1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-05 03:27:10 +01:00
build/cfg/alix/release
David Oberhollenzer dbbb1889f4 Initial commit
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-01-29 10:17:30 +01:00

29 lines
870 B
Text
Executable file

build_release() {
local RELEASE_DIR="$1"
local ROOTFS_SQFS="$2"
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
}