projects
/
efitest1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf13b9a
)
makefile rules to build a disk image
author
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 25 Mar 2019 17:41:51 +0000
(19:41 +0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 25 Mar 2019 17:41:51 +0000
(19:41 +0200)
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
787921f
..
238933f
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-21,7
+21,19
@@
$(efibin): $(efiso)
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
-j .rela -j .reloc --target=efi-app-x86_64 $< $@
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
-j .rela -j .reloc --target=efi-app-x86_64 $< $@
+part.img: $(efibin)
+ dd if=/dev/zero of=$@ bs=1024 count=2080
+ mkfs -t vfat $@
+ mmd -i $@ ::/EFI
+ mmd -i $@ ::/EFI/BOOT
+ mcopy -i $@ $< ::/EFI/BOOT
+
+disk.img: part.img
+ dd if=/dev/zero of=$@ bs=1024 count=2048
+ echo start=2048 type=ef | sfdisk $@
+ dd if=$< of=$@ bs=512 seek=2048 conv=notrunc
+
.PHONY: clean
clean:
.PHONY: clean
clean:
- rm -f $(obj) $(efibin) $(efiso)
+ rm -f $(obj) $(efibin) $(efiso) *.img