0
Antony Abi Rached

eMMC device not Detected by armbian on nanoPi duo core

Recommended Posts

22 minutes ago, Igor said:

 

True. Will be fixed during the day. Thanks.

Thanks for your fast reply!

I wait for the new version.

Share this post


Link to post
Share on other sites

board: http://nanopi.io/nanopi-neo-core.html

image: Armbian Bionic mainline based kernel 4.19.38 from https://www.armbian.com/nanopi-neo/

after "nand-sata-install" I can see system copy on emmc (by mount /dev/mmcblk1p1 /mnt)

UUID in eMMC copy of armbianEnv.txt is correct for eMMC

"poweroff"

remove SD-card

power on

no system start. U-boot shell only with "no MMC card" messages

please advice what to check/fix more?

Share this post


Link to post
Share on other sites

thank you for quick respond, Igor

as I understod that patch must be applied to the some src of u-boot program and then image must be rebuilt, isn't it? Actually I didn't try it before.

or can I decompie a current .dtb file for nanopi-neo from /boot/dtb/ folder to the *.dts file, then some modifiations similar to your patch and then comile a .dts file to the new .dtb file. Possible?

Share this post


Link to post
Share on other sites
51 minutes ago, Serge said:

can I decompie a current .dtb file for nanopi-neo from /boot/dtb/ folder

No ! Those DTB are for kernel, not U-Boot ...

You really need to compile a U-Boot with DTS patched !

Share this post


Link to post
Share on other sites

martinayottte, I've install a virtual ubuntu machine acoding https://github.com/armbian/build on my PC

run ./compile.sh

script has loaded a sources for kernel and u-boot.

After revision results I found that patch applied for sun8i-h3-nanopi-r1.dts and ..du2.dts only

sun8i-h3-nanopi-neo.dts (I'm using nanopi neo core so I suppose that file will be used for u-boot/kernel compilation) wasn't changed for mmc.

So I suppose I have to add similar rows about &emac and &mmc2 into sun8i-h3-nanopi-neo.dts

Then compile.sh again and what then?

copy a binary u-boot to to the SD-card of NanoPi Neo Core board, "nand-sata-install". Right?

Please confirm.

 

 

Share this post


Link to post
Share on other sites
28 minutes ago, Serge said:

So I suppose I have to add similar rows about &emac and &mmc2 into sun8i-h3-nanopi-neo.dts

Right ! But &emac is not need, only &mmc2 ...

Compile using "ub-ooot + kernel only", no need for a complete image !

The resulting u-boot is cache/sources/u-boot/v2019.04/u-boot-sunxi-with-spl.bin, copy that on your nanopi, and from there :

dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk2 bs=1024 seek=8

Then reboot without SD !

Share this post


Link to post
Share on other sites

martinayotte, something wrong I'm doing...

attached .dts file - I've added a &mmc2 section only

attached .dtb file - result after compilation

all that files from ./cache/sources/u-boot/v2019.04/arch/arm/dts folder

 

in virtual machine start script ./compile.sh again

"U-boot and kernel package" selected

"Do not change kernel configuration" selected

"nanopineo" selected

"next Mainline" seleted

.... what is strange the script is cheking the git for orangepi board... anyhow let's wait....

..continue for a long time....

... finish

.deb files have been prepared in ./output/debs

a new "u-boot-sunxi-with-spl.bin" copied from Virtual machine to the /tmp folder of NanoPi

in NanoPI shell runs "dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8"

(also I've run "dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1p1 bs=1024 seek=8" because system copied to /dev/mmcblk1p1)

SD-card removed

result?.... - no result. still u-boot shell available.... (((

Questions:

may be some files must be renamed?

may be .deb files must be copied also?

what else could be wrong?

 

Thank you in advance

 

sun8i-h3-nanopi-neo.dtb sun8i-h3-nanopi-neo.dts

Share this post


Link to post
Share on other sites
59 minutes ago, Serge said:

all that files from ./cache/sources/u-boot/v2019.04/arch/arm/dts folder

If you edit DTS directly in this folder, each time you start a new build, your changes are reverted ...

After having edited the file, your need to go into the ./cache/sources/u-boot/v2019.04 folder, do a "git diff arch/arm/dts/sun8i-h3-nanopi-neo.dts > ~/git-work/igorpecovnik-armbian/build/patch/kernel/sunxi-dev/my-neo-emmc.patch" and then you can start the build !

Also, looking at your DTS attachment, you've added the network &emac, which is useless, but didn't added &mmc2, which is what you are looking for ...

 

Share this post


Link to post
Share on other sites

added &mmc2 section into ****nanopi-neo.dts

from folder /usr/src/build/cache/sources/u-boot/v2019.04 run

"git diff arch/arm/dts/sun8i-h3-nanopi-neo.dts > /usr/src/build/patch/kernel/sunxi-dev/my-neo-emmc.patch"

from /usr/src/buid run ./compile.sh

...

"dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8"

reboot without SD - fault

 

BTW. ***nanopi-neo.dts hasn't &mmc2 section again. Looks like patch wasn't applied. 

 

I've copied .diff file to the same folder as Igor's destination: ./patch/u-boot/u-boot-sunxi

from /usr/src/buid run ./compile.sh

...

"dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8"

and 

"dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1p1 bs=1024 seek=8" (I'm not sure but I did it)

 

reboot without SD - SUCCESS!!!

 

Thank you martinayotte&Igor for your support

 

P.S.

last (I hope) doubt....

"dd if=/tmp/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8"

this command will copy a .bin file into the root folder on eMMC... how it will be read by system during the load?

no .bin files in SD-card's nor "/boot" folder nor "/ "folder

current configuration: ls /dev | grep mmcblk

mmcblk0

mmcblk0p1

mmcblk1

mmcblk1boot0

mmcblk1boot1

mmcblk1p1

 

Share this post


Link to post
Share on other sites
18 hours ago, Serge said:

this command will copy a .bin file into the root folder on eMMC... how it will be read by system during the load?

no .bin files in SD-card's nor "/boot" folder nor "/ "folder

No, it doesn't copy the .bin file on rootfs, but into special sector of the eMMC, the sector #16, since sectors are 512 bytes, and "bs=1024 seek=8" is equivalent of "bs=512 seek=16". It is where U-Boot is located on all AllWinner SoC.

Share this post


Link to post
Share on other sites
56 minutes ago, Serge said:

please check attahed files


Thank you!

But you can also check the procedure of submitting a patch directly to the build script. It's should be simple. Try.

Share this post


Link to post
Share on other sites

let me some time for cooling down. there are many steps have been taken for the first time and need to be realized

"directly to the build sript" - with "config-default.conf"or ./lib/compilation.sh? ...OFFTOPIC: now brain braking with HW connection between Core and SFP..

Share this post


Link to post
Share on other sites
1 hour ago, Serge said:

directly to the build sript


Everything can be done at Github. Fork the project that you can edit it. Than add this patch with appropriate name to patch/u-boot/u-boot-sunxi and create a Pull request ... which gets merged when approved.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0