fix aarch64 and riscv64

This commit is contained in:
Tobias Powalowski 2023-07-24 20:28:58 +02:00
parent db7902db2e
commit ba0920bc50
3 changed files with 7 additions and 6 deletions

View file

@ -8,6 +8,9 @@
shopt -s extglob
# shellcheck source=functions
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/cpio.sh
# needed files/directories
_f_config=
_d_install=/lib/initcpio/install
@ -160,9 +163,7 @@ if ! [[ ${UID} -eq 0 ]]; then
echo "ERROR: Please run as root user!"
exit 1
fi
# shellcheck source=functions
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/cpio.sh
_opt_short='c:d:g:hk:'
parseopts "$_opt_short" -- "$@" || exit 1
set -- "${OPTRET[@]}"

View file

@ -68,7 +68,7 @@ _kver() {
# requirement for CONFIG_LOCALVERSION to be set.
local kver re='^[[:digit:]]+(\.[[:digit:]]+)+'
local arch bytes reader
arch="${_ARCH}"
arch="${_RUNNING_ARCH}"
if [[ $arch == @(i?86|x86_64) ]]; then
local -i offset
offset="$(od -An -j0x20E -dN2 "$1")" || return

View file

@ -35,7 +35,7 @@ _create_iso() {
archboot-"${_ARCH}"-create-container.sh "${_W_DIR}" -cc --install-source="${2}" || exit 1
_create_archboot_db "${_W_DIR}${_CACHEDIR}"
. "${_W_DIR}/etc/archboot/presets/${_ARCH}"
_ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver ${_W_DIR}/${ALL_kver})"
_ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(${_NSPAWN} ${_W_DIR} _kver ${ALL_kver})"
unset ALL_kver MKINITCPIO_CONFIG
# riscv64 does not support kexec at the moment
if ! [[ "${_ARCH}" == "riscv64" ]]; then
@ -51,7 +51,7 @@ _create_iso() {
# wget -q "https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig" -P "${_W_DIR}/var/cache/pacman/pkg"
#fi
${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;rm -rf /tmp/*;archboot-${_ARCH}-iso.sh -g -s \
-p=${_PRESET_LOCAL} -i=${_ISONAME}-local-${_ARCH}" || exit 1
-p=${_PRESET_LOCAL} -i=${_ISONAME}-local-${_ARCH}" || exit 1
echo "Generating latest ISO..."
# generate latest iso in container
${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;rm -rf /tmp/*;archboot-${_ARCH}-iso.sh -g \