1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-05 11:37:10 +01:00
build/pkg/release-qemu/build
David Oberhollenzer 121fee7e97 Add configuration for testing with qemu
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-30 01:28:33 +02:00

46 lines
1,021 B
Text
Executable file

DEPENDS="rootfs"
build() {
local SOURCE="$1"
local DEPLOY="$2"
mkdir -p "$PKGBUILDDIR/$OS_RELEASE"
# copy output of immediate dependencies
for pkgname in $DEPENDS; do
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* \
"$PKGBUILDDIR/$OS_RELEASE"
fi
done
# copy helper scripts
local linux_image="vmlinuz"
local rootfs_image="rootfs.img"
for script in runqemu.sh cmdline.txt kernel.txt; do
cp "$SCRIPTDIR/pkg/$PKGNAME/$script" "$PKGBUILDDIR"
sed -i 's#ROOTFSFILE#'$rootfs_image'#g' "$PKGBUILDDIR/$script"
sed -i 's#KERNELFILE#'$linux_image'#g' "$PKGBUILDDIR/$script"
sed -i 's#VERSIONDIR#'$OS_RELEASE'#g' "$PKGBUILDDIR/$script"
done
# boot partition
mkdir "$PKGBUILDDIR/bootfs"
mv "$PKGBUILDDIR/$OS_RELEASE" "$PKGBUILDDIR/bootfs"
mv "$PKGBUILDDIR/cmdline.txt" "$PKGBUILDDIR/bootfs"
mv "$PKGBUILDDIR/kernel.txt" "$PKGBUILDDIR/bootfs"
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
tar czf "$DEPLOY/$PKGNAME.tar.gz" *
}
check_update() {
return
}