Subsections


5.1 Creating the fli4l Archives/Boot media under Linux or other Unix derivatives and Mac OS X

This is done by using scripts (.sh), which can be found in the fli4l root directory.

mkfli4l.sh

The Build Script recognizes the different boot types.

The simplest call on Linux looks like this:

    sh mkfli4l.sh

The actions of the build scripts are controlled by three mechanisms:

The variable BOOT_TYPE decides which action of the Build Scripts is executed:

The description of the variables in the configuration file <config>/mkfli4l.txt can be found in Chapter Control file mkfli4l.txt.

5.1.1 Command line options

The last control mechanism is appending option parameters to the call of the Build Script on the command line. The control options correspond to those in the file mkfli4l.txt. Option parameters override the values from the control file. Out of convenience, the names of the option parameters differ from the names of the variables from the control file. There is a long and, to some extent, a short form:

Usage: mkfli4l.sh [options] [config-dir]

-c, --clean         cleanup the build-directory
-b, --build <dir>   set build-directory to <dir> for the fli4l-files
-h, --help          display this usage
--batch             don't ask for user input

config-dir          set other config-directory - default is "config"

--hdinstallpath <dir> install a pre-install environment directly to
                    usb/compact flash device mounted or mountable to
                    directory <dir> in order to start the real installation
                    process directly from that device
                    device either has to be mounted and to be writable
                    for the user or it has to be mountable by the user
                    Do not use this for regular updates!

*** Remote-Update options
--remoteupdate        remote-update via scp, implies "--filesonly"
--remoteremount       make /boot writable before copying files and
                      read only afterwards
--remoteuser <name>   user name for remote-update - default is "fli4l"
--remotehost <host>   hostname or IP of remote machine - default
                      is HOSTNAME set in [config-dir]/base.txt
--remotepath <path>   pathname on remote maschine - default is "/boot"
--remoteport <portnr> portnumber of the sshd on remote maschine

*** Netboot options (only on Unix/Linux)
--tftpbootpath <path>   pathname to tftpboot directory
--tftpbootimage <name>  name of the generated bootimage file
--pxesubdir <path>      subdirectory for pxe files relative to tftpbootpath

*** Developer options
-u, --update-ver    set version to <fli4l_version>-rev<svn revision>
-v, --verbose       verbose - some debug-output
-k, --kernel-pkg    create a package containing all available kernel
                    modules and terminate afterwards.
                    set COMPLETE_KERNEL='yes' in config-directory/_kernel.txt
                    and run mkfli4l.sh again without -k to finish
    --filesonly     create only fli4l-files - do not create a boot-media
    --no-squeeze    don't compress shell scripts
    --rebuild       rebuild mkfli4l and related tools; needs make, gcc

An HD pre-installation of a suitably formatted (FAT16/FAT32) CompactFlash (in a USB cardreader) or an USB Stick can be done by using the option --hdinstallpath <dir>. You are using this script at your own risk. The necessary fli4l files will be copied onto the specified partition. At first, run in the fli4l directory:

     sh mkfli4l.sh --hdinstallpath <dir>

This will generate the fli4l files and copy them to the CF-Card or USB Stick.

To run the next steps, you have to make sure:

The script will ensure that this storage device is a FAT-partitioned USB-Drive. After that the boot loader and the files needed will be copied to the disk. You will get notified about success or failure.

After the build you have to execute the following:

    syslinux --mbr /dev/brain

    # make partition bootable using fdisk
    #     p - print partitions
    #     a - toggle bootable flag, specify number of fli4l partition
    #         usually '1'
    #     w - write changes and quit
    fdisk /dev/brain

    # install boot loader
    syslinux -i /dev/brain

Now the CF resp. USB-drive should be bootable. Don't forget to unmount the device (via umount).


An alternative configuration directory can be specified by appending its name to the end of the command line. The normal configuration directory is called config and cn be found under the fli4l root directory. This is where all fli4l packages place their configuration files. If you want to maintain more than one configuration, create another directory, i.e. hd.conf, place a copy of the configuration files there and change them according to the requirements. Here are some examples:

     sh mkfli4l.sh --filesonly hd.conf
     sh mkfli4l.sh --no-squeeze config.test

© 2001-2019 The fli4l-Team - 28 April 2019