Skip to content

Commit

Permalink
Merge pull request #5563 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium authored Jan 5, 2025
2 parents 1b0ff6b + a405764 commit 5c4a706
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 1,674 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
Expand Down Expand Up @@ -146,7 +146,6 @@ jobs:
echo "Repack initrd"
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc"
createArc
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
Expand All @@ -167,6 +166,7 @@ jobs:
rm -f "${IMAGE_FILE}"
echo "Image Converter"
IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
Expand Down Expand Up @@ -231,7 +231,6 @@ jobs:
echo "Repack initrd"
cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
createArc
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
echo "Copying files"
Expand All @@ -252,6 +251,7 @@ jobs:
rm -f "${IMAGE_FILE}"
echo "Image Converter"
IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -O vmdk ${IMAGE_FILE} arc-dyn.vmdk
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
Expand Down
3 changes: 1 addition & 2 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"

. "${ARC_PATH}/include/functions.sh"
. "${ARC_PATH}/arc-functions.sh"
. "${ARC_PATH}/include/addons.sh"
. "${ARC_PATH}/include/modules.sh"
. "${ARC_PATH}/include/update.sh"
. "${ARC_PATH}/include/storage.sh"
. "${ARC_PATH}/include/network.sh"
. "${ARC_PATH}/include/compat.sh"
. "${ARC_PATH}/arc-functions.sh"

# Get Keymap and Timezone and check System
onlineCheck
Expand Down
1 change: 0 additions & 1 deletion files/initrd/opt/arc/include/compat.sh

This file was deleted.

2 changes: 2 additions & 0 deletions files/initrd/opt/arc/include/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ function systemCheck () {
# Check for Arc Patch
ARCCONF="$(readConfigKey "${MODEL:-SA6400}.serial" "${S_FILE}")"
[ -z "${ARCCONF}" ] && writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
# Check for Disks
getmap
}

###############################################################################
Expand Down
12 changes: 5 additions & 7 deletions files/initrd/opt/arc/include/storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ function getmap() {
SATADRIVES=0
if [ $(lspci -d ::106 2>/dev/null | wc -l) -gt 0 ]; then
# Clean old files
[ -f "${TMP_PATH}/drivesmax" ] && rm -f "${TMP_PATH}/drivesmax" && touch "${TMP_PATH}/drivesmax" || true
[ -f "${TMP_PATH}/drivescon" ] && rm -f "${TMP_PATH}/drivescon" && touch "${TMP_PATH}/drivescon" || true
[ -f "${TMP_PATH}/ports" ] && rm -f "${TMP_PATH}/ports" && touch "${TMP_PATH}/ports" || true
[ -f "${TMP_PATH}/remap" ] && rm -f "${TMP_PATH}/remap" && touch "${TMP_PATH}/remap" || true
[ -f "${TMP_PATH}/drivesmax" ] && rm -f "${TMP_PATH}/drivesmax" && touch "${TMP_PATH}/drivesmax"
[ -f "${TMP_PATH}/drivescon" ] && rm -f "${TMP_PATH}/drivescon" && touch "${TMP_PATH}/drivescon"
[ -f "${TMP_PATH}/ports" ] && rm -f "${TMP_PATH}/ports" && touch "${TMP_PATH}/ports"
[ -f "${TMP_PATH}/remap" ] && rm -f "${TMP_PATH}/remap" && touch "${TMP_PATH}/remap"
if [ $(lspci -d ::106 | wc -l) -gt 0 ]; then
let DISKIDXMAPIDX=0
DISKIDXMAP=""
Expand Down Expand Up @@ -247,6 +247,4 @@ RAIDCONTROLLER=$(lspci -d ::104 2>/dev/null | wc -l)
writeConfigKey "device.raidcontroller" "${RAIDCONTROLLER}" "${USER_CONFIG_FILE}"
if [ ${RAIDCONTROLLER} -gt 0 ]; then
writeConfigKey "device.externalcontroller" "true" "${USER_CONFIG_FILE}"
fi
# Check Controller for Disks
getmap
fi
8 changes: 7 additions & 1 deletion img-ext.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#

set -e

Expand Down Expand Up @@ -50,7 +56,6 @@ echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "Repack initrd"
if [ -f "brx/bzImage-arc" ] && [ -f "brx/initrd-arc" ]; then
cp -f "brx/bzImage-arc" "files/p3/bzImage-arc"
createArc
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
else
exit 1
Expand All @@ -73,4 +78,5 @@ sudo losetup --detach ${LOOPX}
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"

IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
8 changes: 7 additions & 1 deletion img-min.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#

set -e

Expand Down Expand Up @@ -49,7 +55,6 @@ echo "${ARC_BRANCH}" >files/p1/ARC-BRANCH
echo "Repack initrd"
if [ -f "brs/bzImage-arc" ] && [ -f "brs/initrd-arc" ]; then
cp -f "brs/bzImage-arc" "files/p3/bzImage-arc"
createArc
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
else
exit 1
Expand All @@ -72,4 +77,5 @@ sudo losetup --detach ${LOOPX}
resizeImg "${IMAGE_FILE}" "+1024M" "arc.img" 2>/dev/null
rm -f "${IMAGE_FILE}"

IMAGE_FILE="arc.img"
qemu-img convert -p -f raw -o subformat=monolithicFlat -O vmdk ${IMAGE_FILE} arc.vmdk
13 changes: 2 additions & 11 deletions scripts/func.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# Copyright (C) 2025 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
Expand Down Expand Up @@ -499,13 +499,4 @@ function copyBuildroot() {
mkdir -p "${DEST_PATH}"
cp -f "../${DEST_PATH}/bzImage" "${DEST_PATH}/bzImage-arc"
cp -f "../${DEST_PATH}/rootfs.cpio.zst" "${DEST_PATH}/initrd-arc"
}

# create arc executable
function createArc() {
[ ! -f "arc" ] && ./scripts/make/makeself.sh --current --zstd "files/initrd/opt/arc" arc "Arc Loader" "./init.sh" || true
rm -rf "files/initrd/opt/arc"
mkdir -p "files/initrd/opt/arc"
cp -f "arc" "files/initrd/opt/arc/"
cp -f "grub.img.gz" "files/initrd/opt/arc/grub.img.gz"
}
Loading

0 comments on commit 5c4a706

Please sign in to comment.