From 90fdceabb93857bd70ddba522553787eb05de4da Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Sat, 25 Nov 2017 17:52:09 +0200 Subject: [PATCH] Using 'xorriso' instead of 'genisoimage'. Updated the kernel version. Fixed the 'static_get' build process to follow the common practice the build directory to be named the same as the bundle name. This is mandatory for the dependency detection mechanism in order to work properly. All other bundles have to follow the same approach (not implemented yet). --- src/.config | 3 ++- src/02_build_kernel.sh | 3 +++ src/12_generate_iso.sh | 3 ++- src/README | 2 +- .../bundles/static_get/01_get.sh | 8 ++++---- .../bundles/static_get/02_install.sh | 18 +++++++++--------- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/.config b/src/.config index 89de9b9bf..1b2837fb6 100644 --- a/src/.config +++ b/src/.config @@ -11,7 +11,7 @@ # # http://kernel.org # -KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.13.3.tar.xz +KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.14.2.tar.xz # You can find the latest GNU libc source bundles here: # @@ -84,6 +84,7 @@ FIO_SOURCE_URL=https://github.com/axboe/fio/archive/fio-3.2.tar.gz # http://www.kbd-project.org/ # KBD_SOURCE_URL=https://www.kernel.org/pub/linux/utils/kbd/kbd-2.0.4.tar.gz + # You can find the latest kexec-tools source bundles here: # # https://www.kernel.org/pub/linux/utils/kernel/kexec/ diff --git a/src/02_build_kernel.sh b/src/02_build_kernel.sh index 57a4c46f6..e6f029153 100755 --- a/src/02_build_kernel.sh +++ b/src/02_build_kernel.sh @@ -84,6 +84,9 @@ else # Enable the EFI stub sed -i "s/.*CONFIG_EFI_STUB.*/CONFIG_EFI_STUB=y/" .config + # Request that the firmware clear the contents of RAM after a reboot (4.14+). + echo "CONFIG_RESET_ATTACK_MITIGATION=y" >> .config + # Disable Apple Properties (Useful for Macs but useless in general) echo "CONFIG_APPLE_PROPERTIES=n" >> .config diff --git a/src/12_generate_iso.sh b/src/12_generate_iso.sh index 2883ae184..47dd25bdf 100755 --- a/src/12_generate_iso.sh +++ b/src/12_generate_iso.sh @@ -144,7 +144,8 @@ echo Minimal Linux Live is starting... CEOF # Now we generate the ISO image file. -genisoimage \ +xorriso \ + -as mkisofs \ -J \ -r \ -o ../minimal_linux_live.iso \ diff --git a/src/README b/src/README index 7b896e1f2..d5772337f 100644 --- a/src/README +++ b/src/README @@ -11,7 +11,7 @@ http://minimal.idzona.com For Ubuntu and other Debian based operating systems you can use the following command in order to resolve the required build dependencies: -sudo apt install wget make gawk gcc bc genisoimage +sudo apt install wget make gawk gcc bc xorriso Once you have your ISO image up and running perhaps you'd like to play with the configuration file ".config" and see what options you have there. For example diff --git a/src/minimal_overlay/bundles/static_get/01_get.sh b/src/minimal_overlay/bundles/static_get/01_get.sh index ad1425db8..3a1a37826 100755 --- a/src/minimal_overlay/bundles/static_get/01_get.sh +++ b/src/minimal_overlay/bundles/static_get/01_get.sh @@ -27,11 +27,11 @@ fi # Delete folder with previously prepared static-get. echo "Removing static-get work area. This may take a while..." -rm -rf $WORK_DIR/overlay/staget -mkdir $WORK_DIR/overlay/staget +rm -rf $WORK_DIR/overlay/$BUNDLE_NAME +mkdir $WORK_DIR/overlay/$BUNDLE_NAME -# Copy static-get to folder 'work/overlay/staget'. -cp static-get.sh $WORK_DIR/overlay/staget +# Copy static-get to folder 'work/overlay/static_get'. +cp static-get.sh $WORK_DIR/overlay/$BUNDLE_NAME cd $SRC_DIR diff --git a/src/minimal_overlay/bundles/static_get/02_install.sh b/src/minimal_overlay/bundles/static_get/02_install.sh index 59316a1f4..57e284f29 100755 --- a/src/minimal_overlay/bundles/static_get/02_install.sh +++ b/src/minimal_overlay/bundles/static_get/02_install.sh @@ -5,24 +5,24 @@ SRC_DIR=$(pwd) . ../../common.sh echo "Removing old static-get artifacts. This may take a while..." -rm -rf $WORK_DIR/overlay/staget/staget_installed -mkdir -p $WORK_DIR/overlay/staget/staget_installed/opt/staget -mkdir -p $WORK_DIR/overlay/staget/staget_installed/bin +rm -rf $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed +mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/opt/$BUNDLE_NAME +mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/bin -cd $WORK_DIR/overlay/staget +cd $WORK_DIR/overlay/$BUNDLE_NAME cp $MAIN_SRC_DIR/source/overlay/static-get.sh . chmod +rx static-get.sh -cp static-get.sh $WORK_DIR/overlay/staget/staget_installed/opt/staget +cp static-get.sh $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/opt/$BUNDLE_NAME -cd $WORK_DIR/overlay/staget/staget_installed +cd $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed -ln -s ../opt/staget/static-get.sh bin/static-get -ln -s ../opt/staget/static-get.sh bin/mll-get +ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/static-get +ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/mll-get -cp -r $WORK_DIR/overlay/staget/staget_installed/* \ +cp -r $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/* \ $WORK_DIR/src/minimal_overlay/rootfs echo "static-get has been installed."