cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
466 Views
Registered: ‎04-12-2018

Initramfs cause kernel to panic

Hello everyone,

I am using Petalinux 2018.2, and i am creating a project for Ultra96 (ZCU100) board. I need to load a little sized Linux image using initramfs instead of SD card. 

So i made the correspondent configurations to load the image (Image Packaging Configuration--->Root filesystem type-->INITRAMFS), and disabled some non required modules and packages to shorten the size of the image.

When loading the image, an error related to "decompress INTERNAL initramfs" (within init/initramfs.c) is given. To load the image, i give the files image/linux/Image and images/linux/rootfs.cpio along with a .dts file for this purpose.

The log of the boot of Linux is the following:

[ 0.000000] Booting Linux on physical CPU 0x3
[ 0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #2 SMP Fri Aug 30 23:03:21 WEST 2019
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: Jailhouse cell on ZynqMP
[ 0.000000] earlycon: jailhouse0 at I/O port 0x0 (options '')
[ 0.000000] bootconsole [jailhouse0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 256 MiB at 0x0000000051000000
root@xilinx-ultra96-reva-2018_2:~# [ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] percpu: Embedded 21 pages/cpu @ffffffc03beb6000 s46488 r8192 d31336 u86016
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 225971
[ 0.000000] Kernel command line: console=jailhouse
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Memory: 287028K/916416K available (7420K kernel code, 474K rwdata, 2632K rodata, 169408K init, 2127K bss, 367244K reserved, 262144K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff80087c0000 ( 7424 KB)
[ 0.000000] .rodata : 0xffffff80087c0000 - 0xffffff8008a60000 ( 2688 KB)
[ 0.000000] .init : 0xffffff8008a60000 - 0xffffff8012fd0000 (169408 KB)
[ 0.000000] .data : 0xffffff8012fd0000 - 0xffffff8013046a00 ( 475 KB)
[ 0.000000] .bss : 0xffffff8013046a00 - 0xffffff801325a7c8 ( 2128 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf00d1c480 ( 13 MB actual)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc03bef0000 ( 958 MB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1710236356, max_idle_ns: 440795202549 ns
[ 0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511099ns
[ 0.008247] Console: colour dummy device 80x25
[ 0.012536] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.99 BogoMIPS (lpj=399999)
[ 0.022937] pid_max: default: 32768 minimum: 301
[ 0.027641] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.034226] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.042135] ASID allocator initialised with 65536 entries
[ 0.047420] Hierarchical SRCU implementation.
[ 0.051900] EFI services will not be available.
[ 0.056339] smp: Bringing up secondary CPUs ...
[ 0.060995] psci: failed to boot CPU1 (-1)
[ 0.064924] CPU1: failed to boot: -1
[ 0.068475] CPU1: failed in unknown state : 0x0
[ 0.073053] smp: Brought up 1 node, 1 CPU
[ 0.076981] SMP: Total of 1 processors activated.
[ 0.081679] CPU features: detected feature: 32-bit EL0 Support
[ 0.087494] CPU: All CPU(s) started at EL1
[ 0.091578] alternatives: patching kernel code
[ 0.096572] devtmpfs: initialized
[ 0.100200] random: get_random_u32 called from bucket_table_alloc+0x108/0x260 with crng_init=0
[ 0.108773] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.118366] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 0.130995] pinctrl core: initialized pinctrl subsystem
[ 0.137015] NET: Registered protocol family 16
[ 0.141805] cpuidle: using governor menu
[ 0.145636] vdso: 2 pages (1 code @ ffffff80087c6000, 1 data @ ffffff8012fd4000)
[ 0.152948] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.160053] random: fast init done
[ 0.164142] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.170664] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 5, base_baud = 6250000) is a xuartps
[ 0.200354] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.208206] SCSI subsystem initialized
[ 0.211959] pps_core: LinuxPPS API ver. 1 registered
[ 0.216757] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.225877] PTP clock support registered
[ 0.229788] EDAC MC: Ver: 3.0.0
[ 0.234226] FPGA manager framework
[ 0.237817] Bluetooth: Core ver 2.22
[ 0.241246] NET: Registered protocol family 31
[ 0.245650] Bluetooth: HCI device and connection manager initialized
[ 0.251991] Bluetooth: HCI socket layer initialized
[ 0.256847] Bluetooth: L2CAP socket layer initialized
[ 0.261893] Bluetooth: SCO socket layer initialized
[ 0.268180] clocksource: Switched to clocksource arch_sys_counter
[ 0.274247] VFS: Disk quotas dquot_6.6.0
[ 0.278060] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.292299] NET: Registered protocol family 2
[ 0.296873] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.303816] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.310427] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.316693] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.322530] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.328950] NET: Registered protocol family 1
[ 0.334211] RPC: Registered named UNIX socket transport module.
[ 0.339972] RPC: Registered udp transport module.
[ 0.344643] RPC: Registered tcp transport module.
[ 0.349330] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.749567] Kernel panic - not syncing: write error
[ 1.754322] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.2 #2
[ 1.761519] Hardware name: Jailhouse cell on ZynqMP (DT)
[ 1.766815] Call trace:
[ 1.769261] [<ffffff8008088c58>] dump_backtrace+0x0/0x368
[ 1.774629] [<ffffff8008088fd4>] show_stack+0x14/0x20
[ 1.779666] [<ffffff800879e8f8>] dump_stack+0x9c/0xbc
[ 1.784700] [<ffffff800809bdc0>] panic+0x11c/0x274
[ 1.789475] [<ffffff8008a62da4>] populate_rootfs+0x40/0x114
[ 1.795026] [<ffffff8008083980>] do_one_initcall+0x38/0x128
[ 1.800585] [<ffffff8008a60cc4>] kernel_init_freeable+0x138/0x1d8
[ 1.806658] [<ffffff80087b0c60>] kernel_init+0x10/0x100
[ 1.811865] [<ffffff8008084a90>] ret_from_fork+0x10/0x18
[ 1.817169] ---[ end Kernel panic - not syncing: write error

 

I know the error is related to rootfs.cpio, but what is the problem? Is there some configuration fault?

0 Kudos
2 Replies
Highlighted
Teacher
Teacher
400 Views
Registered: ‎06-16-2013

Hi @_reis220 

 

How to set rootfs parameter on Linux ? (ex. rootfs=/dev/sda1)

I guess you need to set suitable rootfs setting in kernel config.

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
392 Views
Registered: ‎04-12-2018

Hi @watari,

Have you some guess of what might be the settings i need to set on petalinux-config -c kernel or petalinux-config -c rootfs?

0 Kudos