1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-25 12:20:42 +01:00
build/pkg/release-rpi3/build
David Oberhollenzer 5bc2523af5 Create regular package for root filesystem, use pkg2sqfs in release
This commit overhauls the rootfs package to create a regular package
for the root filesystem instead of creating a packaged squashfs. The
release packages then use pkg2sqfs to turn it into a squashfs image.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-18 22:02:21 +02:00

35 lines
1.1 KiB
Text
Executable file

DEPENDS="rootfs boot-rpi boot-rpi-dtbo boot-rpi-dtb linux"
SUBPKG="release"
build() {
pkg install -om -r "$PKGBUILDDIR/boot" -R "$REPODIR" \
boot-rpi boot-rpi-dtbo boot-rpi-dtb linux
pkg2sqfs -c xz "$REPODIR/rootfs.pkg" "boot/rootfs.img"
# copy files from this package
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"
cat_file_override "rpi_config.txt" > "$PKGBUILDDIR/boot/config.txt"
cat_file_override "rpi_cmdline.txt" > "$PKGBUILDDIR/boot/cmdline.txt"
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/boot/cmdline.txt"
sed -i 's#KERNELFILE#'$kernel_image'#g' "$PKGBUILDDIR/boot/config.txt"
}
deploy() {
tar czf "$BUILDROOT/release.tar.gz" *
touch "$PKGDEPLOYDIR/release.files" "$PKGDEPLOYDIR/release.desc"
}
check_update() {
return
}