33 lines
1.0 KiB
Bash
Executable File
33 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CUR_DIR=$(pwd)
|
|
|
|
if ! [ "$(ls -A buildroot)" ]; then
|
|
echo "Cloning Buildroot..."
|
|
git clone https://gitlab.com/buildroot.org/buildroot -b 2026.05.x buildroot
|
|
fi
|
|
|
|
cd buildroot
|
|
make BR2_EXTERNAL=$CUR_DIR/flip_os_br2_external BR2_DEFCONFIG=$CUR_DIR/flip_os_br2_external/configs/lira_flip_defconfig defconfig
|
|
make BR2_EXTERNAL=$CUR_DIR/flip_os_br2_external
|
|
if [ $? == 0 ]; then
|
|
echo "Building Image..."
|
|
cd output/images
|
|
mkdir ../../../img_tmp
|
|
cp tiboot3.bin ../../../img_tmp/tiboot3.bin
|
|
cp tispl.bin ../../../img_tmp/tispl.bin
|
|
cp u-boot.bin ../../../img_tmp/u-boot.bin
|
|
cp rootfs.btrfs ../../../img_tmp/rootfs.btrfs
|
|
cd ../../../img_tmp
|
|
genimage --rootpath "../buildroot/output/target" --tmppath "genimage.tmp" --inputpath "." --outputpath "../img" --config "../flip_os_br2_external/board/lira_flip_am6254sip/genimage.cfg"
|
|
rm -f ../img/boot.vfat
|
|
if ! [ $? == 0 ]; then
|
|
echo "Failed Building Image."
|
|
fi;
|
|
cd ..
|
|
rm -rf img_tmp
|
|
else
|
|
echo "Failed Building OS."
|
|
fi
|
|
echo "Done"
|