What must I change to boot Linux 4.9 with Nios2? - linux-kernel

I read the manual and used buildroot the create the images
$ ls buildroot/output/images/
rootfs.cpio rootfs.jffs2 rootfs.tar
Then I built u-boot:
~/nios2/u-boot-socfpga$ ls -al u-boot
-rwxrwxr-x 1 developer developer 852924 apr 8 14:00 u-boot
Then I do make menuconfig and choose the path to the buildroot files
Now I build the vmImage.
OBJCOPY arch/nios2/boot/vmlinux.bin
GZIP arch/nios2/boot/vmlinux.gz
UIMAGE arch/nios2/boot/vmImage
Image Name: Linux-4.9.0-00104-g84d4f8a-dirty
Created: Sat Apr 8 14:02:22 2017
Image Type: NIOS II Linux Kernel Image (gzip compressed)
Data Size: 7237729 Bytes = 7068.09 kB = 6.90 MB
Load Address: c0000000
Entry Point: c0000000
Kernel: arch/nios2/boot/vmImage is ready
I wonder why I can't run any of the generated images now. Where is the faulty method? It all compiles but my file system doesn't come in place when I download the files to the fpga:
$ nios2-download -g /home/developer/nios2/linux4/vmlinux
Using cable "USB-Blaster [2-1]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 8504KB in 43.7s (194.5KB/s)
Verified OK
Starting processor at address 0xC0000000
It stops with kernel panic:
$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [2-1]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
Linux version 4.9.0-00104-g84d4f8a-dirty (developer#1604) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32) ) #49 Sat Apr 8 14:02:21 CEST 2017
bootconsole [early0] enabled
early_console initialized at 0xe8001440
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c084e52c, node_mem_map c0883b80
Normal zone: 256 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: debug console=ttyAL0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Sorting __ex_table...
Memory: 121196K/131072K available (2233K kernel code, 66K rwdata, 352K rodata, 5852K init, 197K bss, 9876K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:64 nr_irqs:64 0
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns
Console: colour dummy device 80x25
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
cpu cpu0: Error -2 creating of_node link
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
�random: fast init done
clocksource: Switched to clocksource nios2-clksrc
random: crng init done
futex hash table entries: 256 (order: -1, 3072 bytes)
workingset: timestamp_bits=30 max_order=15 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
�8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART
mousedev: PS/2 mouse device common for all mice
Warning: unable to open an initial console.
Failed to create /dev/root: -2
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -2
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
What can I do about it?

You must point the initramfs source file to the cpio archive, so /home/developer/nios2/buildroot/output/images/rootfs.cpio.
Even easier is to let Buildroot build your kernel and choose the initramfs filesystem. Then Buildroot will take care of linking the initramfs into the kernel.

Related

VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2

What I am trying to do is to have a working Linux kernel with rootfs running on STM32F769I discovery board.
I built the u-boot, kernel and device tree for it using Buildroot, it has been an uphill struggle for me because I am a beginner with embedded systems.
I have managed to get it to the point where the kernel has to mount the rootfs partition from SD card, but it is unable to do so the boot partition here is set correctly and it is even recognized by the kernel but somehow the kernel still panics and is unable to read it.
On the SD card there are two partitions:
mmcblk0p1: vfat
mmcblk0p2: ext3
Kernel boot log:
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 5.4.61 (zjerina#debian) (gcc version 8.4.0 (Buildroot 2020.02.5)) #1 PREEMPT Thu Sep 10 17:22:19 EDT 2020
CPU: ARMv7-M [411fc270] revision 0 (ARMv7M), cr=00000000
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
OF: fdt: Machine model: STMicroelectronics STM32F769-DISCO board
On node 0 totalpages: 4096
Normal zone: 32 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 4096 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists, mobility grouping off. Total pages: 4064
Kernel command line: console=ttySTM0,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait rootdelay=60 loglevel=60
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 12784K/16384K available (2278K kernel code, 170K rwdata, 544K rodata, 104K init, 117K bss, 3600K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
/soc/interrupt-controller#40013c00: bank0
random: get_random_bytes called from 0xc02ee535 with crng_init=0
clocksource: arm_system_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 298634427 ns
ARM System timer initialized as clocksource
sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 21474836475ns
timer#40000c00: STM32 sched_clock registered
Switching to timer-based delay loop, resolution 10ns
timer#40000c00: STM32 delay timer registered
clocksource: timer#40000c00: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
/soc/timer#40000c00: STM32 clockevent driver initialized (32 bits)
Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=1000000)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
stm32f769-pinctrl soc:pin-controller: No package detected, use default one
stm32f769-pinctrl soc:pin-controller: GPIOA bank added
stm32f769-pinctrl soc:pin-controller: GPIOB bank added
stm32f769-pinctrl soc:pin-controller: GPIOC bank added
stm32f769-pinctrl soc:pin-controller: GPIOD bank added
stm32f769-pinctrl soc:pin-controller: GPIOE bank added
stm32f769-pinctrl soc:pin-controller: GPIOF bank added
stm32f769-pinctrl soc:pin-controller: GPIOG bank added
stm32f769-pinctrl soc:pin-controller: GPIOH bank added
stm32f769-pinctrl soc:pin-controller: GPIOI bank added
stm32f769-pinctrl soc:pin-controller: GPIOJ bank added
stm32f769-pinctrl soc:pin-controller: GPIOK bank added
stm32f769-pinctrl soc:pin-controller: Pinctrl STM32 initialized
clocksource: Switched to clocksource timer#40000c00
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
NET: Registered protocol family 1
workingset: timestamp_bits=30 max_order=12 bucket_order=0
fuse: init (API version 7.31)
io scheduler mq-deadline registered
io scheduler kyber registered
STM32 USART driver initialized
40011000.serial: ttySTM0 at MMIO 0x40011000 (irq = 35, base_baud = 6250000) is a stm32-usart
printk: console [ttySTM0] enabled
stm32-usart 40011000.serial: rx dma alloc failed
stm32-usart 40011000.serial: interrupt mode used for rx (no dma)
stm32-usart 40011000.serial: tx dma alloc failed
stm32-usart 40011000.serial: interrupt mode used for tx (no dma)
libphy: Fixed MDIO Bus: probed
stm32_rtc 40002800.rtc: registered as rtc0
stm32_rtc 40002800.rtc: Date/Time must be initialized
i2c /dev entries driver
stm32f7-i2c 40005400.i2c: can't use DMA
stm32f7-i2c 40005400.i2c: STM32F7 I2C-0 bus adapter
mmci-pl18x 40011c00.sdio2: Got CD GPIO
mmci-pl18x 40011c00.sdio2: mmc0: PL180 manf 80 rev8 at 0x40011c00 irq 36,0 (pio)
mmci-pl18x 40011c00.sdio2: DMA channels RX none, TX none
mmc0: host does not support reading read-only switch, assuming write-enable
mmc0: new SDHC card at address aaaa
input: gpio_keys as /devices/platform/gpio_keys/input/input0
mmcblk0: mmc0:aaaa SL08G 7.40 GiB
stm32_rtc 40002800.rtc: setting system clock to 2000-01-01T00:38:58 UTC (946687138)
mmcblk0: p1 p2
Warning: unable to open an initial console.
Waiting 60 sec before mounting root device...
random: fast init done
Failed to create /dev/root: -2
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2
Please append a correct "root=" boot option; here are the available partitions:
b300 7761920 mmcblk0
driver: mmcblk
b301 51200 mmcblk0p1 d7154cc1-01
b302 7709696 mmcblk0p2 d7154cc1-02
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) ]---

QEMU networking and getty issues

I'm trying to create a minimalist setup for an ARM based virtual machine using qemu. I am following the following guide to do so.
I am running QEMU with the following command
qemu-system-arm -M vexpress-a9 -dtb ./linux-4.20.8/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel ./linux-4.20.8/arch/arm/boot/zImage -initrd rootfs.img --append "console=ttyAMA0" --nographic
I am, for some reason unable to see the login prompt. These are the boot messages
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Booting Linux on physical CPU 0x0
Linux version 4.20.8 (aijazbaig1#piper11) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #2 SMP Sat Sep 7 17:17:31 +08 2019
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
OF: fdt: Machine model: V2P-CA9
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
random: get_random_bytes called from start_kernel+0x88/0x458 with crng_init=0
percpu: Embedded 16 pages/cpu #(ptrval) s36800 r8192 d20544 u65536
Built 1 zonelists, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyAMA0 ip=dhcp
printk: log_buf_len individual max cpu contribution: 4096 bytes
printk: log_buf_len total cpu_extra contributions: 12288 bytes
printk: log_buf_len min size: 16384 bytes
printk: log_buf_len: 32768 bytes
printk: early log buf free: 14964(91%)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 498388K/524288K available (6144K kernel code, 400K rwdata, 1408K rodata, 1024K init, 157K bss, 25900K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xa0800000 - 0xff800000 (1520 MB)
lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (7136 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 401 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 158 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU event tracing is enabled.
rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
GIC CPU mask not found - kernel will fail to boot.
GIC CPU mask not found - kernel will fail to boot.
L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 dynamic clock gating disabled, standby mode disabled
L2C-310 cache controller enabled, 8 ways, 128 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Failed to initialize '/smb#4000000/motherboard/iofpga#7,00000000/timer#12000': -22
smp_twd: clock not found -2
Console: colour dummy device 80x30
Calibrating local timer... 97.42MHz.
Calibrating delay loop... 910.13 BogoMIPS (lpj=4550656)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x60100000 - 0x60100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
SMP: Total of 1 processors activated (910.13 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 1024 (order: 4, 65536 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
hw-breakpoint: debug architecture 0x4 unsupported.
Serial: AMBA PL011 UART driver
10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 29, base_baud = 0) is a PL011 rev1
printk: console [ttyAMA0] enabled
1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 30, base_baud = 0) is a PL011 rev1
1000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 31, base_baud = 0) is a PL011 rev1
1000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 32, base_baud = 0) is a PL011 rev1
OF: amba_device_add() failed (-19) for /smb#4000000/motherboard/iofpga#7,00000000/wdt#f000
OF: amba_device_add() failed (-19) for /memory-controller#100e0000
OF: amba_device_add() failed (-19) for /memory-controller#100e1000
OF: amba_device_add() failed (-19) for /watchdog#100e5000
irq: type mismatch, failed to map hwirq-75 for interrupt-controller#1e001000!
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm,sp804
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Unpacking initramfs...
Freeing initrd memory: 11232K
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters available
workingset: timestamp_bits=30 max_order=17 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
9p: Installing v9fs 9p2000 file system support
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
clcd-pl11x 1001f000.clcd: PL111 designer 41 rev2 at 0x1001f000
clcd-pl11x 1001f000.clcd: clcd#1f000 hardware, 640x480#59 display
Console: switching to colour frame buffer device 80x30
clcd-pl11x 10020000.clcd: PL111 designer 41 rev2 at 0x10020000
clcd-pl11x 10020000.clcd: clcd#10020000 hardware, 1024x768#59 display
40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
Concatenating MTD devices:
(0): "40000000.flash"
(1): "40000000.flash"
into device "40000000.flash"
libphy: Fixed MDIO Bus: probed
smsc911x 4e000000.ethernet: Linked as a consumer to regulator.1
smsc911x 4e000000.ethernet (unnamed net_device) (uninitialized): Device not READY in 100ms aborting
isp1760 4f000000.usb: bus width: 32, oc: digital
isp1760 4f000000.usb: NXP ISP1760 USB Host Controller
isp1760 4f000000.usb: new USB bus registered, assigned bus number 1
isp1760 4f000000.usb: Scratch test failed.
isp1760 4f000000.usb: can't setup: -19
isp1760 4f000000.usb: USB bus 1 deregistered
usbcore: registered new interface driver usb-storage
rtc-pl031 10017000.rtc: registered as rtc0
mmci-pl18x 10005000.mmci: Got CD GPIO
mmci-pl18x 10005000.mmci: Got WP GPIO
mmci-pl18x 10005000.mmci: Linked as a consumer to regulator.1
mmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 25,26 (pio)
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
aaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 24
aaci-pl041 10004000.aaci: FIFO 512 entries
oprofile: using arm/armv7-ca9
NET: Registered protocol family 17
9pnet: Installing 9P2000 support
Registering SWP/SWPB emulation handler
input: AT Raw Set 2 keyboard as /devices/platform/smb#4000000/smb#4000000:motherboard/smb#4000000:motherboard:iofpga#7,00000000/10006000.kmi/serio0/input/input0
rtc-pl031 10017000.rtc: setting system clock to 2019-09-08 02:11:22 UTC (1567908682)
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.160.2, my address is 192.168.160.9
IP-Config: Complete:
device=eth0, hwaddr=52:54:00:12:34:56, ipaddr=192.168.160.9, mask=255.255.255.0, gw=192.168.160.2
host=192.168.160.9, domain=, nis-domain=(none)
bootserver=192.168.160.2, rootserver=192.168.160.2, rootpath=
nameserver0=192.168.160.3
ALSA device list:
#0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 24
Freeing unused kernel memory: 1024K
Run /init as init process
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb#4000000/smb#4000000:motherboard/smb#4000000:motherboard:iofpga#7,00000000/10007000.kmi/serio1/input/input2
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator... random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: ip: RTNETLINK answers: File exists
FAIL
In buildroot, I've tried various configurations for the getty baudrate but to no avail. Please give me some pointers as to what exactly is going wrong. Currently I have tried with vt100, kernel selected baudrate as well as vt100, 115200 and it both fails
Update
As of now I have been able to see the login prompt after a slight modification to the command line arguments as follows:
qemu-system-arm -M vexpress-a9 -m 512M
-kernel linux-4.20.8/arch/arm/boot/zImage
-dtb linux-4.20.8/arch/arm/boot/dts/vexpress-v2p-ca9.dtb
-append "console=ttyAMA0,115200 ip=dhcp"
-initrd buildroot/output/images/rootfs.cpio
-serial stdio <s>-nographic</s>
-netdev user,id=mynet0,net=192.168.160.0/24,hostfwd=tcp::2222-:22
-device virtio-net-device,netdev=mynet0
As you can see I've replaced -nographic with -serial stdio so I now see the QEMU GUI window separately (which is blank by the way) and I see the login prompt.What is going on here?
Additionally, I cannot use ssh to log into the VM from my Debian host (ssh has been selected in buildroot as you can see from the following log messages (which appear after my latest modification)
random: ssh-keygen: uninitialized urandom read (32 bytes read)
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Starting sshd: random: sshd: uninitialized urandom read (32 bytes read)
OK
Welcome to Buildroot
buildroot login: root
Password:
I've enabled root login by modifying the sshd_config file on the VM. I've tried ssh root#localhost:2222 as well as ssh root#192.168.160.9 but it just dies out (doesn't say if connection was refused or anything). I'm kind of lost here.
As per your instructions on the kernel command line (rdinit) the Linux kernel runs /sbin/init after boot as the first user process.
The one that is typically configured with Busybox (there are several options) will read a configuration file called /etc/inittab and act based on what is written there.
The execution of /etc/init.d/rcS, if at all, is performed from this file.
It is hard to pinpoint exactly what is happening but at a first step take a look at /etc/inittab. It is possible it is already mounting /proc.
At the very least I am guessing the errors regarding /dev/ttyy originates from directives in this file and can be silenced by editing it.

QEMU Showing Black Screen After Creating Linux uImage for ARM

So I have been following this article:
https://opensourceforu.com/2011/06/qemu-for-embedded-systems-development-part-1/
I first made sure that I enabled the “Use the ARM EABI to compile the kernel” option in the menuconfig and saved it as .config
After that I ran the following command and got the following output:
ivan#UbuntuMATE:~/Programming/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- uImage -s LOADADDR=0x00008000
<stdin>:1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp]
Image Name: Linux-4.18.0-10986-g778a33959a8a
Created: Mon Aug 20 23:09:46 2018
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2816048 Bytes = 2750.05 kB = 2.69 MB
Load Address: 00008000
Entry Point: 00008000
Now the problem happens when I try to test the image with the following command:
ivan#UbuntuMATE:~/Programming/linux$ qemu-system-arm -M versatilepb -m 256M -kernel arch/arm/boot/uImage
I get a black screen. I understand that the kernel will crash, but I still expect to see text on the screen. After reading comments and several questions similar to this online, I try the following command:
ivan#UbuntuMATE:~/Programming/linux$ qemu-system-arm -M versatilepb -m 256M -kernel arch/arm/boot/uImage -append "console=ttyAMA0"
I have also tried with tty1 and even tried what this link suggested:
Just black screen after running Qemu
Please advise as to how to proceed. Thanks in advance!
EDIT: I figured it out!! Thank you #bornfree for the starting point in guiding me to the answer!
Low and behold I no longer get a blank screen but I still get an error:
Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x00000183, r2=0x00000100
r2[]=05 00 00 00 01 00 41 54 01 00 00 00 00 10 00 00 Available machine support:
ID (hex) NAME
ffffffff Generic DT based system
ffffffff ARM-Versatile (Device Tree Support)
Please check your kernel config and/or bootloader.
So after doing some research, I learned that the reason why my old commands didn't work was because back in the day they had all the code for the different boards in the kernel. So they decided to separate it out into device tree files (which is what I believe you were referring to in your last email?) So I noticed that the board files are included in /arch/arm/dts folder but they were just source files. So I had to find a way to compile the board to a dtb to be able to include it to qemu using -dtb. At first I found this command:
ivan#UbuntuMATE-VBox:~/linux/scripts/dtc$ ./dtc -I dts -O dtb -o versatile-pb.dtb /home/ivan/linux/arch/arm/boot/dts/versatile-pb.dts
Error: /home/ivan/linux/arch/arm/boot/dts/versatile-pb.dts:2.1-2 syntax error FATAL ERROR: Unable to parse input tree
So that was a bit discouraging until I found out there is a way with make to make the image I need. First to generate the config file.
ivan#UbuntuMATE-VBox:~/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- versatile_defconfig
Then to generate the dtb file:
ivan#UbuntuMATE-VBox:~/linux$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- dtbs
(Before continuing I should mention that I built the simple root file system mentioned in the original tutorial I was following. You'll see below what I mean).
Then I tried running the command again:
qemu-system-arm -M versatilepb -m 256M -nographic -kernel /home/ivan/linux/arch/arm/boot/uImage -initrd /home/ivan/opt/test/rootfs -dtb dts/versatile-pb.dtb -append "root=/dev/ram rdinit=/hello console= ttyS0"
Then I get another error:
vpb_sic_write: Bad register offset 0x2c
So I found out that ttyS0 emulates PC-style 8250/16550 serial ports where QEMU uses AMBA PL011 for the versatile machines so it uses ttyAMA0, which was originally what I tested with. Since my line has changed I figured I should change it...
qemu-system-arm -M versatilepb -m 256M -nographic -kernel /home/ivan/linux/arch/arm/boot/uImage -initrd /home/ivan/opt/test/rootfs -dtb dts/versatile-pb.dtb -append "root=/dev/ram rdinit=/hello console= ttyAMA0"
Low and behold....it finally worked!!!
vpb_sic_write: Bad register offset 0x2c
Booting Linux on physical CPU 0x0
Linux version 4.18.0+ (ivan#UbuntuMATE-VBox) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-16ubuntu3)) #1 Tue Aug 21 15:56:30 PDT 2018
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: ARM Versatile PB Memory policy: Data cache writeback
random: get_random_bytes called from start_kernel+0x7c/0x3e4 with crng_init=0 Built 1 zonelists, mobility grouping on. Total pages: 65024 Kernel command line: root=/dev/ram rdinit=/hello console=ttyAMA0 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253796K/262144K available (3935K kernel code, 144K rwdata, 964K rodata, 176K init, 130K bss, 8348K reserved, 0K cma-reserved) Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (3937 kB)
.init : 0x(ptrval) - 0x(ptrval) ( 176 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 145 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 131 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 VIC #(ptrval): id 0x00041190, vendor 0x41 FPGA IRQ chip 0 "intc" # (ptrval), 20 irqs, parent IRQ: 47
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns Failed to initialize '/amba/timer#101e3000': -22
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 290.20 BogoMIPS (lpj=1451008)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8400 - 0x8458 VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
OF: amba_device_add() failed (-19) for /amba/smc#10100000
OF: amba_device_add() failed (-19) for /amba/mpmc#10110000
OF: amba_device_add() failed (-19) for /amba/sctl#101e0000
OF: amba_device_add() failed (-19) for /amba/watchdog#101e1000
OF: amba_device_add() failed (-19) for /amba/sci#101f0000
OF: amba_device_add() failed (-19) for /amba/ssp#101f4000
OF: amba_device_add() failed (-19) for /amba/fpga/sci#a000
Serial: AMBA PL011 UART driver
101f1000.uart: ttyAMA0 at MMIO 0x101f1000 (irq = 28, base_baud = 0) is a PL011 rev1 console [ttyAMA0] enabled
101f2000.uart: ttyAMA1 at MMIO 0x101f2000 (irq = 29, base_baud = 0) is a PL011 rev1
101f3000.uart: ttyAMA2 at MMIO 0x101f3000 (irq = 30, base_baud = 0) is a PL011 rev1
uart-pl011 10009000.uart: aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.
10009000.uart: ttyAMA3 at MMIO 0x10009000 (irq = 54, base_baud = 0) is a PL011 rev1
clocksource: Switched to clocksource arm,sp804
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 1, 8192 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 492K
NetWinder Floating Point Emulator V0.97 (double precision)
workingset: timestamp_bits=30 max_order=16 bucket_order=0 Installing knfsd (copyright (C) 1996 okir#monad.swb.de).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) io scheduler mq-deadline registered io scheduler kyber registered pl061_gpio 101e4000.gpio: PL061 GPIO chip #0x101e4000 registered pl061_gpio 101e5000.gpio: PL061 GPIO chip #0x101e5000 registered pl061_gpio 101e6000.gpio: PL061 GPIO chip #0x101e6000 registered pl061_gpio 101e7000.gpio: PL061 GPIO chip #0x101e7000 registered versatile-tft-panel 10000000.sysreg:display#0: no panel detected
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
brd: module loaded
of-flash 34000000.flash: versatile/realview flash protection
34000000.flash: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000 Intel/Sharp Extended Query Table at 0x0031 Using buffer write method
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico#fluxnic.net> smc91x 10010000.net eth0: SMC91C11xFD (rev 1) at (ptrval) IRQ 41 smc91x 10010000.net eth0: Ethernet addr: 52:54:00:12:34:56
rtc-ds1307 0-0068: registered as rtc0
versatile reboot driver registered
mmci-pl18x fpga:05: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 59,60 (pio) mmci-pl18x fpga:0b: mmc1: PL181 manf 41 rev0 at 0x1000b000 irq 49,50 (pio) leds-syscon 10000000.core-module:led#08.0: registered LED versatile:0 leds-syscon 10000000.core-module:led#08.1: registered LED versatile:1 leds-syscon 10000000.core-module:led#08.2: registered LED versatile:2 leds-syscon 10000000.core-module:led#08.3: registered LED versatile:3 leds-syscon 10000000.core-module:led#08.4: registered LED versatile:4 leds-syscon 10000000.core-module:led#08.5: registered LED versatile:5 leds-syscon 10000000.core-module:led#08.6: registered LED versatile:6 leds-syscon 10000000.core-module:led#08.7: registered LED versatile:7
ledtrig-cpu: registered to indicate activity on CPUs
NET: Registered protocol family 17
input: AT Raw Set 2 keyboard as /devices/platform/amba/amba:fpga/10006000.kmi/serio0/input/input0
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
rtc-ds1307 0-0068: setting system clock to 2018-08-22 23:24:34 UTC (1534980274) Freeing unused kernel memory: 176K This architecture does not have kernel memory protection.
Hello World!random: fast init done
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/amba/amba:fpga/10007000.kmi/serio1/input/input2
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
Hello World!
Hello World!
Try using the below command.
qemu-system-arm -M versatilepb -m 256M -nographic -kernel
arch/arm/boot/uImage -append "console=ttyS0"

Booting Linux Kernel on Zynq Devices (Zybo and ZedBoard)

We are trying to boot linux in a xilinx system following the instructions in wiki-xilinx-linux.
After a lot of different tests, after had a look (among others) here, we have enabled the option "LOW LEVEL KERNEL DEBUGGING AND EARLYPRINTKs". Thanks to this we were able to see the following:
U-Boot 2016.07-03720-g95e11f6 (Oct 13 2016 - 03:48:21 -0700)
Model: Zynq MMC: sdhci#e0100000: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, eIn: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Z00b000
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: sdhci#e0100000
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed:reading uImage
3842280 bytes read in 342 ms (10.7 MiB/s)
reading devicetree.dtb
8955 bytes read in 20 ms (436.5 KiB/s)
## Booting kernel from Legacy Image at 0008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
Booting using the fdt blob at OK
Loading Device Tree to 1eb0e000, end 1eb132fa ... OK
Starting kernel .... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-22282-g7d819bd (leProcessor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasiMemory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu #debcd000 s1115200 root=/dev/mmcblk0p2 rw rootwait
PID hash table entries: 2048 (order: 1, (order: 5, 131072 bytes)
Memory: 494528K/524288K available (5304K kernel code, or : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf .data : 0xc0900000 - 0xc0939b60 ( 231 kB)
.bss : 0xc0939b60 - 0xc09R_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cp00 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> ortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gatnq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
my device 80x30
Calibrating delay loop (skipped), value calculated using timer )
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testinx100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksT: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic cohe maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256interface driver usbfs
usbcore: registered new interface driver hub
usbcore: r00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - CoLinux Sound Architecture Driver Initialized.
clocksource: Switched to clocksourle entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (establish (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered nameRegistered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled witx_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Rever for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-led
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized brd: module loaded
loop: module loaded
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (0rne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-si2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver ste Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: Invalid maximummc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cphid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller ar protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Regards found.
Waiting for root device /dev/mmcblk0p2...
mmc0: new high speed SDHCmmcblk0: p1 p2
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30
Ple4 ram1 (driver?)
0102 16384 ram2 (driver?)
0103 16384 ra 16384 ram7 (driver?)
0108 16384 ram8 (driver?)
0109 0c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e ?)
b300 3813376 mmcblk0 driver: mmcblk
b301 1048576 mmcblk0: Unable to mount root fs on unknown-block(179,2)
CPU1: stopping
CPU: 1 PID: 0nd_backtrace) from [<c010a608>] (show_stack+0x10/0x14)
[<c010a608>] (show_stackb24>] (ipi_cpu_stop+0x3c/0x70)
[<c010cb24>] (ipi_cpu_stop) from [<c010d394>] (h4>] (__irq_svc+0x54/0x90)
Exception stack(0xde46ff70 to 0xde46ffb8)
ff60: 01 debdc5c0 474d4ec6 00000000 45283f08 00000000 00000000 00000000
ffa0: 0000000/0x1c0)
[<c0492ccc>] (cpuidle_enter_state) from [<c014a72c>] (cpu_startup_entryFS: Unable to mount root fs on unknown-block(179,2)
It seems that the Virtual File System tries to read from some unknown-block:
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30
Googling, no solutions were found.
Has somebody some idea on how to solve this? Where can we have a look? Which parameter to play with?
Finally I solved all the problems I had (running linux on Zybo with a custom hw in the Programmable Logic). Yes, because I am a beginner, I found different problems:
1) One of the problem was in the .dts: the part with eFuse was compleatly missing. Xilinx committed another version of the .dts with the problem fixed.
2) Another big problem was with the bitstream: at the beginning I wanted to program the PL on Zybo with a running linux using: cat bitstream.bit > /dev/xdevcfg. Of course this is compleatly possible (I tested it) as it is explaned in [this wiki-page][1]. Problem: if you have a custom HW in in FPGA you have also its description in the device-tree. The kernel tries to initialize all the periferics connected to the PS but, of course, the PL is not yet connected!! The solution is to download the bitstream before, including it in the boot.bif in order to generate the boot.bin in the right way:
image : {
[bootloader]fsbl.elf
bitstream.bit
u-boot.elf
devicetree.dtb
uramdisk.image.gz
uImage.bin // currently bootgen requires a file extension. this is just a renamed uImage
}
of course using: bootgen -image boot.bif -o i boot.bin.
There were other little problems and I will try to add a list in future editing-revision of this answer.
UPDATE:
to solve the problem described in the question, if there are no additional problems/errors, should be enough to add the bootargs the option rootdelay=3 (rootdelay — Time to delay before attempting to mount the root filesystem).
This can be necessary because u-boot tries to access the SD too fast and the SD is not ready yet.
You have it set to use the root filesystem on mmcblk0p2 - the second partition of your SD-card. If the filesystem is in fact placed there, you have to verify that the kernel has support for what the partition was formatted with (e.g. ext3).
Is this a prebuilt image or one you built yourself?
If you use the command petalinux-config before building, you can change settings for where to store the filesystem.
Btw, this is a very common problem so you should find lots of info if you use the right terms when you google it.

Kernel Panic in a linux kernel image that is running on a xilinx FPGA

Early console on uartlite at 0x84000000
bootconsole [earlyser0] enabled
Ramdisk addr 0x00000000,
Compiled-in FDT at 0xc035c060
Linux version 3.12.0 (mdt#linux-t5z7) (gcc version 4.6.4 20120924 (Xilinx 14.1 Build EDK_P.13 28 Sep 2013) (crosstool-NG 1.18.0) ) #61 Tue Jun 28 18:58:56 IST 2016
setup_cpuinfo: initialising
setup_cpuinfo: No PVR support. Using static CPU info from FDT
wt_msr
setup_memory: max_mapnr: 0x4000
setup_memory: min_low_pfn: 0x44000
setup_memory: max_low_pfn: 0x48000
setup_memory: max_pfn: 0x48000
Zone ranges:
DMA [mem 0x44000000-0x47ffffff]
Normal empty
HighMem empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x44000000-0x47ffffff]
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c0477d1c, node_mem_map c05f2000
DMA zone: 128 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 16384 pages, LIFO batch:3
early_printk_console remapping from 0x84000000 to 0xff7ff000
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyUL0,115200
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 58768K/65536K available (3440K kernel code, 148K rwdata, 948K rodata, 938K init, 551K bss, 6768K reserved, 0K highmem)
Kernel virtual memory layout:
* 0xfffea000..0xfffff000 : fixmap
* 0xff800000..0xffc00000 : highmem PTEs
* 0xff7ff000..0xff800000 : early ioremap
* 0xf0000000..0xff7ff000 : vmalloc & ioremap
NR_IRQS:33
/plb#0/interrupt-controller#81800000: num_irq=4, edge=0xb
/plb#0/timer#83c00000: irq=1
xilinx_timer_set_mode: shutdown
xilinx_timer_set_mode: periodic
Calibrating delay loop... 30.10 BogoMIPS (lpj=150528)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
bio: create slab <bio-0> at 0
vgaarb: loaded
Switched to clocksource xilinx_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: 1, 10240 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 128 (order: 0, 6144 bytes)
UDP-Lite hash table entries: 128 (order: 0, 6144 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
gpiochip_find_base: cannot find free range
gpiochip_add: gpios -1..-2 (/plb#0/gpio#81440000) failed to register
/plb#0/gpio#81440000: GPIO chip registration failed with status -28
/plb#0/gpio#81440000: error in probe function with status -28
xilinx-gpio: probe of 81440000.gpio failed with error -28
gpiochip_find_base: cannot find free range
gpiochip_add: gpios -1..-2 (/plb#0/gpio#81420000) failed to register
/plb#0/gpio#81420000: GPIO chip registration failed with status -28
/plb#0/gpio#81420000: error in probe function with status -28
xilinx-gpio: probe of 81420000.gpio failed with error -28
gpiochip_find_base: cannot find free range
gpiochip_add: gpios -1..-2 (/plb#0/gpio#81400000) failed to register
/plb#0/gpio#81400000: GPIO chip registration failed with status -28
/plb#0/gpio#81400000: error in probe function with status -28
xilinx-gpio: probe of 81400000.gpio failed with error -28
Skipping unavailable RESET gpio -2 (reset)
audit: initializing netlink socket (disabled)
type=2000 audit(10.250:1): initialized
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 114
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
84000000.serial: ttyUL0 at MMIO 0x84000000 (irq = 4, base_baud = 0) is a uartlite
console [ttyUL0] enabled, bootconsole disabled
console [ttyUL0] enabled, bootconsole disabled
brd: module loaded
xilinx_emaclite 81000000.ethernet: Device Tree Probing
libphy: Xilinx Emaclite MDIO: probed
mdio_bus 81000000: cannot get PHY at address 7
xilinx_emaclite 81000000.ethernet: MAC address is now 00:0a:35:00:00:00
xilinx_emaclite 81000000.ethernet: Xilinx EmacLite at 0x81000000 mapped to 0xF00C0000, irq=3
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
NET: Registered protocol family 24
Oops: kernel access of bad area, sig: 11
CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.0 #61
task: c382dbe0 ti: c382e000 task.ti: c382e000
Registers dump: mode=4782FDB4
r1=C30999C0, r2=00000000, r3=000061A2, r4=00000000
r5=C0471A90, r6=C309CA00, r7=0000006F, r8=C0460420
r9=00000000, r10=00000003, r11=00000000, r12=00000000
r13=00000000, r14=C035B72C, r15=C025C5E0, r16=00000000
r17=C025C628, r18=7FFFFF90, r19=00000011, r20=C0350384
r21=00000000, r22=C04918A4, r23=000061A2, r24=00000007
r25=00000000, r26=0000005D, r27=00000000, r28=00000000
r29=00000000, r30=00000000, r31=C382DBE0, rPC=C025C628
msr=000042A0, ear=00000064, esr=000002D2, fsr=00000000
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
** i cross compiled and downloaded a linux image to a xilinx FPGA and after opening a picocom terminal and running, the following kernel panic error was displayed.Please help me figure this out
Thank you**
Your kernel got a bad page fault for some reason. There is not really enough information here to say why.
The offending instruction was at PC=C025C628, which you might be able to find in the symbol table of your vmlinux.

Resources