Browse Source

Add the possibility to create .o files from arbitrary binary blobs.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
66207bb912
2 changed files with 10 additions and 0 deletions
  1. 9
    0
      src/Makefile.housekeeping
  2. 1
    0
      src/payload/hello.img

+ 9
- 0
src/Makefile.housekeeping View File

409
 $(BIN)/etherboot.% : $(BIN)/gpxe.%
409
 $(BIN)/etherboot.% : $(BIN)/gpxe.%
410
 	ln -sf $(notdir $<) $@
410
 	ln -sf $(notdir $<) $@
411
 
411
 
412
+# Wrap up binary blobs
413
+#
414
+$(BIN)/%.o : payload/%.img
415
+	$(QM)echo "  [WRAP] $@"
416
+	$(Q)$(LD) -b binary -r -o $@ $< --undefined obj_payload \
417
+		--defsym obj_$*=0
418
+
419
+BOBJS += $(patsubst payload/%.img,$(BIN)/%.o,$(wildcard payload/*.img))
420
+
412
 # The compression utilities
421
 # The compression utilities
413
 #
422
 #
414
 $(NRV2B) : util/nrv2b.c $(MAKEDEPS)
423
 $(NRV2B) : util/nrv2b.c $(MAKEDEPS)

+ 1
- 0
src/payload/hello.img View File

1
+hello world!

Loading…
Cancel
Save