#!/usr/bin/env bash # Copyright (C) 2022 Seshan Ravikumar # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e # Crash when a command fails echo " * Build Step: OS Variant Image - ProLinux Server " export ROOTFS=/build/rootfs # Source the global build config source /buildmeta/buildconfig.sh mkdir -pv /build/rootfs && cd /build ls -l $ROOTFS # Uncompress generic rootfs tar xvf /artifacts/sineware.tar.gz -C ${ROOTFS} ls -l ${ROOTFS} # Create boot files mkdir -pv $ROOTFS/boot/efi cp -v /artifacts/bzImage $ROOTFS/boot/ cp -v /artifacts/sineware-initramfs.cpio.gz $ROOTFS/boot/ mkdir -pv $ROOTFS/boot/grub # Customize image ls -l $ROOTFS printf "\nstyle=system" >> $ROOTFS/sineware.ini # Squash it mksquashfs $ROOTFS prolinux-server.squashfs.img cp prolinux-server.squashfs.img /artifacts/prolinux-server.squashfs.img echo "* Done!"