1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-18 09:19:46 +01:00
build/pkg/release-rpi3/build

31 lines
779 B
Text
Raw Normal View History

build() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
local ROOTFS_SQFS=$(find $PKGDEPLOYDIR/rootfs-${CFG}/ -name '*.img')
local rootfs_image=$(basename $ROOTFS_SQFS)
local bootdir="$BUILD/boot"
mkdir -p "$bootdir"
cp -r ${PKGDEPLOYDIR}/linux-rpi3/* "$bootdir"
cp -r ${PKGDEPLOYDIR}/boot-rpi3/* "$bootdir"
cp "$SCRIPTDIR/pkg/release-${CFG}/cmdline.txt" "$bootdir"
cp "$ROOTFS_SQFS" "$bootdir"
sed -i 's/ROOTFSFILE/'$rootfs_image'/g' "$bootdir/cmdline.txt"
cp "$SCRIPTDIR/pkg/release-${CFG}/install.sh" "$BUILD"
cp "$SCRIPTDIR/pkg/release-${CFG}/genimage.sh" "$BUILD"
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
pushd "$PKGBUILDDIR" > /dev/null
tar czf "${DEPLOY}/release-${CFG}.tar.gz" "release-${CFG}"
popd > /dev/null
}