=encoding utf8 =head1 NAME novaboot - Boots a locally compiled operating system on a remote target or in qemu =head1 SYNOPSIS B --help B [option]... [--] script... B<./script> [option]... =head1 DESCRIPTION Novaboot makes booting of a locally compiled operating system (OS) (e.g. NOVA or Linux) on remote targets as simple as running a program locally. It automates things like copying OS images to a TFTP server, generation of bootloader configuration files, resetting of target hardware or redirection of target's serial line to stdin/out. Novaboot is highly configurable and makes it easy to boot a single image on different targets or different images on a single target. Novaboot operation is controlled by configuration files, command line options and by a so-called novaboot script, which can be thought as a generalization of bootloader configuration files (see L). The typical way of using novaboot is to make the novaboot script executable and set its first line to I<#!/usr/bin/env novaboot>. Then, booting a particular OS configuration becomes the same as executing a local program – the novaboot script. Novaboot uses configuration files to, among other things, define command line options needed for different targets. Users typically use only the B<-t>/B<--target> command line option to select the target. Internally, this option expands to the pre-configured options. Novaboot searches configuration files at multiple places, which allows having per-system, per-user or per-project configurations. Configuration file syntax is described in section L. Novaboot newcomers may be confused by a large number of configuration options. Understanding all these options is not always needed, depending on the used setup. The L
shows different setups that vary in how much effort is needed to configure novaboot for them. The setups are: =over 3 =item A: Laptop and target device only This requires to configure everything on the laptop side, including a serial line connection (L, L, ...), power on/off/reset commands (L, ...), TFTP server (L, L...), device IP addresses, etc. =item B: Laptop, target device and external TFTP server Like the previous setup, but the TFTP (and maybe DHCP) configuration is handled by a server. Novaboot users need to understand where to copy their files to the TFTP server (L) and which IP addresses their target will get, but do not need to configure the servers themselves. =item C: Novaboot server running novaboot-shell With this setup, the configuration is done on the server. Users only need to know the SSH account (L) used to communicate between novaboot and novaboot server. The server is implemented as a restricted shell (L) on the server. No need to give full shell access to novaboot users on the server. =back =head2 Simple examples of using C: To boot Linux (files F and F in current directory), create F file with this content: #!/usr/bin/env novaboot load bzImage console=ttyS0,115200 load rootfs.cpio =over 3 =item 1. Booting an OS in Qemu can be accomplished by giving the B<--qemu> option. Thus running novaboot --qemu mylinux (or C<./mylinux --qemu> as described above) will run Qemu and make it boot the configuration specified in the F script. How is qemu started can be configured in various ways (see below). =item 2. Create a bootloader configuration file (currently supported bootloaders are GRUB, GRUB2, ISOLINUX, Pulsar, and U-Boot) and copy it with all other files needed for booting to a remote TFTP server. Then use a TCP/IP-controlled relay/serial-to-TCP converter to reset the target and receive its serial output. ./mylinux --grub2 --copy=192.168.1.1:/tftp --iprelay=192.168.1.2 Alternatively, you can put these switches to the configuration file and run: ./mylinux --target mytarget =item 3. Specifying all the options needed by novaboot to successfully control the target, either on command line or in configuration files, can be difficult for users. Novaboot supports configuring the target centrally via L on a server. With such a configuration, users only need to use the B<--ssh> option to specify where to boot their OS: ./mylinux --ssh myboard@example.com Typically, the server is the computer connected to and controlling the target board and running the TFTP server. =item 4. Run DHCP and TFTP server on developer's machine to boot the target from it. ./mylinux --dhcp-tftp This usage is useful when no network infrastructure is in place, and the target is connected directly to developer's box. =item 5. Create bootable ISO image. novaboot --iso -- script1 script2 The created ISO image will have ISOLINUX bootloader installed on it, and the boot menu will allow selecting between I and I configurations. =back =head1 OPTIONS AND PHASES Novaboot performs its work in several phases. Command line options described bellow influence the execution of each phase or allow their skipping. The list of phases (in the execution order) is as follows. =over =item 1. L =item 2. L =item 3. L