Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2018 21:26:23 +0200
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        freebsd-arm@freebsd.org, "Peter Jeremy" <peter@rulingia.com>
Subject:   Re: Problems with u-boot-rpi on RPi Model B
Message-ID:  <op.zjqn99m8kndu52@klop.ws>
In-Reply-To: <20180525112445.GB3354@server.rulingia.com>
References:  <20180525112445.GB3354@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 May 2018 13:24:45 +0200, Peter Jeremy <peter@rulingia.com>  
wrote:

> Earlier this year, I switched to using the rpi-firmware and u-boot-rpi
> packages and am having a couple of issues.
>
> 1) u-boot-rpi-2017.09.00_1 won't autoboot.  printenv reports that both
> bootdelay and bootcmd are correct but it boots to a U-Boot prompt.   
> Adding
> a print statement to boot.scr shows that it's not read until I enter  
> "boot"
> at the prompt.
>
> 2) u-boot-rpi-2018.03 won't run at all.  The screen stays blank and the
> green SD-card activity flashes every second or two.  I've tried this with
> both rpi-firmware-1.20180328 and an older version.  Switching to the  
> older
> u-boot-rpi on the same SD-cards works.
>
> Can anyone offer any suggestions on how to get autoboot to work with  
> u-boot?
>

I don't remember the version. I think it was the 2018.03 version on a  
RPI-2. It hang during boot if I had an USB-stick in it. It tried to boot  
 from USB instead of SD.
I changed the uboot variables to not do a 'usb start', which restored the  
old behaviour. I think a new feature is that it is now possible to boot  
 from USB but I'm not sure.

This is the content of my uboot.env on the SD-card (lines are  
0-terminated).
[root@rpi2 /boot/msdos]# cat uboot.env | xargs -0 -n 1 echo
=api_address=3af56a58
arch=arm
baudrate=115200
board=rpi
board_name=2 Model B
board_rev=0x4
board_rev_scheme=1
board_revision=0xA01041
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr}  
${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr  
${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype}  
${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt  
addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else  
bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any  
${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr}  
${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile  
${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv  
efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci  
${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci  
PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp  
${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt  
addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else  
bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci  
${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv  
efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
cpu=armv7
dhcpuboot=usb start; dhcp u-boot.uimg; bootm
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target};  
done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=b8:27:eb:77:37:63
fdt_addr_r=0x00000100
fdt_high=ffffffff
fdtcontroladdr=3b3aeb50
fdtfile=bcm2836-rpi-2-b.dtb
initrd_high=ffffffff
kernel_addr_r=0x01000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r}  
${prefix}${efi_fdtfile}
loadaddr=0x00200000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run  
scan_dev_for_boot_part; fi
pxefile_addr_r=0x00100000
ramdisk_addr_r=0x02100000
scan_dev_for_boot=echo Scanning ${devtype}  
${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run  
scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist;  
env exists devplist || setenv devplist 1; for distro_bootpart in  
${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart}  
bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a  
-n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi;  
for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype}  
${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run  
load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart}  
efi/boot/bootarm.efi; then echo Found EFI removable media binary  
efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED:  
continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart}  
${prefix}extlinux/extlinux.conf; then echo Found  
${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED:  
continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e  
${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo  
Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT  
FAILED: continuing...; fi; done
scriptaddr=0x02000000
serial#=00000000ed773763
soc=bcm283x
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run  
scan_dev_for_boot_part; fi
usbethaddr=b8:27:eb:77:37:63
vendor=raspberrypi


Regards,
Ronald.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.zjqn99m8kndu52>