Daniel Schwierzeck | 17def7d | 2014-11-21 23:51:33 +0100 | [diff] [blame] | 1 | # |
| 2 | # SPDX-License-Identifier: GPL-2.0+ |
| 3 | # |
| 4 | |
| 5 | head-y := arch/arc/cpu/$(CPU)/start.o |
| 6 | |
| 7 | libs-y += arch/arc/cpu/$(CPU)/ |
| 8 | libs-y += arch/arc/lib/ |
Alexey Brodkin | 1371d27 | 2014-12-29 15:42:57 +0300 | [diff] [blame] | 9 | |
| 10 | # MetaWare debugger doesn't support PIE (position-independent executable) |
| 11 | # so the only way to load U-Boot in MDB is to fake it by: |
| 12 | # 1. Reset PIE flag in ELF header |
| 13 | # 2. Strip all debug information from elf |
| 14 | ifdef CONFIG_SYS_LITTLE_ENDIAN |
| 15 | EXEC_TYPE_OFFSET=16 |
| 16 | else |
| 17 | EXEC_TYPE_OFFSET=17 |
| 18 | endif |
| 19 | |
| 20 | mdbtrick: u-boot |
| 21 | $(Q)printf '\x02' | dd of=u-boot bs=1 seek=$(EXEC_TYPE_OFFSET) count=1 \ |
| 22 | conv=notrunc &> /dev/null |
| 23 | $(Q)$(CROSS_COMPILE)strip -g u-boot |