Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163323
b: refs/heads/master
c: 07e88e1
h: refs/heads/master
i:
  163321: 2a0e6a2
  163319: db45f91
v: v3
  • Loading branch information
Paul Mundt committed Jul 11, 2009
1 parent 4a99d89 commit 9a793e8
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df8ce2595fbac8b046322fce9df61ce1cf8ddf62
refs/heads/master: 07e88e1bfc128681a80578724fde6a872f413862
2 changes: 2 additions & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ config SUPERH
select HAVE_DMA_API_DEBUG
select HAVE_PERF_COUNTERS
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_LZMA
select RTC_LIB
select GENERIC_ATOMIC64
help
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sh/boot/compressed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vmlinux.bin.*
19 changes: 16 additions & 3 deletions trunk/arch/sh/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#

targets := vmlinux vmlinux.bin vmlinux.bin.gz \
vmlinux.bin.bz2 vmlinux.bin.lzma \
head_$(BITS).o misc_$(BITS).o piggy.o

OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
Expand Down Expand Up @@ -38,10 +39,22 @@ $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)

$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
vmlinux.bin.all-y := $(obj)/vmlinux.bin

$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
$(call if_changed,gzip)
$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
$(call if_changed,bzip2)
$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
$(call if_changed,lzma)

suffix-$(CONFIG_KERNEL_GZIP) := gz
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
suffix-$(CONFIG_KERNEL_LZMA) := lzma

OBJCOPYFLAGS += -R .empty_zero_page

$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,as_o_S)
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T

$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
$(call if_changed,ld)
14 changes: 13 additions & 1 deletion trunk/arch/sh/boot/compressed/misc_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,24 @@ extern int _end;
static unsigned long free_mem_ptr;
static unsigned long free_mem_end_ptr;

#define HEAP_SIZE 0x10000
#ifdef CONFIG_HAVE_KERNEL_BZIP2
#define HEAP_SIZE 0x400000
#else
#define HEAP_SIZE 0x10000
#endif

#ifdef CONFIG_KERNEL_GZIP
#include "../../../../lib/decompress_inflate.c"
#endif

#ifdef CONFIG_KERNEL_BZIP2
#include "../../../../lib/decompress_bunzip2.c"
#endif

#ifdef CONFIG_KERNEL_LZMA
#include "../../../../lib/decompress_unlzma.c"
#endif

#ifdef CONFIG_SH_STANDARD_BIOS
size_t strlen(const char *s)
{
Expand Down
14 changes: 13 additions & 1 deletion trunk/arch/sh/boot/compressed/misc_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,24 @@ extern int _end;
static unsigned long free_mem_ptr;
static unsigned long free_mem_end_ptr;

#define HEAP_SIZE 0x10000
#ifdef CONFIG_HAVE_KERNEL_BZIP2
#define HEAP_SIZE 0x400000
#else
#define HEAP_SIZE 0x10000
#endif

#ifdef CONFIG_KERNEL_GZIP
#include "../../../../lib/decompress_inflate.c"
#endif

#ifdef CONFIG_KERNEL_BZIP2
#include "../../../../lib/decompress_bunzip2.c"
#endif

#ifdef CONFIG_KERNEL_LZMA
#include "../../../../lib/decompress_unlzma.c"
#endif

void puts(const char *s)
{
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/sh/boot/compressed/piggy.S

This file was deleted.

10 changes: 10 additions & 0 deletions trunk/arch/sh/boot/compressed/vmlinux.scr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SECTIONS
{
.rodata.compressed : {
input_len = .;
LONG(input_data_end - input_data) input_data = .;
*(.data)
output_len = . - 4;
input_data_end = .;
}
}

0 comments on commit 9a793e8

Please sign in to comment.