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