tree: rewrite versions and build

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-06 12:52:24 +02:00
parent b04c40c23c
commit 2bfced0ca8
5 changed files with 53 additions and 56 deletions

View File

@ -73,15 +73,15 @@ jobs:
echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV
getTheme "files/p1/boot/grub" getTheme "files/p1/boot/grub"
echo "THEMETAG=${TAG}" >> $GITHUB_ENV echo "THEMETAG=${TAG}" >> $GITHUB_ENV
getBuildrootx "latest" "brx" getBuildroots "latest" "brs"
echo "BR_XVERSION=${TAG}" >> $GITHUB_ENV echo "BRS_VERSION=${TAG}" >> $GITHUB_ENV
getOffline "files/p3/configs" getOffline "files/p3/configs"
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "OK" echo "OK"
# Build incremental # Build incremental
- name: Build Image X - name: Build Image S
run: | run: |
. scripts/func.sh . scripts/func.sh
@ -106,11 +106,11 @@ jobs:
sudo mount ${LOOPX}p1 "/tmp/p1" sudo mount ${LOOPX}p1 "/tmp/p1"
sudo mount ${LOOPX}p3 "/tmp/p3" sudo mount ${LOOPX}p3 "/tmp/p3"
[ ! -f "brx/bzImage-arc" ] || [ ! -f "brx/initrd-arc" ] && return 1 [ ! -f "brs/bzImage-arc" ] || [ ! -f "brs/initrd-arc" ] && return 1
echo "Repack initrd" echo "Repack initrd"
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc" cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc" repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files" echo "Copying files"
sudo cp -Rf "files/p1/"* "/tmp/p1" sudo cp -Rf "files/p1/"* "/tmp/p1"
@ -176,7 +176,7 @@ jobs:
Custom: ${{ env.CUSTOMTAG }} Custom: ${{ env.CUSTOMTAG }}
Theme: ${{ env.THEMETAG }} Theme: ${{ env.THEMETAG }}
LKM: ${{ env.LKMTAG }} LKM: ${{ env.LKMTAG }}
Buildroot: ${{ env.BR_XVERSION }} Buildroot: ${{ env.BR_SVERSION }}
artifacts: | artifacts: |
arc-*.zip arc-*.zip
update.zip update.zip

View File

