2020-09-17 09:52:56 +02:00
|
|
|
REMOVE=rm -f
|
|
|
|
INSTALL=sudo apt-get install
|
|
|
|
COPY=cp
|
|
|
|
DISKCOPY=dd
|
|
|
|
COMPRESS=xz
|
|
|
|
SYNC=sync
|
|
|
|
CREATEDIR=mkdir
|
|
|
|
CAT=cat
|
|
|
|
|
|
|
|
all: harddisk.img.final harddiskuefi.img.final
|
|
|
|
|
2018-09-27 11:13:27 +02:00
|
|
|
harddiskuefi.img.before:
|
2020-09-17 09:52:56 +02:00
|
|
|
$(COMPRESS) -d -k harddiskuefi.img.xz
|
|
|
|
$(DISKCOPY) if=harddiskuefi.img of=harddiskuefi.img.part1 skip=13672 bs=512
|
|
|
|
$(DISKCOPY) if=harddiskuefi.img of=harddiskuefi.img.before count=13672 bs=512
|
|
|
|
$(SYNC)
|
|
|
|
$(CREATEDIR) ./mnt -p
|
2019-01-19 16:23:57 +01:00
|
|
|
|
2020-09-17 09:52:56 +02:00
|
|
|
harddiskuefi.img.final: harddiskuefi.img.before
|
2020-09-17 16:37:16 +02:00
|
|
|
mount -t ext2 -o rw harddiskuefi.img.part1 ./mnt
|
2020-09-17 09:52:56 +02:00
|
|
|
$(COPY) ../system/system.sys ./mnt/boot/
|
|
|
|
$(SYNC)
|
2020-09-17 16:37:16 +02:00
|
|
|
umount ./mnt
|
2019-01-19 16:23:57 +01:00
|
|
|
cat harddiskuefi.img.before > harddiskuefi.img.final
|
|
|
|
cat harddiskuefi.img.part1 >> harddiskuefi.img.final
|
2020-09-17 09:52:56 +02:00
|
|
|
$(SYNC)
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2018-09-27 07:55:24 +02:00
|
|
|
harddisk.img.before:
|
2020-09-17 09:52:56 +02:00
|
|
|
$(COMPRESS) -d -k harddisk.img.xz
|
|
|
|
$(DISKCOPY) if=harddisk.img of=harddisk.img.part1 skip=63 bs=512
|
|
|
|
$(DISKCOPY) if=harddisk.img of=harddisk.img.before count=63 bs=512
|
|
|
|
$(SYNC)
|
|
|
|
$(CREATEDIR) ./mnt -p
|
2019-01-19 16:23:57 +01:00
|
|
|
|
2020-09-17 09:52:56 +02:00
|
|
|
harddisk.img.final: harddisk.img.before
|
2020-09-17 16:37:16 +02:00
|
|
|
mount -t ext2 -o rw harddisk.img.part1 ./mnt
|
2020-09-17 09:52:56 +02:00
|
|
|
$(COPY) ../system/system.sys ./mnt/boot/
|
|
|
|
$(SYNC)
|
2020-09-17 16:37:16 +02:00
|
|
|
umount ./mnt
|
2019-01-19 16:23:57 +01:00
|
|
|
cat harddisk.img.before > harddisk.img.final
|
|
|
|
cat harddisk.img.part1 >> harddisk.img.final
|
2020-09-17 09:52:56 +02:00
|
|
|
$(SYNC)
|
2019-01-19 16:23:57 +01:00
|
|
|
|
|
|
|
initram.img:
|
2020-09-17 09:52:56 +02:00
|
|
|
$(MAKE) ../programs
|
2018-09-27 07:55:24 +02:00
|
|
|
|
|
|
|
littleclean:
|
2020-09-17 09:52:56 +02:00
|
|
|
$(REMOVE) *.final
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2018-12-12 13:47:08 +01:00
|
|
|
togit: clean
|
|
|
|
|
2018-07-24 04:04:07 +02:00
|
|
|
clean:
|
2020-09-17 09:52:56 +02:00
|
|
|
$(REMOVE) *.before
|
|
|
|
$(REMOVE) *.part1
|
|
|
|
$(REMOVE) *.img
|
|
|
|
$(REMOVE) *.final
|
2020-09-17 16:37:16 +02:00
|
|
|
|