From eb0765a5b66a8b5e03e4e9a61535ed38ffcb7d63 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Mon, 30 Oct 2023 19:09:58 +0100 Subject: [PATCH] grub: update build script Signed-off-by: AuxXxilium --- scripts/grub.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/scripts/grub.sh b/scripts/grub.sh index 270b24597..af3bd8266 100755 --- a/scripts/grub.sh +++ b/scripts/grub.sh @@ -8,6 +8,7 @@ GRUB=${1:-"grub-2.06"} BIOS=${2:-"i386-pc i386-efi x86_64-efi"} +NAME=${3:-"ARC"} curl -#kLO https://ftp.gnu.org/gnu/grub/${GRUB}.tar.gz tar -zxvf ${GRUB}.tar.gz @@ -34,40 +35,40 @@ fdisk -l grub.img LOOPX=$(sudo losetup -f) sudo losetup -P ${LOOPX} grub.img -sudo mkdosfs -F32 -n ARC1 ${LOOPX}p1 -sudo mkfs.ext2 -F -L ARC2 ${LOOPX}p2 -sudo mkfs.ext4 -F -L ARC3 ${LOOPX}p3 +sudo mkdosfs -F32 -n ${NAME}1 ${LOOPX}p1 +sudo mkfs.ext2 -F -L ${NAME}2 ${LOOPX}p2 +sudo mkfs.ext4 -F -L ${NAME}3 ${LOOPX}p3 -rm -rf ARC1 -mkdir -p ARC1 -sudo mount ${LOOPX}p1 ARC1 +rm -rf ${NAME}1 +mkdir -p ${NAME}1 +sudo mount ${LOOPX}p1 ${NAME}1 -sudo mkdir -p ARC1/EFI -sudo mkdir -p ARC1/boot/grub +sudo mkdir -p ${NAME}1/EFI +sudo mkdir -p ${NAME}1/boot/grub cat >device.map <