Getting VT-X is not available inside CENTOS7 guest - vagrant

I have currently got a CENTOS7 guest inside windows 10 host and I am trying to install vagrant and Virtual box inside the CENTOS guest to create a kubernetes cluster for local development.
I have installed vagrant 2.1.1 and VirtualBox 5.2.12
When I am trying to
vagrant up
It says VT-X is not available.
I have turned on Virtualization in BIOS and I have checked windows features and HyperV is disabled/unchecked.
Also when I cat the /proc/cpuinfo , vmx is not in the flags
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2400 CPU # 3.10GHz
stepping : 7
cpu MHz : 3092.984
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni ssse3 sse4_1 sse4_2 x2apic hypervisor lahf_lm
bogomips : 6185.96
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Also for the lscpu command :
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Model name: Intel(R) Core(TM) i5-2400 CPU # 3.10GHz
Stepping: 7
CPU MHz: 3092.984
BogoMIPS: 6185.96
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0,1
I would really appreciate any insight on how I can get this resolved.

You disabled hyper-v, this means that you are using alternative hypervisor(virtualbox?). I don't think that anything except hyper-v on windows supports nested virtualization.
You can give a try to hyper-v guest with centos(with enabled nested virtualization by command Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true) and run virtualbox with vagrant inside it.

Related

pm2 start -i max run on 12 vcpu buy my ec2 only has 8 vcpu

I just upgrade our AWS EC2 instance from t2.xlarge to t2.2xlarge, so our instance now has 8 vCPU. Upon restarting the server, I run the command pm2 start src/app.js -i max -f and to my surprise, instead of my app running on 8vCPU, it now runs on 12 vCPU. At least that's what's the pm2 list displayed. What really happen here?
Here's the output of cat /proc/cpuinfo
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2686 v4 # 2.30GHz
stepping : 1
microcode : 0xb000038
cpu MHz : 2300.118
cache size : 46080 KB
physical id : 0
siblings : 8
core id : 7
cpu cores : 8
apicid : 14
initial apicid : 14
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x 2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_ lm abm cpuid_fault invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 4600.13
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
Summary of what we talked about in the comments.
The output of cat /proc/cpuinfo tells us, that the instance actually has 8 CPU cores, which we can see from this line:
cpu cores : 8
That tells us AWS is giving you what you're paying for :-)
I don't know anything about pm2, but the docs tell me, that -i max in pm2 start src/app.js -i max -f tells pm2 to start as many worker processes as there are CPU cores.
It seems that somehow the CPU core detection has been messed up when you changed the instance type and it has chosen to add the new 8 cores to the 4 cores it already knew about to now give you 12 processes.
As a workaround you can explicitly set the number of worker processes to 8 like this:
pm2 start src/app.js -i 8 -f

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.

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.

Using pci_enable_msi_block

I am trying to enable multiple MSI irq lines in a kernel module. I am operating in RC mode. The problem is when I call pci_enable_msi_block() it will not allocate more than 1 MSI. If I call pci_enable_msi_block(dev, 32) it will return 4 (which I assume should mean I can use 4 MSI). I then call pci_enable_msi_block(dev,4) and it returns 1.
Here is an output from $lspci -v after insmod Custom_module.ko but with only a successful enable of 1 MSI
00:00.0 PCI bridge: Texas Instruments Device 8888 (rev 01) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Memory at <ignored> (32-bit, non-prefetchable)
Memory at <ignored> (32-bit, prefetchable)
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00001000-00001fff
Memory behind bridge: 50000000-501fffff
Prefetchable memory behind bridge: 50200000-503fffff
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Port (Slot-), MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: pcieport
01:00.0 Memory controller: Xilinx Corporation Device 7022
Subsystem: Xilinx Corporation Device 0007
Flags: bus master, fast devsel, latency 0, IRQ 576
Memory at 50000000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable+ Count=4/4 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: Custom_Module
How do I go about using more than 1 MSI. I can use JTAG to edit the Enable_MSI registers and then the EP can trigger the MSI, but there is no handler dedicated to these IRQs.

Failure with booting of qemu_x86_defconfig in buildroot-2011.11?

