Makefile 546 B

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