Hi all,
Im trying to run openwrt via qemu on a Pi like this:
qemu-system-aarch64 -M virt -m 128m -kernel openwrt-21.02.1-armvirt-64-Image -drive file=openwrt-21.02.1-armvirt-64-rootfs-ext4.img,format=raw,if=virtio -no-reboot -nographic -nic user -nic user -cpu cortex-a53 -smp 2 -append "root=fe00"
It did the trick (just booting for now...) but I get 100% CPU on one core for ever... and I also dont know why if I try to switch to -cpu host I get "qemu-system-aarch64: unable to find CPU model 'host'"
I havent done anything else other than booting and waiting to stabilise.
Any qemu aficionado to help me a bit?
Thanks
boot log:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP Sun Oct 24 09:01:35 2021
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 20 pages/cpu s44248 r8192 d29480 u81920
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 843419
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32256
[ 0.000000] Kernel command line: root=fe00
[ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 103848K/131072K available (6846K kernel code, 404K rwdata, 1040K rodata, 512K init, 289K bss, 27224K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: CONFIG_RCU_FANOUT set to non-default value of 32.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2.
[ 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] GICv2m: range[mem 0x08020000-0x08020fff], SPI[80:143]
[ 0.000000] random: get_random_bytes called from 0xffffffc010840b98 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[ 0.001177] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.066001] Console: colour dummy device 80x25
[ 0.083767] printk: console [tty0] enabled
[ 0.099294] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[ 0.101270] pid_max: default: 32768 minimum: 301
[ 0.120695] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.122265] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.566229] ASID allocator initialised with 32768 entries
[ 0.579454] rcu: Hierarchical SRCU implementation.
[ 0.651508] smp: Bringing up secondary CPUs ...
[ 0.689697] Detected VIPT I-cache on CPU1
[ 0.697564] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.760451] smp: Brought up 1 node, 2 CPUs
[ 0.761550] SMP: Total of 2 processors activated.
[ 0.764559] CPU features: detected: 32-bit EL0 Support
[ 0.765394] CPU features: detected: CRC32 instructions
[ 0.787480] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[ 0.793176] CPU: All CPU(s) started at EL1
[ 0.797470] alternatives: patching kernel code
[ 1.063904] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 1.070908] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 1.421212] NET: Registered protocol family 16
[ 1.470924] DMA: preallocated 256 KiB pool for atomic allocations
[ 1.640239] cpuidle: using governor menu
[ 1.670679] Serial: AMBA PL011 UART driver
[ 2.240141] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1
[ 2.353771] printk: console [ttyAMA0] enabled
[ 3.332079] cryptd: max_cpu_qlen set to 1000
[ 3.484573] SCSI subsystem initialized
[ 3.539936] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[ 3.749051] clocksource: Switched to clocksource arch_sys_counter
[ 4.156447] thermal_sys: Registered thermal governor 'step_wise'
[ 4.205370] NET: Registered protocol family 2
[ 4.240306] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 4.508682] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 4.515190] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 4.521937] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 4.527851] TCP: Hash tables configured (established 1024 bind 1024)
[ 4.556153] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 4.563895] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 4.607144] NET: Registered protocol family 1
[ 4.619833] PCI: CLS 0 bytes, default 64
[ 5.303886] workingset: timestamp_bits=46 max_order=15 bucket_order=0
[ 5.632465] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 5.639338] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 5.950277] 9p: Installing v9fs 9p2000 file system support
[ 6.055862] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 6.168600] atomic64_test: passed
[ 6.252819] pl061_gpio 9030000.pl061: PL061 GPIO chip registered
[ 6.283555] pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
[ 6.296378] pci-host-generic 4010000000.pcie: IO 0x3eff0000..0x3effffff -> 0x00000000
[ 6.308374] pci-host-generic 4010000000.pcie: MEM 0x10000000..0x3efeffff -> 0x10000000
[ 6.314641] pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 6.331251] pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
[ 6.352438] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00
[ 6.359987] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 6.367198] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 6.371011] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[ 6.375108] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[ 6.397848] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[ 6.460434] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[ 6.468887] pci 0000:00:01.0: reg 0x10: [io 0x0000-0x001f]
[ 6.475731] pci 0000:00:01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 6.479466] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 6.488705] pci 0000:00:02.0: [1af4:1000] type 00 class 0x020000
[ 6.492180] pci 0000:00:02.0: reg 0x10: [io 0x0000-0x001f]
[ 6.498317] pci 0000:00:02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 6.500435] pci 0000:00:02.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 6.512487] pci 0000:00:03.0: [1af4:1001] type 00 class 0x010000
[ 6.518508] pci 0000:00:03.0: reg 0x10: [io 0x0000-0x007f]
[ 6.520306] pci 0000:00:03.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 6.526640] pci 0000:00:03.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 6.583368] pci 0000:00:01.0: BAR 6: assigned [mem 0x10000000-0x1003ffff pref]
[ 6.590511] pci 0000:00:02.0: BAR 6: assigned [mem 0x10040000-0x1007ffff pref]
[ 6.596782] pci 0000:00:01.0: BAR 4: assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[ 6.603906] pci 0000:00:02.0: BAR 4: assigned [mem 0x8000004000-0x8000007fff 64bit pref]
[ 6.608079] pci 0000:00:03.0: BAR 4: assigned [mem 0x8000008000-0x800000bfff 64bit pref]
[ 6.612620] pci 0000:00:03.0: BAR 1: assigned [mem 0x10080000-0x10080fff]
[ 6.616354] pci 0000:00:03.0: BAR 0: assigned [io 0x1000-0x107f]
[ 6.620604] pci 0000:00:01.0: BAR 0: assigned [io 0x1080-0x109f]
[ 6.624107] pci 0000:00:02.0: BAR 0: assigned [io 0x10a0-0x10bf]
[ 6.787202] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[ 6.839917] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[ 6.878174] virtio-pci 0000:00:03.0: enabling device (0000 -> 0003)
[ 6.939914] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 7.126471] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 7.511742] loop: module loaded
[ 7.848198] virtio_blk virtio2: [vda] 212992 512-byte logical blocks (109 MB/104 MiB)
[ 8.153077] Loading iSCSI transport class v2.0-870.
[ 8.504397] rtc-pl031 9010000.pl031: registered as rtc0
[ 8.602801] NET: Registered protocol family 10
[ 8.787627] Segment Routing with IPv6
[ 8.799744] NET: Registered protocol family 17
[ 8.815639] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 8.822575] 8021q: 802.1Q VLAN Support v1.8
[ 8.850404] 9pnet: Installing 9P2000 support
[ 8.996095] rtc-pl031 9010000.pl031: setting system clock to 2021-12-23T14:18:02 UTC (1640269082)
[ 9.196185] uart-pl011 9000000.pl011: no DMA platform data
[ 9.568069] EXT4-fs (vda): mounted filesystem without journal. Opts: (null)
[ 9.599578] VFS: Mounted root (ext4 filesystem) readonly on device 254:0.
[ 9.776882] Freeing unused kernel memory: 512K
[ 9.827794] Run /sbin/init as init process
[ 15.079559] init: Console is alive
[ 17.216815] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 17.260091] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 17.408268] init: - preinit -
[ 30.894199] random: jshn: uninitialized urandom read (4 bytes read)
[ 32.692965] random: jshn: uninitialized urandom read (4 bytes read)
[ 33.828317] random: jshn: uninitialized urandom read (4 bytes read)
[ 35.136322] random: jshn: uninitialized urandom read (4 bytes read)
[ 36.828654] 8021q: adding VLAN 0 to HW filter on device eth0
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 54.724859] mount_root: mounting /dev/root
[ 54.915858] EXT4-fs (vda): re-mounted. Opts: (null)
[ 55.083644] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 58.256706] procd: - early -
[ 139.671641] kmodloader: loading kernel modules from /etc/modules.d/*
[ 143.850704] xt_time: kernel timezone is -0000
[ 145.166583] PPP generic driver version 2.4.2
[ 145.544564] NET: Registered protocol family 24
[ 146.868636] kmodloader: done loading kernel modules from /etc/modules.d/*