# Make the loader module for the MVME16x boards.  This module
# should be stuck in the vmlinux file at address 0x800 (ie. half
# way through the ELF header).  Load the image at 0, and go 800.

# Stick it in vmlinux with:
#	dd if=loader.bin of=vmlinux bs=2048 seek=1 conv=notunc


all:		loader.bin

loader.s:	loader.c
		cc -S -fomit-frame-pointer -O3 -o loader.s loader.c

loader.o:	loader.s
		as -o loader.o loader.s

loader.bin:	loader.o
		objdump -j .text --raw --quiet loader.o > loader.bin

clean:
	@rm -f loader.o loader.s loader.bin
