diff options
| author | Artur Artamonov <freeartman@wechall.net> | 2013-08-21 16:52:55 +0300 |
|---|---|---|
| committer | Artur Artamonov <freeartman@wechall.net> | 2013-08-21 16:52:55 +0300 |
| commit | d4bc867ac3afd260e4256e1463b273083769a363 (patch) | |
| tree | 81c868f33d397d9b61de9ef00c8303fecc9195ca /target/linux/realtek/image/lzma-loader/src/head.S | |
| parent | 2789830761da86a4537ab198203138c082b3058e (diff) | |
| parent | 6e8428d78c98c653f625aa0839437359306f99db (diff) | |
Merge branch 'realtek-unstable' of git://213.175.90.206/openwrt-realtek into realtek-unstable
Diffstat (limited to 'target/linux/realtek/image/lzma-loader/src/head.S')
| -rw-r--r-- | target/linux/realtek/image/lzma-loader/src/head.S | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/realtek/image/lzma-loader/src/head.S b/target/linux/realtek/image/lzma-loader/src/head.S new file mode 100644 index 000000000..ab43f909c --- /dev/null +++ b/target/linux/realtek/image/lzma-loader/src/head.S @@ -0,0 +1,49 @@ +/* + * LZMA compressed kernel loader for Realtek 819X + * + * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org> + * + * Some parts of this code was based on the OpenWrt specific lzma-loader + * for the BCM47xx and ADM5120 based boards: + * Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org) + * Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su> + * + * 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. + */ + +#include <asm/asm.h> +#include <asm/regdef.h> + + + .text + +LEAF(startup) + .set noreorder + +__reloc_done: + /* clear bss */ + la t0, _bss_start + la t1, _bss_end + b __bss_check + nop + +__bss_fill: + sw zero, 0(t0) + addi t0, 4 + +__bss_check: + bne t0, t1, __bss_fill + nop + + /* Setup new "C" stack */ + la sp, _stack + + /* jump to the decompressor routine */ + la t0, loader_main + jr t0 + nop + + .set reorder +END(startup) |
