Frederick

> -----Original Message-----
> From: U-Boot <u-boot-boun...@lists.denx.de> On Behalf Of Frederik Lotter
> Sent: Monday, December 6, 2021 12:55 AM
> To: u-boot@lists.denx.de
> Subject: [External] - Raspberry Pi Boot 1b / Uboot boot failure with large
> initramfs
> 
> Hi,
> 
> I am facing intermittend boot failures resulting in a data abort. Boot log and
> environment attached below. The uboot is built with rpi_defconfig with
> OF_BOARD to get uboot to pass through the FDT.
> 
> Note:
> 
> (1) If I boot this image directly using the RPI bootloader, the kernel (with
> initramfs embedded) boots fine consistently.
> 
> (2) However, I get inconsistent failures with uboot. My gut tells me memory
> is getting corrupted.
> 
> (3) Sometimes just adding one option to the bootargs breaks the next boot.
> 
> (4) It seems the FDT address changes slightly (see failed vs OK). Not sure if
> this is expected from start.elf (I assume the FDT address is supplied to u-
> boot).
> 
> (5) Is the size of the image overwriting anything in u-boot? I am not that
> familiar with the u-boot memory map.
> 
> I boot using the following environment changes:
> bootargs=bootslot=a console=ttyAMA0,115200 root=/dev/null
> bootcmd=fatload mmc 0:1 ${kernel_addr_r}  kernel.a.img ;  bootz
> ${kernel_addr_r} - ${fdtcontroladdr}

Do you have the same problems when using ${fdt_addr}?

