mirror of
https://github.com/pygos/build.git
synced 2024-11-05 03:27:10 +01:00
Propperly process Linux package targets in deploy function
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
073a7b3aa7
commit
d06083c96d
1 changed files with 16 additions and 9 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue