mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix buildchain
This commit is contained in:
parent
97b6583041
commit
83e4613092
7 changed files with 22 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_ARCH="aarch64"
|
||||
source /usr/lib/archboot/functions
|
||||
source /usr/lib/archboot/iso_functions
|
||||
[[ -z "${1}" ]] && _usage
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_ARCH="aarch64"
|
||||
_ARCHBOOT="archboot-arm"
|
||||
source /usr/lib/archboot/functions
|
||||
source /usr/lib/archboot/release_functions
|
||||
_ARCHBOOT="archboot-arm"
|
||||
[[ -z "${1}" ]] && _usage
|
||||
_root_check
|
||||
_aarch64_check
|
||||
echo "Start release creation in $1 ..."
|
||||
_create_iso "$@"
|
||||
_create_boot
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_ARCH="x86_64"
|
||||
source /usr/lib/archboot/functions
|
||||
source /usr/lib/archboot/iso_functions
|
||||
[[ -z "${1}" ]] && _usage
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_ARCH="x86_64"
|
||||
_ARCHBOOT="archboot"
|
||||
source /usr/lib/archboot/functions
|
||||
source /usr/lib/archboot/release_functions
|
||||
_ARCHBOOT="archboot"
|
||||
[[ -z "${1}" ]] && _usage
|
||||
_root_check
|
||||
_x86_64_check
|
||||
|
|
|
@ -12,7 +12,7 @@ _ISODIR="$(mktemp -d ISODIR.XXX)"
|
|||
|
||||
_usage () {
|
||||
echo "${_BASENAME}: usage"
|
||||
echo "CREATE X86_64 USB/CD IMAGES"
|
||||
echo "CREATE ${_RUNNING_ARCH} USB/CD IMAGES"
|
||||
echo "-----------------------------"
|
||||
echo "PARAMETERS:"
|
||||
echo " -g Start generation of image."
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
_PRESET_LATEST="${_RUNNING_ARCH}-latest"
|
||||
_PRESET_LATEST="${_ARCH}-latest"
|
||||
_AMD_UCODE="boot/amd-ucode.img"
|
||||
_INTEL_UCODE="boot/intel-ucode.img"
|
||||
_INITRAMFS="boot/initramfs_${_RUNNING_ARCH}.img"
|
||||
_INITRAMFS_LATEST="boot/initramfs_${_RUNNING_ARCH}-latest.img"
|
||||
_KERNEL="boot/vmlinuz_${_RUNNING_ARCH}"
|
||||
_KERNEL_ARCHBOOT="boot/vmlinuz_archboot_${_RUNNING_ARCH}"
|
||||
_INITRAMFS="boot/initramfs_${_ARCH}.img"
|
||||
_INITRAMFS_LATEST="boot/initramfs_${_ARCH}-latest.img"
|
||||
_KERNEL="boot/vmlinuz_${_ARCH}"
|
||||
_KERNEL_ARCHBOOT="boot/vmlinuz_archboot_${_ARCH}"
|
||||
_W_DIR="$(mktemp -u archboot-release.XXX)"
|
||||
|
||||
_usage () {
|
||||
|
@ -20,25 +20,25 @@ _create_iso() {
|
|||
mkdir -p "${1}"
|
||||
cd "${1}" || exit 1
|
||||
# create container
|
||||
archboot-"${_RUNNING_ARCH}"-create-container.sh "${_W_DIR}" -cc -cp || exit 1
|
||||
archboot-"${_ARCH}"-create-container.sh "${_W_DIR}" -cc -cp || exit 1
|
||||
# generate tarball in container, umount tmp it's a tmpfs and weird things could happen then
|
||||
echo "Generate ISO ..."
|
||||
# generate iso in container
|
||||
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_RUNNING_ARCH}-iso.sh -g" || exit 1
|
||||
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_ARCH}-iso.sh -g" || exit 1
|
||||
# remove not working lvm2 from latest image
|
||||
echo "Remove lvm2 and openssh from container ${_W_DIR} ..."
|
||||
systemd-nspawn -D "${_W_DIR}" /bin/bash -c "pacman -Rdd lvm2 openssh --noconfirm" >/dev/null 2>&1
|
||||
# generate latest tarball in container
|
||||
echo "Generate latest ISO ..."
|
||||
# generate latest iso in container
|
||||
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_RUNNING_ARCH}-iso.sh -g -p=${_PRESET_LATEST} \
|
||||
-i=archlinux-archboot-$(date +%Y.%m.%d-%H.%M)-latest-${_RUNNING_ARCH}" || exit 1
|
||||
systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_ARCH}-iso.sh -g -p=${_PRESET_LATEST} \
|
||||
-i=archlinux-archboot-$(date +%Y.%m.%d-%H.%M)-latest-${_ARCH}" || exit 1
|
||||
# create Release.txt with included main archlinux packages
|
||||
echo "Generate Release.txt ..."
|
||||
(echo "Welcome to _RUNNING_ARCHBOOT INSTALLATION / RESCUEBOOT SYSTEM";\
|
||||
(echo "Welcome to ARCHBOOT INSTALLATION / RESCUEBOOT SYSTEM";\
|
||||
echo "Creation Tool: 'archboot' Tobias Powalowski <tpowa@archlinux.org>";\
|
||||
echo "Homepage: https://wiki.archlinux.org/title/Archboot";\
|
||||
echo "Architecture: ${_RUNNING_ARCH}";\
|
||||
echo "Architecture: ${_ARCH}";\
|
||||
echo "RAM requirement to boot: 1152 MB or greater";\
|
||||
echo "Archboot:$(systemd-nspawn -q -D "${_W_DIR}" pacman -Qi "${_ARCHBOOT}" | grep Version | cut -d ":" -f2 | sed -e "s/\r//g")";\
|
||||
echo "Kernel:$(systemd-nspawn -q -D "${_W_DIR}" pacman -Qi linux | grep Version | cut -d ":" -f2 | sed -e "s/\r//g")";\
|
||||
|
@ -55,11 +55,11 @@ _create_boot() {
|
|||
# create boot directory with ramdisks
|
||||
echo "Create boot directory ..."
|
||||
mkdir -p boot/licenses/amd-ucode
|
||||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] || mkdir -p boot/licenses/intel-ucode
|
||||
[[ "${_ARCH}" == "aarch64" ]] || mkdir -p boot/licenses/intel-ucode
|
||||
for i in *.iso; do
|
||||
if ! echo "${i}" | grep -q latest; then
|
||||
isoinfo -R -i "${i}" -x /"${_AMD_UCODE}" 2>/dev/null > "${_AMD_UCODE}"
|
||||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] || isoinfo -R -i "${i}" -x /"${_INTEL_UCODE}" 2>/dev/null > "${_INTEL_UCODE}"
|
||||
[[ "${_ARCH}" == "aarch64" ]] || isoinfo -R -i "${i}" -x /"${_INTEL_UCODE}" 2>/dev/null > "${_INTEL_UCODE}"
|
||||
isoinfo -R -i "${i}" -x /"${_INITRAMFS}" 2>/dev/null > "${_INITRAMFS}"
|
||||
isoinfo -R -i "${i}" -x /"${_KERNEL}" 2>/dev/null > "${_KERNEL_ARCHBOOT}"
|
||||
else
|
||||
|
@ -67,7 +67,7 @@ _create_boot() {
|
|||
fi
|
||||
done
|
||||
cp /usr/share/licenses/amd-ucode/* boot/licenses/amd-ucode/
|
||||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] || cp /usr/share/licenses/intel-ucode/* boot/licenses/intel-ucode/
|
||||
[[ "${_ARCH}" == "aarch64" ]] || cp /usr/share/licenses/intel-ucode/* boot/licenses/intel-ucode/
|
||||
}
|
||||
|
||||
_create_torrent() {
|
||||
|
|
|
@ -33,7 +33,7 @@ _update_aarch64_pacman_chroot() {
|
|||
systemd-nspawn -D "${_PACMAN_AARCH64}" pacman -Syu --noconfirm >/dev/null 2>&1 || exit 1
|
||||
# remove package cache
|
||||
echo "Remove package cache from container ..."
|
||||
rm ${_PACMAN_AARCH64}/var/cache/pacman/pkg/*
|
||||
rm ${_PACMAN_AARCH64}/var/cache/pacman/pkg/* >/dev/null 2>&1
|
||||
# enable parallel downloads
|
||||
sed -i -e 's:^#ParallelDownloads:ParallelDownloads:g' "${_PACMAN_AARCH64}"/etc/pacman.conf
|
||||
# fix network in container
|
||||
|
|
Loading…
Reference in a new issue