I'm trying to nail down a buildroot (version 2017.02.4) config, and I need to separate kernel-related issues from software environment issues.
So I've tried to build a simple disk image which will work both in a Buildroot environment and a real machine.
I took a generic config, built it into an image, converted it to a vdi, and attached it to a Virtualbox VM.
make pc_x86_64_bios_defconfig
make clean
make
VBoxManage output/images/disk.img output/images/disk.vdi
This boots, but hangs at 'Booting Buildroot
'
I did this also with a qemu_x86_64_defconfig (slightly modified to create a grub2 disk image using genimage) and got the same result. I did this before a few years ago, so I don't understand why it wouldn't work now.
What config is causing this to hang?
Do Virtualbox guests need a special hook to boot properly?
UPDATE: These images appear to work in qemu kvm
, so it must be a Virtualbox config or specification issue.
The
pc_x86_64_bios_defconfig
seems to be 64bit. In Oracle VirtualBox, hardware support for virtualization (Intel VT-x or AMD-v) is required for all 64bit VMs, even when the host OS is 64bit. KVM just does the virtualization differently.Because the string "Buildroot" isn't known to Virtualbox, when creating the machine it offers type "Other" and version "Other / Unknown".
As the name seemed very generic, I presumed this meant that it was agnostic bitwise*.
Under the bonnet, this is a 32-bit option and there is a "version" called "Other / Unknown (64-bit)".
As soon as I had changed this to a 64-bit option, everything worked. It probably half-worked because Grub, being smart about early CPU state, is mostly 32-bit code.
*Some websites implied that VT simply passed-through the bitsize from the host, which in my case was 64-bit, which further compounded my assumptions.