1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-05 03:27:10 +01:00
build/pkg/linux/build
David Oberhollenzer 52fb22a291 Move archiecture/target variables to TOOLCHAIN file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-10 19:59:51 +01:00

42 lines
1.1 KiB
Text
Executable file

MAJOR="4"
MINOR="14"
RELEASE="1"
VERSION="$MAJOR.$MINOR.$RELEASE"
SRCDIR="linux-$VERSION"
TARBALL="linux-$VERSION.tar.xz"
URL="https://www.kernel.org/pub/linux/kernel/v$MAJOR.x"
SHA256SUM="6fb9f67002f986ce3905b35466e35c394e0fa3eb7c32df508514717955cb4de7"
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="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
cp "$CFGFILE" "$OUTPUT/.config"
make -C "$INPUT" O="$OUTPUT" ARCH="$LINUX_CPU" 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="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS $LINUX_TGT
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
pushd $BUILD
install -m 755 "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/vmlinuz-$VERSION"
popd
}