mirror of
https://github.com/rosalinux/image-builder.git
synced 2025-02-23 18:32:51 +00:00
48 lines
1.4 KiB
Bash
Executable file
48 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
echo "--- mkosi.build: args=$@"
|
|
echo "--- mkosi.build: container=$container"
|
|
|
|
if [ "$container" != "mkosi" ]; then
|
|
exec mkosi-chroot "$CHROOT_SCRIPT" "$@"
|
|
fi
|
|
|
|
echo "--- mkosi.build: user=$USER"
|
|
echo "--- mkosi.build: home=$HOME"
|
|
echo "--- mkosi.build: pwd=$PWD"
|
|
echo "--- mkosi.build: srcdir=$SRCDIR"
|
|
echo "--- mkosi.build: builddir=$BUILDDIR"
|
|
|
|
cd $SRCDIR
|
|
echo "--- mkosi.build: clone u-boot"
|
|
|
|
if [ -f "${SRCDIR}/mkosi/idbloader.img" ]; then
|
|
echo "--- mkosi.build: idbloader.img already exist, skipping u-boot build..."
|
|
exit 0
|
|
fi
|
|
|
|
dnf in -y --release 13 python2
|
|
dnf in -y --release 13 basesystem-build curl \
|
|
dnf git gcc-aarch64-linux-gnu \
|
|
binutils-aarch64-linux-gnu \
|
|
wget dtc bc
|
|
|
|
git clone https://github.com/radxa/u-boot.git --depth 1 -b next-dev-v2024.03
|
|
cd u-boot
|
|
git apply ${SRCDIR}/configuration/*.patch
|
|
BL31="rk3568_bl31_v1.44.elf"
|
|
RKDDR="rk3568_ddr_1560MHz_v1.23.bin"
|
|
BOOT_SOC="rk3568"
|
|
ARCH="aarch64"
|
|
|
|
wget https://github.com/rockchip-linux/rkbin/raw/refs/heads/master/bin/rk35/${RKDDR}
|
|
wget https://github.com/rockchip-linux/rkbin/raw/refs/heads/master/bin/rk35/${BL31}
|
|
|
|
make rk3568-ok3568c_defconfig
|
|
make -s -j$(nproc) KCFLAGS="-Wno-error" \
|
|
BL31=${BL31} \
|
|
spl/u-boot-spl.bin \
|
|
u-boot.dtb u-boot.itb CROSS_COMPILE="${ARCH}-linux-gnu-"
|
|
|
|
tools/mkimage -n ${BOOT_SOC} -T rksd -d ${RKDDR}:spl/u-boot-spl.bin idbloader.img
|
|
|
|
cp -fv idbloader.img u-boot.itb ${SRCDIR}/mkosi/
|