1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-16 16:37:10 +01:00
build/pkg/linux-rpi3/build
David Oberhollenzer ffacb26218 Remove depends file
Instead of having a "depends" file with a list of packages, add a
"DEPENDS" variable to the build script.

Generate the rootfs dependencies from a config file stored in the
cfg directory.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-01-30 14:02:09 +01:00

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/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
}