I have built the qemu_x86_defconfig with buildroot-2011.11, the
qemu-system-i386 version is 1.0.50 and I use the external cross toolchain of Sourcery CodeBench
x86/x86_64 2010.09, but I encountered the following problem:
Linux version 3.0.4 (liunx#liunx-desktop) (gcc version 4.5.1 (Sourcery
G++ Lite 2010.09-44) ) #2 Wed Dec 28 12:33:03 CST 2011
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fffd000 (usable)
BIOS-e820: 000000000fffd000 - 0000000010000000 (reserved)
BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
Notice: NX (Execute Disable) protection missing in CPU!
DMI 2.4 present.
last_pfn = 0xfffd max_arch_pfn = 0x100000
init_memory_mapping: 0000000000000000-000000000fffd000
ACPI: RSDP 000fd910 00014 (v00 BOCHS )
ACPI: RSDT 0fffd7b0 00034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 0fffff80 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 0fffd9b0 02589 (v01 BXPC BXDSDT 00000001 INTL 20100528)
ACPI: FACS 0fffff40 00040
ACPI: SSDT 0fffd910 0009E (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
ACPI: APIC 0fffd830 00072 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
ACPI: HPET 0fffd7f0 00038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
0MB HIGHMEM available.
255MB LOWMEM available.
mapped low ram: 0 - 0fffd000
low ram: 0 - 0fffd000
Zone PFN ranges:
DMA 0x00000010 -> 0x00001000
Normal 0x00001000 -> 0x0000fffd
HighMem empty
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0x00000010 -> 0x0000009f
0: 0x00000100 -> 0x0000fffd
ACPI: PM-Timer IO Port: 0xb008
Allocating PCI resources starting at 10000000 (gap: 10000000:effc0000)
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64908
Kernel command line: root=/dev/sda rw console=ttyS0,115200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Initializing CPU#0
Initializing HighMem for node 0 (00000000:00000000)
Memory: 255264k/262132k available (2539k kernel code, 6416k reserved,
1025k data, 268k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xfffe4000 - 0xfffff000 ( 108 kB)
pkmap : 0xff800000 - 0xffc00000 (4096 kB)
vmalloc : 0xd07fd000 - 0xff7fe000 ( 752 MB)
lowmem : 0xc0000000 - 0xcfffd000 ( 255 MB)
.init : 0xc137c000 - 0xc13bf000 ( 268 kB)
.data : 0xc127ae73 - 0xc137b540 (1025 kB)
.text : 0xc1000000 - 0xc127ae73 (2539 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
SLUB: Genslabs=15, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16
Console: colour VGA+ 80x25
console [ttyS0] enabled
Fast TSC calibration failed
TSC: Unable to calibrate against PIT
TSC: using PMTIMER reference calibration
Detected 3013.653 MHz processor.
Calibrating delay loop (skipped), value calculated using timer
frequency.. 6027.30 BogoMIPS (lpj=12054612)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Intel QEMU Virtual CPU version 1.0.50 stepping 03
ACPI: Core revision 20110413
ACPI: setting ELCR to 0200 (from 0c00)
Performance Events: Broken PMU hardware detected, using software events
only.
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xffe77, last bus=0
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S5)
ACPI: Using PIC for interrupt routing
PCI: Ignoring host bridge windows from ACPI; if necessary, use
"pci=use_crs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB
pci0000:00: Unable to request _OSC control (_OSC support mask: 0x08)
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs 9) *0
vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
vgaarb: bridge control possible 0000:00:02.0
SCSI subsystem initialized
Advanced Linux Sound Architecture Driver Version 1.0.24.
PCI: Using ACPI for IRQ routing
Switching to clocksource pit
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 8 devices
ACPI: ACPI bus type pnp unregistered
Switching to clocksource acpi_pm
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
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.
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:01.0: Activating ISA DMA hang workarounds
io scheduler noop registered (default)
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc080 irq 14
ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc088 irq 15
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
cpuidle: using governor ladder
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input1
ata2.00: ATAPI: QEMU DVD-ROM, 1.0.50, max UDMA/100
ata1.00: ATA-7: QEMU HARDDISK, 1.0.50, max UDMA/100
ata1.00: 10648 sectors, multi 16: LBA48
ata1.00: configured for MWDMA2
ata2.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 1.0. PQ: 0 ANSI: 5
scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 1.0. PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 10648 512-byte logical blocks: (5.45 MB/5.19 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't
support DPO or FUA
sda: unknown partition table
sd 0:0:0:0: [sda] Attached SCSI disk
EXT2-fs (sda): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 8:0.
Freeing unused kernel memory: 268k freed
Kernel panic - not syncing: No init found. Try passing init= option to
kernel. See Linux Documentation/init.txt for guidance.
Pid: 1, comm: swapper Not tainted 3.0.4 #2
Call Trace:
[<c1278026>] ? panic+0x57/0x12d
[<c137c71c>] ? do_one_initcall+0x12e/0x12e
[<c100117c>] ? init_post+0x6c/0xb0
[<c137c813>] ? kernel_init+0xf7/0xfe
[<c127a3b6>] ? kernel_thread_helper+0x6/0xd
QEMU: Terminated
Here is my qemu boot script:
qemu-system-i386 \
-m 256M \
-kernel images/bzImage \
-append "root=/dev/sda rw console=ttyS0,115200" \
-hda images/rootfs.ext2 \
-boot c \
-localtime \
-net nic,vlan=0,macaddr="12:34:56:78:9a:bc" \
-net nic,vlan=0,macaddr="12:34:56:78:bc:de" \
-net tap,vlan=0,ifname=tap0,script=./qemu-ifup \
-nographic
I also tried the qemu_arm_versatile_defconfig with the same qemu boot
script, and it works very well, so I really can not understand what's
wrong, and any tips?
regards
Back in late 2011, we had problems with the IA32 CodeSourcery toolchain, but they should now be fixed.
Try to use:
root=/dev/sda1
in boot script as sda1 corresponds to the first partition of the sda.
Have you tried to disable SELinux as mentioned in this thread?? Perhaps it might fix it.

Resources