Hi,
Thanks!
I am trying to load & bootup 2nd linux image in non-root cell of jailhouse.
I could port jailhouse 0.12 in kernel 5.4.147 . Flashed the image in SD card & emmc of i.MX8. Initiated SD card image with command "run jh_mmcboot" & could load jailhouse driver also. emmc has mmcblk0 & sd card has mmcblk1, mounted mmcblk1p1 & mmcblkip2 manually.
After driver is up used below commands:
jailhouse enable /usr/share/jailhouse/cells/imx8mq.cell
export PATH=$PATH:/usr/share/jailhouse/tools/
jailhouse cell linux /usr/share/jailhouse/cells/imx8mq-linux-demo.cell /run/media/mmcblk1p1/Image -d /run/media/mmcblk1p1/imx8mq-evk-inmate.dtb -c "clk_ignore_unused console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk2p2 rootwait rw"
2nd image not booting up, below are the logs:
root=/dev/mmcblk2p2 rootwait rw"mxc0,115200 earlycon=ec_imx6q,0x30860000,115200
[ 2102.362388] IRQ232: set affinity failed(-22).
[ 2102.362464] CPU2: shutdown
[ 2102.369562] psci: CPU2 killed (polled 0 ms)
[ 2102.422343] IRQ232: set affinity failed(-22).
[ 2102.422642] CPU3: shutdown
[ 2102.429741] psci: CPU3 killed (polled 0 ms)
Adding virtual PCI device 00:00.0 to cell "linux-inmate-demo"
Shared memory connection established, peer cells:
"imx8mq"
Adding virtual PCI device 00:01.0 to cell "linux-inmate-demo"
Shared memory connection established, peer cells:
"imx8mq"
Created cell "linux-inmate-demo"
Page pool usage after cell creation: mem 80/992, remap 144/131072
[ 2102.486660] Created Jailhouse cell "linux-inmate-demo"
Cell "linux-inmate-demo" can be loaded
Started cell "linux-inmate-demo"
[ 0.000000] Booting Linux on physical CPU 0x0000000002 [0x410fd034]
[ 0.000000] Linux version 5.4.147+gbbb2e2b (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP PREEMPT Wed Dec 1 22:21:40 UTC 2021
[ 0.000000] Machine model: Freescale i.MX8MQ EVK
[ 0.000000] earlycon: ec_imx6q0 at MMIO 0x0000000030860000 (options '115200')
[ 0.000000] printk: bootconsole [ec_imx6q0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 320 MiB at 0x00000000e8000000
imx8mqevk:/dev# [ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x00000000c0000000-0x00000000fdbfffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xfda0e500-0xfda0ffff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x00000000c0000000-0x00000000fdbfffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000fdbfffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000fdbfffff]
[ 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] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 33 pages/cpu s98072 r8192 d28904 u135168
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 248976
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: clk_ignore_unused console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk2p2 rootwait rw
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 632620K/1011712K available (17212K kernel code, 2074K rwdata, 7068K rodata, 3712K init, 1034K bss, 51412K reserved, 327680K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 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] GICv3: 128 SPIs implemented
[ 0.000000] GICv3: 0 Extended SPIs implemented
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: 16 PPIs implemented
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] GICv3: CPU0: found redistributor 2 region 0:0x00000000388c0000
[ 0.000000] ITS: No ITS available, not enabling LPIs
[ 0.000000] random: get_random_bytes called from start_kernel+0x318/0x49c with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 8.33MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1ec0311ec, max_idle_ns: 440795202152 ns
[ 0.000004] sched_clock: 56 bits at 8MHz, resolution 120ns, wraps every 2199023255541ns
[ 0.008140] Console: colour dummy device 80x25
[ 0.012468] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.66 BogoMIPS (lpj=33333)
[ 0.022663] pid_max: default: 32768 minimum: 301
[ 0.027337] LSM: Security Framework initializing
[ 0.031912] Smack: Initializing.
[ 0.035152] Smack: IPv6 port labeling enabled.
[ 0.039717] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.047061] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.056210] ASID allocator initialised with 32768 entries
[ 0.060340] rcu: Hierarchical SRCU implementation.
[ 0.065289] EFI services will not be available.
[ 0.069677] smp: Bringing up secondary CPUs ...
[ 0.074490] Detected VIPT I-cache on CPU1
[ 0.074525] GICv3: CPU1: found redistributor 3 region 0:0x00000000388e0000
[ 0.074566] CPU1: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.074660] smp: Brought up 1 node, 2 CPUs
[ 0.095498] SMP: Total of 2 processors activated.
[ 0.100182] CPU features: detected: 32-bit EL0 Support
[ 0.105318] CPU features: detected: CRC32 instructions
[ 0.120795] CPU: All CPU(s) started at EL1
[ 0.122044] alternatives: patching kernel code
[ 0.127762] devtmpfs: initialized
[ 0.131440] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.139498] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.155615] pinctrl core: initialized pinctrl subsystem
[ 0.158617] DMI not present or invalid.
[ 0.162081] NET: Registered protocol family 16
[ 0.173481] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.176737] audit: initializing netlink subsys (disabled)
[ 0.182242] audit: type=2000 audit(0.136:1): state=initialized audit_enabled=0 res=1
[ 0.189855] cpuidle: using governor menu
[ 0.194092] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.200888] Serial: AMBA PL011 UART driver
[ 0.204654] imx mu driver is registered.
[ 0.208501] imx rpmsg driver is registered.
[ 0.231076] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.234931] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.241608] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.248291] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.256007] cryptd: max_cpu_qlen set to 1000
[ 0.261848] ACPI: Interpreter disabled.
[ 0.263391] iommu: Default domain type: Translated
[ 0.268086] vgaarb: loaded
[ 0.270905] SCSI subsystem initialized
[ 0.274698] usbcore: registered new interface driver usbfs
[ 0.279826] usbcore: registered new interface driver hub
[ 0.285127] usbcore: registered new device driver usb
[ 0.290446] mc: Linux media interface: v0.10
[ 0.294407] videodev: Linux video capture interface: v2.00
[ 0.299922] pps_core: LinuxPPS API ver. 1 registered
[ 0.304800] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.313927] PTP clock support registered
[ 0.317874] EDAC MC: Ver: 3.0.0
[ 0.321369] No BMan portals available!
[ 0.324882] QMan: Allocated lookup table at (____ptrval____), entry count 65537
[ 0.332006] No QMan portals available!
[ 0.335746] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[ 0.341970] FPGA manager framework
[ 0.345172] Advanced Linux Sound Architecture Driver Initialized.
[ 0.351573] NetLabel: Initializing
[ 0.354555] NetLabel: domain hash size = 128
[ 0.358877] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.364577] NetLabel: unlabeled traffic allowed by default
[ 0.370582] clocksource: Switched to clocksource arch_sys_counter
[ 1.126801] VFS: Disk quotas dquot_6.6.0
[ 1.127914] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.134921] pnp: PnP ACPI: disabled
[ 1.145678] thermal_sys: Registered thermal governor 'step_wise'
[ 1.145681] thermal_sys: Registered thermal governor 'power_allocator'
[ 1.149008] NET: Registered protocol family 2
[ 1.159787] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 1.167659] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[ 1.175430] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.183185] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[ 1.190453] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.196747] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 1.203285] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 1.210414] NET: Registered protocol family 1
[ 1.215001] RPC: Registered named UNIX socket transport module.
[ 1.220549] RPC: Registered udp transport module.
[ 1.225224] RPC: Registered tcp transport module.
[ 1.229907] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.236334] PCI: CLS 0 bytes, default 64
[ 1.240854] kvm [1]: HYP mode not available
[ 1.247543] Initialise system trusted keyrings
[ 1.249234] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[ 1.262658] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.266308] NFS: Registering the id_resolver key type
[ 1.270690] Key type id_resolver registered
[ 1.274838] Key type id_legacy registered
[ 1.278838] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.285511] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.292908] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.299464] 9p: Installing v9fs 9p2000 file system support
[ 1.321024] Key type asymmetric registered
[ 1.322258] Asymmetric key parser 'x509' registered
[ 1.327165] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[ 1.334506] io scheduler mq-deadline registered
[ 1.339020] io scheduler kyber registered
[ 1.344069] pci-host-generic bfb00000.pci: host bridge /pci@bfb00000 ranges:
[ 1.350073] pci-host-generic bfb00000.pci: MEM 0x10000000..0x1000ffff -> 0x10000000
[ 1.357904] pci-host-generic bfb00000.pci: ECAM at [mem 0xbfb00000-0xbfbfffff] for [bus 00]
[ 1.366299] pci-host-generic bfb00000.pci: PCI host bridge to bus 0000:00
[ 1.372967] pci_bus 0000:00: root bus resource [bus 00]
[ 1.378171] pci_bus 0000:00: root bus resource [mem 0x10000000-0x1000ffff]
[ 1.385056] pci 0000:00:00.0: [110a:4106] type 00 class 0xff0000
[ 1.391048] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
[ 1.397518] pci 0000:00:01.0: [110a:4106] type 00 class 0xff0001
[ 1.403282] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x00000fff]
[ 1.409905] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x10000fff]
[ 1.416286] pci 0000:00:01.0: BAR 0: assigned [mem 0x10001000-0x10001fff]
[ 1.423676] EINJ: ACPI disabled.
[ 1.427098] Bus freq driver module loaded
[ 1.433950] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.438875] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 5, base_baud = 1562500) is a IMX
[ 1.454472] brd: module loaded
[ 1.460813] loop: module loaded
[ 1.504683] imx ahci driver is registered.
[ 1.507384] libphy: Fixed MDIO Bus: probed
[ 1.510933] tun: Universal TUN/TAP device driver, 1.6
[ 1.515357] thunder_xcv, ver 1.0
[ 1.518284] thunder_bgx, ver 1.0
[ 1.521510] nicpf, ver 1.0
[ 1.524328] Freescale FM module, FMD API version 21.1.0
[ 1.529414] Freescale FM Ports module
[ 1.533013] fsl_mac: fsl_mac: FSL FMan MAC API based driver
[ 1.538614] fsl_dpa: FSL DPAA Ethernet driver
[ 1.542943] fsl_advanced: FSL DPAA Advanced drivers:
[ 1.547856] fsl_proxy: FSL DPAA Proxy initialization driver
[ 1.553450] fsl_oh: FSL FMan Offline Parsing port driver
[ 1.559103] hclge is initializing
[ 1.561998] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 1.569209] hns3: Copyright (c) 2017 Huawei Corporation.
[ 1.574555] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 1.581534] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 1.587303] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.593078] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.599025] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[ 1.605926] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 1.611521] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 1.619298] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 1.625275] sky2: driver version 1.30
[ 1.629226] ivshmem-net 0000:00:01.0: enabling device (0000 -> 0002)
[ 1.635261] ivshmem-net 0000:00:01.0: TX memory at 0x00000000bfe80000, size 0x000000000007f000
[ 1.643779] ivshmem-net 0000:00:01.0: RX memory at 0x00000000bfe01000, size 0x000000000007f000
_ivshmem 0000:00:00.0: state_table at 0x00000000bfd00000, size 0x0000000000001000o58s ready
[ 1.667569] uio_ivshmem 0000:00:00.0: rw_section at 0x00000000bfd01000, size 0x0000000000009000
[ 1.676244] uio_ivshmem 0000:00:00.0: input_sections at 0x00000000bfd0a000, size 0x0000000000006000
[ 1.685268] uio_ivshmem 0000:00:00.0: output_section at 0x00000000bfd0e000, size 0x0000000000002000
[ 1.694814] VFIO - User Level meta-driver version: 0.3
[ 1.700138] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.705933] ehci-pci: EHCI PCI platform driver
[ 1.710384] ehci-platform: EHCI generic platform driver
[ 1.715598] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.721741] ohci-pci: OHCI PCI platform driver
[ 1.726175] ohci-platform: OHCI generic platform driver
[ 1.731493] usbcore: registered new interface driver usb-storage
[ 1.737402] usbcore: registered new interface driver usbserial_generic
[ 1.743876] usbserial: USB Serial support registered for generic
[ 1.749866] usbcore: registered new interface driver cp210x
[ 1.755414] usbserial: USB Serial support registered for cp210x
[ 1.761327] usbcore: registered new interface driver usb_serial_simple
[ 1.767836] usbserial: USB Serial support registered for carelink
[ 1.773904] usbserial: USB Serial support registered for zio
[ 1.779547] usbserial: USB Serial support registered for funsoft
[ 1.785535] usbserial: USB Serial support registered for flashloader
[ 1.791874] usbserial: USB Serial support registered for google
[ 1.797776] usbserial: USB Serial support registered for libtransistor
[ 1.804286] usbserial: USB Serial support registered for vivopay
[ 1.810274] usbserial: USB Serial support registered for moto_modem
[ 1.816526] usbserial: USB Serial support registered for motorola_tetra
[ 1.823127] usbserial: USB Serial support registered for novatel_gps
[ 1.829469] usbserial: USB Serial support registered for hp4x
[ 1.835189] usbserial: USB Serial support registered for suunto
[ 1.841092] usbserial: USB Serial support registered for siemens_mpi
[ 1.848500] i2c /dev entries driver
[ 1.850968] usbcore: registered new interface driver i2c-tiny-usb
[ 1.857640] imx-cpufreq-dt: probe of imx-cpufreq-dt failed with error -2
[ 1.863865] sdhci: Secure Digital Host Controller Interface driver
[ 1.869815] sdhci: Copyright(c) Pierre Ossman
[ 1.874218] Synopsys Designware Multimedia Card Interface Driver
[ 1.880265] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.885988] sdhci-esdhc-imx 30b40000.mmc: could not get pinctrl
[ 1.922878] mmc2: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA
[ 1.927813] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.934117] usbcore: registered new interface driver usbhid
[ 1.938650] usbhid: USB HID core driver
[ 1.943182] No fsl,qman node
[ 1.945348] Freescale USDPAA process driver
[ 1.949525] fsl-usdpaa: no region found
[ 1.953344] Freescale USDPAA process IRQ driver
[ 1.959898] usbcore: registered new interface driver snd-usb-audio
[ 1.966247] pktgen: Packet Generator for packet performance testing. Version: 2.75
[ 1.971766] drop_monitor: Initializing network drop monitor service
[ 1.977889] NET: Registered protocol family 26
[ 1.982808] NET: Registered protocol family 10
[ 1.987363] Segment Routing with IPv6
[ 1.990314] NET: Registered protocol family 17
[ 1.994752] 8021q: 802.1Q VLAN Support v1.8
[ 1.998931] lib80211: common routines for IEEE802.11 drivers
[ 2.004686] 9pnet: Installing 9P2000 support
[ 2.008803] tsn generic netlink module v1 init...
[ 2.013535] Key type dns_resolver registered
[ 2.018325] registered taskstats version 1
[ 2.021787] Loading compiled-in X.509 certificates
[ 2.028774] hctosys: unable to open rtc device (rtc0)
[ 2.031735] clk: Not disabling unused clocks
[ 2.035868] ALSA device list:
[ 2.038808] No soundcards found.
[ 2.042235] Warning: unable to open an initial console.
[ 2.047626] Waiting for root device /dev/mmcblk2p2...
[ 2.095262] mmc2: new DDR MMC card at address 0001
[ 2.097737] mmcblk2: mmc2:0001 DG4016 14.7 GiB
[ 2.101934] mmcblk2boot0: mmc2:0001 DG4016 partition 1 4.00 MiB
[ 2.107842] mmcblk2boot1: mmc2:0001 DG4016 partition 2 4.00 MiB
[ 2.113647] mmcblk2rpmb: mmc2:0001 DG4016 partition 3 4.00 MiB, chardev (237:0)
[ 2.123465] mmcblk2: p1 p2
[ 2.139262] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.144558] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.150930] devtmpfs: error mounting -2
[ 2.156025] Freeing unused kernel memory: 3712K
[ 2.158906] Run /sbin/init as init process
[ 2.162934] Run /etc/init as init process
[ 2.166921] Run /bin/init as init process
[ 2.170922] Run /bin/sh as init process
[ 2.174728] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 2.188854] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.147+gbbb2e2b #1
[ 2.195620] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 2.200655] Call trace:
[ 2.203094] dump_backtrace+0x0/0x140
[ 2.206734] show_stack+0x14/0x20
[ 2.210036] dump_stack+0xb4/0x110
[ 2.213419] panic+0x158/0x360
[ 2.216455] kernel_init+0xf0/0x108
[ 2.219929] ret_from_fork+0x10/0x1c
[ 2.223489] SMP: stopping secondary CPUs
[ 2.227396] Kernel Offset: disabled
[ 2.230865] CPU features: 0x0002,2000200c
[ 2.234856] Memory Limit: none
[ 2.237901] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---