eMMC boot falure

Moderators: mdrjr, odroid

eMMC boot falure

Unread postby elatllat » Fri Jul 13, 2018 11:03 am

So I tried booting the orange eMMC from the N1 on the XU4 (rev 0.1) but it had no UART output.
No blue on the XU4
One quick blue flash from the USB-UART Module.
I copied the official 18.04 minimal image off the eMMC and onto a uSDCard, flipped the switch and it booted normaly.
Tried a few more times to no avail.
Ever seen that before @odroid ?
elatllat
 
Posts: 1074
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: eMMC boot falure

Unread postby odroid » Fri Jul 13, 2018 12:27 pm

N1 bundle Orange eMMC module might not have a proper boot-loader for Exynos-5422 in the hidden boot block.
Note that N1 SoC doesn't use the hidden boot block while Exynos uses it.

Try this method to write the boot-loader into your Orange eMMC hidden block.
viewtopic.php?f=53&t=6173
User avatar
odroid
Site Admin
 
Posts: 28849
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: eMMC boot falure

Unread postby elatllat » Sat Jul 14, 2018 1:54 am

Thanks I did not know the XU4 used the hidden partition.

Is /root/boot0.img the same as u-boot.bin in the android img?,
or is there some way to mount system_aa?
Code: Select all
simg2img img_1/system_a* system_aa.img
Failed to read sparse file
,
or can you share that file seperatly?
Last edited by elatllat on Sat Jul 14, 2018 11:23 pm, edited 1 time in total.
elatllat
 
Posts: 1074
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: eMMC boot falure

Unread postby odroid » Sat Jul 14, 2018 10:47 am

Try to find a u-boot package in our Bionic repo.
User avatar
odroid
Site Admin
 
Posts: 28849
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: eMMC boot falure

Unread postby elatllat » Sat Jul 14, 2018 11:22 pm

Code: Select all
> apt show uboot 2>/dev/null | grep "APT-Sources"
APT-Sources: http://deb.odroid.in/5422-s bionic/main armhf Packages

> dpkg-query -L uboot | grep -P 'boot[^/]*\.[^/]*$'
/usr/share/5422_uboot/u-boot.bin.hardkernel


So

Code: Select all
cat /usr/share/5422_uboot/u-boot.bin.hardkernel > /dev/mmcblk0boot0


might work?
elatllat
 
Posts: 1074
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: eMMC boot falure

Unread postby rooted » Sat Jul 14, 2018 11:43 pm

You can only write to the hidden sector of the eMMC while it's attached to the device, you can't do it from a PC.

I learned this the hard way ;)
User avatar
rooted
 
Posts: 5676
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: eMMC boot falure

Unread postby elatllat » Sun Jul 15, 2018 1:07 am

Thanks, rooted I gatherd that from the thread odroid linked to, which is fine as I am doing it all on the XU4.
I'm just trying variffy which file I should be using to avoid testing which requires down time.
(This should really be documented on the odroid eMMC wiki page)

Aside; Is the reason it only works on the XU4 the USB adapter or some out of tree patch?
elatllat
 
Posts: 1074
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: eMMC boot falure

Unread postby rooted » Sun Jul 15, 2018 1:37 am

I think it's something Samsung security related perhaps. I never really looked into it, I was trying to use a C2 eMMC in an XU4 last year and kept flashing uboot and bl1 or bl2 or all from my PC but it simply wouldn't work.

It was so aggravating. I was going to come up with a minimal sd image to deal with this but lost interest.

I think a very minimal image and also instructions on doing so from a running system should be added to the wiki.
User avatar
rooted
 
Posts: 5676
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: eMMC boot falure

Unread postby odroid » Mon Jul 16, 2018 9:57 am

The hidden partition could not be accessed by USB mass storage protocol.
Before writing a binary file into the hidden boot block on XU4, you need to unlock it first something like this.
Code: Select all
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=u-boot-dtb.bin of=/dev/mmcblk0boot0 seek=62


Or, simply run the recovery process with a spare SD card.
User avatar
odroid
Site Admin
 
Posts: 28849
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: eMMC boot falure

Unread postby elatllat » Tue Jul 17, 2018 3:12 am

@odroid
Thanks verifying my speculation on the USB protocol/adapter limitation.

The unlock part is clear enough from your other post, it's the u-boot file that I am unclear on.
Am I correct in assuming the file names
    u-boot-dtb.bin
    u-boot.bin.hardkernel
    boot0.img
    u-boot.bin
are effectively the same u-boot file with inconsistent naming?

Your other post did not mention "seek=62" so maybe some of the named uboot files contain zero padding while some do not?
any particular reason for the zero padding?

Thanks for helping explain the "simple for the computer" method vs the existing "simple for the user" method.
elatllat
 
Posts: 1074
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: eMMC boot falure

Unread postby odroid » Tue Jul 17, 2018 9:19 am

You could find BL1/BL2/TrustZone binaries in the u-boot package.
https://wiki.odroid.com/odroid-xu4/soft ... u4-v201705

This script will give you more understandable sector maps hopefully.
https://github.com/hardkernel/u-boot/bl ... _fusing.sh
User avatar
odroid
Site Admin
 
Posts: 28849
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Issues

Who is online

Users browsing this forum: No registered users and 3 guests