Reputation: 466
I'm booting kernel on my board with u-boot ramdisk image which is 39.8 MB. It boots successfully. When I try another u-boot image which has 74.7 MB size, load adress of ramdisk changing and its giving
'Loading Ramdisk to ff8c0000, end 03fffd63... Bad Trap at PC:7fef8cb0'
and board hangs with ' ###ERROR ### Please RESET the board ###'
Commands I use for booting with tftp:
tftp 30000000 uImage.bin
tftp 32000000 DTB.dtb
tftp 40000000 rootfs.ext2.gz.u-boot
bootm 30000000 40000000 32000000
I also tried different tftp adresses. Scenario remains same.
How can I solve this situation?
Edit: Full Console log:
=> bootm 30000000 40000000 32000000 WARNING: adjusting available memory to 30000000
Booting kernel from Legacy Image at 30000000 ...
Image Name: Linux-4.19.26+gc0c2141
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 7140198 Bytes = 6.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading init Ramdisk from Legacy Image at 40000000 ...
Image Name: core-image-x11-t1042d4rdb-64b-20
Image Type: PowerPC Linux RAMDisk Image (uncompressed)
Data Size: 74710371 Bytes = 71.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Flattened Device Tree blob at 32000000
Booting using the fdt blob at 0x32000000
Uncompressing Kernel Image ... OK
Loading Ramdisk to ff8c0000, end 03fffd63 ... Bad trap at PC: 7fef8cb0, SR: 0
NIP: 7FEF8CB0 XER: 20000000 LR: 7FF16C60 REGS: 7faedae0 TRAP: 0d00 DAR: FFFFEFFC
MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 00000003 7FAEDBD0 7FAEDE98 FF8C0000 4073F038 0473FD60 FFFFF000 5E2AE23B GPR08: DE633873 00000020 00000001 7FAEDBE0 7FFCB808 08200800 7FAF52E8 00000000 GPR16: 00000000 00000000 306CF3A6 30000000 00000001 30000040 00000000 7FF957A8 GPR24: 7FAF533C 7FFCB6FC 7FFCB718 40000040 04000000 7FFCB6F8 7FF78540 0473FD63 Call backtrace: 7FFCB6F8 7FF176CC 7FF0D9D4 7FEFA26C 7FF1B088 7FF0BC44 7FF0BE08 7FF0C3B8 7FF1A664 7FF09CDC 7FF0CCC4 7FF4FF3C 7FF0D1D0 7FEF1040 Exception in kernel pc 7fef8cb0 signal 0
ERROR ### Please RESET the board ###
Upvotes: 0
Views: 1277
Reputation: 466
What I understood so far is, the adress in
'Bad trap at PC: 7fef8cb0'
7fef8cb0 nearly equals 1,998995945 GB and start adress of Ramdisk seems ff8c0000 which nearly equals 3,992919922 GB.
Why U-boot is arranged so many memory for a ~70 MB ramdisk image ?
Upvotes: 0
Reputation: 2483
You are loading the kernel image at 0x30000000. Afterwards you are loading the device tree at 0x30000000.
0x32000000 - 0x30000000 = 0x2000000 = 33554432
So when loading the device tree you are overwriting the kernel image.
If the area between 0x3f000000 and 0x40000000 is not used otherwise, choosing 0x3f000000 for the device tree should solve your problem.
Upvotes: 0