All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target
@ 2017-04-14 11:46 Heinrich Schuchardt
  2017-04-14 13:42 ` Andreas Färber
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2017-04-14 11:46 UTC (permalink / raw)
  To: u-boot

To enable booting from MMC the MMC devices 0 and 1 are added to the
BOOT_TARGET_DEVICES.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@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) \
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target
  2017-04-14 11:46 [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target Heinrich Schuchardt
@ 2017-04-14 13:42 ` Andreas Färber
  2017-04-14 13:50   ` Heinrich Schuchardt
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2017-04-14 13:42 UTC (permalink / raw)
  To: u-boot

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

> BOOT_TARGET_DEVICES.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@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?

Thanks,
Andreas

>  	func(DHCP, dhcp, na)
>  
>  #include <config_distro_bootcmd.h>
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target
  2017-04-14 13:42 ` Andreas Färber
@ 2017-04-14 13:50   ` Heinrich Schuchardt
  2017-04-14 13:55     ` Andreas Färber
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2017-04-14 13:50 UTC (permalink / raw)
  To: u-boot

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
> 
>> BOOT_TARGET_DEVICES.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@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.

Best Regards

Heinrich Schuchardt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target
  2017-04-14 13:50   ` Heinrich Schuchardt
@ 2017-04-14 13:55     ` Andreas Färber
  2017-04-14 14:17       ` Heinrich Schuchardt
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2017-04-14 13:55 UTC (permalink / raw)
  To: u-boot

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@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. :)

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target
  2017-04-14 13:55     ` Andreas Färber
@ 2017-04-14 14:17       ` Heinrich Schuchardt
  0 siblings, 0 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2017-04-14 14:17 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-14 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 11:46 [U-Boot] [PATCH 1/1] odroid-c2: enable MMC as boot target Heinrich Schuchardt
2017-04-14 13:42 ` Andreas Färber
2017-04-14 13:50   ` Heinrich Schuchardt
2017-04-14 13:55     ` Andreas Färber
2017-04-14 14:17       ` Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.