2017-12-09 21:51:48 +01:00
|
|
|
build_release() {
|
|
|
|
local RELEASE_DIR="$1"
|
2018-01-16 21:10:20 +01:00
|
|
|
|
|
|
|
local ROOTFS_SQFS=$(find $PKGDEPLOYDIR/rootfs-${CFG}/ -name '*.img')
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
local fname=$(find $PKGDEPLOYDIR/linux/ -name 'vmlinuz*')
|
|
|
|
local linux_image=$(basename $fname)
|
|
|
|
local rootfs_image=$(basename $ROOTFS_SQFS)
|
|
|
|
|
|
|
|
cp -r "$fname" "$RELEASE_DIR"
|
|
|
|
cp "$ROOTFS_SQFS" "$RELEASE_DIR"
|
|
|
|
cp "$SCRIPTDIR/cfg/$CFG/install.sh" "$RELEASE_DIR"
|
|
|
|
cp "$SCRIPTDIR/cfg/$CFG/genimage.sh" "$RELEASE_DIR"
|
|
|
|
cp "/usr/share/syslinux/mbr.bin" "$RELEASE_DIR"
|
|
|
|
|
|
|
|
sed -i 's/ROOTFSFILE/'$rootfs_image'/g' "$RELEASE_DIR/install.sh"
|
|
|
|
sed -i 's/KERNELFILE/'$linux_image'/g' "$RELEASE_DIR/install.sh"
|
|
|
|
|
|
|
|
sed -i 's/ROOTFSFILE/'$rootfs_image'/g' "$RELEASE_DIR/genimage.sh"
|
|
|
|
sed -i 's/KERNELFILE/'$linux_image'/g' "$RELEASE_DIR/genimage.sh"
|
|
|
|
|
|
|
|
cat > "$RELEASE_DIR/syslinux.cfg" << _EOF
|
|
|
|
timeout 0
|
|
|
|
totaltimeout 50
|
|
|
|
default linux
|
|
|
|
label linux
|
|
|
|
kernel /$linux_image
|
|
|
|
append root=/dev/sda1 root_sfs=/$rootfs_image
|
|
|
|
_EOF
|
|
|
|
}
|