mirror of
https://github.com/pygos/build.git
synced 2024-11-16 16:37:10 +01:00
ae57b55b9c
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
43 lines
1.4 KiB
Text
Executable file
43 lines
1.4 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"
|
|
DEPENDS="initrd"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local INPUT="$1"
|
|
local OUTPUT="$2"
|
|
|
|
local CFGFILE="$SCRIPTDIR/board/$BOARD/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/board/$BOARD/linux.config"
|
|
|
|
pushd $BUILD
|
|
install -m 755 "arch/arm/boot/zImage" "$DEPLOY/kernel.img"
|
|
cp arch/arm/boot/dts/*.dtb "$DEPLOY/"
|
|
popd
|
|
}
|