Hello, I'm booting kernel on t1042d4rdb-64b 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 ###'
How can I solve this situation?
解決済! 解決策の投稿を見る。
Increasing BLK_DEV_RAM_SIZE to 435752 (74.2 MB in kilobyte format) and higher number in kernel config has solved the problem. Thanks.
Hello Yusuf Altıparmak,
How did you generate 74.7 MB u-boot ramdisk image?
Would you please also attach the console log of your target board?
Thanks,
Yiping
Hello yipingwang
I generate 74.7 MB Image with this https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/tree/readme?h=yocto_2.7.
Kernel version 4.19 and Yocto version 2.7. When I try fsl-image-networking, which is 39.8 MB, it boots successfully. When I boot core-image-x11, which is 74.7 MB, it hangs with the log below. I am trying to prepare an desktop system so I decided to build and X11 image to use with GPU. The driver I used for GPU is inside kernel and working (~117 MB).
=> 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 ###
The commands I used for Ramdisk are;
tftp 30000000 uImage.bin
tftp 32000000 t1042d4rdb--4.19-r0-t1042d4rdb-64b-20200106043637.dtb
tftp 40000000 rootfs.ext2.gz.u-boot
bootm 30000000 40000000 32000000
I also tried with many other adresses but the result is same.
Hello Yusuf Altıparmak,
Please try core-image-x11 image which I built from Yocto 3.0 release https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/tree/readme?h=zeus.
Please download the rootfs image from the following link.
https://drive.google.com/open?id=1Org0x2vTj0qpaENGVNcnDRjDaTl3Uwg1
Thanks,
Yiping
Hello yipingwang,
Thank you for the answer. I'll try Yocto 3.0 with warrior.
Is there any way to play with some config values about this situation ? fsl-image-networking-full is almost ~450 MB. What is the way of work with kernels with bigger size ?
"Loading Ramdisk to ff8c0000, end 03fffd63 ... Bad trap at PC: 7fef8cb0, SR: 0".
Start adress ff8c0000 is changing when I try to load 39.8 MB kernel. What is the logic behind it ?
Filename in the following link is "core-image-x11-t2080rdb.ext2.gz.u-boot". I am working with t1042d4rdb-64b. Will it work with this board ?
"Please download the rootfs image from the following link.
https://drive.google.com/open?id=1Org0x2vTj0qpaENGVNcnDRjDaTl3Uwg1"
Thanks.
Hello Yusuf Altıparmak,
I also can reproduce your issue.
Please add u-boot environment variable "initrd_high=0xffffffff"
=> setenv initrd_high 0xffffffff
Thanks,
Yiping
Hello yipingwang,
I did like you said. It worked at first step. System is not halting with bad trap error now. But there exists another error which blocks system working again.
Full error console log is here:
RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (17195 != 32768)
write error
EXT4-fs (ram0): bad geometry: block count 435752 exceeds size of device (131072 blocks)
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 536K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
attempt to access beyond end of device
ram0: rw=0, want=450632, limit=262144
Buffer I/O error on dev ram0, logical block 225315, async page read
attempt to access beyond end of device
ram0: rw=0, want=454376, limit=262144
Buffer I/O error on dev ram0, logical block 227187, async page read
attempt to access beyond end of device
ram0: rw=0, want=458082, limit=262144
Buffer I/O error on dev ram0, logical block 229040, async page read
attempt to access beyond end of device
ram0: rw=0, want=458084, limit=262144
Buffer I/O error on dev ram0, logical block 229041, async page read
Run /etc/init as init process
attempt to access beyond end of device
ram0: rw=0, want=456378, limit=262144
Buffer I/O error on dev ram0, logical block 228188, async page read
attempt to access beyond end of device
ram0: rw=0, want=457688, limit=262144
Buffer I/O error on dev ram0, logical block 228843, async page read
attempt to access beyond end of device
ram0: rw=0, want=458086, limit=262144
Buffer I/O error on dev ram0, logical block 229042, async page read
Run /bin/init as init process
attempt to access beyond end of device
ram0: rw=0, want=457942, limit=262144
Buffer I/O error on dev ram0, logical block 228970, async page read
Run /bin/sh as init process
attempt to access beyond end of device
ram0: rw=0, want=457942, limit=262144
Buffer I/O error on dev ram0, logical block 228970, async page read
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin.
CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.19.26+gc0c2141 #1
Call Trace:
[c0000001f3107c70] [c000000000a69bf4] .dump_stack+0xa8/0xec (unreliable)
[c0000001f3107d00] [c00000000004b580] .panic+0x12c/0x2e8
[c0000001f3107db0] [c000000000002464] .kernel_init+0x10c/0x128
[c0000001f3107e30] [c0000000000009f4] .ret_from_kernel_thread+0x58/0x64
Rebooting in 180 seconds..
printenv output:
baudrate=115200
bdev=sda3
bootargs=root=/dev/ram rw console=ttyS0,115200
bootcmd=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;bootm e8020000 e9300000 e8800000
bootdelay=3
bootfile=uImage
c=ffe
consoledev=ttyS0
eth1addr=00:04:9F:05:B7:B1
eth2addr=00:04:9F:05:B7:B2
eth3addr=00:04:9F:05:B7:B3
eth4addr=00:04:9F:05:B7:B4
eth5addr=00:04:9f:8e:7b:b4
ethact=FM1@DTSEC1
ethaddr=00:04:9F:05:B7:B0
ethprime=e1000#0
fdtaddr=2000000
fdtfile=uImage-t1042d4rdb.dtb
fileaddr=2000000
filesize=9a83
fman_ucode=eff00000
gatewayip=192.168.10.4
hvboot=setenv bootargs console=$consoledev,$baudrate config-addr=0xfe8900000;bootm 0xfe8700000 - 0xfe8800000
hwconfig=fsl_ddr:bank_intlv=cs0_cs1
initrd_high=0xffffffff
ipaddr=192.168.10.99
loadaddr=1000000
netdev=eth0
netmask=255.255.255.0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostnar
nohvboot=tftp 1000000 $dir/$bootfile;tftp 5000000 $dir/$ramdiskfile;tftp 2000000 $dir/$fdtfile;setenv bootargs root=/;
othbootargs=ramdisk_size=1000000
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tfr
ramdisk_size=41943040
ramdiskaddr=5000000
ramdiskfile=fsl-image-core-t1042d4rdb.ext2.gz.u-boot
rootpath=/opt/nfsroot
serverip=192.168.10.50
tftpflash=tftpboot $loadaddr $uboot && protect off $ubootaddr +$filesize && erase $ubootaddr +$filesize && cp.b $loade
uboot=u-boot.bin
ubootaddr=0xeff40000
Environment size: 1871/8188 bytes
and the commands I used:
tftp 10000000 uImage--4.19-r0-t1042d4rdb-64b-20200106043637.bin
tftp 1f000000 t1042d4rdb--4.19-r0-t1042d4rdb-64b-20200106043637.dtb
tftp 20000000 asd2.rootfs.ext2.gz.u-boot
bootm 10000000 20000000 1f000000
I didn't get what is the reason of this. Can you help ?
Thanks.
Increasing BLK_DEV_RAM_SIZE to 435752 (74.2 MB in kilobyte format) and higher number in kernel config has solved the problem. Thanks.