Comment 10 for bug 345534

Revision history for this message
Oliver Grawert (ogra) wrote :

this is the snippet used in the initial builder script for the live image, cmdline needs to be changed to use a UUID, fis needs to be used to determine the actual offset (both are hardcoded values in the image build script), the dd'ing of the binary blob doesnt need to happen, i'll rework this bit into a proper patch.

set_fconfig_bootscript()
{
    echo "writing bootloader configuration ..."
    INITRAMFS_SIZE=$(wc -c $BUILDDIR/initrd.gz|cut -d' ' -f1)
    BINARY_BLOB=/home/ogra/fconfig.bin
    LOAD_INITRAMFS="fis load initramfs"
    LOAD_KERNEL="fis load kernel"
    CMDLINE="\"console=ttymxc0,115200 console=tty1 boot=casper LIVEMEDIA=/dev/mmcblk0p1\""
    FCONFIG_STRING=" $LOAD_INITRAMFS\ $LOAD_KERNEL\ e -r 0x1000000 -s $INITRAMFS_SIZE -c $CMDLINE"

    # copy binary blob in place
    dd if=$BINARY_BLOB of=$IMAGENAME bs=389120 seek=1 conv=notrunc >/dev/null 2>&1

    # modify configuration
    fconfig -w -d $IMAGENAME -o 389120 -n boot_script_data -x "${FCONFIG_STRING}" >/dev/null 2>&1
}