From 310be05bff5a268a874f6fb635d0f70912aaa81a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 18 Jul 2012 19:11:55 +0200 Subject: Renaming net flavour to netboot for consistency. --- scripts/build/lb_binary | 2 +- scripts/build/lb_binary_debian-installer | 4 +- scripts/build/lb_binary_grub | 2 +- scripts/build/lb_binary_grub2 | 2 +- scripts/build/lb_binary_net | 179 ------------------------------- scripts/build/lb_binary_netboot | 179 +++++++++++++++++++++++++++++++ scripts/build/lb_binary_silo | 2 +- scripts/build/lb_binary_syslinux | 2 +- scripts/build/lb_binary_yaboot | 2 +- scripts/build/lb_chroot_hacks | 2 +- scripts/build/lb_config | 4 +- scripts/build/lb_source | 2 +- scripts/build/lb_source_net | 74 ------------- scripts/build/lb_source_netboot | 74 +++++++++++++ 14 files changed, 265 insertions(+), 265 deletions(-) delete mode 100755 scripts/build/lb_binary_net create mode 100755 scripts/build/lb_binary_netboot delete mode 100755 scripts/build/lb_source_net create mode 100755 scripts/build/lb_source_netboot (limited to 'scripts') diff --git a/scripts/build/lb_binary b/scripts/build/lb_binary index 4a4f76b9e..564b056c6 100755 --- a/scripts/build/lb_binary +++ b/scripts/build/lb_binary @@ -84,7 +84,7 @@ fi # Building images lb binary_iso ${*} -lb binary_net ${*} +lb binary_netboot ${*} lb binary_tar ${*} lb binary_hdd ${*} lb binary_virtual-hdd ${*} diff --git a/scripts/build/lb_binary_debian-installer b/scripts/build/lb_binary_debian-installer index 28072abb2..59d62e6bd 100755 --- a/scripts/build/lb_binary_debian-installer +++ b/scripts/build/lb_binary_debian-installer @@ -80,7 +80,7 @@ Install_package # Setting destination directory case "${LB_BINARY_IMAGES}" in - net) + netboot) DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURES}" ;; @@ -100,7 +100,7 @@ case "${LB_DEBIAN_INSTALLER}" in ;; *) case "${LB_BINARY_IMAGES}" in - net) + netboot) DI_IMAGE_TYPE="netboot" ;; diff --git a/scripts/build/lb_binary_grub b/scripts/build/lb_binary_grub index 4d94716bf..ea2b0fecb 100755 --- a/scripts/build/lb_binary_grub +++ b/scripts/build/lb_binary_grub @@ -151,7 +151,7 @@ case "${LB_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - hdd*|net) + hdd*|netboot) Echo_warning "Bootloader in this image type not yet supported by live-build." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2 index d88901d7b..f28cd87c4 100755 --- a/scripts/build/lb_binary_grub2 +++ b/scripts/build/lb_binary_grub2 @@ -125,7 +125,7 @@ case "${LB_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - hdd*|net) + hdd*|netboot) Echo_warning "Bootloader in this image type not yet supported by live-build." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 diff --git a/scripts/build/lb_binary_net b/scripts/build/lb_binary_net deleted file mode 100755 index 5d8cdeed7..000000000 --- a/scripts/build/lb_binary_net +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2012 Daniel Baumann -## -## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -set -e - -# Including common functions -. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh - -# Setting static variables -DESCRIPTION="$(Echo 'build netboot binary image')" -HELP="" -USAGE="${PROGRAM} [--force]" - -Arguments "${@}" - -# Reading configuration files -Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source -Set_defaults - -if ! In_list net "${LB_BINARY_IMAGES}" -then - exit 0 -fi - -if [ "${LB_NET_TARBALL}" = "false" ] -then - exit 0 -fi - -Echo_message "Begin building binary netboot image..." - -# Requiring stage file -Require_stagefile .build/config .build/bootstrap - -# Checking stage file -Check_stagefile .build/binary_net - -# Checking lock file -Check_lockfile .lock - -# Creating lock file -Create_lockfile .lock - -if [ "${LB_ARCHITECTURES}" = "sparc" ] -then - # Checking depends - Check_package chroot/usr/bin/elftoaout sparc-utils - - # Restoring cache - Restore_cache cache/packages.binary - - # Installing depends - Install_package - - # Set target and source directories - DESTDIR="tftpboot" - case "${LB_INITRAMFS}" in - casper) - ORIGDIR="binary/casper" - ;; - - live-boot) - ORIGDIR="binary/live" - ;; - - *) - ORIGDIR="binary/boot" - ;; - esac - - # Find defaults - DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')" - DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" - DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')" - DEFAULT_MAP="$(echo chroot/boot/System.map-*${DEFAULT_FLAVOUR})" - - gzip -cd ${ORIGDIR}/${DEFAULT_KERNEL} > kernel.tmp - - mkdir -p ${DESTDIR} - rm -f ${DESTDIR}/boot.img - elftoaout -o ${DESTDIR}/boot.img kernel.tmp - - case "${DEFAULT_FLAVOUR}" in - sparc32) - piggyback ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD} - ;; - sparc64) - piggyback64 ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD} - ;; - *) - Echo_error "Invalid default kernel flavour for sparc \"%s\"" "${DEFAULT_FLAVOUR}" - exit 1; - ;; - esac - - # Pad boot.img - REMAINDER=$((( 4 - $(stat -c %s ${DESTDIR}/boot.img) % 4 ) % 4)) - dd if=/dev/zero bs=1 count=${REMAINDER} >> ${DESTDIR}/boot.img - - # No need for kernel and initrd images in the binary - rm -f ${ORIGDIR}/vmlinuz-* - rm -f ${ORIGDIR}/initrd.img-* - - # Clean temporaries - rm -f kernel.tmp - - # Saving cache - Save_cache cache/packages.binary - - # Removing depends - Remove_package -fi - -# Remove old binary -rm -f binary-net.tar.bz2 binary-net.tar.gz binary-net.tar.lz binary-net.tar - -# Creating image file -ROOT_DIR=$(basename ${LB_NET_ROOT_PATH}) - -if [ "${ROOT_DIR}" = "chroot" ] -then - mv chroot chroot.tmp -fi - -if [ "${ROOT_DIR}" != "binary" ] -then - mv binary ${ROOT_DIR} -fi - -mkdir binary.tmp -mv ${ROOT_DIR} tftpboot binary.tmp -cd binary.tmp - -# Moving kernel and initrd image arround -mkdir tftpboot/live -mv */live/vmlinuz* */live/initrd* tftpboot/live - -tar cf ../binary-net.tar * - -case "${LB_COMPRESSION}" in - bzip2) - bzip2 ${BZIP2_OPTIONS} ../binary-net.tar - ;; - - gzip) - gzip ${GZIP_OPTIONS} ../binary-net.tar - ;; - - lzip) - lzip ${LZIP_OPTIONS} ../binary-net.tar - ;; - - none) - ;; -esac - -mv * ../ -cd "${OLDPWD}" -rmdir binary.tmp - -if [ "${ROOT_DIR}" != "binary" ] -then - mv ${ROOT_DIR} binary -fi - -if [ "${ROOT_DIR}" = "chroot" ] -then - mv chroot.tmp chroot -fi - -# Creating stage file -Create_stagefile .build/binary_net diff --git a/scripts/build/lb_binary_netboot b/scripts/build/lb_binary_netboot new file mode 100755 index 000000000..90669b0e6 --- /dev/null +++ b/scripts/build/lb_binary_netboot @@ -0,0 +1,179 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2012 Daniel Baumann +## +## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +set -e + +# Including common functions +. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh + +# Setting static variables +DESCRIPTION="$(Echo 'build netboot binary image')" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + +# Reading configuration files +Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source +Set_defaults + +if ! In_list netboot "${LB_BINARY_IMAGES}" +then + exit 0 +fi + +if [ "${LB_NET_TARBALL}" = "false" ] +then + exit 0 +fi + +Echo_message "Begin building binary netboot image..." + +# Requiring stage file +Require_stagefile .build/config .build/bootstrap + +# Checking stage file +Check_stagefile .build/binary_netboot + +# Checking lock file +Check_lockfile .lock + +# Creating lock file +Create_lockfile .lock + +if [ "${LB_ARCHITECTURES}" = "sparc" ] +then + # Checking depends + Check_package chroot/usr/bin/elftoaout sparc-utils + + # Restoring cache + Restore_cache cache/packages.binary + + # Installing depends + Install_package + + # Set target and source directories + DESTDIR="tftpboot" + case "${LB_INITRAMFS}" in + casper) + ORIGDIR="binary/casper" + ;; + + live-boot) + ORIGDIR="binary/live" + ;; + + *) + ORIGDIR="binary/boot" + ;; + esac + + # Find defaults + DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')" + DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" + DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')" + DEFAULT_MAP="$(echo chroot/boot/System.map-*${DEFAULT_FLAVOUR})" + + gzip -cd ${ORIGDIR}/${DEFAULT_KERNEL} > kernel.tmp + + mkdir -p ${DESTDIR} + rm -f ${DESTDIR}/boot.img + elftoaout -o ${DESTDIR}/boot.img kernel.tmp + + case "${DEFAULT_FLAVOUR}" in + sparc32) + piggyback ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD} + ;; + sparc64) + piggyback64 ${DESTDIR}/boot.img ${DEFAULT_MAP} ${ORIGDIR}/${DEFAULT_INITRD} + ;; + *) + Echo_error "Invalid default kernel flavour for sparc \"%s\"" "${DEFAULT_FLAVOUR}" + exit 1; + ;; + esac + + # Pad boot.img + REMAINDER=$((( 4 - $(stat -c %s ${DESTDIR}/boot.img) % 4 ) % 4)) + dd if=/dev/zero bs=1 count=${REMAINDER} >> ${DESTDIR}/boot.img + + # No need for kernel and initrd images in the binary + rm -f ${ORIGDIR}/vmlinuz-* + rm -f ${ORIGDIR}/initrd.img-* + + # Clean temporaries + rm -f kernel.tmp + + # Saving cache + Save_cache cache/packages.binary + + # Removing depends + Remove_package +fi + +# Remove old binary +rm -f binary.netboot.tar.bz2 binary.netboot.tar.gz binary.netboot.tar.lz binary.netboot.tar + +# Creating image file +ROOT_DIR=$(basename ${LB_NET_ROOT_PATH}) + +if [ "${ROOT_DIR}" = "chroot" ] +then + mv chroot chroot.tmp +fi + +if [ "${ROOT_DIR}" != "binary" ] +then + mv binary ${ROOT_DIR} +fi + +mkdir binary.tmp +mv ${ROOT_DIR} tftpboot binary.tmp +cd binary.tmp + +# Moving kernel and initrd image arround +mkdir tftpboot/live +mv */live/vmlinuz* */live/initrd* tftpboot/live + +tar cf ../binary.netboot.tar * + +case "${LB_COMPRESSION}" in + bzip2) + bzip2 ${BZIP2_OPTIONS} ../binary.netboot.tar + ;; + + gzip) + gzip ${GZIP_OPTIONS} ../binary.netboot.tar + ;; + + lzip) + lzip ${LZIP_OPTIONS} ../binary.netboot.tar + ;; + + none) + ;; +esac + +mv * ../ +cd "${OLDPWD}" +rmdir binary.tmp + +if [ "${ROOT_DIR}" != "binary" ] +then + mv ${ROOT_DIR} binary +fi + +if [ "${ROOT_DIR}" = "chroot" ] +then + mv chroot.tmp chroot +fi + +# Creating stage file +Create_stagefile .build/binary_netboot diff --git a/scripts/build/lb_binary_silo b/scripts/build/lb_binary_silo index 31a2aad1b..2a9ca5c41 100755 --- a/scripts/build/lb_binary_silo +++ b/scripts/build/lb_binary_silo @@ -34,7 +34,7 @@ case "${LB_BINARY_IMAGES}" in iso*|hdd*|tar) ;; - net) + netboot) # silo not required for sparc netbooting exit 0 ;; diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux index 6a4842b32..d88a0bf54 100755 --- a/scripts/build/lb_binary_syslinux +++ b/scripts/build/lb_binary_syslinux @@ -63,7 +63,7 @@ case "${LB_BINARY_IMAGES}" in esac ;; - net*) + netboot) _BOOTLOADER="pxelinux" _TARGET="tftpboot" ;; diff --git a/scripts/build/lb_binary_yaboot b/scripts/build/lb_binary_yaboot index c4e21c88f..ef001ef06 100755 --- a/scripts/build/lb_binary_yaboot +++ b/scripts/build/lb_binary_yaboot @@ -158,7 +158,7 @@ case "${LB_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - hdd*|net|tar) + hdd*|netboot|tar) Echo_error "not yet supported, aborting (FIXME)." exit 1 ;; diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks index 83e5730d3..334a5bfcb 100755 --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -141,7 +141,7 @@ do done case "${LB_BINARY_IMAGES}" in - net) + netboot) if [ ! -f chroot/sbin/mount.cifs ] then Apt chroot install cifs-utils diff --git a/scripts/build/lb_config b/scripts/build/lb_config index 8b6a3ad37..41d427b66 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -40,7 +40,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--apt-secure true|false]\n\ \t [--apt-source-archives true|false]\n\ \t [-a|--architectures ARCHITECTURE]\n\ -\t [-b|--binary-images iso|iso-hybrid|net|tar|hdd]\n\ +\t [-b|--binary-images iso|iso-hybrid|netboot|tar|hdd]\n\ \t [--binary-filesystem fat16|fat32|ext2|ext3|ext4]\n\ \t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\ \t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\ @@ -135,7 +135,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--parent-archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\ \t [--security true|false]\n\ \t [--source true|false]\n\ -\t [-s|--source-images iso|net|tar|hdd]\n\ +\t [-s|--source-images iso|netboot|tar|hdd]\n\ \t [--firmware-binary true|false]\n\ \t [--firmware-chroot true|false]\n\ \t [--swap-file-path PATH]\n\ diff --git a/scripts/build/lb_source b/scripts/build/lb_source index 928e88bfa..b1fa79808 100755 --- a/scripts/build/lb_source +++ b/scripts/build/lb_source @@ -55,7 +55,7 @@ lb source_checksums ${*} # Building images lb source_iso ${*} -lb source_net ${*} +lb source_netboot ${*} lb source_tar ${*} lb source_hdd ${*} lb source_virtual-hdd ${*} diff --git a/scripts/build/lb_source_net b/scripts/build/lb_source_net deleted file mode 100755 index 9a1829e8f..000000000 --- a/scripts/build/lb_source_net +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2012 Daniel Baumann -## -## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -set -e - -# Including common functions -. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh - -# Setting static variables -DESCRIPTION="$(Echo 'build source net image')" -HELP="" -USAGE="${PROGRAM} [--force]" - -Arguments "${@}" - -# Reading configuration files -Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source -Set_defaults - -if [ "${LB_SOURCE}" != "true" ] -then - exit 0 -fi - -if ! In_list net "${LB_SOURCE_IMAGES}" -then - exit 0 -fi - -Echo_message "Begin building source netboot image..." - -# Requiring stage file -Require_stagefile .build/config .build/source_debian - -# Checking stage file -Check_stagefile .build/source_net - -# Checking lock file -Check_lockfile .lock - -# Creating lock file -Create_lockfile .lock - -# Remove old source -rm -f source-net.tar.bz2 source-net.tar.gz source-net.tar.lz source-net.tar - -tar cf source-net.tar source - -case "${_COMPRESSION}" in - bzip2) - bzip2 ${BZIP2_OPTIONS} source-net.tar - ;; - - gzip) - gzip ${GZIP_OPTIONS} source-net.tar - ;; - - lzip) - lzip ${LZIP_OPTIONS} source-net.tar - ;; - - none) - ;; -esac - -# Creating stage file -Create_stagefile .build/source_net diff --git a/scripts/build/lb_source_netboot b/scripts/build/lb_source_netboot new file mode 100755 index 000000000..4882866ca --- /dev/null +++ b/scripts/build/lb_source_netboot @@ -0,0 +1,74 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2012 Daniel Baumann +## +## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +set -e + +# Including common functions +. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh + +# Setting static variables +DESCRIPTION="$(Echo 'build source netboot image')" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + +# Reading configuration files +Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source +Set_defaults + +if [ "${LB_SOURCE}" != "true" ] +then + exit 0 +fi + +if ! In_list netboot "${LB_SOURCE_IMAGES}" +then + exit 0 +fi + +Echo_message "Begin building source netboot image..." + +# Requiring stage file +Require_stagefile .build/config .build/source_debian + +# Checking stage file +Check_stagefile .build/source_netboot + +# Checking lock file +Check_lockfile .lock + +# Creating lock file +Create_lockfile .lock + +# Remove old source +rm -f source.netboot.tar.bz2 source.netboot.tar.gz source.netboot.tar.lz source.netboot.tar + +tar cf source.netboot.tar source + +case "${_COMPRESSION}" in + bzip2) + bzip2 ${BZIP2_OPTIONS} source.netboot.tar + ;; + + gzip) + gzip ${GZIP_OPTIONS} source.netboot.tar + ;; + + lzip) + lzip ${LZIP_OPTIONS} source.netboot.tar + ;; + + none) + ;; +esac + +# Creating stage file +Create_stagefile .build/source_netboot -- cgit v1.2.3