memory.
LDFLAGS = -i
LIBS = -lsys -lsysutil
-OBJ = memory.o imgrd.o
+# imgrd_s.s is the ACK assembler version of the ramdisk. For more portability,
+# use the C version imgrd.c. However, the C compiler takes too much memory
+# compiling imgrd.c.
+IMGRD=imgrd_s.o
+#IMGRD=imgrd.c
+
+OBJ = memory.o $(IMGRD)
LIBDRIVER = $d/libdriver/driver.o
install -S 8k $(DRIVER)
imgrd.o: ramdisk/image.c
+imgrd_s.o: ramdisk/image.s
$(LIBDRIVER):
cd $d/libdriver && $(MAKE)
ramdisk_image:
cd ramdisk && make
- binsizes big
# install with other drivers
install: /usr/sbin/$(DRIVER)
--- /dev/null
+#
+.sect .text; .sect .rom; .sect .data
+
+! export symbols
+.define _imgrd, _imgrd_size
+
+.sect .data
+_imgrd:
+0:
+#include "ramdisk/image.s"
+1:
+
+! Use local labels to compute the size of _imgrd.
+_imgrd_size:
+ .data4 [1b] - [0b]
PROGRAMS=at_wini bios_wini cdprobe dev2name floppy loadramdisk newroot \
pci sh service sysenv
-all: image.c
+all: image.c image.s
clean:
rm -f $(PROGRAMS) bintoc image image.c
image.c: bintoc image
./bintoc -o $@ image
+image.s: image.c
+ sed < image.c > $@ 's/^/.data1 /;s/,$$//' || { rm -f $@; false; }
+
# Note for cross compilation: this executable has to be compiled for the
# host system
bintoc: bintoc.c