mirror of
https://github.com/AuxXxilium/arc-v.git
synced 2024-11-23 15:01:04 +07:00
build: try something new
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
243b20d75d
commit
d2f9f703ad
8
.github/workflows/autobuild.yml
vendored
8
.github/workflows/autobuild.yml
vendored
@ -72,11 +72,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
. scripts/func.sh
|
. scripts/func.sh
|
||||||
|
|
||||||
gzip -dc "files/grub.img.gz" >"arc.img"
|
echo "Create Arc Image"
|
||||||
fdisk -l "arc.img"
|
IMAGE_FILE="arc.img"
|
||||||
|
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
|
||||||
|
fdisk -l "${IMAGE_FILE}"
|
||||||
|
|
||||||
LOOPX=$(sudo losetup -f)
|
LOOPX=$(sudo losetup -f)
|
||||||
sudo losetup -P "${LOOPX}" "arc.img"
|
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
|
||||||
|
|
||||||
echo "Mounting image file"
|
echo "Mounting image file"
|
||||||
mkdir -p "/tmp/p1"
|
mkdir -p "/tmp/p1"
|
||||||
|
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -149,11 +149,12 @@ jobs:
|
|||||||
. scripts/func.sh
|
. scripts/func.sh
|
||||||
|
|
||||||
echo "Create Arc Image"
|
echo "Create Arc Image"
|
||||||
gzip -dc "files/grub.img.gz" >"arc.img"
|
IMAGE_FILE="arc.img"
|
||||||
fdisk -l "arc.img"
|
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
|
||||||
|
fdisk -l "${IMAGE_FILE}"
|
||||||
|
|
||||||
LOOPX=$(sudo losetup -f)
|
LOOPX=$(sudo losetup -f)
|
||||||
sudo losetup -P "${LOOPX}" "arc.img"
|
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
|
||||||
|
|
||||||
echo "Mounting Image File"
|
echo "Mounting Image File"
|
||||||
mkdir -p "/tmp/p1"
|
mkdir -p "/tmp/p1"
|
||||||
|
44
img-gen.sh
44
img-gen.sh
@ -4,6 +4,14 @@ set -e
|
|||||||
|
|
||||||
. scripts/func.sh
|
. 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"
|
IMAGE_FILE="arc.img"
|
||||||
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
|
gzip -dc "files/grub.img.gz" >"${IMAGE_FILE}"
|
||||||
fdisk -l "${IMAGE_FILE}"
|
fdisk -l "${IMAGE_FILE}"
|
||||||
@ -12,12 +20,12 @@ LOOPX=$(sudo losetup -f)
|
|||||||
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
|
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
|
||||||
|
|
||||||
echo "Mounting Image File"
|
echo "Mounting Image File"
|
||||||
sudo rm -rf "/tmp/files/p1"
|
sudo rm -rf "/tmp/p1"
|
||||||
sudo rm -rf "/tmp/files/p3"
|
sudo rm -rf "/tmp/p3"
|
||||||
sudo mkdir -p "/tmp/files/p1"
|
mkdir -p "/tmp/p1"
|
||||||
sudo mkdir -p "/tmp/files/p3"
|
mkdir -p "/tmp/p3"
|
||||||
sudo mount ${LOOPX}p1 "/tmp/files/p1"
|
sudo mount ${LOOPX}p1 "/tmp/p1"
|
||||||
sudo mount ${LOOPX}p3 "/tmp/files/p3"
|
sudo mount ${LOOPX}p3 "/tmp/p3"
|
||||||
|
|
||||||
echo "Get Buildroot"
|
echo "Get Buildroot"
|
||||||
# read -rp 'Version (2023.02.x): ' br_version
|
# 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"
|
# read -rp "Build: ${VERSION}? Press ENTER to continue"
|
||||||
|
|
||||||
echo "Repack initrd"
|
echo "Repack initrd"
|
||||||
sudo cp -f "br/bzImage-arc" "/tmp/files/p3/bzImage-arc"
|
cp -f "br/bzImage-arc" "files/p3/bzImage-arc"
|
||||||
repackInitrd "br/initrd-arc" "files/initrd" "/tmp/files/p3/initrd-arc"
|
repackInitrd "br/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||||
|
|
||||||
echo "Copying files"
|
echo "Copying files"
|
||||||
sudo cp -Rf "files/p1/"* "/tmp/files/p1"
|
sudo cp -Rf "files/p1/"* "/tmp/p1"
|
||||||
sudo cp -Rf "files/p3/"* "/tmp/files/p3"
|
sudo cp -Rf "files/p3/"* "/tmp/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
|
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
echo "Unmount Image File"
|
echo "Unmount image file"
|
||||||
sudo umount "/tmp/files/p1"
|
sudo umount "/tmp/p1"
|
||||||
sudo umount "/tmp/files/p3"
|
sudo umount "/tmp/p3"
|
||||||
|
rmdir "/tmp/p1"
|
||||||
|
rmdir "/tmp/p3"
|
||||||
|
|
||||||
sudo losetup --detach ${LOOPX}
|
sudo losetup --detach ${LOOPX}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user