Basic ISO Boot to Command Prompt
norman.feske at ...1...
Fri Sep 9 11:39:12 CEST 2016
On 08.09.2016 23:17, Chris Rothrock wrote:
> I am trying to build the most basic Genode build that creates a bootable
> ISO image that, once booted, brings me to a command prompt and outputs
> to a screen, not to a serial connection.
in Genode, there is no command prompt to speak of. The most basic
scenario that outputs something on screen is the framebuffer.run script
that you can find at repos/os/run/.
Of course there are scenarios that let you interact with the Genode
components like bash running in a Noux runtime. But this is not a basic
scenario but a fairly complex one. You may take a look at
ports/run/noux_bash.run. Also, what you see when booting the scenario is
simply a bash shell, which does not illustrate any Genode-specific
feature. So in my opinion it is not a good starting point.
Btw, there exists a command-line based component called CLI monitor (at
os/src/app/cli_monitor) that allows for the starting and killing of
subsystems in an interactive way. But there is not ready-to-use run
script that presents it on screen. Also, unlike a shell on Unix, the
output of the started subsystems is not printed in the CLI monitor. It
goes to a LOG service (like the one provided by core that prints it on
> I'm fairly familiar with the
> build process and I have made numerous demo builds work from within qemu
> but I am trying to make a stand-alone bootable image. So far I am only
> getting the boot loader message where the kernel loads (in this round I
> am simply using the Nova hypervisor but any kernel is fine for my demo
> boot). What am I missing to make this happen?
A bootable image is automatically created when you execute a run script.
E.g., after issuing 'make framebuffer.run', you can find an ISO image of
the scenario at var/run/framebuffer.iso. The simplest way to boot it on
a real machine is to use 'dd' to copy the ISO file to an USB stick and
let your machine boot from the USB stick.
We never use tools like 'create_iso' manually, nor do we modify boot
configurations or ISO images by hand. Instead, the workflow of Genode is
based on the run tool that automates these steps for us. If you want to
see the steps you would need to take to manually assemble a boot image
without the run tool, you may look at the files at tool/run. For
example, the function 'run_boot_dir' in boot_dir/nova tells you how a
GRUB menu.lst file is created to run a Genode scenario on NOVA, or the
function 'run_image' in image/iso tells you how a boot directory is
turned into an ISO image.
Those steps are tedious. Hence, I warmly recommend you to leverage the
run tool to automate this work. As the run tool is highly modular, it is
quite easy to tune it according to different needs. E.g., we routinely
boot a test machine via PXE and tftp, obtain the serial output via AMT
serial-over-line, and power-cycle the machine via a networked-controlled
PDU. This can be achieved my a mere configuration of the run tool. You
can find more examples in Section 5.4.2. "Run-tool configuration
examples" in the Genode Foundations book.
Dr.-Ing. Norman Feske
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users