1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-12-23 23:50:51 +01:00

Propperly process Linux package targets in deploy function

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-19 20:42:09 +02:00
parent 073a7b3aa7
commit d06083c96d

View file

@ -50,19 +50,26 @@ deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local LINUX_CPU=$(get_linux_cpu)
local target
mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules"
cp arch/${LINUX_CPU}/boot/*Image "$DEPLOY/boot/vmlinuz"
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
if grep -q "^CONFIG_MODULES=" ".config"; then
export KBUILD_OUTPUT="$PKGBUILDDIR"
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install
for target in $LINUX_TGT; do
case $target in
*Image)
cp "arch/$LINUX_CPU/boot/$target" "$DEPLOY/boot/vmlinuz"
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
;;
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"
fi
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"
;;
esac
done
}
check_update() {