1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00
build/pkg/linux-rpi3/build
David Oberhollenzer dbbb1889f4 Initial commit
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-01-29 10:17:30 +01:00

42 lines
1.3 KiB
Text
Executable file

VERSION="1.20170427-1"
SRCDIR="linux-raspberrypi-kernel_${VERSION}"
TARBALL="raspberrypi-kernel_${VERSION}"
URL="https://codeload.github.com/raspberrypi/linux/tar.gz"
SHA256SUM="c9b60483e901556a2fbab64c06be8a9eba884f3eaac98ba39347e82bb0a00f5b"
prepare() {
return
}
build() {
local INPUT="$1"
local OUTPUT="$2"
local CFGFILE="$SCRIPTDIR/cfg/$CFG/linux.config"
local INITRDLIST="$PKGDEPLOYDIR/initrd/initrd.list"
export KBUILD_OUTPUT="$OUTPUT"
make -C "$INPUT" O="$OUTPUT" ARCH="arm" CROSS_COMPILE="${TARGET}-" mrproper
cp "$CFGFILE" "$OUTPUT/.config"
sed -i "$OUTPUT/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
sed -i "$OUTPUT/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
make -C "$INPUT" O="$OUTPUT" ARCH="arm" CROSS_COMPILE="${TARGET}-" oldconfig
sed -i "$OUTPUT/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
sed -i "$OUTPUT/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
make -C "$INPUT" O="$OUTPUT" ARCH="arm" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS zImage dtbs
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
local CFGFILE="$SCRIPTDIR/cfg/$CFG/linux.config"
pushd $BUILD
install -m 755 "arch/arm/boot/zImage" "$DEPLOY/kernel.img"
cp arch/arm/boot/dts/*.dtb "$DEPLOY/"
popd
}