build linux image
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>default-cape-symlinks
parent
279bc06f60
commit
be22c31c26
@ -0,0 +1,14 @@
|
|||||||
|
image: robertcnelson/debian-bookworm-slim-riscv:latest
|
||||||
|
|
||||||
|
cache:
|
||||||
|
key: "$CI_PROJECT_NAME"
|
||||||
|
paths:
|
||||||
|
- mirror/x86_64-gcc-*-linux.tar.xz
|
||||||
|
- deploy/*.tar.xz
|
||||||
|
|
||||||
|
build:
|
||||||
|
tags:
|
||||||
|
- docker-amd64
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- ./01_git_sync.sh
|
@ -0,0 +1,36 @@
|
|||||||
|
#!/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 ../
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue