1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-17 00:47:10 +01:00
build/cfg/alix/release

30 lines
870 B
Text
Raw Normal View History

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
}