Browse Source

fix h8/300 userland build

Waldemar Brodkorb 9 years ago
parent
commit
fbfe56ba11

+ 2 - 0
mk/vars.mk

@@ -177,7 +177,9 @@ endif
 
 ifeq ($(ADK_TARGET_ARCH_H8300),y)
 TARGET_CFLAGS+=		-mh
+TARGET_LDFLAGS+=	-mh
 ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
+TARGET_LDFLAGS+=	-Wl,-elf2flt
 TARGET_CFLAGS+=		-Wl,-elf2flt
 TARGET_CXXFLAGS+=	-Wl,-elf2flt
 endif

+ 1 - 1
package/busybox/Makefile

@@ -41,7 +41,7 @@ do-configure:
 		symbol=$$(echo $$sym|sed -e "s#=y##"); \
 		printf "# CONFIG_$${symbol} is not set\n" >> ${WRKBUILD}/.config; \
 	done
-ifneq ($(ADK_TARGET_WITH_MMU),y)
+ifeq ($(ADK_TARGET_WITHOUT_MMU),y)
 	echo 'CONFIG_NOMMU=y' >> ${WRKBUILD}/.config
 endif
 	$(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config

+ 1 - 1
package/busybox/config/Config.in

@@ -518,7 +518,7 @@ config BUSYBOX_PIE
 
 config BUSYBOX_NOMMU
 	bool "Force NOMMU build"
-	default y if ADK_TARGET_UCLINUX
+	default y if ADK_TARGET_WITHOUT_MMU
 	default n
 	help
 	  Busybox tries to detect whether architecture it is being

+ 1 - 1
package/sash/Makefile

@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		sash
 PKG_VERSION:=		1.0
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_DESCR:=		standalone shell
 PKG_SECTION:=		base/shells
 

+ 3 - 3
package/sash/src/Makefile

@@ -19,13 +19,13 @@ CFLAGS += -DCOMMAND_HISTORY
 all: $(SH) $(SHUTDOWN) $(REBOOT)
 
 $(SH): $(SHOBJS) $(LIBSASH)
-	$(CC) $(LDFLAGS) -o $@ $(SHOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SHOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
 
 $(SHUTDOWN): $(SHUTDOWNOBJS) $(LIBSASH)
-	$(CC) $(LDFLAGS) -o $@ $(SHUTDOWNOBJS) $(LIBSASH) $(LDLIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SHUTDOWNOBJS) $(LIBSASH) $(LDLIBS)
 
 $(REBOOT): $(REBOOTOBJS) $(LIBSASH)
-	$(CC) $(LDFLAGS) -o $@ $(REBOOTOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(REBOOTOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
 
 dummy_target:
 

+ 2 - 0
target/config/Config.in.libc.choice

@@ -38,8 +38,10 @@ config ADK_TARGET_LIB_GLIBC
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_CRIS
+	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_XTENSA
 	depends on !ADK_TARGET_UCLINUX
+	depends on !ADK_TARGET_WITHOUT_MMU
 	help
 	  http://www.gnu.org/libc
 

+ 34 - 0
target/h8300/Makefile

@@ -7,3 +7,37 @@ include $(ADK_TOPDIR)/mk/modules.mk
 include $(ADK_TOPDIR)/mk/kernel-build.mk
 include $(ADK_TOPDIR)/mk/image.mk
 
+KERNEL:=$(LINUX_DIR)/vmlinux
+
+# target helper text
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+	@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+	@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+targethelp:
+	@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+	@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+targethelp:
+	@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+endif
+
+kernel-strip:
+	@cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+	@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfspiggyback)
+imageinstall: createinitramfs targethelp
+endif

+ 2 - 1
target/h8300/systems/sim-h8300h

@@ -1,7 +1,8 @@
 config ADK_TARGET_SYSTEM_SIM_H8300H
 	bool "Simulator"
 	select ADK_CPU_H8300
+	select ADK_TARGET_SIM
 	select ADK_TARGET_PACKAGE_TXZ
 	help
-	  H8/300 simulator.
+	  H8/300 GDB simulator.