[U-Boot] RPi3 Not autobooting from SD-card. {Scanned}

Göran Lundberg goran at lundberg.email
Tue Mar 6 13:55:40 UTC 2018


Can anyone share their working u-boot configuration for RPi3? With a 
working graphics mode and device tree overlay. config.txt boot.scr and 
any other config files you might have.
I'm running a normal Raspbian Stretch lite image with stock 32bit kernel.
I compiled u-boot with |rpi_3_32b_defconfig|

/Göran Lundberg

On 2018-03-06 14:42, Göran Lundberg wrote:
>
> I got it autobooting by adding enable_uart=1 to /boot/config.txt
>
> But it seems like a bug that could be fixed, since it was booting, but
> only manually.
> Anyone got an idea what might cause this?
>
> But the graphics mode is all wrong. The four raspberrys are purple and
> the resolution is extremely low.
> In u-boot, the graphics is ok in high resolution, but when booting the
> kernel it all changes.
> I'm guessing it's got something to do with the device tree not loading
> properly.
>
> I finally got a serial console working. Here's the output:
>
> U-Boot 2018.03-rc3-00090-g3990c9d627 (Mar 01 2018 - 15:51:26 +0100)
>
> DRAM:  998 MiB
> RPI 3 Model B (0xa02082)
> MMC:   mmc at 7e202000: 0, sdhci at 7e300000: 1
> Loading Environment from FAT... *** Warning - bad CRC, using default 
> environment
>
> Failed (-5)
> In:    serial
> Out:   vidconsole
> Err:   vidconsole
> Net:   No ethernet found.
> starting USB...
> USB0:   Core Release: 2.80a
> scanning bus 0 for devices... 4 USB Device(s) found
>        scanning usb for storage devices... 0 Storage Device(s) found
> 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
> 915 bytes read in 4 ms (222.7 KiB/s)
> ## Executing script at 02000000
> switch to partitions #0, OK
> mmc0 is current device
> 4579632 bytes read in 198 ms (22.1 MiB/s)
> 17794 bytes read in 3 ms (5.7 MiB/s)
> Kernel image @ 0x1000000 [ 0x000000 - 0x45e130 ]
> ## Flattened Device Tree blob at 2effb600
>    Booting using the fdt blob at 0x2effb600
>    reserving fdt memory region: addr=0 size=1000
>    Using Device Tree in place at 2effb600, end 2f002b81
>
> Starting kernel ...
>
> Any idea what is wrong here:
>
>   Loading Environment from FAT... *** Warning - bad CRC, using default 
> environment
>
> I don't have an env file on the SD-card. So how can it give a CRC error?
> I tried to use saveenv at the u-boot prompt but i got an infinite
> repeating error.
>   fsm 1, hsts 00000001
>
> And this line:
>
>   reserving fdt memory region: addr=0 size=1000
>
> Why is addr=0? And size=1000 seems low?
> But on the next line the size seems right.
>
> Here's my boot.scr:
>
> setenv fdtfile bcm2710-rpi-3-b.dtb
> mmc dev 0
> fatload mmc 0:1 ${kernel_addr_r} kernel7.img
> fatload mmc 0:1 ${fdt_addr} ${fdtfile}
> setenv bootargs earlyprintk console=tty0 root=/dev/mmcblk0p2
> rootfstype=ext4 noinitrd rootwait dwc_otg.lpm_enable=0 elevator=deadline
> bootz ${kernel_addr_r} - ${fdt_addr}
>
> Any help appreciated!
>
> On 2018-03-02 20:55, Peter Robinson wrote:
>> On Fri, Mar 2, 2018 at 10:47 AM, Göran Lundberg 
>> <goran at lundberg.email> wrote:
>>> Hi!
>>> I'm trying to boot from u-boot on a Raspberry Pi 3. But for some 
>>> reason it
>>> isn't autobooting on the SD-card.
>>>
>>> Is it possible to get more debug output on the screen console? I 
>>> don't have
>>> a serial console at the moment.
>>> The output on the screen is:
>>>
>>> Net:   No ehternet found.
>>> starting USB...
>>> USB:    Core Release 2.80a
>>> scanning bus 0 for devices... 4 USB Devices found
>>>         scanning usb for storage devices... 0 Storage Device(s) found
>>> Hit any key to stop autoboot:   0
>>> U-Boot>
>>>
>>> Shouldn't it mention mmc somewhere in the boot message?
>>>
>>> The first command I type on the prompt is always failing, it's not
>>> outputting anything. Just a new prompt on the next line. The next 
>>> commands i
>>> type in are working. Which seems strange.
>>> I got boot.scr set up right, except graphic settings which are 
>>> wrong. It is
>>> booting the kernel when I type 'run bootcmd'. But only after I type in
>>> another command before it.
>>> It seems like it's not detecting the SD-card (mmc0) until I have typed
>>> anything into the prompt.
>>>
>>> Do I have to set any other env variable for it to autoboot? I would 
>>> have
>>> printed the output of printenv here, but since I don't have a serial
>>> console, retyping everything is very time consuming.
>>> printenv seems to have the right settings. It's basically a full 
>>> console
>>> screen of variables. It just doesn't seem to load them until I type in
>>> another command before it.
>>>
>>> boot_targets=mmc0 usb0 pxe dhcp
>>> Which seems right to me.
>>>
>>> I compiled the latest u-boot from github.
>>>
>>> If you need more info please let me know and I'll post it.
>>>
>>> Hope that anyone can point me in the right direction here. Would really
>>> appreciate it.
>> I'm seeing the same issues with 2018.03 rc3.
>>
>> I'm not sure what the issue is and I've not had time to investigate it
>> further yet, but if you type "boot" and hit enter it should boot,
>> sometimes you actually have to type it twice. It will boot but I'm not
>> sure which bits here have causes this regression.
>>
>> Peter
>>
>
>
> On 2018-03-02 20:55, Peter Robinson wrote:
>> On Fri, Mar 2, 2018 at 10:47 AM, Göran Lundberg 
>> <goran at lundberg.email> wrote:
>>> Hi!
>>> I'm trying to boot from u-boot on a Raspberry Pi 3. But for some 
>>> reason it
>>> isn't autobooting on the SD-card.
>>>
>>> Is it possible to get more debug output on the screen console? I 
>>> don't have
>>> a serial console at the moment.
>>> The output on the screen is:
>>>
>>> Net:   No ehternet found.
>>> starting USB...
>>> USB:    Core Release 2.80a
>>> scanning bus 0 for devices... 4 USB Devices found
>>>         scanning usb for storage devices... 0 Storage Device(s) found
>>> Hit any key to stop autoboot:   0
>>> U-Boot>
>>>
>>> Shouldn't it mention mmc somewhere in the boot message?
>>>
>>> The first command I type on the prompt is always failing, it's not
>>> outputting anything. Just a new prompt on the next line. The next 
>>> commands i
>>> type in are working. Which seems strange.
>>> I got boot.scr set up right, except graphic settings which are 
>>> wrong. It is
>>> booting the kernel when I type 'run bootcmd'. But only after I type in
>>> another command before it.
>>> It seems like it's not detecting the SD-card (mmc0) until I have typed
>>> anything into the prompt.
>>>
>>> Do I have to set any other env variable for it to autoboot? I would 
>>> have
>>> printed the output of printenv here, but since I don't have a serial
>>> console, retyping everything is very time consuming.
>>> printenv seems to have the right settings. It's basically a full 
>>> console
>>> screen of variables. It just doesn't seem to load them until I type in
>>> another command before it.
>>>
>>> boot_targets=mmc0 usb0 pxe dhcp
>>> Which seems right to me.
>>>
>>> I compiled the latest u-boot from github.
>>>
>>> If you need more info please let me know and I'll post it.
>>>
>>> Hope that anyone can point me in the right direction here. Would really
>>> appreciate it.
>> I'm seeing the same issues with 2018.03 rc3.
>>
>> I'm not sure what the issue is and I've not had time to investigate it
>> further yet, but if you type "boot" and hit enter it should boot,
>> sometimes you actually have to type it twice. It will boot but I'm not
>> sure which bits here have causes this regression.
>>
>> Peter
>>
>
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the U-Boot mailing list