1/* 2 * Copyright (c) 2021 DENX Software Engineeering GmbH 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/** 8 * @file 9 * @brief Linker command/script file 10 * 11 * This is the linker script for ip_k66f board to allow ethernet 12 * interfaces placement. 13 */ 14 15/* 16 * Explicit placement of the ethernet interfaces 17 * 18 * eth0 is the "master" port for the DSA switch and hence shall be 19 * placed on the index (position) 1 (as net_if_get_by_index() uses 20 * internally '_net_if_list_start[index - 1]' linker generated symbol). 21 * 22 * lan{123} shall be placed afterwards (sorted) so the order will be 23 * correctly preserved. 24 * 25 * If ip_k66f have had eth1 interface - it shall be placed afterwards 26 * 27 * The last entry with `._net_if.static.*` is to accommodate ethernet 28 * interfaces created in tests/samples - like e.g. _net_if.static.eth_test) 29 * in tests/net/vlan/src/main.c 30 */ 31 32#define NETWORK_RAM_SECTIONS \ 33SECTION_DATA_PROLOGUE(net_if_area,,SUBALIGN(4)) \ 34{ \ 35 _net_if_list_start = .; \ 36 KEEP(*(._net_if.static.dts*)); \ 37 KEEP(*(SORT_BY_NAME(._net_if.static.dsa_slave*))); \ 38 KEEP(*(SORT_BY_NAME(._net_if.static.*))); \ 39 _net_if_list_end = .; \ 40} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) \ 41ITERABLE_SECTION_RAM(net_if_dev, 4) \ 42ITERABLE_SECTION_RAM(net_l2, 4) \ 43ITERABLE_SECTION_RAM(eth_bridge, 4) 44 45#include <arch/arm/aarch32/cortex_m/scripts/linker.ld> 46