mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:09:53 +07:00
tree: add back branches x/s
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
74e7294491
commit
3a29084e6e
85
.github/workflows/autobuild.yml
vendored
85
.github/workflows/autobuild.yml
vendored
@ -71,15 +71,17 @@ jobs:
|
||||
echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV
|
||||
getTheme "files/p1/boot/grub"
|
||||
echo "THEMETAG=${TAG}" >> $GITHUB_ENV
|
||||
getBuildroot "latest" "brx"
|
||||
echo "BR_XVERSION=${TAG}" >> $GITHUB_ENV
|
||||
getBuildroot "latest-s" "brs"
|
||||
echo "BR_SVERSION=${TAG}" >> $GITHUB_ENV
|
||||
getOffline "files/p3/configs"
|
||||
getBuildroot "latest" "br"
|
||||
echo "BR_VERSION=${TAG}" >> $GITHUB_ENV
|
||||
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
|
||||
|
||||
echo "OK"
|
||||
|
||||
# Build incremental
|
||||
- name: Build Image
|
||||
- name: Build Image X
|
||||
run: |
|
||||
. scripts/func.sh
|
||||
|
||||
@ -104,11 +106,11 @@ jobs:
|
||||
sudo mount ${LOOPX}p1 "/tmp/p1"
|
||||
sudo mount ${LOOPX}p3 "/tmp/p3"
|
||||
|
||||
[ ! -f "br/bzImage-arc" ] || [ ! -f "br/initrd-arc" ] && return 1
|
||||
[ ! -f "brx/bzImage-arc" ] || [ ! -f "brx/initrd-arc" ] && return 1
|
||||
|
||||
echo "Repack initrd"
|
||||
cp -f "br/bzImage-arc" "files/p3/bzImage-arc"
|
||||
repackInitrd "br/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||
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"
|
||||
@ -135,6 +137,64 @@ jobs:
|
||||
zip -9j update.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg"
|
||||
sha256sum update.zip >checksum.sha256
|
||||
|
||||
# Build incremental
|
||||
- name: Build Image S
|
||||
run: |
|
||||
. scripts/func.sh
|
||||
|
||||
if [ -n "${VERSION}" ]; then
|
||||
VERSION="${VERSION}-s"
|
||||
# Modify Source File
|
||||
echo "${VERSION}" >VERSION
|
||||
echo "${VERSION}" >files/p1/ARC-VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
|
||||
fi
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc-s.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"
|
||||
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
|
||||
|
||||
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}
|
||||
|
||||
echo "Image Converter"
|
||||
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-s-dyn.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-s.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-s.vhdx
|
||||
|
||||
echo "Create Arc ova"
|
||||
convertova "${IMAGE_FILE}" "arc-s.ova"
|
||||
|
||||
# Zip update and generate checksum
|
||||
zip -9j update-s.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg"
|
||||
sha256sum update-s.zip >checksum-s.sha256
|
||||
|
||||
# Zip image and generate checksum
|
||||
- name: Pack
|
||||
run: |
|
||||
@ -145,6 +205,12 @@ jobs:
|
||||
zip -9 "arc-${{ env.VERSION }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}.vhdx.zip" arc.vhdx
|
||||
zip -9 "arc-${{ env.VERSION }}.ova.zip" arc.ova
|
||||
# SBase
|
||||
zip -9 "arc-${{ env.VERSION }}-s.img.zip" arc-s.img
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vmdk-dyn.zip" arc-s-dyn.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vmdk-flat.zip" arc-s.vmdk arc-s-flat.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vhdx.zip" arc-s.vhdx
|
||||
zip -9 "arc-${{ env.VERSION }}-s.ova.zip" arc-s.ova
|
||||
fi
|
||||
echo "${{ inputs.update_version }}" >check.update
|
||||
|
||||
@ -163,6 +229,9 @@ jobs:
|
||||
Release: ${{ env.BUILD_TIME }}
|
||||
|
||||
- Full Changelog and Arc Patch (Decryption Key) can be found in my Discord.
|
||||
- Version:
|
||||
- without "s": Latest Buildroot System (incl. new Hardware / Hyper-V and XEN (still in testing))
|
||||
- with "s": Stable Buildroot System (For the most Systems)
|
||||
|
||||
### Versions:
|
||||
Addons: ${{ env.ADDONSTAG }}
|
||||
@ -172,9 +241,11 @@ jobs:
|
||||
Custom: ${{ env.CUSTOMTAG }}
|
||||
Theme: ${{ env.THEMETAG }}
|
||||
LKM: ${{ env.LKMTAG }}
|
||||
Buildroot: ${{ env.BR_XVERSION }}
|
||||
Buildroot: ${{ env.BR_XVERSION }} | Buildroot S: ${{ env.BR_SVERSION }}
|
||||
artifacts: |
|
||||
arc-*.zip
|
||||
update.zip
|
||||
update-s.zip
|
||||
checksum.sha256
|
||||
checksum-s.sha256
|
||||
check.update
|
99
.github/workflows/build.yml
vendored
99
.github/workflows/build.yml
vendored
@ -77,13 +77,6 @@ jobs:
|
||||
VERSION="`date +'%y.%m.%d'`"
|
||||
fi
|
||||
|
||||
if [ -n "${VERSION}" ]; then
|
||||
# Modify Source File
|
||||
echo "${VERSION}" >VERSION
|
||||
echo "${VERSION}" >files/p1/ARC-VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
|
||||
fi
|
||||
|
||||
echo "Version: ${VERSION}"
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
|
||||
@ -106,18 +99,27 @@ jobs:
|
||||
echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV
|
||||
getTheme "files/p1/boot/grub"
|
||||
echo "THEMETAG=${TAG}" >> $GITHUB_ENV
|
||||
getBuildroot "latest" "brx"
|
||||
echo "BR_XVERSION=${TAG}" >> $GITHUB_ENV
|
||||
getBuildroot "latest-s" "brs"
|
||||
echo "BR_SVERSION=${TAG}" >> $GITHUB_ENV
|
||||
getOffline "files/p3/configs"
|
||||
getBuildroot "latest" "br"
|
||||
echo "BR_VERSION=${TAG}" >> $GITHUB_ENV
|
||||
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
|
||||
|
||||
echo "OK"
|
||||
|
||||
# Build incremental
|
||||
- name: Build Image
|
||||
- name: Build Image X
|
||||
run: |
|
||||
. scripts/func.sh
|
||||
|
||||
if [ -n "${VERSION}" ]; then
|
||||
# Modify Source File
|
||||
echo "${VERSION}" >VERSION
|
||||
echo "${VERSION}" >files/p1/ARC-VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
|
||||
fi
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
@ -132,11 +134,11 @@ jobs:
|
||||
sudo mount ${LOOPX}p1 "/tmp/p1"
|
||||
sudo mount ${LOOPX}p3 "/tmp/p3"
|
||||
|
||||
[ ! -f "br/bzImage-arc" ] || [ ! -f "br/initrd-arc" ] && return 1
|
||||
[ ! -f "brx/bzImage-arc" ] || [ ! -f "brx/initrd-arc" ] && return 1
|
||||
|
||||
echo "Repack initrd"
|
||||
cp -f "br/bzImage-arc" "files/p3/bzImage-arc"
|
||||
repackInitrd "br/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||
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"
|
||||
@ -163,6 +165,64 @@ jobs:
|
||||
zip -9j update.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg"
|
||||
sha256sum update.zip >checksum.sha256
|
||||
|
||||
# Build incremental
|
||||
- name: Build Image S
|
||||
run: |
|
||||
. scripts/func.sh
|
||||
|
||||
if [ -n "${VERSION}" ]; then
|
||||
VERSION="${VERSION}-s"
|
||||
# Modify Source File
|
||||
echo "${VERSION}" >VERSION
|
||||
echo "${VERSION}" >files/p1/ARC-VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
|
||||
fi
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc-s.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"
|
||||
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
|
||||
|
||||
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}
|
||||
|
||||
echo "Image Converter"
|
||||
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic arc-s-dyn.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-s.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-s.vhdx
|
||||
|
||||
echo "Create Arc ova"
|
||||
convertova "${IMAGE_FILE}" "arc-s.ova"
|
||||
|
||||
# Zip update and generate checksum
|
||||
zip -9j update-s.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg"
|
||||
sha256sum update-s.zip >checksum-s.sha256
|
||||
|
||||
# Zip image and generate checksum
|
||||
- name: Pack
|
||||
run: |
|
||||
@ -173,6 +233,12 @@ jobs:
|
||||
zip -9 "arc-${{ env.VERSION }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}.vhdx.zip" arc.vhdx
|
||||
zip -9 "arc-${{ env.VERSION }}.ova.zip" arc.ova
|
||||
# SBase
|
||||
zip -9 "arc-${{ env.VERSION }}-s.img.zip" arc-s.img
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vmdk-dyn.zip" arc-s-dyn.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vmdk-flat.zip" arc-s.vmdk arc-s-flat.vmdk
|
||||
zip -9 "arc-${{ env.VERSION }}-s.vhdx.zip" arc-s.vhdx
|
||||
zip -9 "arc-${{ env.VERSION }}-s.ova.zip" arc-s.ova
|
||||
fi
|
||||
echo "${{ inputs.update_version }}" >check.update
|
||||
|
||||
@ -191,6 +257,9 @@ jobs:
|
||||
Release: ${{ env.BUILD_TIME }}
|
||||
|
||||
- Full Changelog and Arc Patch (Decryption Key) can be found in my Discord.
|
||||
- Version:
|
||||
- without "s": Latest Buildroot System (incl. Hyper-V and XEN (still in testing))
|
||||
- with "s": Stable Buildroot System (For the most Systems)
|
||||
|
||||
### Versions:
|
||||
Addons: ${{ env.ADDONSTAG }}
|
||||
@ -200,9 +269,11 @@ jobs:
|
||||
Custom: ${{ env.CUSTOMTAG }}
|
||||
Theme: ${{ env.THEMETAG }}
|
||||
LKM: ${{ env.LKMTAG }}
|
||||
Buildroot: ${{ env.BR_XVERSION }}
|
||||
Buildroot: ${{ env.BR_XVERSION }} | Buildroot S: ${{ env.BR_SVERSION }}
|
||||
artifacts: |
|
||||
arc-*.zip
|
||||
update.zip
|
||||
update-s.zip
|
||||
checksum.sha256
|
||||
checksum-s.sha256
|
||||
check.update
|
||||
|
@ -832,6 +832,7 @@ function updateMenu() {
|
||||
7 "Update Modules" \
|
||||
8 "Update Patches" \
|
||||
9 "Update Custom Kernel" \
|
||||
0 "Switch Buildroot" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
case "$(cat ${TMP_PATH}/resp)" in
|
||||
@ -1030,6 +1031,26 @@ function updateMenu() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
0)
|
||||
# Ask for Arc Branch
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Switch Buildroot" \
|
||||
--menu "Which Branch?" 0 0 0 \
|
||||
1 "x - latest" \
|
||||
2 "s - stable" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
[ -z "${opts}" ] && return 1
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
writeConfigKey "arc.branch" "s" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
dialog --backtitle "$(backtitle)" --title "Switch Buildroot" --aspect 18 \
|
||||
--msgbox "Updates are using ${ARCBRANCH} Branch.\nYou need to Update the Loader now!" 0 0
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return
|
||||
@ -1071,6 +1092,7 @@ function sysinfo() {
|
||||
VENDOR=$(dmesg 2>/dev/null | grep -i "DMI:" | sed 's/\[.*\] DMI: //i')
|
||||
ETHX="$(ls /sys/class/net/ 2>/dev/null | grep eth)"
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
if [ "${CONFDONE}" == "true" ]; then
|
||||
@ -1167,7 +1189,7 @@ function sysinfo() {
|
||||
TEXT+="\n\Zb$(lspci -s ${NETBUS} -nnk | awk '{$1=""}1' | awk '{$1=$1};1')\Zn\n"
|
||||
done
|
||||
# Print Config Informations
|
||||
TEXT+="\n\Z4> Arc: ${ARC_VERSION}\Zn"
|
||||
TEXT+="\n\Z4> Arc: ${ARC_VERSION} | Branch: ${ARCBRANCH:-x}\Zn"
|
||||
TEXT+="\n Subversion: \ZbAddons ${ADDONSVERSION} | Configs ${CONFIGSVERSION} | LKM ${LKMVERSION} | Modules ${MODULESVERSION} | Patches ${PATCHESVERSION}\Zn"
|
||||
TEXT+="\n Config | Build: \Zb${CONFDONE} | ${BUILDDONE}\Zn"
|
||||
TEXT+="\n Config Version: \Zb${CONFIGVER}\Zn"
|
||||
|
@ -57,6 +57,7 @@ RAIDCONTROLLER="$(readConfigKey "device.raidcontroller" "${USER_CONFIG_FILE}")"
|
||||
SASCONTROLLER="$(readConfigKey "device.sascontroller" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get Config/Build Status
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
function upgradeLoader () {
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
local ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
if [ -z "${1}" ]; then
|
||||
# Check for new Version
|
||||
idx=0
|
||||
@ -43,7 +44,11 @@ function upgradeLoader () {
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}.img.zip"
|
||||
if [ -n "${ARCBRANCH}" ]; then
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${ARCBRANCH}-${TAG}.img.zip"
|
||||
else
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}.img.zip"
|
||||
fi
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
curl -#kL "${URL}" -o "${TMP_PATH}/arc.img.zip" 2>&1 | while IFS= read -r -n1 char; do
|
||||
[[ $char =~ [0-9] ]] && keep=1 ;
|
||||
@ -69,7 +74,11 @@ function upgradeLoader () {
|
||||
echo "Installing new Loader Image..."
|
||||
# Process complete update
|
||||
umount "${PART1_PATH}" "${PART2_PATH}" "${PART3_PATH}"
|
||||
dd if="${TMP_PATH}/arc.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
|
||||
if [ -n "${ARCBRANCH}" ]; then
|
||||
dd if="${TMP_PATH}/arc-${ARCBRANCH}.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
|
||||
else
|
||||
dd if="${TMP_PATH}/arc.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
|
||||
fi
|
||||
# Ask for Boot
|
||||
rm -f "${TMP_PATH}/arc.img" >/dev/null
|
||||
echo "Upgrade done! -> Rebooting..."
|
||||
@ -85,6 +94,7 @@ function upgradeLoader () {
|
||||
function updateLoader() {
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
local ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
if [ -z "${1}" ]; then
|
||||
# Check for new Version
|
||||
idx=0
|
||||
@ -126,8 +136,13 @@ function updateLoader() {
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update.zip"
|
||||
local SHA="https://github.com/AuxXxilium/arc/releases/download/${TAG}/checksum.sha256"
|
||||
if [ -n "${ARCBRANCH}" ]; then
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update-${ARCBRANCH}.zip"
|
||||
local SHA="https://github.com/AuxXxilium/arc/releases/download/${TAG}/checksum-${ARCBRANCH}.sha256"
|
||||
else
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update.zip"
|
||||
local SHA="https://github.com/AuxXxilium/arc/releases/download/${TAG}/checksum.sha256"
|
||||
fi
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
curl -#kL "${URL}" -o "${TMP_PATH}/update.zip" 2>&1 | while IFS= read -r -n1 char; do
|
||||
[[ $char =~ [0-9] ]] && keep=1 ;
|
||||
|
@ -83,6 +83,7 @@ if grep -q "automated_arc" /proc/cmdline; then
|
||||
else
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
[ $(echo "${ARC_VERSION}" | grep -q "s" | wc -l) -gt 0 ] && writeConfigKey "arc.branch" "s" "${USER_CONFIG_FILE}" || writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
|
||||
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null
|
||||
# Check for compatibility
|
||||
compatboot
|
||||
|
53
img-gen.sh
53
img-gen.sh
@ -16,7 +16,8 @@ getPatches "files/p3/patches"
|
||||
getCustom "files/p3/custom"
|
||||
getTheme "files/p1/boot/grub"
|
||||
getOffline "files/p3/configs"
|
||||
getBuildroot "latest" "br"
|
||||
getBuildroot "latest" "brx"
|
||||
getBuildroot "stable" "brs"
|
||||
|
||||
# Xbase
|
||||
IMAGE_FILE="arc.img"
|
||||
@ -34,7 +35,7 @@ mkdir -p "/tmp/p3"
|
||||
sudo mount ${LOOPX}p1 "/tmp/p1"
|
||||
sudo mount ${LOOPX}p3 "/tmp/p3"
|
||||
|
||||
[[ ! -f "br/bzImage-arc" || ! -f "br/initrd-arc" ]] && return 1
|
||||
[[ ! -f "brx/bzImage-arc" || ! -f "brx/initrd-arc" ]] && return 1
|
||||
|
||||
VERSION=$(date +'%y.%-m.dev')
|
||||
echo "${VERSION}" >files/p1/ARC-VERSION
|
||||
@ -42,8 +43,8 @@ echo "${VERSION}" >VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
|
||||
|
||||
echo "Repack initrd"
|
||||
cp -f "br/bzImage-arc" "files/p3/bzImage-arc"
|
||||
repackInitrd "br/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||
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"
|
||||
@ -62,4 +63,46 @@ 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
|
||||
|
||||
exit 0
|
||||
# Sbase
|
||||
IMAGE_FILE="arc-s.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}-s" >files/p1/ARC-VERSION
|
||||
echo "${VERSION}-s" >VERSION
|
||||
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}-s'"/' -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-s-dyn.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-s.vmdk
|
||||
qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-s.vhdx
|
@ -234,12 +234,20 @@ function getBuildroot() {
|
||||
fi
|
||||
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
|
||||
rm -f "${DEST_PATH}/bzImage-arc"
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc")
|
||||
if [ "${TAG}" = "latest-s" ]; then
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}-s/bzImage" -o "${DEST_PATH}/bzImage-arc")
|
||||
else
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc")
|
||||
fi
|
||||
echo "TAG=${TAG}; Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
|
||||
rm -f "${DEST_PATH}/initrd-arc"
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc")
|
||||
if [ "${TAG}" = "latest-s" ]; then
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}-s/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc")
|
||||
else
|
||||
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-buildroot/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc")
|
||||
fi
|
||||
echo "TAG=${TAG}; Status=${STATUS}"
|
||||
[ ${STATUS} -ne 200 ] && exit 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user