Added downstream updates to build_linux
This commit is contained in:
parent
d8617df871
commit
6c66473209
1 changed files with 80 additions and 17 deletions
|
|
@ -160,7 +160,7 @@ function update_live_env() {
|
||||||
sed -i -r "s/_+/$KIT_NAME_FULL/" "$LIVE_DIR/syslinux/wk_head.cfg"
|
sed -i -r "s/_+/$KIT_NAME_FULL/" "$LIVE_DIR/syslinux/wk_head.cfg"
|
||||||
mkdir -p "$TEMP_DIR" 2>/dev/null
|
mkdir -p "$TEMP_DIR" 2>/dev/null
|
||||||
curl -Lo "$TEMP_DIR/wimboot.zip" "http://git.ipxe.org/releases/wimboot/wimboot-latest.zip"
|
curl -Lo "$TEMP_DIR/wimboot.zip" "http://git.ipxe.org/releases/wimboot/wimboot-latest.zip"
|
||||||
7z e "$TEMP_DIR/wimboot.zip" -o"$LIVE_DIR/arch/boot" 'wimboot*/LICENSE.txt' 'wimboot*/README.txt' 'wimboot*/wimboot'
|
7z e -aoa "$TEMP_DIR/wimboot.zip" -o"$LIVE_DIR/arch/boot" 'wimboot*/LICENSE.txt' 'wimboot*/README.txt' 'wimboot*/wimboot'
|
||||||
|
|
||||||
# Boot config (UEFI)
|
# Boot config (UEFI)
|
||||||
mkdir -p "$LIVE_DIR/EFI/boot"
|
mkdir -p "$LIVE_DIR/EFI/boot"
|
||||||
|
|
@ -177,9 +177,9 @@ function update_live_env() {
|
||||||
mkdir -p "$LIVE_DIR/EFI/memtest86/Benchmark"
|
mkdir -p "$LIVE_DIR/EFI/memtest86/Benchmark"
|
||||||
mkdir -p "$TEMP_DIR/memtest86"
|
mkdir -p "$TEMP_DIR/memtest86"
|
||||||
curl -Lo "$TEMP_DIR/memtest86/memtest86-usb.zip" "https://www.memtest86.com/downloads/memtest86-usb.zip"
|
curl -Lo "$TEMP_DIR/memtest86/memtest86-usb.zip" "https://www.memtest86.com/downloads/memtest86-usb.zip"
|
||||||
7z e "$TEMP_DIR/memtest86/memtest86-usb.zip" -o"$TEMP_DIR/memtest86" "memtest86-usb.img"
|
7z e -aoa "$TEMP_DIR/memtest86/memtest86-usb.zip" -o"$TEMP_DIR/memtest86" "memtest86-usb.img"
|
||||||
7z e "$TEMP_DIR/memtest86/memtest86-usb.img" -o"$TEMP_DIR/memtest86" "MemTest86.img"
|
7z e -aoa "$TEMP_DIR/memtest86/memtest86-usb.img" -o"$TEMP_DIR/memtest86" "MemTest86.img"
|
||||||
7z x "$TEMP_DIR/memtest86/MemTest86.img" -o"$TEMP_DIR/memtest86"
|
7z x -aoa "$TEMP_DIR/memtest86/MemTest86.img" -o"$TEMP_DIR/memtest86"
|
||||||
rm "$TEMP_DIR/memtest86/EFI/BOOT/BOOTIA32.efi"
|
rm "$TEMP_DIR/memtest86/EFI/BOOT/BOOTIA32.efi"
|
||||||
mv "$TEMP_DIR/memtest86/EFI/BOOT/BOOTX64.efi" "$LIVE_DIR/EFI/memtest86/memtestx64.efi"
|
mv "$TEMP_DIR/memtest86/EFI/BOOT/BOOTX64.efi" "$LIVE_DIR/EFI/memtest86/memtestx64.efi"
|
||||||
mv "$TEMP_DIR/memtest86/EFI/BOOT"/* "$LIVE_DIR/EFI/memtest86"/
|
mv "$TEMP_DIR/memtest86/EFI/BOOT"/* "$LIVE_DIR/EFI/memtest86"/
|
||||||
|
|
@ -333,6 +333,39 @@ function install_deps() {
|
||||||
run_elevated pacman -Syu --needed --noconfirm $packages
|
run_elevated pacman -Syu --needed --noconfirm $packages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_all() {
|
||||||
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
|
echo "This section is meant to be run as root."
|
||||||
|
echo "Aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prep for build
|
||||||
|
cleanup
|
||||||
|
fix_kit_permissions
|
||||||
|
install_deps
|
||||||
|
load_settings --edit
|
||||||
|
update_repo
|
||||||
|
|
||||||
|
# Build (full)
|
||||||
|
copy_live_env
|
||||||
|
update_live_env
|
||||||
|
# Rerun script as root to start Archiso build process
|
||||||
|
run_elevated "$(realpath "$0")" --build-iso
|
||||||
|
# Cleanup
|
||||||
|
mv -nv "$LIVE_DIR" "${LIVE_DIR}.full"
|
||||||
|
perl-rename -v "s/(${KIT_NAME_SHORT}-Linux)-(${DATE}.*)/\1-Full-\2/" "$OUT_DIR"/*
|
||||||
|
|
||||||
|
# Build (minimal)
|
||||||
|
copy_live_env --minimal
|
||||||
|
update_live_env --minimal
|
||||||
|
# Rerun script as root to start Archiso build process
|
||||||
|
run_elevated "$(realpath "$0")" --build-iso
|
||||||
|
# Cleanup
|
||||||
|
mv -nv "$LIVE_DIR" "${LIVE_DIR}.minimal"
|
||||||
|
perl-rename -v "s/(${KIT_NAME_SHORT}-Linux)-(${DATE}.*)/\1-Minimal-\2/" "$OUT_DIR"/*
|
||||||
|
}
|
||||||
|
|
||||||
function build_iso() {
|
function build_iso() {
|
||||||
if [[ "$EUID" -ne 0 ]]; then
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
echo "This section is meant to be run as root."
|
echo "This section is meant to be run as root."
|
||||||
|
|
@ -386,10 +419,38 @@ function build_full() {
|
||||||
update_live_env
|
update_live_env
|
||||||
# Rerun script as root to start Archiso build process
|
# Rerun script as root to start Archiso build process
|
||||||
run_elevated "$(realpath "$0")" --build-iso
|
run_elevated "$(realpath "$0")" --build-iso
|
||||||
|
# Cleanup
|
||||||
|
perl-rename -v "s/(${KIT_NAME_SHORT}-Linux)-(${DATE}.*)/\1-Full-\2/" "$OUT_DIR"/*
|
||||||
|
}
|
||||||
|
|
||||||
|
function build_minimal() {
|
||||||
|
if [[ "$EUID" -eq 0 ]]; then
|
||||||
|
echo "This section not meant to be run as root."
|
||||||
|
echo "Aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prep for build
|
||||||
|
cleanup
|
||||||
|
fix_kit_permissions
|
||||||
|
install_deps
|
||||||
|
load_settings --edit
|
||||||
|
update_repo
|
||||||
|
copy_live_env --minimal
|
||||||
|
update_live_env --minimal
|
||||||
|
# Rerun script as root to start Archiso build process
|
||||||
|
run_elevated "$(realpath "$0")" --build-iso
|
||||||
|
# Cleanup
|
||||||
|
perl-rename -v "s/(${KIT_NAME_SHORT}-Linux)-(${DATE}.*)/\1-Minimal-\2/" "$OUT_DIR"/*
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check input
|
# Check input
|
||||||
case ${1:-} in
|
case ${1:-} in
|
||||||
|
-a|--build-all)
|
||||||
|
build_all
|
||||||
|
echo Done
|
||||||
|
;;
|
||||||
|
|
||||||
-b|--build-full)
|
-b|--build-full)
|
||||||
build_full
|
build_full
|
||||||
echo Done
|
echo Done
|
||||||
|
|
@ -434,13 +495,15 @@ case ${1:-} in
|
||||||
echo "Usage: $(basename "$0") [OPTIONS]"
|
echo "Usage: $(basename "$0") [OPTIONS]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -b --build-full Perform all tasks and build iso"
|
echo " -a --build-all Perform all tasks to build all isos"
|
||||||
|
echo " -b --build-full Perform all tasks to build the full iso"
|
||||||
|
echo " -m --build-minimal Perform all tasks to build the minimal iso"
|
||||||
echo " -h --help Show usage"
|
echo " -h --help Show usage"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Advanced options:"
|
echo "Advanced options:"
|
||||||
echo " -f --fix-perms Fix folder permissions"
|
echo " -f --fix-perms Fix folder permissions"
|
||||||
echo " -i --install-deps Install build dependencies"
|
echo " -i --install-deps Install build dependencies"
|
||||||
echo " -m --prep-minimal-env Prep live & airootfs folders (minimal packages)"
|
echo " -n --prep-minimal-env Prep live & airootfs folders (minimal packages)"
|
||||||
echo " -o --build-iso Build ISO (using current setup)"
|
echo " -o --build-iso Build ISO (using current setup)"
|
||||||
echo " -p --prep-live-env Prep live & airootfs folders"
|
echo " -p --prep-live-env Prep live & airootfs folders"
|
||||||
echo " -u --update-repo Update custom pacman repo"
|
echo " -u --update-repo Update custom pacman repo"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue