diff options
author | Roman Yeryomin <roman@advem.lv> | 2013-08-16 11:44:04 +0300 |
---|---|---|
committer | Roman Yeryomin <roman@advem.lv> | 2013-08-16 11:44:04 +0300 |
commit | dee99ab0143122146ab7713cfe171790bc796dd3 (patch) | |
tree | 907ad856f6ceae17a70dd1df004a1adee8a1b2fd /target/linux/realtek/image/lzma-loader/src/head.S | |
parent | 4ed5985ada0f0420d69d7d959ecc3c9c8515efa0 (diff) |
Get rid of rtkload. Use OpenWrt lzma-loader (with kernel_entry hack). Use mgbin for unified tftp image generation.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
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) |