UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
6,266 Views
Registered: ‎01-26-2016

PetaLinux 2015.4 initrd kernel crash

Jump to solution

If “petalinux-config” is run, “Image Packaging Configuration -> Root filesystem type” is set to “INITRAMFS”, and “petalinux-build” is used to build image.ub, the kernel boots up without any problems.

 

But, if “Image Packaging Configuration -> Root filesystem type” is set to “INITRD”, the kernel crashes on power up with the following message:

Trying to unpack rootfs image as initramfs...

Unable to handle kernel paging request at virtual address fee53000

pgd = c0004000

[fee53000] *pgd=00000000

Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM

Modules linked in:

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.0.0-xilinx #1

Hardware name: Xilinx Zynq Platform

task: ee8289c0 ti: ee84c000 task.ti: ee84c000

PC is at unpack_to_rootfs+0xb8/0x288

LR is at 0x0

pc : [<c0665898>]    lr : [<00000000>]    psr: 20000113

sp : ee84de50  ip : c069b810  fp : 00000000

r10: c06d2214  r9 : 00000000  r8 : 00000000

r7 : c068f448  r6 : fee53000  r5 : 004fa493  r4 : c068f448

r3 : 00000000  r2 : 00000000  r1 : eefd8810  r0 : 00000000

Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 18c5387d  Table: 0000404a  DAC: 00000015

Process swapper/0 (pid: 1, stack limit = 0xee84c210)

Stack: (0xee84de50 to 0xee84e000)

de40:                                     c06954b0 c069f2a0 c06d21c0 c06d2210

de60: 00000000 00000000 c05a96f4 ee84de8c 00000000 c06d220c 00000000 00000000

de80: c06954b0 c069f2a0 c06d21c0 c06d2210 00000000 c0665bac c06f6030 c06ab4fc

dea0: ff0a0005 ffffffff c06d21c0 ee84df00 c05b0aeb 00000010 ee9c1380 000000d0

dec0: c06d21c0 c068f3c4 00000000 c01d0b84 000000d0 ee84df00 00000005 c0665b50

dee0: 00000000 ee9c1380 c0665b50 00000000 c069f2a0 c069f2a0 c06d21c0 c068f3c4

df00: 00000000 c00089e0 c0496f00 ee89cc00 c048d58c c06d8d38 c068f300 c00fd0c8

df20: c05b0c9c ee89ce80 c06a25e4 60000113 000000ac ef7fce31 00000000 c0035b60

df40: 000000ad 00000005 00000005 000000ac c06a25cc 00000005 000000ad 00000005

df60: 000000ad c0695094 c068f3b8 c06d21c0 c06d21c0 c0663d3c 00000005 00000005

df80: c06634fc ee84c000 00000000 c04804a0 00000000 00000000 00000000 00000000

dfa0: 00000000 c04804a8 00000000 c000de40 00000000 00000000 00000000 00000000

dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 d6bff4fa c8f7e58d

[<c0665898>] (unpack_to_rootfs) from [<c0665bac>] (populate_rootfs+0x5c/0x1e0)

[<c0665bac>] (populate_rootfs) from [<c00089e0>] (do_one_initcall+0x100/0x180)

[<c00089e0>] (do_one_initcall) from [<c0663d3c>] (kernel_init_freeable+0x110/0x1d4)

[<c0663d3c>] (kernel_init_freeable) from [<c04804a8>] (kernel_init+0x8/0xe4)

[<c04804a8>] (kernel_init) from [<c000de40>] (ret_from_fork+0x14/0x34)

Code: e3530000 0a00004a e1c721d0 e1cd21f0 (e5d63000)

