Skip to content

Commit

Permalink
h8300 zImage support update
Browse files Browse the repository at this point in the history
- Add missing files
- Add Makefile target
- Change image base
- Style fix

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
ysat0 authored and Linus Torvalds committed Jul 16, 2007
1 parent f79224c commit 86277d5
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 6 deletions.
7 changes: 4 additions & 3 deletions arch/h8300/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions arch/h8300/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/h8300/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2006 Yoshinori Sato
*/

.h8300h
.h8300h
#include <linux/linkage.h>

#define SRAM_START 0xff4000
Expand Down
32 changes: 32 additions & 0 deletions arch/h8300/boot/compressed/vmlinux.lds
Original file line number Diff line number Diff line change
@@ -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 = . ;
}
}
9 changes: 9 additions & 0 deletions arch/h8300/boot/compressed/vmlinux.scr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SECTIONS
{
.data : {
_input_len = .;
LONG(_input_data_end - _input_data) _input_data = .;
*(.data)
_input_data_end = .;
}
}

0 comments on commit 86277d5

Please sign in to comment.