Identify file format(s), disassemble as ARM binary (results show that it is not useable as a binary kernel image)

This commit is contained in:
Georges Dupéron 2018-07-08 00:10:48 +02:00
parent 7b5a320bc0
commit d56b7442a4
2 changed files with 15 additions and 3 deletions

View File

@ -3,3 +3,5 @@
/os.reasm.asm
/os.reasm
/os.reasm.disasm
/os.file
/os.arm.disasm

View File

@ -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