From d56b7442a419310caff2742085fa951a4b77b841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 8 Jul 2018 00:10:48 +0200 Subject: [PATCH] Identify file format(s), disassemble as ARM binary (results show that it is not useable as a binary kernel image) --- example-os/.gitignore | 2 ++ example-os/Makefile | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/example-os/.gitignore b/example-os/.gitignore index f2ce617..605e551 100644 --- a/example-os/.gitignore +++ b/example-os/.gitignore @@ -3,3 +3,5 @@ /os.reasm.asm /os.reasm /os.reasm.disasm +/os.file +/os.arm.disasm diff --git a/example-os/Makefile b/example-os/Makefile index aba991b..a494db9 100644 --- a/example-os/Makefile +++ b/example-os/Makefile @@ -2,16 +2,21 @@ os_filename = os.bat tests = test/qemu-system-i386 test/qemu-system-arm test/virtualbox test/bochs test/gui-sh test/dosbox .PHONY: all -all: $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm .gitignore test Makefile +# all: os.arm.disasm +all: $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm os.file .gitignore Makefile ../deploy-screenshots: Makefile mkdir -p $@ + touch $@ $(os_filename): os.asm ../deploy-screenshots Makefile rm -f $@ nasm -o $@ $< chmod a+x-w $@ +os.file: $(os_filename) Makefile + file -kr $< > $@ + os.ndisasm.disasm: $(os_filename) Makefile ../utils/compact-ndisasm.sh $< $@ @@ -27,9 +32,12 @@ os.reasm: os.reasm.asm $(os_filename) Makefile echo "Re-assembled file is different from $(os_filename). Use meld os.ndisasm.disasm os.reasm.disasm to see differences."; \ exit 1) +#os.arm.disasm: $(os_filename) Makefile +# arm-none-eabi-objdump --endian=little -marm -b binary -D --adjust-vma=0x8000 $< > $@ + .PHONY: clean clean: Makefile - rm -f $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm + rm -f $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm os.file os.arm.disasm .gitignore: Makefile echo /$(os_filename) > $@ @@ -37,9 +45,11 @@ clean: Makefile echo /os.reasm.asm >> $@ echo /os.reasm >> $@ echo /os.reasm.disasm >> $@ + echo /os.file >> $@ + echo /os.arm.disasm >> $@ .PHONY: test -test: $(tests) Makefile +test: $(tests) all Makefile .PHONY: $(tests) $(tests): $(os_filename) ../deploy-screenshots Makefile