a8479bfcf9
The redox.patch was present and symlinked but never listed in the [source] patches field, so the cookbook never applied it during builds. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
35 lines
1.1 KiB
TOML
35 lines
1.1 KiB
TOML
[source]
|
|
git = "https://gitlab.redox-os.org/redox-os/bootloader.git"
|
|
patches = ["redox.patch"]
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
OUTDIR="${COOKBOOK_BUILD}"
|
|
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
|
|
|
|
function bootloader {
|
|
export TARGET="$1"
|
|
src="$2"
|
|
dst="$3"
|
|
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" -f "${COOKBOOK_SOURCE}/Makefile" -C "${OUTDIR}" "${OUTDIR}/${src}"
|
|
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
|
|
}
|
|
|
|
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
|
|
|
|
# Build BIOS bootloader for supported architectures
|
|
if [ "${ARCH}" == "i586" -o "${ARCH}" == "i686" -o "${ARCH}" == "x86_64" ]
|
|
then
|
|
bootloader "x86-unknown-none" bootloader.bin bootloader.bios
|
|
bootloader "x86-unknown-none" bootloader-live.bin bootloader-live.bios
|
|
fi
|
|
|
|
# Build UEFI bootloader for supported architectures
|
|
if [ "${ARCH}" == "aarch64" -o "${ARCH}" == "x86_64" -o "${ARCH}" == "riscv64gc" ]
|
|
then
|
|
bootloader "${ARCH}-unknown-uefi" bootloader.efi bootloader.efi
|
|
bootloader "${ARCH}-unknown-uefi" bootloader-live.efi bootloader-live.efi
|
|
fi
|
|
"""
|