add mt7981_360t7_build.sh to build uboot and atf

This commit is contained in:
hanwckf
2022-10-28 01:13:54 +08:00
parent 7bf57155cc
commit ae85174be6
2 changed files with 37 additions and 0 deletions

1
.gitignore vendored
View File

@@ -29,3 +29,4 @@ u-boot.cfg
/mkgpt/bin
/mkgpt/gpttable
__pycache__
./*-fip.bin

36
mt7981_360t7_build.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
TOOLCHAIN=aarch64-linux-gnu-
command -v ${TOOLCHAIN}gcc
[ "$?" != "0" ] && { echo ${TOOLCHAIN}gcc not found!; exit 0; }
export CROSS_COMPILE=$TOOLCHAIN
BOARD=360t7
UBOOT_DIR=uboot-mtk-20220606
UBOOT_CFG=mt7981_360t7_defconfig
ATF_DIR=atf-20220606-637ba581b
ATF_CFG=mt7981_360t7_defconfig
echo "build u-boot..."
cp -f $UBOOT_DIR/configs/$UBOOT_CFG $UBOOT_DIR/.config
make -C $UBOOT_DIR olddefconfig all
if [ -f "$UBOOT_DIR/u-boot.bin" ]; then
cp -f $UBOOT_DIR/u-boot.bin $ATF_DIR/u-boot.bin
echo "u-boot.bin done"
else
echo "u-boot.bin fail!"
exit 1
fi
echo "build atf..."
make -C $ATF_DIR -f makefile $ATF_CFG all
if [ -f "$ATF_DIR/build/mt7981/release/fip.bin" ]; then
cp -f $ATF_DIR/build/mt7981/release/fip.bin $BOARD-fip.bin
echo "fip.bin done"
else
echo "fip build fail!"
exit 1
fi