Hi, today we had a great time at #squeak (IRC). Craig was trying to compile a new VM for SqueakNOS (I guess he's trying some kind of spoon and SqueakNOS integration!), and he have some problems. So, if anybody wants to compile, this is how to do it (and how to apply some patches).
All from linux, sorry.
From the CD (or .ISO image) get the copy trunk to your hard drive, and
make it writable (if it's not):
this is a working pseudoscript, read all before trying, although nothing bad can happen if you try:
mount -o loop SqueakNOS-today.iso /cdrom cp -R /cdrom/trunk . chmod -R w+ trunk cd trunk/platforms/SqueakNOS cp /cdrom/Squeak*image boot/iso.template cp /cdrom/Squeak*changes boot/iso.template make distro
this should leave SqueakNOS-today.tar.bz2 and SqueakNOS-today.zip in directory release.
Now, "make distro" may fail, if so, or if you prefer try "make iso" instead, this'll leave SqueakNOS.iso in release and may be enough for you.
If you have gcc < 4 you may experience problems related to strlen, memcpy and memcmp. Edit the Makefile in and change this line to:
LIBCOBJS = strcpy.o strncmp.o strcmp.o strlen.o memcpy.o memcmp.o
(add strlen.o memcpy.o memcmp.o to the end of the existing)
try to make again, this should be it.
let me know if you experience any problems
gera
Now, "make distro" may fail, if so, or if you prefer try "make iso" instead, this'll leave SqueakNOS.iso in release and may be enough for you.
The attached version of the Makefile (to put in platforms/SqueakNOS) will solve the problems related to "make distro" and is actually a lot lot cleaner than the ugly hack I was doing before.
Craig: this should fix you make distro problems
thanks for testing! gera
ifndef SRCDIR include src32/plugins.ext include src32/plugins.int
INTERNAL_LIBS = $(addsuffix .lib, $(INTERNAL_PLUGINS)) EXTERNAL_LIBS = $(addsuffix .dll, $(EXTERNAL_PLUGINS)) endif
VM = SqueakNOS.obj VMOUTDIR = $(BLDDIR) SQIMAGE = Squeak3.8-6665full
all: $(VM)
try: all cp $(VMOUTDIR)/$(VM) boot/SqueakNOS.o make -C boot SqueakNOS.try
iso: all cp $(SQIMAGE).* boot/iso.template cp $(VMOUTDIR)/$(VM) boot/SqueakNOS.o make -C boot SqueakNOS.iso SqueakNOS.cd.vmx mv boot/SqueakNOS.iso $(BLDDIR) mv boot/SqueakNOS.cd.vmx $(BLDDIR)/SqueakNOS.vmx
distro: make clean make -C boot clean rm -rf boot/iso.template/$(SQIMAGE).* rm -rf boot/iso.template/trunk cd ../../../ && tar --exclude $(SQIMAGE).* -cvf sources.tar trunk/platforms/SqueakNOS trunk/platforms/Cross cd boot/iso.template && tar xvf ../../../../../sources.tar rm ../../../sources.tar make iso cd $(BLDDIR) && tar cjvf SqueakNOS-`date +%d-%b-%Y`.tar.bz2 SqueakNOS.iso SqueakNOS.vmx cd $(BLDDIR) && zip -9 SqueakNOS-`date +%d-%b-%Y`.zip SqueakNOS.iso SqueakNOS.vmx
AR = ar CP = cp RM = rm LD = ld
CFLAGS = -g -mpentium -O0 -fomit-frame-pointer -funroll-loops -fschedule-insns2 LDFLAGS = -static -nostdlib -lm -Xlinker -r CXXFLAGS= $(CFLAGS) -felide-constructors DEFS = -DNO_STD_FILE_SUPPORT -DDEBUG -DLSB_FIRST -DX86 $(XDEFS) XDEFS = -DSQUEAK_BUILTIN_PLUGIN
ifndef SRCDIR SRCDIR=. endif BLDDIR= $(SRCDIR)/release
ifndef OBJDIR OBJDIR= $(BLDDIR) endif
VMDIR1 = $(SRCDIR)/src32/vm VMDIR2 = $(SRCDIR)/../Cross/vm VMDIR3 = $(SRCDIR)/common VMDIR4 = $(SRCDIR)/nos VMSRC = $(notdir $(wildcard $(VMDIR1)/*.c) $(wildcard $(VMDIR2)/*.c) $(wildcard $(VMDIR3)/*.c) $(wildcard $(VMDIR4)/*.c)) VMOBJ:= $(VMSRC:.c=.o) INCS =-I$(VMDIR1) -I$(VMDIR2) -I$(VMDIR3) -I$(VMDIR4)
LIBSRC = $(wildcard *.c) LIBOBJ = $(LIBSRC:.c=.o)
LIBCOBJS = strcpy.o strncmp.o strcmp.o strlen.o memcpy.o memcmp.o
ALLOBJ= $(VMOBJ) libc.o
# Where to look for files? VPATH= $(VMDIR1) $(VMDIR2) $(VMDIR3) $(VMDIR4) $(VMOUTDIR)
.SUFFIXES: .SUFFIXES: .ccg .cc .c .o .s .i .rc .res .cg .hg .ccg .INTERMEDIATE: unix.c nos.c
$(VM): .ensureRelease $(ALLOBJ) $(INTERNAL_LIBS) $(CC) -o $(VMOUTDIR)/$@ $(addprefix $(VMOUTDIR)/,$(ALLOBJ)) $(addprefix $(VMOUTDIR)/,$(INTERNAL_LIBS)) $(LDFLAGS)
# Building plugins
makelib: $(LIBOBJ) $(AR) rc $(LIB) $(LIBOBJ) $(RM) $(LIBOBJ)
%.lib: @$(MAKE) -C src32/vm/intplugins/$* -f ../../../../Makefile SRCDIR=../../../.. LIB=$*.lib OBJDIR=. XDEFS=-DSQUEAK_BUILTIN_PLUGIN makelib $(CP) src32/vm/intplugins/$*/$*.lib $(BLDDIR)/$*.lib $(RM) src32/vm/intplugins/$*/$*.lib
# Rules for automated builds
.c.o: $(CC) -o $(OBJDIR)/$@ $(CFLAGS) $(INCS) $(DEFS) -c $<
.cc.o: $(CXX) -o $(OBJDIR)/$@ $(CXXFLAGS) $(INCS) $(DEFS) -c $<
.c.s: $(CC) -S -o $@ -fverbose-asm -Wa,ah $(CFLAGS) $(INCS) $(DEFS) -c $<
.cc.s: $(CXX) -S -o $@ -fverbose-asm -Wa,ah $(CXXFLAGS) $(INCS) $(DEFS) -c $<
.c.i: $(CC) -E -o $@ $(CFLAGS) $(INCS) $(DEFS) -c $<
.cg.c: $(CCG) -n -o $@ $<
.hg.h: $(CCG) -n -o $@ $<
.ccg.cc: $(CCG) -n -o $@ $<
# Extra specific dependencies
libc.o: /usr/lib/libc.a cd $(OBJDIR) $(AR) x $< $(LIBCOBJS) ld -r -o $(BLDDIR)/$@ $(LIBCOBJS) $(RM) $(LIBCOBJS)
.ensureRelease: mkdir -p $(BLDDIR)
### housekeeping clean: make -C boot clean -rm -f $(BLDDIR)/* *.iso *.vmx
squeaknos@lists.squeakfoundation.org