OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [sh/] [boot/] [compressed/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#
2
# linux/arch/sh/boot/compressed/Makefile
3
#
4
# create a compressed vmlinux image from the original vmlinux
5
#
6
 
7
HEAD = head.o
8
SYSTEM = $(TOPDIR)/vmlinux
9
 
10
OBJECTS = $(HEAD) misc.o
11
 
12
ifdef CONFIG_SH_STANDARD_BIOS
13
OBJECTS += ../../kernel/sh_bios.o
14
endif
15
 
16
ZLDFLAGS = -e startup -T $(TOPDIR)/arch/sh/vmlinux.lds
17
 
18
#
19
# ZIMAGE_OFFSET is the load offset of the compression loader
20
#
21
ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[0x80000000+0x$(CONFIG_MEMORY_START)+0x$(CONFIG_BOOT_LINK_OFFSET)])
22
 
23
ZLINKFLAGS  = -Ttext $(ZIMAGE_OFFSET)  $(ZLDFLAGS)
24
 
25
all: vmlinux
26
 
27
vmlinux: piggy.o $(OBJECTS)
28
        $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
29
 
30
head.o: head.S
31
        $(CC) $(AFLAGS) -traditional -c head.S
32
 
33
piggy.o:        $(SYSTEM)
34
        tmppiggy=_tmp_$$$$piggy; \
35
        rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk; \
36
        $(OBJCOPY) -R .empty_zero_page $(SYSTEM) $$tmppiggy; \
37
        gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
38
        echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
39
        $(LD) -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-sh-linux -T $$tmppiggy.lnk; \
40
        rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk
41
 
42
clean:
43
        rm -f vmlinux _tmp_*

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.