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.
37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
CORES=$(getconf _NPROCESSORS_ONLN)
|
|
wdir=`pwd`
|
|
CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
|
|
|
|
cd ./linux/
|
|
|
|
make ARCH=riscv CROSS_COMPILE=${CC} clean
|
|
make ARCH=riscv CROSS_COMPILE=${CC} mpfs_defconfig
|
|
#./scripts/config --enable CONFIG_OF_OVERLAY
|
|
|
|
echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
|
|
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs
|
|
|
|
KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' )
|
|
|
|
make -s ARCH=riscv CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH="${wdir}/deploy/tmp"
|
|
|
|
if [ -f "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" ] ; then
|
|
rm -rf "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" || true
|
|
fi
|
|
echo "Compressing ${KERNEL_UTS}-modules.tar.gz..."
|
|
echo "${KERNEL_UTS}" > "${wdir}/deploy/.modules"
|
|
cd "${wdir}/deploy/tmp" || true
|
|
tar --create --gzip --file "../${KERNEL_UTS}-modules.tar.gz" ./*
|
|
cd "${wdir}/linux/" || exit
|
|
rm -rf "${wdir}/deploy/tmp" || true
|
|
|
|
#cp -v ./arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts ../BeagleBoard-DeviceTrees/src/thead/
|
|
cp -v ./.config ../patches/linux/mpfs_defconfig
|
|
cp -v ./arch/riscv/boot/Image ../deploy/
|
|
#cp -v ./arch/riscv/boot/dts/thead/*.dtb ../deploy/
|
|
|
|
cd ../
|
|
|