Skip to contentSkip to conversation

h8300 zImage support update.

PATCH New Yoshinori Sato 1 participant 1 message Jun 4, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 h8300 zImage support update.

- Add missing files
- Add Makefile target
- Change image base
- Style fix

arch/h8300/Makefile +4 -3
index b2d896a..53b5c1e 100644
@@ -61,10 +61,11 @@ archmrproper:
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
 
-vmlinux.srec vmlinux.bin: vmlinux
+vmlinux.srec vmlinux.bin zImage: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 define archhelp
-  echo  'vmlinux.bin  - Create raw binary'
-  echo  'vmlinux.srec - Create srec binary'
+  @echo  'vmlinux.bin  - Create raw binary'
+  @echo  'vmlinux.srec - Create srec binary'
+  @echo  'zImage       - Compressed kernel image'
 endef
arch/h8300/boot/compressed/Makefile +2 -2
index 71aac82..d6189e0 100644
@@ -15,10 +15,10 @@ OBJECTS = $(obj)/head.o $(obj)/misc.o
 # in order to suppress error message.
 #
 CONFIG_MEMORY_START     ?= 0x00400000
-CONFIG_BOOT_LINK_OFFSET ?= 0x00400000
+CONFIG_BOOT_LINK_OFFSET ?= 0x00140000
 IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
 
-LDFLAGS_vmlinux := -T $(obj)/vmlinux.lds
+LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup $(obj)/vmlinux.lds
 
 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
 	$(call if_changed,ld)
arch/h8300/boot/compressed/head.S +1 -1
index b8e90d1..985a81a 100644
@@ -4,7 +4,7 @@
  *  Copyright (C) 2006 Yoshinori Sato
  */
 
-.h8300h
+	.h8300h
 #include <linux/linkage.h>
 
 #define SRAM_START 0xff4000
arch/h8300/boot/compressed/vmlinux.lds new file +32 -0
new file mode 100644
index 0000000..65e2a0d
@@ -0,0 +1,32 @@
+SECTIONS
+{
+        .text :
+        {
+        __stext = . ;
+	__text = .;
+	       *(.text.startup)
+	       *(.text)
+        __etext = . ;
+        }
+
+	.rodata :
+	{
+		*(.rodata)
+	}
+        .data :
+
+        {
+        __sdata = . ;
+        ___data_start = . ;
+                *(.data.*)
+	}
+        .bss :
+        {
+        . = ALIGN(0x4) ;
+        __sbss = . ;
+                *(.bss*)
+        . = ALIGN(0x4) ;
+        __ebss = . ;
+        __end = . ;
+        }
+}
arch/h8300/boot/compressed/vmlinux.scr new file +9 -0
new file mode 100644
index 0000000..d9bcc74
@@ -0,0 +1,9 @@
+SECTIONS
+{
+  .data : { 
+	_input_len = .;
+	LONG(_input_data_end - _input_data) _input_data = .; 
+	*(.data) 
+	_input_data_end = .; 
+	}
+}
Signature · 2 lines
Yoshinori Sato
<[email protected]>