18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# create a compressed vmlinux image from the original vmlinux 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_citargets := vmlinux head.o misc.o piggy.o vmlinux.lds 78c2ecf20Sopenharmony_ciasflags-y := 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciOBJECTS = $(obj)/head.o $(obj)/misc.o 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciLDFLAGS_vmlinux := -T 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE 148c2ecf20Sopenharmony_ci $(call if_changed,ld) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciLDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE 198c2ecf20Sopenharmony_ci $(call if_changed,ld) 20