mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +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 SOURCE="$1"
|
||||||
local DEPLOY="$2"
|
local DEPLOY="$2"
|
||||||
local LINUX_CPU=$(get_linux_cpu)
|
local LINUX_CPU=$(get_linux_cpu)
|
||||||
|
local target
|
||||||
|
|
||||||
mkdir -p "$DEPLOY/boot" "$DEPLOY/lib/modules"
|
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
|
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"
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
||||||
make -C "$SOURCE" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" INSTALL_MOD_PATH="$DEPLOY" modules_install
|
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" \; | \
|
find "$DEPLOY/lib" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
|
||||||
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
|
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
|
||||||
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
|
sed "s/755/555/g" >> "$DEPLOY/rootfs_files.txt"
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
check_update() {
|
check_update() {
|
||||||
|
|
Loading…
Reference in a new issue