mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Minor fixes for main line Linux LTS build
- Patch the config first, don't touch it after running make oldconfig - Add modules target to toolchain config, don't directly call it - Only try to install modules if we actually have support for loadable modules Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
8faae986b6
commit
6ced6fc948
2 changed files with 10 additions and 11 deletions
|
@ -7,5 +7,5 @@ GCC_EXTRACFG="--disable-libmpx --disable-libssp"
|
||||||
|
|
||||||
LINUXPKG="linux"
|
LINUXPKG="linux"
|
||||||
LINUX_CPU="x86"
|
LINUX_CPU="x86"
|
||||||
LINUX_TGT="bzImage"
|
LINUX_TGT="bzImage modules"
|
||||||
OPENSSL_TARGET="linux-generic32 386"
|
OPENSSL_TARGET="linux-generic32 386"
|
||||||
|
|
|
@ -20,13 +20,11 @@ build() {
|
||||||
|
|
||||||
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
|
||||||
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
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_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
|
||||||
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
|
||||||
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_LOCALVERSION=.*,CONFIG_LOCALVERSION="-'${OS_NAME}-${OS_RELEASE}'",'
|
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}-" oldconfig
|
||||||
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS $LINUX_TGT
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS $LINUX_TGT
|
||||||
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS modules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy() {
|
deploy() {
|
||||||
|
@ -35,15 +33,16 @@ deploy() {
|
||||||
|
|
||||||
mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules"
|
mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules"
|
||||||
cp "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/boot/vmlinuz"
|
cp "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/boot/vmlinuz"
|
||||||
|
|
||||||
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
|
||||||
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install
|
|
||||||
|
|
||||||
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
|
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
|
||||||
|
|
||||||
find "$DEPLOY/lib" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
|
if grep -q "^CONFIG_MODULES=" ".config"; then
|
||||||
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
||||||
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
|
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install
|
||||||
|
|
||||||
|
find "$DEPLOY/lib" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
|
||||||
|
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
|
||||||
|
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_update() {
|
check_update() {
|
||||||
|
|
Loading…
Reference in a new issue