From 66207bb912ef267d730165658b56b145fbb5eb3b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 6 Sep 2007 15:11:09 +0100 Subject: [PATCH] Add the possibility to create .o files from arbitrary binary blobs. --- src/Makefile.housekeeping | 9 +++++++++ src/payload/hello.img | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/payload/hello.img diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 2fb41a8c..4909345d 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -409,6 +409,15 @@ allpxes allisos alldsks : all%s : $(foreach DRIVER,$(DRIVERS),$(BIN)/$(DRIVER).% $(BIN)/etherboot.% : $(BIN)/gpxe.% ln -sf $(notdir $<) $@ +# Wrap up binary blobs +# +$(BIN)/%.o : payload/%.img + $(QM)echo " [WRAP] $@" + $(Q)$(LD) -b binary -r -o $@ $< --undefined obj_payload \ + --defsym obj_$*=0 + +BOBJS += $(patsubst payload/%.img,$(BIN)/%.o,$(wildcard payload/*.img)) + # The compression utilities # $(NRV2B) : util/nrv2b.c $(MAKEDEPS) diff --git a/src/payload/hello.img b/src/payload/hello.img new file mode 100644 index 00000000..bc7774a7 --- /dev/null +++ b/src/payload/hello.img @@ -0,0 +1 @@ +hello world! \ No newline at end of file