From b6f49c0e6bdb7fda9ac52cbc02eae23bc1f4d479 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 21:23:48 +0100 Subject: [PATCH 1/7] second: make console_putchar() inline in console.c only --- second/console.c | 2 +- second/console.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/second/console.c b/second/console.c index 2157f60..1e4e694 100644 --- a/second/console.c +++ b/second/console.c @@ -33,7 +33,7 @@ console_init(void) wait_char = 0; } -int console_putchar(int c) +extern inline int console_putchar(int c) { switch(selected_console) { diff --git a/second/console.h b/second/console.h index f347d2b..3d1f4ec 100644 --- a/second/console.h +++ b/second/console.h @@ -13,7 +13,7 @@ #include "head.h" extern void console_init(void); -extern inline int console_putchar(int c); +extern int console_putchar(int c); extern void console_putstring(const char *s); int wait_char; #ifdef USE_CLI From 6e23d9a665299074c3261461178908747db2b0da Mon Sep 17 00:00:00 2001 From: Michael Karcher Date: Wed, 15 Mar 2017 21:29:26 +0100 Subject: [PATCH 2/7] libunix: add -ffreestanding to CFLAGS to fix nonnull-compare warning --- libunix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libunix/Makefile b/libunix/Makefile index 755c160..f3704e4 100644 --- a/libunix/Makefile +++ b/libunix/Makefile @@ -4,7 +4,7 @@ TOP = $(shell pwd) -CFLAGS += -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -O2 -Os +CFLAGS += -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -ffreestanding -fpic -O2 -Os CPPFLAGS = -I$(TOP) -I$(TOP)/../libmacos -DARCH_M68K LIBRARY = libunix.a From 11bd9223baaf7f787caa3a1718037a0b8868e60d Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 21:34:14 +0100 Subject: [PATCH 3/7] tools: remove Makefile from SOURCES variable --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 3ad61bd..bdf9fd5 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -11,7 +11,7 @@ PROGRAMS = emile-set-cmdline emile-first-tune emile-install \ iso9660_cat minigzip read_vmlinuz emile-mkisofs \ ext2_ls ext2_cat emile-mktable emile-conf -SOURCES = emile-set-cmdline.c Makefile emile-first-tune.c \ +SOURCES = emile-set-cmdline.c emile-first-tune.c \ emile-install.c emile-set-output.c emile.c \ emile_scanbus.c emile-map-set.c iso9660_ls.c \ iso9660_cat.c minigzip.c read_vmlinuz.c device.c gzio.c \ From 162572aaf9691114f2d904186fee96c03a364176 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 21:39:27 +0100 Subject: [PATCH 4/7] debian: bump debhelper minimum version and compat to 9 --- debian/compat | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/compat b/debian/compat index b8626c4..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +9 diff --git a/debian/control b/debian/control index a893bf5..84e93f0 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Wouter Verhelst Uploaders: Wouter Verhelst , Stephen R. Marenka -Build-Depends: debhelper (>> 4.1.16), docbook-to-man, gcc, e2fslibs-dev +Build-Depends: debhelper (>= 9), docbook-to-man, gcc, e2fslibs-dev Build-Depends-Indep: gcc-4.6-m68k-linux-gnu [!m68k] Standards-Version: 3.7.2 From 4722d3550b56965e9d906e851f0916c024f04028 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 22:52:40 +0100 Subject: [PATCH 5/7] tools: fix source path for installation of tools binaries --- Makefile | 2 +- tools/Makefile | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 956ef3e..f2117b1 100644 --- a/Makefile +++ b/Makefile @@ -270,7 +270,7 @@ tools:: libemile libiso9660 libext2 libgzip libconfig libmap $(MAKE) -C tools all CROSS_COMPILE=$(CROSS_COMPILE) TARGET=$(NATIVE) tools-install:: tools - $(MAKE) -C tools install + $(MAKE) -C tools install TARGET=$(NATIVE) tools-uninstall:: $(MAKE) -C tools uninstall diff --git a/tools/Makefile b/tools/Makefile index bdf9fd5..dbea086 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -59,15 +59,15 @@ emile-conf: emile-conf.o device.o install: install -d $(DESTDIR)/$(PREFIX)/sbin/ - install emile-set-cmdline $(DESTDIR)/$(PREFIX)/sbin/emile-set-cmdline - install emile-first-tune $(DESTDIR)/$(PREFIX)/sbin/emile-first-tune - install emile-install $(DESTDIR)/$(PREFIX)/sbin/emile-install - install emile-set-output $(DESTDIR)/$(PREFIX)/sbin/emile-set-output - install emile $(DESTDIR)/$(PREFIX)/sbin/emile - install emile-map-set $(DESTDIR)/$(PREFIX)/sbin/emile-map-set - install emile-mkisofs $(DESTDIR)/$(PREFIX)/sbin/emile-mkisofs - install emile-mktable $(DESTDIR)/$(PREFIX)/sbin/emile-mktable - install emile-conf $(DESTDIR)/$(PREFIX)/sbin/emile-conf + install $(TARGET)/emile-set-cmdline $(DESTDIR)/$(PREFIX)/sbin/emile-set-cmdline + install $(TARGET)/emile-first-tune $(DESTDIR)/$(PREFIX)/sbin/emile-first-tune + install $(TARGET)/emile-install $(DESTDIR)/$(PREFIX)/sbin/emile-install + install $(TARGET)/emile-set-output $(DESTDIR)/$(PREFIX)/sbin/emile-set-output + install $(TARGET)/emile $(DESTDIR)/$(PREFIX)/sbin/emile + install $(TARGET)/emile-map-set $(DESTDIR)/$(PREFIX)/sbin/emile-map-set + install $(TARGET)/emile-mkisofs $(DESTDIR)/$(PREFIX)/sbin/emile-mkisofs + install $(TARGET)/emile-mktable $(DESTDIR)/$(PREFIX)/sbin/emile-mktable + install $(TARGET)/emile-conf $(DESTDIR)/$(PREFIX)/sbin/emile-conf uninstall: rm -f $(DESTDIR)/$(PREFIX)/sbin/emile-set-cmdline From 710d7ed2f65b0fd52fac1f68960c0b22f9d2b09f Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 22:56:49 +0100 Subject: [PATCH 6/7] remove trailing spaces from multiple Makefiles --- Makefile | 4 ++-- libunix/Makefile | 2 +- second/Makefile | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f2117b1..4e7a830 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ multiboot.bin: tools first vmlinuz second/$(KARCH)-linux-all/second tools/emile-install -c $(FLOPPY_CONF) multiboot.bin.X mv multiboot.bin.X multiboot.bin ln -s multiboot.bin last.bin - + boot.bin: floppy.bin rm -f last.bin cp floppy.bin boot.bin.X @@ -204,7 +204,7 @@ first-uninstall:: $(MAKE) -C first uninstall second-install:: - $(MAKE) -C second install + $(MAKE) -C second install second-uninstall:: $(MAKE) -C second uninstall diff --git a/libunix/Makefile b/libunix/Makefile index f3704e4..f51f5da 100644 --- a/libunix/Makefile +++ b/libunix/Makefile @@ -14,7 +14,7 @@ SOURCES = divsi3.S modsi3.S mulsi3.S udivsi3.S umodsi3.S free.c malloc.c \ strcpy.c strlen.c strncpy.c vsprintf.c write.c strcmp.c \ strncmp.c strtol.c strdup.c -HEADERS = +HEADERS = all: $(LIBRARY) diff --git a/second/Makefile b/second/Makefile index 643f36c..1f6d393 100644 --- a/second/Makefile +++ b/second/Makefile @@ -1,7 +1,7 @@ -# -# +# +# # (c) 2004-2007 Laurent Vivier -# +# # TARGET = m68k-linux @@ -16,7 +16,7 @@ CPPFLAGS = -DVERSION="\"$(VERSION)\"" -I$(TOP) -Wa,-I$(TOP) \ # -O2 is needed to be able to inline functions from libmacos CFLAGS = $(OPT_CFLAGS) -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -O2 -ASFLAGS = +ASFLAGS = LIBS = $(OPT_LIBS) \ -L$(TOP)/../libiso9660/m68k-linux -liso9660 \ -L$(TOP)/../libext2/m68k-linux -lext2 \ @@ -128,7 +128,7 @@ $(TARGET)-$(MEDIA)/second:: OPT_CFLAGS="$(CFLAGS_TARGET)" \ OPTOBJS="$(OBJS_TARGET) $(OBJS_MEDIA)" \ OPT_LIBS="$(LIBS_MEDIA)" - + $(TARGET)-$(MEDIA)-driver/apple_driver:: test -d $(TARGET)-$(MEDIA)-driver || mkdir $(TARGET)-$(MEDIA)-driver cd $(TARGET)-$(MEDIA)-driver && make -f $(TOP)/Makefile apple_driver \ @@ -143,7 +143,7 @@ $(TARGET)-$(MEDIA)-driver/apple_driver:: OPTOBJS="$(OBJS_TARGET) $(OBJS_MEDIA)" \ OPT_LIBS="$(LIBS_MEDIA)" -ifeq ("$(TARGET)", "ppc-linux") +ifeq ("$(TARGET)", "ppc-linux") bootstrapPPC.o: bootstrapPPC.S $(PPC_CC) $(CPPFLAGS) -c $(TOP)/bootstrapPPC.S -o bootstrapPPC.o @@ -152,7 +152,7 @@ bootstrap: bootstrapPPC.o -O binary bootstrapPPC.o bootstrap switch_to_PPC.o: switch_to_PPC.S bootstrap - $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ $(OBJCOPY) --add-section .bootstrap=bootstrap \ --set-section-flags .bootstrap=contents,alloc,load,data \ switch_to_PPC.o @@ -179,10 +179,10 @@ apple_driver.o: $(OBJS) $(TOP)/ld.script $(LD) -T $(TOP)/ld.script -o apple_driver.o $(OBJS) $(LIBS) .c.o: - $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ -%030.o: %030.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68030 -Wa,-mcpu=68030 -c -o $@ $^ -%040.o: %040.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68040 -Wa,-mcpu=68040 -c -o $@ $^ +%030.o: %030.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68030 -Wa,-mcpu=68030 -c -o $@ $^ +%040.o: %040.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68040 -Wa,-mcpu=68040 -c -o $@ $^ install:: install -d $(DESTDIR)/$(PREFIX)/boot/emile/ From 59e2e59943155f702bc4ab2b469549afd5de306e Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 15 Mar 2017 22:59:32 +0100 Subject: [PATCH 7/7] scripts: don't bail out when no m68k cross-compiler can be found --- scripts/tools.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/tools.sh b/scripts/tools.sh index 35a3316..b76e35b 100644 --- a/scripts/tools.sh +++ b/scripts/tools.sh @@ -36,7 +36,6 @@ then if ! type "${M68K_CROSS_COMPILE}${CC}" > /dev/null 2>&1 then echo "Cannot find m68k cross-compiler" 1>&2 - exit 1 fi fi M68K_GCC_VERSION=$(${M68K_CROSS_COMPILE}${CC} -dumpversion 2> /dev/null)