You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BeagleV-Fire-ubuntu/03_build_u-boot.sh

39 lines
1.5 KiB
Bash

#!/bin/bash
CORES=$(getconf _NPROCESSORS_ONLN)
wdir=`pwd`
CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} distclean
cd ./u-boot/
#patch -p1 < ../patches/u-boot/0001-Use-MMUART0-for-stdout.patch
#exit 2
cp -v ../patches/u-boot/microchip_mpfs_icicle.h include/configs/microchip_mpfs_icicle.h
cp -v ../patches/u-boot/microchip-mpfs-icicle-kit.dts arch/riscv/dts/
cp -v ../patches/u-boot/microchip_mpfs_icicle_defconfig .config
cd ../
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} microchip_mpfs_icicle
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} olddefconfig
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} menuconfig
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} savedefconfig
#cp -v ./u-boot/defconfig ./u-boot/configs/microchip_mpfs_icicle_defconfig
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} distclean
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} microchip_mpfs_icicle_defconfig
#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} menuconfig
make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} olddefconfig
make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} savedefconfig
cp -v ./u-boot/defconfig ./u-boot/configs/microchip_mpfs_icicle_defconfig
cp -v ./u-boot/defconfig ./patches/u-boot/microchip_mpfs_icicle_defconfig
echo "make -C u-boot -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} all"
make -C u-boot -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} all
cp -v ./u-boot/u-boot.bin ./deploy/
cp -v ./u-boot/u-boot.bin ./deploy/src.bin