[U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Apr 14 14:17:11 UTC 2017


On 04/14/2017 03:55 PM, Andreas Färber wrote:
> Am 14.04.2017 um 15:50 schrieb Heinrich Schuchardt:
>> On 04/14/2017 03:42 PM, Andreas Färber wrote:
>>> Am 14.04.2017 um 13:46 schrieb Heinrich Schuchardt:
>>>> To enable booting from MMC the MMC devices 0 and 1 are added to the
>>>
>>> from eMMC
> 
> Sorry, was getting confused with the multiple submissions here.
> 
> SD and eMMC, or just MMC as you had it.
> 
> And "automatic booting" would be more accurate, as one could manually boot.
> 
>>>
>>>> BOOT_TARGET_DEVICES.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>>> ---
>>>> This is a resubmission of
>>>> https://lists.denx.de/pipermail/u-boot/2017-April/287315.html
>>>> where this patch was part of patch series which was no longer applicable.
>>>> ---
>>>>  include/configs/meson-gxbb-common.h | 2 ++
>>>>  1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/include/configs/meson-gxbb-common.h b/include/configs/meson-gxbb-common.h
>>>> index cc2b5b6..388f239 100644
>>>> --- a/include/configs/meson-gxbb-common.h
>>>> +++ b/include/configs/meson-gxbb-common.h
>>>> @@ -39,6 +39,8 @@
>>>>  #include <config_distro_defaults.h>
>>>>  
>>>>  #define BOOT_TARGET_DEVICES(func) \
>>>> +	func(MMC, mmc, 0) \
>>>> +	func(MMC, mmc, 1) \
>>>
>>> What if booting on SD fails and eMMC is absent? Will that still iterate
>>> on to DHCP?
>>
>> Yes, the targets are tried in sequence.
>> So if neither SD nor eMMC are available DHCP is tried.
>> You will find the same for a lot of other boards (e.g. wandboard.h).
>>
>> For details refer to chapter "Boot Target Configuration" in
>> doc/README.distro.
> 
> I am familiar with other boards, but in my previous testing of older
> patches it hang when accessing an absent MMC device. So the question is
> about whether the S905 driver handles it okay.
> 
> BTW had the commit message indicated it I wouldn't ask. :)

I will send an updated patch.

Please, find appended a console log. I removed the dtb file from the SD
card.

- The kernel is loaded from SD card but loading the dtb file fails.
- Next eMMC is tried but not available.
- Last resort is DHCP. DHCP setup is successful but TFTP is not
  available.

Best regards

Heinrich

--- UART initialized after reboot ---
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3046-00db630-dirty 2016-08-31 09:24:14
tao.zeng at droid04]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef be ad de d f0 Load bl33 from SD, src: 0x00034200, des:
0x01000000, size: 0x000573f0
ad ba ef be ad de not ES chip
[0.381670 Inits done]
secure task start!
high task start!
low task start!
NOTICE:  BL3-1: v1.0(debug):4d2e34d
NOTICE:  BL3-1: Built : 17:08:35, Oct 29 2015
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2017.05-rc1-R001-00005-geb33781 (Apr 12 2017 - 19:37:43 +0200)
odroid-c2

DRAM:  2 GiB
MMC:   mmc at 72000: 0, mmc at 74000: 1
Using default environment

In:    serial at 4c0
Out:   serial at 4c0
Err:   serial at 4c0
Net:   eth0: ethernet at c9410000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
642 bytes read in 4 ms (156.3 KiB/s)
## Executing script at 1f000000
12921356 bytes read in 584 ms (21.1 MiB/s)
10308160 bytes read in 467 ms (21.1 MiB/s)
** File not found
dtbs/4.10.0-rc5-next-20170125-r000-arm64/meson-gxbb-odroidc2.dtb **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   kernel 4.10.0-rc5-next-20170125-
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    10308096 Bytes = 9.8 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   ramdisk 4.10.0-rc5-next-20170125
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    12921292 Bytes = 12.3 MiB
   Load Address: 13000000
   Entry Point:  13000000
   Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
Card did not respond to voltage select!
mmc_init: -95, time 9
MMC Device 1 not found
no mmc device at slot 1
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.1.53 (1005 ms)
Using ethernet at c9410000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.53
Filename 'boot.scr.uimg'.
Load address: 0x1f000000
Loading: T T T



More information about the U-Boot mailing list