mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
dbbb1889f4
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
29 lines
870 B
Text
Executable file
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
|
|
}
|