---[ end trace 3de30580f6da239c ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

CPU1: stopping

CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.0.0-xilinx #1

Hardware name: Xilinx Zynq Platform

[<c001490c>] (unwind_backtrace) from [<c0010e4c>] (show_stack+0x10/0x14)

[<c0010e4c>] (show_stack) from [<c04839dc>] (dump_stack+0x80/0xcc)

[<c04839dc>] (dump_stack) from [<c00132e8>] (ipi_cpu_stop+0x3c/0x6c)

[<c00132e8>] (ipi_cpu_stop) from [<c00138d0>] (handle_IPI+0x64/0x84)

[<c00138d0>] (handle_IPI) from [<c0008628>] (gic_handle_irq+0x54/0x5c)

[<c0008628>] (gic_handle_irq) from [<c0011800>] (__irq_svc+0x40/0x74)

Exception stack(0xee86bf90 to 0xee86bfd8)

bf80:                                     00000001 00000000 00000000 c001cba0

bfa0: 00000000 ee86a000 00000000 c06d24dc ee86bfe0 00000001 00000000 c048a824

bfc0: 00000000 ee86bfd8 c000e8d4 c000e8d8 60000013 ffffffff

[<c0011800>] (__irq_svc) from [<c000e8d8>] (arch_cpu_idle+0x2c/0x38)

[<c000e8d8>] (arch_cpu_idle) from [<c004933c>] (cpu_startup_entry+0x234/0x268)

[<c004933c>] (cpu_startup_entry) from [<000086c4>] (0x86c4)

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

It looks like an access to virtual address fee53000 is causing the crash.

0 Kudos
1 Solution

Accepted Solutions
425 Views
Registered: ‎01-26-2016

Re: PetaLinux 2015.4 initrd kernel crash

Jump to solution

In platform_auto.h, the "initrd_high=0x10000000\0" string needs to be added to CONFIG_EXTRA_ENV_SETTINGS in platform-auto.h.

Example:

#define CONFIG_EXTRA_ENV_SETTINGS \
SERIAL_MULTI \
CONSOLE_ARG \
PSSERIAL0 \
"nc=setenv stdout nc;setenv stdin nc;\0" \
"ethaddr=00:0a:35:00:1e:53\0" \
"sdboot=echo boot Petalinux; mmcinfo && fatload mmc 0 ${netstart} ${kernel_img} && bootm \0" \
"autoload=no\0" \
"clobstart=0x01000000\0" \
"netstart=0x01000000\0" \
"dtbnetstart=0x02800000\0" \
"loadaddr=0x01000000\0" \
"initrd_high=0x10000000\0" \

...

View solution in original post

0 Kudos
2 Replies
Scholar rfs613
Scholar
5,916 Views
Registered: ‎05-28-2013

Re: PetaLinux 2015.4 initrd kernel crash

Jump to solution

So initramfs has been favoured over initrd for probably close to a decade or more. There's an old LWN article I could probably dig up if you want, but basically initramfs is much more friendly in terms of memory usage, as it interacts better with the page caches.


If you do want to use the old initrd for some reason, you would need to enable the relevant kernel features, and make sure that your ramdisk is built in the appropriate format. Whereas initramfs is bascially a cpio archive, initrd is typically an ext2 or other similar filesystem.

 

I don't know if Petalinux is able to auto-generate this for you.

0 Kudos
426 Views
Registered: ‎01-26-2016

Re: PetaLinux 2015.4 initrd kernel crash

Jump to solution

In platform_auto.h, the "initrd_high=0x10000000\0" string needs to be added to CONFIG_EXTRA_ENV_SETTINGS in platform-auto.h.

Example:

#define CONFIG_EXTRA_ENV_SETTINGS \
SERIAL_MULTI \
CONSOLE_ARG \
PSSERIAL0 \
"nc=setenv stdout nc;setenv stdin nc;\0" \
"ethaddr=00:0a:35:00:1e:53\0" \
"sdboot=echo boot Petalinux; mmcinfo && fatload mmc 0 ${netstart} ${kernel_img} && bootm \0" \
"autoload=no\0" \
"clobstart=0x01000000\0" \
"netstart=0x01000000\0" \
"dtbnetstart=0x02800000\0" \
"loadaddr=0x01000000\0" \
"initrd_high=0x10000000\0" \

...

View solution in original post

0 Kudos