From e03df2dbabf1e4777ce5c7a863e772a05bfa7a70 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Thu, 24 Oct 2024 19:08:56 +0200 Subject: [PATCH] build: update local build files Signed-off-by: AuxXxilium --- README.md | 1 - Taskfile.yaml | 15 ++--- img-gen-all.sh | 110 -------------------------------- img-gen-next.sh => img-gen-n.sh | 19 +++--- img-gen.sh => img-gen-s.sh | 15 ++--- 5 files changed, 21 insertions(+), 139 deletions(-) delete mode 100755 img-gen-all.sh rename img-gen-next.sh => img-gen-n.sh (75%) rename img-gen.sh => img-gen-s.sh (77%) diff --git a/README.md b/README.md index 13108768..0b5efe1e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ The Arc Loader is a customized Redpill Loader for DSM 7.x (Xpenology) with enhan - Overview - FAQ & Wiki - Download latest Build -- Customized Build with automated Config ### Developer diff --git a/Taskfile.yaml b/Taskfile.yaml index d6a04db3..3d2245ff 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -3,23 +3,18 @@ version: "3" tasks: - build-img: + build-img-n: cmds: - git pull - - ./img-gen.sh + - ./img-gen-n.sh - build-img-next: + build-img-s: cmds: - git pull - - ./img-gen-next.sh - - build-img-all: - cmds: - - git pull - - ./img-gen-all.sh + - ./img-gen-s.sh compile-kpatch: dir: kpatch cmds: - make clean all - - mv kpatch ../files/board/arc/overlayfs/opt/arc/ \ No newline at end of file + - mv kpatch ../files/p3/system/ \ No newline at end of file diff --git a/img-gen-all.sh b/img-gen-all.sh deleted file mode 100755 index 4d5e656a..00000000 --- a/img-gen-all.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# Clean cached Files -sudo git clean -fdx - -. scripts/func.sh - -# Get extractor, LKM, addons and Modules -getLKMs "files/p3/lkms" -getAddons "files/p3/addons" -getModules "files/p3/modules" -getConfigs "files/p3/configs" -getPatches "files/p3/patches" -getCustom "files/p3/custom" -getTheme "files/p1/boot/grub" -getOffline "files/p3/offline" -getBuildroots "latest" "brs" -getBuildrootx "latest" "brx" - -# Sbase -IMAGE_FILE="arc.img" -gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}" -fdisk -l "${IMAGE_FILE}" - -LOOPX=$(sudo losetup -f) -sudo losetup -P "${LOOPX}" "${IMAGE_FILE}" - -echo "Mounting Image File" -sudo rm -rf "/tmp/p1" -sudo rm -rf "/tmp/p3" -mkdir -p "/tmp/p1" -mkdir -p "/tmp/p3" -sudo mount ${LOOPX}p1 "/tmp/p1" -sudo mount ${LOOPX}p3 "/tmp/p3" - -[[ ! -f "brs/bzImage-arc" || ! -f "brs/initrd-arc" ]] && return 1 - -VERSION=$(date +'%y.%m.dev') -echo "${VERSION}" >files/p1/ARC-VERSION -echo "${VERSION}" >VERSION -echo "stable" >files/p1/ARC-BRANCH -sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh - -echo "Repack initrd" -cp -f "brs/bzImage-arc" "files/p3/bzImage-arc" -repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc" - -echo "Copying files" -sudo cp -Rf "files/p1/"* "/tmp/p1" -sudo cp -Rf "files/p3/"* "/tmp/p3" -sync - -echo "Unmount image file" -sudo umount "/tmp/p1" -sudo umount "/tmp/p3" -rmdir "/tmp/p1" -rmdir "/tmp/p3" - -sudo losetup --detach ${LOOPX} - -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-dyn.vmdk -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.vmdk -qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc.vhdx - -# Xbase -IMAGE_FILE="arc-next.img" -gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}" -fdisk -l "${IMAGE_FILE}" - -LOOPX=$(sudo losetup -f) -sudo losetup -P "${LOOPX}" "${IMAGE_FILE}" - -echo "Mounting Image File" -sudo rm -rf "/tmp/p1" -sudo rm -rf "/tmp/p3" -mkdir -p "/tmp/p1" -mkdir -p "/tmp/p3" -sudo mount ${LOOPX}p1 "/tmp/p1" -sudo mount ${LOOPX}p3 "/tmp/p3" - -[[ ! -f "brx/bzImage-arc" || ! -f "brx/initrd-arc" ]] && return 1 - -VERSION=$(date +'%y.%m.dev') -echo "${VERSION}" >files/p1/ARC-VERSION -echo "${VERSION}" >VERSION -echo "next" >files/p1/ARC-BRANCH -sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh - -echo "Repack initrd" -cp -f "brx/bzImage-arc" "files/p3/bzImage-arc" -repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc" - -echo "Copying files" -sudo cp -Rf "files/p1/"* "/tmp/p1" -sudo cp -Rf "files/p3/"* "/tmp/p3" -sync - -echo "Unmount image file" -sudo umount "/tmp/p1" -sudo umount "/tmp/p3" -rmdir "/tmp/p1" -rmdir "/tmp/p3" - -sudo losetup --detach ${LOOPX} - -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-next-dyn.vmdk -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-next.vmdk -qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-next.vhdx \ No newline at end of file diff --git a/img-gen-next.sh b/img-gen-n.sh similarity index 75% rename from img-gen-next.sh rename to img-gen-n.sh index adf9a9ee..85b1d383 100755 --- a/img-gen-next.sh +++ b/img-gen-n.sh @@ -8,18 +8,19 @@ sudo git clean -fdx . scripts/func.sh # Get extractor, LKM, addons and Modules -getLKMs "files/p3/lkms" +echo "Get Dependencies" getAddons "files/p3/addons" getModules "files/p3/modules" getConfigs "files/p3/configs" getPatches "files/p3/patches" getCustom "files/p3/custom" +getLKMs "files/p3/lkms" getTheme "files/p1/boot/grub" -getOffline "files/p3/offline" -getBuildrootx "latest" "brx" +getOffline "files/p3/configs" +getBuildrootx "brx" -# Xbase -IMAGE_FILE="arc-next.img" +# Sbase +IMAGE_FILE="arc.img" gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}" fdisk -l "${IMAGE_FILE}" @@ -39,11 +40,11 @@ sudo mount ${LOOPX}p3 "/tmp/p3" VERSION=$(date +'%y.%m.dev') echo "${VERSION}" >files/p1/ARC-VERSION echo "${VERSION}" >VERSION -echo "next" >files/p1/ARC-BRANCH -sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh +echo "dev" >files/p1/ARC-BRANCH echo "Repack initrd" cp -f "brx/bzImage-arc" "files/p3/bzImage-arc" +cp -f "brx/initrd-arc" "files/p3/initrd-arc" repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc" echo "Copying files" @@ -59,6 +60,4 @@ rmdir "/tmp/p3" sudo losetup --detach ${LOOPX} -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-next-dyn.vmdk -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-next.vmdk -qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-next.vhdx \ No newline at end of file +qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.vmdk \ No newline at end of file diff --git a/img-gen.sh b/img-gen-s.sh similarity index 77% rename from img-gen.sh rename to img-gen-s.sh index 419c47cc..ce42c253 100755 --- a/img-gen.sh +++ b/img-gen-s.sh @@ -8,15 +8,16 @@ sudo git clean -fdx . scripts/func.sh # Get extractor, LKM, addons and Modules -getLKMs "files/p3/lkms" +echo "Get Dependencies" getAddons "files/p3/addons" getModules "files/p3/modules" getConfigs "files/p3/configs" getPatches "files/p3/patches" getCustom "files/p3/custom" +getLKMs "files/p3/lkms" getTheme "files/p1/boot/grub" -getOffline "files/p3/offline" -getBuildroots "latest" "brs" +getOffline "files/p3/configs" +getBuildroots "brs" # Sbase IMAGE_FILE="arc.img" @@ -39,11 +40,11 @@ sudo mount ${LOOPX}p3 "/tmp/p3" VERSION=$(date +'%y.%m.dev') echo "${VERSION}" >files/p1/ARC-VERSION echo "${VERSION}" >VERSION -echo "stable" >files/p1/ARC-BRANCH -sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh +echo "dev" >files/p1/ARC-BRANCH echo "Repack initrd" cp -f "brs/bzImage-arc" "files/p3/bzImage-arc" +cp -f "brs/initrd-arc" "files/p3/initrd-arc" repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc" echo "Copying files" @@ -59,6 +60,4 @@ rmdir "/tmp/p3" sudo losetup --detach ${LOOPX} -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-dyn.vmdk -qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.vmdk -qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc.vhdx \ No newline at end of file +qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.vmdk \ No newline at end of file