mirror of
https://github.com/pygos/build.git
synced 2024-11-05 11:37:10 +01:00
39c0c2c98d
Just install the kernel package to the rootfs /boot directory and add a step to the rootfs package to move /boot data out of the squasfs image. Add linux package as regular dependency to the rootfs. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
42 lines
No EOL
1 KiB
Text
Executable file
42 lines
No EOL
1 KiB
Text
Executable file
DEPENDS="rootfs boot-rpi3"
|
|
|
|
build() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
# copy output of immediate dependencies
|
|
mkdir -p "$PKGBUILDDIR/boot"
|
|
|
|
for pkgname in $DEPENDS; do
|
|
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
|
|
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$PKGBUILDDIR/boot"
|
|
fi
|
|
done
|
|
|
|
# copy files from this package
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/cmdline.txt" "$PKGBUILDDIR/boot"
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/install.sh" "$PKGBUILDDIR"
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/genimage.sh" "$PKGBUILDDIR"
|
|
|
|
# substitute file names in scripts
|
|
mkdir -p "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
mv "$PKGBUILDDIR/boot/rootfs.img" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
mv "$PKGBUILDDIR/boot/vmlinuz" "$PKGBUILDDIR/boot/$OS_RELEASE"
|
|
|
|
local rootfs_image="$OS_RELEASE/rootfs.img"
|
|
local kernel_image="$OS_RELEASE/vmlinuz"
|
|
|
|
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/boot/cmdline.txt"
|
|
sed -i 's#KERNELFILE#'$kernel_image'#g' "$PKGBUILDDIR/boot/config.txt"
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
} |