Makefile 550 B

123456789101112131415161718192021
  1. #
  2. # SPDX-License-Identifier: GPL-2.0+
  3. #
  4. libs-y += arch/arc/cpu/$(CPU)/
  5. libs-y += arch/arc/lib/
  6. # MetaWare debugger doesn't support PIE (position-independent executable)
  7. # so the only way to load U-Boot in MDB is to fake it by:
  8. # 1. Reset PIE flag in ELF header
  9. # 2. Strip all debug information from elf
  10. ifdef CONFIG_SYS_LITTLE_ENDIAN
  11. EXEC_TYPE_OFFSET=16
  12. else
  13. EXEC_TYPE_OFFSET=17
  14. endif
  15. mdbtrick: u-boot
  16. $(Q)printf '\x02' | dd of=u-boot bs=1 seek=$(EXEC_TYPE_OFFSET) count=1 \
  17. conv=notrunc &> /dev/null
  18. $(Q)$(CROSS_COMPILE)strip -g u-boot