Makefile 674 B

123456789101112131415161718192021222324
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. targets := Image zImage uImage
  3. $(obj)/Image: vmlinux FORCE
  4. $(call if_changed,objcopy)
  5. @echo ' Kernel: $@ is ready'
  6. compress-$(CONFIG_KERNEL_GZIP) = gzip
  7. compress-$(CONFIG_KERNEL_LZO) = lzo
  8. compress-$(CONFIG_KERNEL_LZMA) = lzma
  9. compress-$(CONFIG_KERNEL_XZ) = xzkern
  10. compress-$(CONFIG_KERNEL_LZ4) = lz4
  11. $(obj)/zImage: $(obj)/Image FORCE
  12. $(call if_changed,$(compress-y))
  13. @echo ' Kernel: $@ is ready'
  14. UIMAGE_ARCH = sandbox
  15. UIMAGE_COMPRESSION = $(compress-y)
  16. UIMAGE_LOADADDR = $(shell $(NM) vmlinux | awk '$$NF == "_start" {print $$1}')
  17. $(obj)/uImage: $(obj)/zImage
  18. $(call if_changed,uimage)
  19. @echo 'Image: $@ is ready'