Skip to contentSkip to conversation

sh: kfr2r09 board support - zImage flash boot

PATCH In review Magnus Damm 2 participants 3 messages Jul 22, 2009 – Jul 23, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: kfr2r09 board support - zImage flash boot

From: Magnus Damm <[email protected]>

This patch adds zImage flash boot support to the kfr2r09 board.

The flash boot code is a Partner Jet script converted into assembly using macros. If CONFIG_ZIMAGE_BOOT_LOADER is set then the resulting zImage should be burned to the boot vector of the CS0 flash.

The Partner Jet script can also be used stand alone with the Partner Jet JTAG debugger to setup the RAM and allow the zImage to execute from RAM without burning the zImage to flash.

A simple initramfs based user land is booted in less than a second.

---

Applies on top of the KEYSC keypad patch.

 arch/sh/Kconfig                                   |    1 
 arch/sh/boards/Kconfig                            |    1 
 arch/sh/boards/mach-kfr2r09/head.S                |   78 ++++++++++++
 arch/sh/boards/mach-kfr2r09/partner-jet-setup.txt |  134 +++++++++++++++++++++
 4 files changed, 214 insertions(+)
arch/sh/Kconfig +1 -0
@@ -772,6 +772,7 @@ config CMDLINE
 config ZIMAGE_BOOT_LOADER_FILE
 	string
 	depends on ZIMAGE_BOOT_LOADER
+	default "../../boards/mach-kfr2r09/head.S" if SH_KFR2R09
 
 config ZIMAGE_BOOT_LOADER
 	bool "Use zImage as boot loader"
arch/sh/boards/Kconfig +1 -0
@@ -197,6 +197,7 @@ config SH_KFR2R09
 	bool "KFR2R09"
 	depends on CPU_SUBTYPE_SH7724
 	select ARCH_REQUIRE_GPIOLIB
+	select SYS_SUPPORTS_ZIMAGE_BOOT_LOADER
 	help
 	  "Kit For R2R for 2009" support.
 
arch/sh/boards/mach-kfr2r09/head.S new file +78 -0

78 lines not on this page · raw message

arch/sh/boards/mach-kfr2r09/partner-jet-setup.txt new file +134 -0

134 lines not on this page · raw message

#1 lore raw

Hi! Magnus.

Quoted 9 lines · On Thu, 23 Jul 2009 01:26:37 +0900 Magnus Damm <[email protected]> wrote:

From: Magnus Damm <[email protected]>

This patch adds zImage flash boot support to the kfr2r09 board.

The flash boot code is a Partner Jet script converted into assembly using macros. If CONFIG_ZIMAGE_BOOT_LOADER is set then the resulting zImage should be burned to the boot vector of the CS0 flash.

Quoted 5 lines

The Partner Jet script can also be used stand alone with the Partner Jet JTAG debugger to setup the RAM and allow the zImage to execute from RAM without burning the zImage to flash.

A simple initramfs based user land is booted in less than a second.

Is not U-Boot of R2R yet implemented?

Best regards,
Nobuhiro

Signature · 2 lines
Nobuhiro Iwamatsu
	GPG ID: 3170EBE9
#2 lore raw
In reply to Magnus Damm

Hi Iwamatsu-san,

Quoted 5 lines · Nobuhiro Iwamatsu
Quoted 1 line · On Thu, 23 Jul 2009 01:26:37 +0900 Magnus Damm <[email protected]> wrote:

This patch adds zImage flash boot support to the kfr2r09 board.

Is not U-Boot of R2R yet implemented?

I don't know the status of U-Boot on R2R by itself, but last time I checked U-boot did not have enough hardware support for the kfr2r09 board to boot easily. This board does not have any ethernet controller. And no USB host.

To easily boot the kfr2r09 board we need USB gadget support with r8a66597 together with USB ethernet + serial combo gadget driver and maybe MMC as well. And since we need them under Linux anyway we may as well reuse our drivers for booting together with kexec.

Cheers,

/ magnus