1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00

Merge linux_modules package into linux package

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-07-15 17:17:01 +02:00
parent 39c0c2c98d
commit cd74009293
5 changed files with 18 additions and 33 deletions

View file

@ -1,4 +1,3 @@
linux_modules
kmod kmod
inetutils inetutils
ethtool ethtool

View file

@ -1,4 +1,3 @@
linux_modules
kmod kmod
inetutils inetutils
ethtool ethtool

View file

@ -23,17 +23,24 @@ build() {
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="arm" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS zImage dtbs make -C "$1" O="$PKGBUILDDIR" ARCH="arm" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS zImage dtbs modules
} }
deploy() { deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2" local DEPLOY="$2"
mkdir -p "$DEPLOY/boot" mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules"
cp "arch/arm/boot/zImage" "$DEPLOY/boot/vmlinuz" cp "arch/arm/boot/zImage" "$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" \; | \
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
} }
check_update() { check_update() {

View file

@ -26,16 +26,24 @@ build() {
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}-" -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() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2" local DEPLOY="$2"
mkdir -p "$DEPLOY/boot" 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" \; | \
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
} }
check_update() { check_update() {

View file

@ -1,28 +0,0 @@
# 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
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"
}