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

View File

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

View File

@ -819,6 +819,7 @@ function backupMenu() {
###############################################################################
# Shows update menu to user
function updateMenu() {
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
NEXT="1"
while true; do
dialog --backtitle "$(backtitle)" --cancel-label "Exit" \
@ -832,7 +833,7 @@ function updateMenu() {
7 "Update Modules" \
8 "Update Patches" \
9 "Update Custom Kernel" \
0 "Switch Buildroot" \
0 "Switch Branch ${ARCBRANCH}" \
2>"${TMP_PATH}/resp"
[ $? -ne 0 ] && break
case "$(cat ${TMP_PATH}/resp)" in
@ -1052,19 +1053,19 @@ function updateMenu() {
# Ask for Arc Branch
dialog --clear --backtitle "$(backtitle)" --title "Switch Buildsystem" \
--menu "Which Branch?" 7 50 0 \
1 "x - latest Buildsystem" \
2 "s - stable Buildsystem" \
1 "Stable Buildsystem" \
2 "Next Buildsystem (latest)" \
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}"
writeConfigKey "arc.branch" "next" "${USER_CONFIG_FILE}"
fi
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
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}"
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"
done
# 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 Config | Build: \Zb${CONFDONE} | ${BUILDDONE}\Zn"
TEXT+="\n Config Version: \Zb${CONFIGVER}\Zn"

View File

@ -7,7 +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}")"
local ARCBRANCH="-$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
@ -44,11 +44,7 @@ function upgradeLoader () {
(
# Download update file
echo "Downloading ${TAG}"
if [ -n "${ARCBRANCH}" ]; then
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
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}${ARCBRANCH}.img.zip"
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 ;
@ -94,7 +90,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}")"
local ARCBRANCH="-$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
@ -136,12 +132,8 @@ function updateLoader() {
(
# Download update file
echo "Downloading ${TAG}"
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"
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"
fi
if [ "${ARCNIC}" == "auto" ]; then
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 "layout" "" "${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 "model" "" "${USER_CONFIG_FILE}"
initConfigKey "modelid" "" "${USER_CONFIG_FILE}"
@ -84,7 +85,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}"
[ "${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
# Check for compatibility
compatboot