From c477b96e2be62a23ed2473bb92a3c840c3bf92d3 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Wed, 15 Feb 2017 20:08:28 +0100
Subject: add srec support for kernel format

---
 target/h8300/Makefile                  | 11 +++++++++++
 target/h8300/systems/hitachi-edosk2674 |  2 ++
 2 files changed, 13 insertions(+)

(limited to 'target/h8300')

diff --git a/target/h8300/Makefile b/target/h8300/Makefile
index cc6ae80bf..6c0add73e 100644
--- a/target/h8300/Makefile
+++ b/target/h8300/Makefile
@@ -6,6 +6,9 @@ include $(ADK_TOPDIR)/mk/kernel-build.mk
 include $(ADK_TOPDIR)/mk/image.mk
 
 KERNEL:=$(LINUX_DIR)/vmlinux
+ifeq ($(ADK_TARGET_KERNEL_VMLINUX_SREC),y)
+KERNEL:=$(LINUX_DIR)/arch/h8300/boot/vmlinux.srec
+endif
 OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
 
 # target helper text
@@ -33,6 +36,11 @@ ifeq ($(ADK_TARGET_SIM),y)
 	@echo 'gdb> run earlyprintk=h8300-sim console=ttySC0'
 endif
 endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+targethelp:
+	@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+	@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
 
 kernel-strip:
 	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
@@ -50,3 +58,6 @@ endif
 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
 imageinstall: createinitramfs targethelp
 endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
diff --git a/target/h8300/systems/hitachi-edosk2674 b/target/h8300/systems/hitachi-edosk2674
index 5f674f25b..74fcbc1cd 100644
--- a/target/h8300/systems/hitachi-edosk2674
+++ b/target/h8300/systems/hitachi-edosk2674
@@ -2,6 +2,8 @@ config ADK_TARGET_SYSTEM_HITACHI_EDOSK2674
 	bool "Hitachi EDOSK2674"
 	select ADK_TARGET_CPU_H8S
 	select ADK_TARGET_PACKAGE_TXZ
+	select ADK_TARGET_KERNEL_VMLINUX_SREC
+	select ADK_TARGET_KERNEL_WITH_COMPRESSION
 	help
 	  Hitachi EDOSK2674 H8S development board.
 
-- 
cgit v1.2.3