#
# CONFIG.Common.RTEMS-pc386,v 1.4.2.2 2004/10/28 18:23:41 norume Exp
# Author: W. Eric Norum
#         Canadian Light Source
#         eric@cls.usask.ca
#
# All RTEMS targets use the same Makefile fragment
#
RTEMS_TARGET_CPU=i386

MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
define MUNCH_CMD
	$(RTEMS_BASE)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< temp.bin
	$(BIN2BOOT) $@ 0x00097E00 \
		$(PROJECT_RELEASE)/lib/start16.bin 0x00097C00 0 temp.bin 0x00100000 0
	rm -f temp.bin
endef

include $(CONFIG)/os/CONFIG.Common.RTEMS

#
# Put text segment where it will work with etherboot
#
# Suggested by Till Strauman
# Must be removed for CEXP/run-time loading:
#OP_SYS_LDFLAGS += -Wl,-Ttext,0x100000