> 
> Any ideas?
> 
> Regards,
> Fred
> 
> BOOT:
> 
> DRAM:  448 MiB
> RPI Model B rev2 (0xe)
> MMC:   mmc@7e202000: 0
> Loading Environment from FAT... OK
> In:    serial
> Out:   vidconsole
> Err:   vidconsole
> Net:   No ethernet found.
> starting USB...
> Bus usb@7e980000: usb dr_mode not found
> USB DWC2
> scanning bus usb@7e980000 for devices... 3 USB Device(s) found
>        scanning usb for storage devices... 0 Storage Device(s) found Hit any 
> key
> to stop autoboot:  0
> 70746744 bytes read in 2940 ms (22.9 MiB/s) Kernel image @ 0x080000 [
> 0x000000 - 0x4378278 ] ## Flattened Device Tree blob at 1bb500e0
>    Booting using the fdt blob at 0x1bb500e0
>    Using Device Tree in place at 1bb500e0, end 1bb59ebe data abort
> pc : [<1bf5c4ec>]          lr : [<1bf5c7c4>]
> reloc pc : [<000094ec>]    lr : [<000097c4>]
> sp : 1bb4fdb8  ip : 0000000c     fp : 00000003
> r10: 00000000  r9 : 1bb56ec0     r8 : 1bb6bad4
> r7 : 00000000  r6 : 00080000     r5 : 1bfc5874  r4 : 00000400
> r3 : 0074616d  r2 : 1bb6bad4     r1 : 00000400  r0 : 1bfc5874
> Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
> Code: e12fff1e e92d4073 e5993000 e5906060 (e5933038) Resetting CPU ...
> 
> resetting ...
> 
> ENV:
> 
> arch=arm
> baudrate=115200
> board=rpi
> board_name=Model B rev2
> board_rev=0xE
> board_rev_scheme=0
> board_revision=0xE
> boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr}
> ${prefix}${script}; source ${scriptaddr} boot_efi_binary=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_efi_bootmgr=if fdt addr
> ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
> boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any
> ${scriptaddr} ${prefix}${boot_syslinux_conf} boot_net_usb_start=usb start
> boot_prefixes=/ /boot/ boot_script_dhcp=boot.scr.uimg
> boot_scripts=boot.scr.uimg boot.scr
> boot_syslinux_conf=extlinux/extlinux.conf
> boot_targets=mmc0 mmc1 usb0 pxe dhcp
> bootargs=bootslot=a console=ttyAMA0,115200 root=/dev/null
> bootcmd=fatload mmc 0:1 ${kernel_addr_r}  kernel.a.img ;  bootz
> ${kernel_addr_r} - ${fdtcontroladdr} bootcmd_dhcp=devtype=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=devnum=0; run
> mmc_boot bootcmd_mmc1=devnum=1; run mmc_boot bootcmd_pxe=run
> boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
> bootcmd_usb0=devnum=0; run usb_boot
> bootdelay=2
> cpu=arm1176
> 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:46:ba:40
> fdt_addr=1bfe9200
> fdt_addr_r=0x02600000
> fdt_high=ffffffff
> fdtcontroladdr=1bb500e0
> fdtfile=bcm2835-rpi-b-rev2.dtb
> initrd_high=ffffffff
> kernel_addr_r=0x00080000
> load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r}
> ${prefix}${efi_fdtfile}
> loadaddr=0x00200000
> mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run
> scan_dev_for_boot_part; fi preboot=usb start
> pxefile_addr_r=0x02500000
> ramdisk_addr_r=0x02700000
> 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; setenv devplist 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;run boot_efi_bootmgr;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}${boot_syslinux_conf}; then echo Found
> ${prefix}${boot_syslinux_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=0x02400000
> serial#=00000000ec46ba40
> soc=bcm283x
> stderr=serial,vidconsole
> stdin=serial,usbkbd
> stdout=serial,vidconsole
> usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run
> scan_dev_for_boot_part; fi
> usbethaddr=b8:27:eb:46:ba:40
> vendor=raspberrypi
> 
> GOOD UBOOT BOOT:
> 
> U-Boot> boot
> 70746744 bytes read in 2942 ms (22.9 MiB/s) Kernel image @ 0x080000 [
> 0x000000 - 0x4378278 ] ## Flattened Device Tree blob at 1bb500c0
>    Booting using the fdt blob at 0x1bb500c0
>    Using Device Tree in place at 1bb500c0, end 1bb59eaa
> 
> Starting kernel ...
> 
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 5.10.82-rpiv6-kernos (root@flotter-pc)
> (armv6-rpi-linux-musleabihf-gcc (crosstool-NG UNKNOWN) 11.2.0, GNU ld
> (crosstool-NG UNKNOWN) 2.37) #2 Mon Dec 6 00:09:19 SAST 2021
> [    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7
> (ARMv7), cr=00c5387d
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing
> instruction cache
> [    0.000000] OF: fdt: Machine model: Raspberry Pi Model B Rev 2
> [    0.000000] random: fast init done
> [    0.000000] Memory policy: Data cache writeback
> [    0.000000] Reserved memory: created CMA memory pool at 0x17800000,
> size
> 64 MiB
> [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id
> shared-dma-pool
> [    0.000000] Zone ranges:
> [    0.000000]   Normal   [mem 0x0000000000000000-0x000000001bffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
> [    0.000000] Initmem setup node 0 [mem
> 0x0000000000000000-0x000000001bffffff]
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 113680
> [    0.000000] Kernel command line: bootslot=a console=ttyAMA0,115200
> root=/dev/null
> [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144
> bytes, linear)
> [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072
> bytes, linear)
> [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> [    0.000000] Memory: 310640K/458752K available (8867K kernel code, 1325K
> rwdata, 2792K rodata, 64024K init, 836K bss, 82576K reserved, 65536K
> cma-reserved)
> [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> [    0.000000] ftrace: allocating 29813 entries in 88 pages
> [    0.000000] ftrace: allocated 88 pages with 3 groups
> [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
> [    0.000000] random: get_random_bytes called from
> start_kernel+0x32c/0x57c with crng_init=1
> [    0.000027] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps
> every 2147483647500ns
> [    0.000104] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff,
> max_idle_ns: 1911260446275 ns
> [    0.000199] bcm2835: system timer (irq = 27)
> [    0.000890] Console: colour dummy device 80x30
> [    0.000997] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
> [    0.060356] pid_max: default: 32768 minimum: 301
> [    0.060665] LSM: Security Framework initializing
> [    0.061003] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes,
> linear)
> [    0.061050] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
> bytes, linear)
> [    0.063391] cgroup: Disabling memory control group subsystem
> [    0.063847] CPU: Testing write buffer coherency: ok
> [    0.066086] Setting up static identity map for 0x8240 - 0x8278
> [    0.067555] devtmpfs: initialized
> [    0.079529] VFP support v0.3: implementor 41 architecture 1 part 20
> variant b rev 5
> [    0.079971] clocksource: jiffies: mask: 0xffffffff max_cycles:
> 0xffffffff, max_idle_ns: 19112604462750000 ns
> [    0.080032] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
> [    0.089374] pinctrl core: initialized pinctrl subsystem
> [    0.091692] NET: Registered protocol family 16
> [    0.095545] DMA: preallocated 256 KiB pool for atomic coherent
> allocations
> [    0.102090] audit: initializing netlink subsys (disabled)
> [    0.103799] thermal_sys: Registered thermal governor 'step_wise'
> [    0.104272] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
> [    0.104322] hw-breakpoint: maximum watchpoint size is 4 bytes.
> [    0.104631] Serial: AMBA PL011 UART driver
> [    0.110828] audit: type=2000 audit(0.100:1): state=initialized
> audit_enabled=0 res=1
> [    0.127927] bcm2835-mbox 2000b880.mailbox: mailbox enabled
> [    0.140861] raspberrypi-firmware soc:firmware: Attached to firmware from
> 2021-12-01T11:48:03, variant start
> [    0.150873] raspberrypi-firmware soc:firmware: Firmware hash is
> be18b6271a0f99f896fc81249da5da6658422558
> [    0.204413] Kprobes globally optimized
> [    0.215320] bcm2835-dma 20007000.dma: DMA legacy API manager,
> dmachans=0x1
> [    0.218694] SCSI subsystem initialized
> [    0.219212] usbcore: registered new interface driver usbfs
> [    0.219352] usbcore: registered new interface driver hub
> [    0.219487] usbcore: registered new device driver usb
> [    0.222073] clocksource: Switched to clocksource timer
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you recognize the sender and know the
> content is safe.

Reply via email to