]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - arch/h8300/boot/compressed/Makefile
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / arch / h8300 / boot / compressed / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
06706c96
YS
2#
3# linux/arch/sh/boot/compressed/Makefile
4#
5# create a compressed vmlinux image from the original vmlinux
6#
7
8targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
9
10OBJECTS = $(obj)/head.o $(obj)/misc.o
11
12#
13# IMAGE_OFFSET is the load offset of the compression loader
14# Assign dummy values if these 2 variables are not defined,
15# in order to suppress error message.
16#
17CONFIG_MEMORY_START ?= 0x00400000
78f02cac 18CONFIG_BOOT_LINK_OFFSET ?= 0x00280000
06706c96
YS
19IMAGE_OFFSET := $(shell printf "0x%08x" $$(($(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET))))
20
21LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
78f02cac
YS
22LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup -T $(obj)/vmlinux.lds \
23 --defsym output=$(CONFIG_MEMORY_START)
06706c96
YS
24
25$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
26 $(call if_changed,ld)
06706c96
YS
27
28$(obj)/vmlinux.bin: vmlinux FORCE
29 $(call if_changed,objcopy)
30
42b510eb
YS
31suffix-$(CONFIG_KERNEL_GZIP) := gzip
32suffix-$(CONFIG_KERNEL_LZO) := lzo
33
34$(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE
35 $(call if_changed,$(suffix-y))
06706c96
YS
36
37LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T
38OBJCOPYFLAGS := -O binary
39
42b510eb 40$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
06706c96 41 $(call if_changed,ld)
42b510eb
YS
42
43CFLAGS_misc.o = -O0