@ -102,9 +102,9 @@ jobs:
getTheme "files/p1/boot/grub" getTheme "files/p1/boot/grub"
echo "THEMETAG=${TAG}" >> $GITHUB_ENV echo "THEMETAG=${TAG}" >> $GITHUB_ENV
getBuildrootx "latest" "brx" getBuildrootx "latest" "brx"
echo "BR_XVERSION=${TAG}" >> $GITHUB_ENV echo "BRX_VERSION=${TAG}" >> $GITHUB_ENV
getBuildroots "latest" "brs" getBuildroots "latest" "brs"
echo "BR_SVERSION=${TAG}" >> $GITHUB_ENV echo "BRS_VERSION=${TAG}" >> $GITHUB_ENV
getOffline "files/p3/configs" getOffline "files/p3/configs"
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
@ -119,11 +119,12 @@ jobs:
# Modify Source File # Modify Source File
echo "${VERSION}" >VERSION echo "${VERSION}" >VERSION
echo "${VERSION}" >files/p1/ARC-VERSION echo "${VERSION}" >files/p1/ARC-VERSION
echo "next" >files/p1/ARC-BRANCH
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
fi fi
echo "Create Arc Image" echo "Create Arc Image"
IMAGE_FILE="arc.img" IMAGE_FILE="arc-next.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}" gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}" fdisk -l "${IMAGE_FILE}"
@ -156,16 +157,16 @@ jobs:
sudo losetup --detach ${LOOPX} sudo losetup --detach ${LOOPX}
echo "Image Converter" echo "Image Converter"
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 arc-next-dyn.vmdk
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.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.vhdx qemu-img convert ${IMAGE_FILE} -O vhdx -o subformat=dynamic arc-next.vhdx
echo "Create Arc ova" echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc.ova" convertova "${IMAGE_FILE}" "arc-next.ova"
# Zip update and generate checksum # Zip update and generate checksum
zip -9j update.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg" zip -9j update-next.zip "files/p3/bzImage-arc" "files/p3/initrd-arc" "files/p1/ARC-VERSION" "files/p1/boot/grub/grub.cfg"
sha256sum update.zip >checksum.sha256 sha256sum update-next.zip >checksum-next.sha256
# Build incremental # Build incremental
- name: Build Image S - name: Build Image S
@ -173,15 +174,15 @@ jobs:
. scripts/func.sh . scripts/func.sh
if [ -n "${VERSION}" ]; then if [ -n "${VERSION}" ]; then
VERSION="${VERSION}-s"
# Modify Source File # Modify Source File
echo "${VERSION}" >VERSION echo "${VERSION}" >VERSION
echo "${VERSION}" >files/p1/ARC-VERSION echo "${VERSION}" >files/p1/ARC-VERSION
echo "stable" >files/p1/ARC-BRANCH
sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh sed 's/^ARC_VERSION=.*/ARC_VERSION="'${VERSION}'"/' -i files/initrd/opt/arc/include/consts.sh
fi fi
echo "Create Arc Image" echo "Create Arc Image"
IMAGE_FILE="arc-s.img" IMAGE_FILE="arc.img"
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}" gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
fdisk -l "${IMAGE_FILE}" fdisk -l "${IMAGE_FILE}"
@ -214,31 +215,31 @@ jobs:
sudo losetup --detach ${LOOPX} sudo losetup --detach ${LOOPX}
echo "Image Converter" 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 arc-dyn.vmdk
qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc-s.vmdk qemu-img convert ${IMAGE_FILE} -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat arc.vmdk
echo "Create Arc ova" echo "Create Arc ova"
convertova "${IMAGE_FILE}" "arc-s.ova" convertova "${IMAGE_FILE}" "arc.ova"
# Zip update and generate checksum # 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" zip -9j update.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 sha256sum update.zip >checksum.sha256
# Zip image and generate checksum # Zip image and generate checksum
- name: Pack - name: Pack
run: | run: |
if [ -n "${{ env.VERSION }}" ]; then if [ -n "${{ env.VERSION }}" ]; then
# XBase # XBase
zip -9 "arc-${{ env.VERSION }}-next.img.zip" arc.img
zip -9 "arc-${{ env.VERSION }}-next.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.VERSION }}-next.vmdk-flat.zip" arc.vmdk arc-flat.vmdk
zip -9 "arc-${{ env.VERSION }}-next.vhdx.zip" arc.vhdx
zip -9 "arc-${{ env.VERSION }}-next.ova.zip" arc.ova
# SBase
zip -9 "arc-${{ env.VERSION }}.img.zip" arc.img zip -9 "arc-${{ env.VERSION }}.img.zip" arc.img
zip -9 "arc-${{ env.VERSION }}.vmdk-dyn.zip" arc-dyn.vmdk zip -9 "arc-${{ env.VERSION }}.vmdk-dyn.zip" arc-dyn.vmdk
zip -9 "arc-${{ env.VERSION }}.vmdk-flat.zip" arc.vmdk arc-flat.vmdk 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 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.ova.zip" arc-s.ova
fi fi
echo "${{ inputs.update_version }}" >check.update echo "${{ inputs.update_version }}" >check.update
@ -254,12 +255,13 @@ jobs:
body: | body: |
### Information: ### Information:
Notice: ${{ inputs.notice }} Notice: ${{ inputs.notice }}
Release: ${{ env.BUILD_TIME }}
- Full Changelog and Arc Patch (Decryption Key) can be found in my Discord. - Full Changelog and Arc Patch (Decryption Key) can be found in my Discord.
- Version: - Version:
- without "-s": Latest Buildroot System (More Hardware supported / Hyper-V and XEN (still in testing)) - arc: Stable Buildroot System (Less Hardware supported / faster Boot)
- with "-s": Stable Buildroot System (Less Hardware supported / faster Boot) - arc-next: Latest Buildroot System (More Hardware supported / Hyper-V and XEN (still in testing))
Release: ${{ env.BUILD_TIME }}
### Versions: ### Versions:
Addons: ${{ env.ADDONSTAG }} Addons: ${{ env.ADDONSTAG }}
@ -269,11 +271,11 @@ jobs:
Custom: ${{ env.CUSTOMTAG }} Custom: ${{ env.CUSTOMTAG }}
Theme: ${{ env.THEMETAG }} Theme: ${{ env.THEMETAG }}
LKM: ${{ env.LKMTAG }} LKM: ${{ env.LKMTAG }}
Buildroot: ${{ env.BR_XVERSION }} | Buildroot S: ${{ env.BR_SVERSION }} Buildroot: ${{ env.BRS_VERSION }} | Buildroot Next: ${{ env.BRX_VERSION }}
artifacts: | artifacts: |
arc-*.zip arc-*.zip
update.zip update.zip
update-s.zip update-next.zip
checksum.sha256 checksum.sha256
checksum-s.sha256 checksum-next.sha256
check.update check.update

