1

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'

enter image description here

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.

  • I'm aware that we don't have a 'buildroot' tag yet on SF, but I looked everywhere else for buildroot and virtualbox tags. Only SO has them both, but the virtualbox tag there has a notice saying that it's limited to programming questions, and I don't see this as a programming question. Please suggest the appropriate forum if it's off-topic here as I spent alot of effort trying to find the right place for it! Thanks! – tudor -Reinstate Monica- Aug 03 '17 at 01:46

2 Answers2

1

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.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
1

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)".

enter image description here

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.