Setting up Debian VM for BBB

Hi All,
I realize my question is VirtualBox related but I’m stuck trying to set up Debian ‘Buster’ as my VM for my BBB.
I’ve gone through several blogs on the setup but it still won’t boot Debian.

My iso image is: debian-10.0.0-armhf-netinst.iso
When I start the VM it drops me into a UEFI shell. If I then go to FS0: and do a directory I can ‘see’ the Debian files.

Capture1.PNG

Capture2.PNG

I have no idea what the UEFI shell is or why I’m there ??? Can you help me boot Debian? Here is a screenshot of my VM setup:

Capture3.PNG

Thanks in advance !!!

If I disable EFI under System I get response “No bootable medium found!”

Maybe it's because you're running VirtualBox on Windows host, and trying
to run ARM guest. I don't think VirtualBox can emulate ARM cpu.

Your beagleBone install is armhf. Is your host armhf as well or x86_64?
If it is x86_64, how would that work?

isn’t it because your virtualbox host is x86_64, but the VM is armhf?

Another note, my host is Windows 10 Home 10.0.17134 build 17134

Hi Brian,

It could be I don’t understand something fundamental, or something very strange is being attempted.

A Windows 10 PC, if it has an x86 or x64 processor, cannot use VirtualBox in this manner, to run a Linux image intended for a BBB. The BBB doesn’t have an x86 or x64 processor, and VirtualBox isn’t intended for emulating ARM processors (unless things have changed significantly… I have not tried VirtualBox for years).

Capture1.PNG

Capture2.PNG

Capture3.PNG

Hello,

Look into QEMU. https://qemu.weilnetz.de/doc/qemu-doc.html.

Seth

P.S. It is lengthy but if you figure it out, you can share w/ the rest of the group. I have tried QEMU before and failed. More power to you!

Hello Mr. Brian,

Seth here. Here is another link for QEMU stuff: https://wiki.qemu.org/Main_Page. It is the wiki page in case the hyperlink did not give it away.

Also, the book by Molloy might have an addition to QEMU plus examples. His first book on the BBB does. Oh and his newest book on the BeagleBone Black Wireless does also.

Seth

Thank you! My immediate problem was I was using the armhf iso on the VM. I changed this to the debian i386 iso and it booted. I’m ready to install. I guess my next lurking issue will be QEMM. I’m using Derek Molloy’s book and video as a guideline in this adventure,

Thanks,
Brian

Sir,

I can and will help you but we need to be very descriptive and make it public for this bunch of people, this chat, and for the BBB family of boards.

This may sound like me reaching out b/c it is me reaching out. I will pitch in is what I am saying. I will take time out to help you help me help everyone.

Seth

P.S. Let me know what you think.

Hello,

Nice! I am glad you got it. I can go to that page in the book anytime you need help. I have the newer version of the book, too.

Seth

P.S. If you need anything from that section, let me know. I can try to explain to the point my face turns blue. QEMU!

Hi Brian,

It could be I don't understand something fundamental, or something very
strange is being attempted.

A Windows 10 PC, if it has an x86 or x64 processor, cannot use VirtualBox in
this manner, to run a Linux image intended for a BBB. The BBB doesn't have
an x86 or x64 processor, and VirtualBox isn't intended for emulating ARM
processors (unless things have changed significantly.. I have not tried
VirtualBox for years).

There are two *different* things happening: Virtualization and Emulation.
*Virtualization* (what VirtualBox generally does), means running a complete
machine in a "protectected" state (as a "virtual machine"). This makes uses
of special processor instructions and memory management that allows running
*on the base processor*, but it a kind of "fun house mirror" way.

Emulation is something different. This is a regular program that *emulates* a
processor, that is it is a piece of software that does what a piece of
hardware does. This is something completely different.

It is NOT possible to create a true virtual machine for a *different*
processor type on a x86_64 processor. Modern x86_64 processor can run virtual
machines that are either x86_64 or i686 processor based. Basically, you
cannot have an arm VM running on a x86_64 processor, at least not as a normal
VM. In theory, it is possible to write and install an arm *emulator* that
will run on a x86_64 processor. But emulating a full-fledged Linux operating
system with that emulator is going to be really slow.

I don't know if VirtualBox includes a arm emulator or not (I would guess not).

Thank you! My immediate problem was I was using the armhf iso on the VM. I
changed this to the debian i386 iso and it booted. I'm ready to install. I
guess my next lurking issue will be QEMM. I'm using Derek Molloy's book and
video as a guideline in this adventure,

The i386 processor type matches what the x86_64 processors can run as virtual
machines. Note: the i386 iso is not a BBB iso and cannot run beagleboard
programs.

I’ll admit I’m a newbie at this. I’m following Derek Molloy’s book and videos, specifically chapter 7 in his book, http://exploringbeaglebone.com/chapter7/
He uses a windows host and VirtualBox running debian to set up a tool chain using Eclipse CDT and QEMU to write & debug code for the Beaglebone, including remote debug on the BB. The BB is running an arm hard float debian. I’ll post a progress report when I get it working,

Brian

I'll admit I'm a newbie at this. I'm following Derek Molloy's book and
videos, specifically chapter 7 in his book,
http://exploringbeaglebone.com/chapter7/
He uses a windows host and VirtualBox running debian to set up a tool chain
using Eclipse CDT and QEMU to write & debug code for the Beaglebone,
including remote debug on the BB. The BB is running an arm hard float
debian. I'll post a progress report when I get it working,

