mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
some Makefile Stuff
This commit is contained in:
parent
bd2abaf81c
commit
b3e82f0ac8
3
Makefile
3
Makefile
@ -297,7 +297,8 @@ install: $(installdisk) $(MBRDIR)/grub.cfg $(BINDIR)/kaleid
|
||||
@echo ${CL2}[$@] ${CL}Success.${CL3}
|
||||
|
||||
$(installdisk): $(BUILDDIR)/create_disk.sh
|
||||
@echo ${CL2}[$@]${NC} Constructing disk image...${CL3}
|
||||
@echo ${CL2}[$@]${NC} Constructing disk image $@...${CL3}
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(BUILDDIR)/create_disk.sh $(installdisk)
|
||||
@echo ${CL2}[$@]${NC} Constructing disk image...${CL3}
|
||||
|
||||
|
@ -45,11 +45,18 @@ echo ${CL2}[create_disk.sh]${NC} Formatting image... \(mkdosfs\)${CL3}
|
||||
echo ${CL2}[create_disk.sh]${NC} Mount image... \(udisksctl\)${CL3}
|
||||
udisksctl loop-setup --no-user-interaction --file $1
|
||||
lpblock=$(/sbin/losetup -j $1 | cut -d ':' -f 1)
|
||||
mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g')
|
||||
|
||||
echo ${CL2}[create_disk.sh]${NC} Sync image... \(sync\)${CL3}
|
||||
sync
|
||||
|
||||
mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g')
|
||||
|
||||
if [ -z $mountpoint ];
|
||||
then
|
||||
echo Impossible to mount the image $mountpoint. Fatal error !
|
||||
return 13
|
||||
fi
|
||||
|
||||
echo ${CL2}[create_disk.sh]${NC} Install grub into $lpblock as $mountpoint... \(grub-install\)${CL3}
|
||||
|
||||
sudo grub-install --force --target=i386-pc --root-directory=$mountpoint --boot-directory=$mountpoint/boot --no-floppy --modules="part_msdos biosdisk fat multiboot configfile" $lpblock
|
||||
|
@ -33,8 +33,10 @@ set -e #exit if error
|
||||
echo ${CL2}[create_disk.sh]${NC} Mount image... \(udisksctl\)${CL3}
|
||||
udisksctl loop-setup --no-user-interaction --file $1
|
||||
lpblock=$(/sbin/losetup -j $1 | cut -d ':' -f 1)
|
||||
echo Block is $lpblock
|
||||
#udisksctl mount --no-user-interaction -b $lpblock
|
||||
|
||||
echo ${CL2}[create_disk.sh]${NC} Sync image... \(sync\)${CL3}
|
||||
sync
|
||||
|
||||
mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g')
|
||||
|
||||
echo ${CL2}[grub-install.sh]${NC} Copying grub.cfg
|
||||
|
Loading…
Reference in New Issue
Block a user