unicore32 additional architecture files: boot process
PATCH 7/12 unicore32 additional architecture files: boot process
Message-Id: <a62b51cab5f387297db1cade6ccc835711cee4f6.1297842537.git.gxt@mprc.pku.edu.cn>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: GuanXuetao <[email protected]>
Date: Sat, 15 Jan 2011 18:23:31 +0800
This patch implements booting process, including uncompression process.
Signed-off-by Guan Xuetao <[email protected]>
--- arch/unicore32/boot/Makefile | 47 ++++++ arch/unicore32/boot/compressed/Makefile | 68 ++++++++ arch/unicore32/boot/compressed/head.S | 204 +++++++++++++++++++++++++ arch/unicore32/boot/compressed/misc.c | 126 +++++++++++++++ arch/unicore32/boot/compressed/piggy.S.in | 6 + arch/unicore32/boot/compressed/vmlinux.lds.in | 61 ++++++++ arch/unicore32/include/mach/uncompress.h | 34 ++++ 7 files changed, 546 insertions(+), 0 deletions(-) create mode 100644 arch/unicore32/boot/Makefile create mode 100644 arch/unicore32/boot/compressed/Makefile create mode 100644 arch/unicore32/boot/compressed/head.S create mode 100644 arch/unicore32/boot/compressed/misc.c create mode 100644 arch/unicore32/boot/compressed/piggy.S.in create mode 100644 arch/unicore32/boot/compressed/vmlinux.lds.in create mode 100644 arch/unicore32/include/mach/uncompress.h
arch/unicore32/boot/Makefile new file +47 -0
@@ -0,0 +1,47 @@ +# +# arch/unicore32/boot/Makefile +# +# This file is included by the global makefile so that you can add your own +# architecture-specific flags and dependencies. +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2001~2010 GUAN Xue-tao +# + +MKIMAGE := $(srctree)/scripts/mkuboot.sh + +targets := Image zImage uImage + +$(obj)/Image: vmlinux FORCE + $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' + +$(obj)/compressed/vmlinux: $(obj)/Image FORCE + $(Q)$(MAKE) $(build)=$(obj)/compressed $@ + +$(obj)/zImage: $(obj)/compressed/vmlinux FORCE + $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' + +quiet_cmd_uimage = UIMAGE $@ + cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A unicore -O linux -T kernel \ + -C none -a $(LOADADDR) -e $(STARTADDR) \ + -n 'Linux-$(KERNELRELEASE)' -d $< $@ + +$(obj)/uImage: LOADADDR=0x0 + +$(obj)/uImage: STARTADDR=$(LOADADDR) + +$(obj)/uImage: $(obj)/zImage FORCE + $(call if_changed,uimage) + @echo ' Image $@ is ready' + +PHONY += initrd FORCE +initrd: + @test "$(INITRD)" != "" || \ + (echo You must specify INITRD; exit -1) + +subdir- := compressed
arch/unicore32/boot/compressed/Makefile new file +68 -0
68 lines not on this page · raw message
arch/unicore32/boot/compressed/head.S new file +204 -0
204 lines not on this page · raw message
arch/unicore32/boot/compressed/misc.c new file +126 -0
126 lines not on this page · raw message
arch/unicore32/boot/compressed/piggy.S.in new file +6 -0
@@ -0,0 +1,6 @@ + .section .piggydata,#alloc + .globl input_data +input_data: + .incbin "arch/unicore32/boot/compressed/piggy.DECOMP_SUFFIX" + .globl input_data_end +input_data_end:
arch/unicore32/boot/compressed/vmlinux.lds.in new file +61 -0
61 lines not on this page · raw message
arch/unicore32/include/mach/uncompress.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* linux/arch/unicore32/include/mach/uncompress.h +* +* Code specific to PKUnity SoC and UniCore ISA +* +* Copyright (C) 2001-2010 GUAN Xue-tao +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __MACH_PUV3_UNCOMPRESS_H__ +#define __MACH_PUV3_UNCOMPRESS_H__ + +#include "hardware.h" +#include "ocd.h" + +extern char input_data[]; +extern char input_data_end[]; + +static void arch_decomp_puts (const char *ptr) +{ +char c; + +while ((c = *ptr++) !='\0' ) { +if (c =='\n' ) +putc ('\r' ); +putc (c); + } +} +#define ARCH_HAVE_DECOMP_PUTS + +#endif /* __MACH_PUV3_UNCOMPRESS_H__ */
Signature · 1 line
1.6.2.2
Quoted 3 lines · Guan Xuetao
This patch implements booting process, including uncompression process.
Signed-off-by Guan Xuetao <[email protected]>
Reviewed-by Arnd Bergmann <[email protected]>