From 41e64bf1c41f08e44dc0eefdf4b92e81f2784433 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 12 Apr 2017 20:04:23 +0200 Subject: h8s: minor progress, doesn't run on edosk2674 board --- target/config/Config.in.runtime | 2 ++ target/h8300/Makefile | 11 +++++++++++ target/h8300/systems/hitachi-edosk2674 | 1 + target/linux/config/Config.in.serial | 4 +++- target/linux/patches/4.9.20/h8300.patch | 12 ++++++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 target/linux/patches/4.9.20/h8300.patch diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index a91c2c7c2..645a54a6d 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -355,6 +355,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE || ADK_TARGET_SYSTEM_QEMU_AARCH64 default "ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH default "ttySC0" if ADK_TARGET_SYSTEM_SIM_H8300H + default "ttySC2" if ADK_TARGET_SYSTEM_HITACHI_EDOSK2674 default "ttymxc0" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default "ttyAMA0" if ADK_TARGET_SYSTEM_RASPBERRY_PI default "ttyAMA0" if ADK_TARGET_SYSTEM_RASPBERRY_PI2 @@ -376,6 +377,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_SPEED default "9600" if ADK_TARGET_SYSTEM_SGI_O2 default "38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP default "38400" if ADK_TARGET_SYSTEM_ANDES_AG101P + default "38400" if ADK_TARGET_SYSTEM_HITACHI_EDOSK2674 default "115200" config ADK_RUNTIME_KBD_LAYOUT diff --git a/target/h8300/Makefile b/target/h8300/Makefile index 48a8b1e52..df8939529 100644 --- a/target/h8300/Makefile +++ b/target/h8300/Makefile @@ -7,6 +7,10 @@ include $(ADK_TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/vmlinux OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id +ifeq ($(ADK_TARGET_KERNEL_UIMAGEBIN),y) +KERNEL:=$(LINUX_DIR)/arch/h8300/boot/uImage.bin +OSTRIP:= +endif ifeq ($(ADK_TARGET_KERNEL_ZIMAGE),y) KERNEL:=$(LINUX_DIR)/arch/h8300/boot/zImage OSTRIP:= @@ -16,6 +20,10 @@ KERNEL:=$(LINUX_DIR)/arch/h8300/boot/vmlinux.srec endif # target helper text +ifeq ($(ADK_TARGET_FS),archive) +targethelp: + @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)" +endif ifeq ($(ADK_TARGET_FS),initramfs) targethelp: @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' @@ -57,6 +65,9 @@ kernel-install: kernel-strip @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL) # filesystem specific targets +ifeq ($(ADK_TARGET_FS),archive) +imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp +endif ifeq ($(ADK_TARGET_FS),initramfs) imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp endif diff --git a/target/h8300/systems/hitachi-edosk2674 b/target/h8300/systems/hitachi-edosk2674 index a9a125fcc..dcd6d35df 100644 --- a/target/h8300/systems/hitachi-edosk2674 +++ b/target/h8300/systems/hitachi-edosk2674 @@ -4,6 +4,7 @@ config ADK_TARGET_SYSTEM_HITACHI_EDOSK2674 select ADK_TARGET_PACKAGE_TXZ select ADK_TARGET_KERNEL_WITH_COMPRESSION select ADK_HOST_BUILD_U_BOOT_H8300 + select ADK_TARGET_WITH_SERIAL select ADK_TARGET_KERNEL_UIMAGEBIN help Hitachi EDOSK2674 H8S development board. diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial index 8a25d7f5d..ab6704ee0 100644 --- a/target/linux/config/Config.in.serial +++ b/target/linux/config/Config.in.serial @@ -227,8 +227,10 @@ config ADK_KERNEL_SERIAL_AMBA_PL011 config ADK_KERNEL_SERIAL_SH_SCI bool "sci serial driver" select ADK_KERNEL_SERIAL_SH_SCI_CONSOLE - depends on ADK_TARGET_SYSTEM_SIM_H8300H + depends on ADK_TARGET_SYSTEM_SIM_H8300H \ + || ADK_TARGET_SYSTEM_HITACHI_EDOSK2674 default y if ADK_TARGET_SYSTEM_SIM_H8300H + default y if ADK_TARGET_SYSTEM_HITACHI_EDOSK2674 default n help Serial driver for SCI chip. diff --git a/target/linux/patches/4.9.20/h8300.patch b/target/linux/patches/4.9.20/h8300.patch new file mode 100644 index 000000000..a58b3f137 --- /dev/null +++ b/target/linux/patches/4.9.20/h8300.patch @@ -0,0 +1,12 @@ +diff -Nur linux-4.9.20.orig/arch/h8300/Kconfig.cpu linux-4.9.20/arch/h8300/Kconfig.cpu +--- linux-4.9.20.orig/arch/h8300/Kconfig.cpu 2017-03-31 10:32:02.000000000 +0200 ++++ linux-4.9.20/arch/h8300/Kconfig.cpu 2017-04-04 08:10:00.132205323 +0200 +@@ -96,4 +96,8 @@ + hex "Load offset" + default 0 + ++config RAMBASE ++ hex "RAM base address" ++ default 0x400000 ++ + endmenu -- cgit v1.2.3