build: try something new

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-01-22 21:33:55 +01:00
parent 243b20d75d
commit d2f9f703ad
3 changed files with 32 additions and 27 deletions

View File

@ -72,11 +72,13 @@ jobs:
run: |
. scripts/func.sh
gzip -dc "files/grub.img.gz" >"arc.img"
fdisk -l "arc.img"
echo "Create Arc Image"
IMAGE_FILE="arc.img"
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "arc.img"
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting image file"
mkdir -p "/tmp/p1"

View File

@ -149,11 +149,12 @@ jobs:
. scripts/func.sh
echo "Create Arc Image"
gzip -dc "files/grub.img.gz" >"arc.img"
fdisk -l "arc.img"
IMAGE_FILE="arc.img"
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "arc.img"
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
mkdir -p "/tmp/p1"

View File

@ -4,6 +4,14 @@ set -e
. scripts/func.sh
# Get extractor, LKM, addons and Modules
getExtractor "files/p3/extractor"
getLKMs "files/p3/lkms"
getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
IMAGE_FILE="arc.img"
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}"
@ -12,12 +20,12 @@ LOOPX=$(sudo losetup -f)
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
echo "Mounting Image File"
sudo rm -rf "/tmp/files/p1"
sudo rm -rf "/tmp/files/p3"
sudo mkdir -p "/tmp/files/p1"
sudo mkdir -p "/tmp/files/p3"
sudo mount ${LOOPX}p1 "/tmp/files/p1"
sudo mount ${LOOPX}p3 "/tmp/files/p3"
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"
echo "Get Buildroot"
# read -rp 'Version (2023.02.x): ' br_version
@ -33,25 +41,19 @@ sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/incl
# read -rp "Build: ${VERSION}? Press ENTER to continue"
echo "Repack initrd"
sudo cp -f "br/bzImage-arc" "/tmp/files/p3/bzImage-arc"
repackInitrd "br/initrd-arc" "files/initrd" "/tmp/files/p3/initrd-arc"
cp -f "br/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "br/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
sudo cp -Rf "files/p1/"* "/tmp/files/p1"
sudo cp -Rf "files/p3/"* "/tmp/files/p3"
# Get extractor, LKM, addons and Modules
getExtractor "/tmp/files/p3/extractor"
getLKMs "/tmp/files/p3/lkms" true
getAddons "/tmp/files/p3/addons" true
getModules "/tmp/files/p3/modules" true
getConfigs "/tmp/files/p3/configs" true
getPatches "/tmp/files/p3/patches" true
sudo cp -Rf "files/p1/"* "/tmp/p1"
sudo cp -Rf "files/p3/"* "/tmp/p3"
sync
echo "Unmount Image File"
sudo umount "/tmp/files/p1"
sudo umount "/tmp/files/p3"
echo "Unmount image file"
sudo umount "/tmp/p1"
sudo umount "/tmp/p3"
rmdir "/tmp/p1"
rmdir "/tmp/p3"
sudo losetup --detach ${LOOPX}