This *sounds* like what is going on is running x86 debian in VirtualBox and
then using a cross-build tool chain. (The "remote debug" is the give away
here.) Although, QEMU appears to include an ARM "emulator", but it is not
really a *BBB* oriented. Building a cross-build tool chain for an ARM Linux
target is hard enough on a Linux host, it is going to be even harder with a
MS-Windows host. GCC's build infrastructure depends on make and the
autotools, which are not really available, natively, under MS-Windows.

*I* expect it is going to easier (at this point) to just get a Raspberry Pi
and use that as a build/debug host. Raspberry Pis are dirt cheap ($35, even
for a Raspberry Pi 4) and have all of the user-friendly features -- GUI, etc.
And being a quad-core, 64bit processor, means it is fast enough to use as a
desktop build box, even running an IDE (eg Eclipse). Code compiled *natively*
on a Raspberry Pi will run on a Beagle, just by copying the ELF binary over.

The only thing "missing" from a Raspberry Pi is a powerful GPU and SATA ports,
but these are "minor" issues... *I* am probably going to not bother getting a
newer laptop once my current laptop gets too old to be usable and will likely
just build a battery powered Raspberry Pi based system. I may end up with only
two Intel x86 processor machines: a desktop tower, that will be mostly
functioning as a LAN server (dhcpd, named, and amanda backup host) and x86
Linux build host and a MacMini as a MacOSX build host.

Building a cross-build tool chain for an ARM Linux target is hard enough on a Linux host, it is going to be even harder with a MS-Windows host.
GCC’s build infrastructure depends on make and the autotools, which are not really available, natively, under MS-Windows.

I’ve documented cross-compiling '(and debugging) on Windows with Linaro GCC, and/or ARM DS-5/ CCS IDE:

https://www.element14.com/community/people/jancumps/blog/2016/07/31/beaglebone-cross-compile-c-on-windows

https://www.element14.com/community/community/designcenter/single-board-computers/next-gen_beaglebone/blog/2019/05/18/build-and-debug-a-linux-c-program-with-code-composer-studio

I believe that the steps, if taken exactly, are repeatable.
I’m currently working on how to do that on the new Arm Developer Studio with their non-commercially-licensed option.
I can build and debug, but not automatically deploy on that environment (yet).

Regards, Jan

On Sun, 8 Sep 2019 09:57:47 -0700 (PDT), Brian Tremaine
<btremaine@gmail.com> declaimed the
following:

Hi All,
I realize my question is VirtualBox related but I'm stuck trying to set up
Debian 'Buster' as my VM for my BBB.
I've gone through several blogs on the setup but it still won't boot Debian.

My iso image is: debian-10.0.0-armhf-netinst.iso
When I start the VM it drops me into a UEFI shell. If I then go to FS0: and
do a directory I can 'see' the Debian files.

  VirtualBox is a package for running guest operating systems within
another OS. It does not emulate different hardware processors so the guest
OS must be one that is compatible with the hardware in use.

  If you are running on a 64-bit Windows system, you will need either a
32 or 64 bit Intel compatible image for Debian (since 64-bit Intel can run
32-bit, though I'd recommend matching the actual processor). I downloaded
(but have not installed) the following

C:\Users\Wulfraed>dir e:\Debian-Buster
Volume in drive E is PhotoExt
Volume Serial Number is CA0A-BC13

Directory of e:\Debian-Buster

07/07/2019 02:35 PM <DIR> .
07/07/2019 02:35 PM <DIR> ..
07/07/2019 02:14 PM 3,841,982,464 debian-10.0.0-amd64-DVD-1.iso
07/07/2019 02:31 PM 4,688,773,120 debian-10.0.0-amd64-DVD-2.iso
07/07/2019 02:35 PM 4,688,506,880 debian-10.0.0-amd64-DVD-3.iso
               3 File(s) 13,219,262,464 bytes
               2 Dir(s) 3,377,198,362,624 bytes free

C:\Users\Wulfraed>

I'm still running Stretch in VirtualBox on my system (I should update the
running version of VBox some day and then install the new Debian).

  You would then set up a /cross-compiler/ toolchain -- this is one that
runs on the native processor but creates binaries for a different
architecture (eg: ARM).

  Those binaries can not run on the native architecture. You either have
to copy them to a hardware board (Beagle of some sort) to execute, or you
use a program that emulates (interprets) that foreign architecture's
instruction set (often fairly slowly -- though a high-speed Intel chipset
might get close to the slower Beagle: a 3GHz Intel using three instructions
to emulate one ARM would be close to 1GHz ARM speed -- though I suspect the
rate isn't that good, maybe closer to 5 instructions->1 instruction).

  QEMU is one such hardware emulator. However, unless someone has spent a
lot of time I suspect it will only emulate the core ARM instructions -- it
likely won't emulate the PRUs.

  I have not set up QEMU so can't speak of the difficulties.

  Oh, BTW... If you have a recent Win10 install (maybe Professional or
higher) you may not even need to use Virtual Box.

  Win10 Pro optional features (<right-click START>, Search "features",
"Turn Windows features on or off") includes

  Hyper-V
    Hyper-V Management Tools
      Hyper-V GUI Management Tools
      Hyper-V Module for Windows PowerShell
    Hyper-V Platform
      Hyper-V Hypervisor
      Hyper-V Services

Running systeminfo (as shown in the first link) on my machine gives:

C:\Users\Wulfraed>systeminfo

Host Name: ELUSIVEUNICORN
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.18362 N/A Build 18362

  <SNIP>

System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 58 Stepping 9
GenuineIntel ~3401 Mhz

  <SNIP>

Hyper-V Requirements: VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

  Hyper-V should give practically the same capabilities as VirtualBox
(though knowing M$, they probably don't support packaging in compatible
file types <G> )