View File

@ -819,6 +819,7 @@ function backupMenu() {
############################################################################### ###############################################################################
# Shows update menu to user # Shows update menu to user
function updateMenu() { function updateMenu() {
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
NEXT="1" NEXT="1"
while true; do while true; do
dialog --backtitle "$(backtitle)" --cancel-label "Exit" \ dialog --backtitle "$(backtitle)" --cancel-label "Exit" \
@ -832,7 +833,7 @@ function updateMenu() {
7 "Update Modules" \ 7 "Update Modules" \
8 "Update Patches" \ 8 "Update Patches" \
9 "Update Custom Kernel" \ 9 "Update Custom Kernel" \
0 "Switch Buildroot" \ 0 "Switch Branch ${ARCBRANCH}" \
2>"${TMP_PATH}/resp" 2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && break [ $? -ne 0 ] && break
case "$(cat ${TMP_PATH}/resp)" in case "$(cat ${TMP_PATH}/resp)" in
@ -1052,19 +1053,19 @@ function updateMenu() {
# Ask for Arc Branch # Ask for Arc Branch
dialog --clear --backtitle "$(backtitle)" --title "Switch Buildsystem" \ dialog --clear --backtitle "$(backtitle)" --title "Switch Buildsystem" \
--menu "Which Branch?" 7 50 0 \ --menu "Which Branch?" 7 50 0 \
1 "x - latest Buildsystem" \ 1 "Stable Buildsystem" \
2 "s - stable Buildsystem" \ 2 "Next Buildsystem (latest)" \
2>"${TMP_PATH}/opts" 2>"${TMP_PATH}/opts"
opts=$(cat ${TMP_PATH}/opts) opts=$(cat ${TMP_PATH}/opts)
[ -z "${opts}" ] && return 1 [ -z "${opts}" ] && return 1
if [ ${opts} -eq 1 ]; then if [ ${opts} -eq 1 ]; then
writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
elif [ ${opts} -eq 2 ]; then elif [ ${opts} -eq 2 ]; then
writeConfigKey "arc.branch" "s" "${USER_CONFIG_FILE}" writeConfigKey "arc.branch" "next" "${USER_CONFIG_FILE}"
fi fi
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")" ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
dialog --backtitle "$(backtitle)" --title "Switch Buildsystem" --aspect 18 \ dialog --backtitle "$(backtitle)" --title "Switch Buildsystem" --aspect 18 \
--msgbox "Updates are using ${ARCBRANCH} Branch.\nYou need to Update the Loader now!" 0 0 --msgbox "Using ${ARCBRANCH} Buildsystem, now.\nUpdate the Loader to apply the changes!" 7 50
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}" writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")" BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
;; ;;
@ -1206,7 +1207,8 @@ function sysinfo() {
TEXT+="\n\Zb$(lspci -s ${NETBUS} -nnk | awk '{$1=""}1' | awk '{$1=$1};1')\Zn\n" TEXT+="\n\Zb$(lspci -s ${NETBUS} -nnk | awk '{$1=""}1' | awk '{$1=$1};1')\Zn\n"
done done
# Print Config Informations # Print Config Informations
TEXT+="\n\Z4> Arc: ${ARC_VERSION} | Branch: ${ARCBRANCH:-x}\Zn" TEXT+="\n\Z4> Arc: ${ARC_VERSION}\Zn"
[ -n "${ARCBRANCH}" ] && TEXT+="\n Branch: \Zb${ARCBRANCH}\Zn"
TEXT+="\n Subversion: \ZbAddons ${ADDONSVERSION} | Configs ${CONFIGSVERSION} | LKM ${LKMVERSION} | Modules ${MODULESVERSION} | Patches ${PATCHESVERSION}\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 | Build: \Zb${CONFDONE} | ${BUILDDONE}\Zn"
TEXT+="\n Config Version: \Zb${CONFIGVER}\Zn" TEXT+="\n Config Version: \Zb${CONFIGVER}\Zn"

View File

@ -7,7 +7,7 @@
function upgradeLoader () { function upgradeLoader () {
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")" local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")" local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
local ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")" local ARCBRANCH="-$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
# Check for new Version # Check for new Version
idx=0 idx=0
@ -44,11 +44,7 @@ function upgradeLoader () {
( (
# Download update file # Download update file
echo "Downloading ${TAG}" echo "Downloading ${TAG}"
if [ -n "${ARCBRANCH}" ]; then local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}${ARCBRANCH}.img.zip"
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}-${ARCBRANCH}.img.zip"
else
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}.img.zip"
fi
if [ "${ARCNIC}" == "auto" ]; then if [ "${ARCNIC}" == "auto" ]; then
curl -#kL "${URL}" -o "${TMP_PATH}/arc.img.zip" 2>&1 | while IFS= read -r -n1 char; do curl -#kL "${URL}" -o "${TMP_PATH}/arc.img.zip" 2>&1 | while IFS= read -r -n1 char; do
[[ $char =~ [0-9] ]] && keep=1 ; [[ $char =~ [0-9] ]] && keep=1 ;
@ -94,7 +90,7 @@ function upgradeLoader () {
function updateLoader() { function updateLoader() {
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")" local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")" local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
local ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")" local ARCBRANCH="-$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
# Check for new Version # Check for new Version
idx=0 idx=0
@ -136,12 +132,8 @@ function updateLoader() {
( (
# Download update file # Download update file
echo "Downloading ${TAG}" echo "Downloading ${TAG}"
if [ -n "${ARCBRANCH}" ]; then local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update${ARCBRANCH}.zip"
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"
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 fi
if [ "${ARCNIC}" == "auto" ]; then if [ "${ARCNIC}" == "auto" ]; then
curl -#kL "${URL}" -o "${TMP_PATH}/update.zip" 2>&1 | while IFS= read -r -n1 char; do curl -#kL "${URL}" -o "${TMP_PATH}/update.zip" 2>&1 | while IFS= read -r -n1 char; do

View File

@ -66,7 +66,8 @@ initConfigKey "device.externalcontroller" "false" "${USER_CONFIG_FILE}"
initConfigKey "keymap" "" "${USER_CONFIG_FILE}" initConfigKey "keymap" "" "${USER_CONFIG_FILE}"
initConfigKey "layout" "" "${USER_CONFIG_FILE}" initConfigKey "layout" "" "${USER_CONFIG_FILE}"
initConfigKey "lkm" "prod" "${USER_CONFIG_FILE}" initConfigKey "lkm" "prod" "${USER_CONFIG_FILE}"
initConfigKey "modblacklist" "evbug,cdc_ether" "${USER_CONFIG_FILE}" # initConfigKey "modblacklist" "evbug,cdc_ether" "${USER_CONFIG_FILE}"
initConfigKey "modblacklist" "evbug" "${USER_CONFIG_FILE}"
initConfigKey "modules" "{}" "${USER_CONFIG_FILE}" initConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
initConfigKey "model" "" "${USER_CONFIG_FILE}" initConfigKey "model" "" "${USER_CONFIG_FILE}"
initConfigKey "modelid" "" "${USER_CONFIG_FILE}" initConfigKey "modelid" "" "${USER_CONFIG_FILE}"
@ -84,7 +85,7 @@ if grep -q "automated_arc" /proc/cmdline; then
else else
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}" writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
fi fi
[ $(echo "${ARC_VERSION}" | grep -q "s" | wc -l) -gt 0 ] && writeConfigKey "arc.branch" "s" "${USER_CONFIG_FILE}" || writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}" [ "${ARC_BRANCH}" == "next" ] && initConfigKey "arc.branch" "next" "${USER_CONFIG_FILE}" || initConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true [ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true
# Check for compatibility # Check for compatibility
compatboot compatboot