mirror of
https://github.com/pygos/build.git
synced 2024-11-26 04:40:41 +01:00
94cc2d2c46
- build needs a pair of product and board name - some products can only be built for some boards - Config files in product/<name> directory override those in board/<name> - For some config files, like LDPATH or ROOTFS, the files are merged - product/common provides defaults Add default config for various services: - Add default config for unbound - Add default config for dnsmasq Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
24 lines
941 B
Text
Executable file
24 lines
941 B
Text
Executable file
# inherit package details from kernel package
|
|
source "$SCRIPTDIR/pkg/$LINUXPKG/build"
|
|
DEPENDS="toolchain"
|
|
|
|
build() {
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
|
|
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" oldconfig
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_LOCALVERSION=.*,CONFIG_LOCALVERSION="-'${OS_NAME}-${OS_RELEASE}'",'
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS modules
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
mkdir -p "$DEPLOY/lib/modules"
|
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
|
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install
|
|
}
|