Discussion:
Basic ISO Boot to Command Prompt
Chris Rothrock
2016-09-08 21:17:54 UTC
Permalink
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. 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?

Chris
--
Thank You,

Chris Rothrock
Senior System Administrator
(315) 308-1637
Norman Feske
2016-09-09 09:39:12 UTC
Permalink
Hi Chris,
Post by Chris Rothrock
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
the comport).
Post by Chris Rothrock
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.

[1] http://genode.org/documentation/genode-foundations-16-05.pdf

Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs

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

------------------------------------------------------------------------------
Chris Rothrock
2016-09-09 11:12:50 UTC
Permalink
Norman,

Ok, so going off these instructions I want to try to reproduce the demo ISO
that is available for download. When I use the basic make run/demo, this
demo scenario runs perfectly fine through qemu on my Linux machine and
creates a bootable ISO image, however that bootable ISO image does NOT act
the same way that the pre-compiled demo does - it has no framebuffer
output, only serial output. How do I compile the demo to make a bootable
ISO that outputs to the screen with framebuffer? I would have thought that
this was what the run/demo does but it does not.

Chris
Post by Norman Feske
Hi Chris,
Post by Chris Rothrock
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
the comport).
Post by Chris Rothrock
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.
[1] http://genode.org/documentation/genode-foundations-16-05.pdf
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
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
------------------------------------------------------------
------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Thank You,

Chris Rothrock
Senior System Administrator
(315) 308-1637
Norman Feske
2016-09-09 11:33:09 UTC
Permalink
Hi Chris,
Post by Chris Rothrock
Ok, so going off these instructions I want to try to reproduce the demo
ISO that is available for download. When I use the basic make run/demo,
this demo scenario runs perfectly fine through qemu on my Linux machine
and creates a bootable ISO image, however that bootable ISO image does
NOT act the same way that the pre-compiled demo does - it has no
framebuffer output, only serial output. How do I compile the demo to
make a bootable ISO that outputs to the screen with framebuffer? I
would have thought that this was what the run/demo does but it does not.
the ISO should indeed produce the same scenario that you see on Qemu.
Could it be that the VESA framebuffer driver fails on your specific
hardware?

Have you tried to boot the ISO on a different machine?

Could you give the scenario a try with a different kernel?

You say that you see log output. I wonder, does it reveal any problem?
Could you post the output here?

With "pre-compiled demo", do you refer to the example that we provide
with the current release notes? You can find the run script for this
specific scenario on the following branch (please review the last few
commits on the branch):

https://github.com/alex-ab/genode/commits/sel4_screenshot

But since you reported problems with the framebuffer on your real
machine, we should first try to get a simple scenario like
framebuffer.run or demo.run to work.

Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs

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

------------------------------------------------------------------------------
Chris Rothrock
2016-09-09 15:53:39 UTC
Permalink
Norman,

It seems you were right about the hardware - the laptop I was using for my
testing can load the demo from within the hardware linux install through
the qemu emulator but that laptop fails to load the framebuffer directly.
On another machine, I can successfully launch the ISO as a hardware boot as
well as a VirtualBox boot. This now being successful, my next step is to
get TinyCore running within VirtualBox on a Genode build (a hardware boot,
not within QEMU or a VM). This part seems more problematic since I can get
the ISO to boot but upon loading the TinyCore linux within VirtualBox
inside Genode it hangs at "Loading Kernel". From what I understand this
should produce a successfully loaded OS running inside the Genode
environment.
Post by Norman Feske
Hi Chris,
Post by Chris Rothrock
Ok, so going off these instructions I want to try to reproduce the demo
ISO that is available for download. When I use the basic make run/demo,
this demo scenario runs perfectly fine through qemu on my Linux machine
and creates a bootable ISO image, however that bootable ISO image does
NOT act the same way that the pre-compiled demo does - it has no
framebuffer output, only serial output. How do I compile the demo to
make a bootable ISO that outputs to the screen with framebuffer? I
would have thought that this was what the run/demo does but it does not.
the ISO should indeed produce the same scenario that you see on Qemu.
Could it be that the VESA framebuffer driver fails on your specific
hardware?
Have you tried to boot the ISO on a different machine?
Could you give the scenario a try with a different kernel?
You say that you see log output. I wonder, does it reveal any problem?
Could you post the output here?
With "pre-compiled demo", do you refer to the example that we provide
with the current release notes? You can find the run script for this
specific scenario on the following branch (please review the last few
https://github.com/alex-ab/genode/commits/sel4_screenshot
But since you reported problems with the framebuffer on your real
machine, we should first try to get a simple scenario like
framebuffer.run or demo.run to work.
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
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
------------------------------------------------------------
------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Thank You,

Chris Rothrock
Senior System Administrator
(315) 308-1637
Loading...