u-boot/board
Tom Rini 6e2228fb05 Merge patch series "Clean up arm linker scripts"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

The arm linker scripts had a mix of symbols and C defined variables in an
effort to emit relative references instead of absolute ones e.g [0]. A
linker bug prevented us from doing so [1] -- fixed since 2016.
This has led to confusion over the years, ending up with mixed section
definitions. Some sections are defined with overlays and different
definitions between v7 and v8 architectures.
For example __efi_runtime_rel_start/end is defined as a linker symbol for
armv8 and a C variable in armv7.

Linker scripts nowadays can emit relative references, as long as the symbol
definition is contained within the section definition. So let's switch most
of the C defined variables and clean up the arm sections.c file.
There's still a few symbols remaining -- __secure_start/end,
__secure_stack_start/end and __end which can be cleaned up
in a followup series.

For both QEMU v7/v8 bloat-o-meter shows now size difference
$~ ./scripts/bloat-o-meter u-boot u-boot.new
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Function                                     old     new   delta
Total: Before=798861, After=798861, chg +0.00%

The symbols seem largely unchanged apart from a difference in .bss
as well as the emited sections and object types of the affected variables.

On the output below the first value is from -next and the second comes from
-next + this patchset. The .bss_start/end sections have disappeared from
the newer binaries.

# For example on QEMU v8:
efi_runtime_start
  7945: 0000000000000178     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
  7942: 0000000000000178     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
  9050: 0000000000000d38     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
  9047: 0000000000000d38     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  7172: 00000000000dc2f0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_start
  7169: 00000000000dc2f0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_start
__efi_runtime_rel_stop
  7954: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
  7951: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
__rel_dyn_start
  7030: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __rel_dyn_start
  7027: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_start
__rel_dyn_end
  8959: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __rel_dyn_end
  8956: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_end
image_copy_start
  9051: 0000000000000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
  9048: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
  7467: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __image_copy_end
  7464: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __image_copy_end
bss_start
    12: 0000000000102b10     0 SECTION LOCAL  DEFAULT   12 .bss_start
  8087: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8375: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __bss_start
  8084: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8372: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   12 __bss_start
bss_end
    14: 000000000010bc30     0 SECTION LOCAL  DEFAULT   14 .bss_end
  7683: 000000000010bc30     0 OBJECT  GLOBAL DEFAULT   14 __bss_end
  8479: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs
  7680: 000000000010bbb0     0 NOTYPE  GLOBAL DEFAULT   12 __bss_end
  8476: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs

# For QEMU v7:
efi_runtime_start
 10703: 000003bc     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
 10699: 000003c0     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
 11796: 000012ec     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
 11792: 000012ec     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  9937: 000c40dc     0 OBJECT  GLOBAL DEFAULT    8 __efi_runtime_rel_start
  9935: 000c40dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_start
__efi_runtime_rel_stop
 10712: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
 10708: 000c41dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_stop
__rel_dyn_start
  9791: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_start
  9789: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_start
__rel_dyn_end
 11708: 000da5f4     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_end
 11704: 000da5f4     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_end
image_copy_start
   448: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11797: 00000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
   445: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11793: 00000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
   450: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10225: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __image_copy_end
   447: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10222: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __image_copy_end
bss_start
    11: 000c41dc     0 SECTION LOCAL  DEFAULT   11 .bss_start
 11124: 000c41dc     0 OBJECT  GLOBAL DEFAULT   11 __bss_start
 11120: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   11 __bss_start
bss_end
    13: 000cbbf8     0 SECTION LOCAL  DEFAULT   13 .bss_end
 10442: 000cbbf8     0 OBJECT  GLOBAL DEFAULT   13 __bss_end
 10439: 000cbbf8     0 NOTYPE  GLOBAL DEFAULT   11 __bss_end

It's worth noting that since the efi regions are affected by the change, booting
with EFI is preferable while testing. Booting the kernel only should be enough
since the efi stub and the kernel proper do request boottime and runtime
services respectively.
Something along the lines of
> virtio scan && load virtio 0 $kernel_addr_r Image && bootefi $kernel_addr_r
will work for QEMU aarch64.

Tested platforms:
- QEMU aarch64
- Xilinx kv260 kria starter kit & zynq
- QEMU armv7
- STM32MP157C-DK2

[0] commit 3ebd1cbc49 ("arm: make __bss_start and __bss_end__ compiler-generated")
[1] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")
2024-03-29 10:39:38 -04:00
..
abilis/tb100 arc: Cleanup and audit usage of <config.h> 2023-12-21 08:54:37 -05:00
advantech spl: mmc: Introduce proper layering for spl_mmc_get_uboot_raw_sector() 2023-10-17 23:55:10 +02:00
alliedtelesis
altera board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
amarula/vyasa-rk3288
amlogic board: amlogic: fix buffler overflow in seria, mac & usid read 2024-03-25 09:16:19 +01:00
anbernic/rgxx3_rk3566 Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
AndesTech/ae350 spl: riscv: falcon: move fdt blob to specified address 2024-01-31 16:51:03 +08:00
aries/mcvevk board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
aristainetos
armadeus/opos6uldev opos6uldev: make the LCD work again 2024-03-04 08:18:48 -03:00
armltd corstone1000: update maintainers 2023-08-17 12:29:21 -04:00
aspeed board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
astro/mcf5373l
asus board: asus: transformer: switch to DM pinmux 2023-12-19 21:24:30 +02:00
atmel board: at91: sama7g54_curiosity: Add initial board support 2024-03-13 13:35:16 +02:00
avionic-design
beacon ARM: renesas: Rename arch-/mach-rmobile to arch-/mach-renesas 2024-03-02 14:29:36 -05:00
beagle Merge patch series "board: beagle: Enable 32k and debounce configuration and fixups" 2024-03-04 13:40:57 -05:00
beckhoff/mx53cx9020
bitmain/antminer_s9
bluewater/gurnard
bosch tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
boundary/nitrogen6x
broadcom board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
bsh MAINTAINERS: Remove non-working address from MAINTAINERS 2023-12-13 09:59:32 -03:00
bticino/mamoj
buffalo/lsxl
BuR global: Drop common.h inclusion 2023-12-21 08:54:37 -05:00
BuS/eb_cpu5282
cadence/xtfpga Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
calao/usb_a9263
cavium/thunderx Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
cei/cei-tk1-som
chipspark/popmetal_rk3288 boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
cloos/imx8mm_phg
cloudengines
cobra5272 global: Use proper project name U-Boot (next2) 2023-09-21 13:20:11 +02:00
compal/paz00 board: compal: paz00: clean up the board 2023-12-19 21:24:30 +02:00
compulab
comtrend board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
conclusive/kstr-sama5d27 board: Add support for Conclusive KSTR-SAMA5D27 2023-10-23 17:07:06 +03:00
congatec
coreboot coreboot: Remove empty config header 2024-02-27 14:18:30 -05:00
cortina event: Use an event to replace last_stage_init() 2023-08-31 13:16:55 -04:00
cssi global: Rework architecture global_data.h to include <linux/types.h> 2023-12-21 08:54:37 -05:00
CZ.NIC global: Drop common.h inclusion 2023-12-21 08:54:37 -05:00
d-link/dns325 kirkwood: dns325: Enable 2nd harddrive 2023-10-16 11:10:32 +02:00
data_modul ARM: imx: Configure GIC clock parent on Data Modul i.MX8M Plus eDM SBC 2024-01-22 08:39:08 -03:00
davinci/da8xxevm tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
devboards/dbm-soc1 board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
dfi
dhelectronics ARM: imx: Update DRAM timings with inline ECC on DH i.MX8MP DHCOM SoM 2023-12-16 07:45:07 -03:00
ea
ebv/socrates board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
edgeble boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
eets/pdu001 tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
efi efi-x86_payload: Remove empty config header 2024-02-27 14:18:30 -05:00
egnite/ethernut5
elgin/elgin_rv1108 Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
embest/mx6boards
emulation qemu-arm: round down memory to multiple of 2MB for LPAE 2024-03-02 12:25:14 -05:00
engicam board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
esd/meesc
firefly Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
freescale Prepare v2024.04-rc4 2024-03-11 15:27:20 -04:00
friendlyarm treewide: use linux/time.h for time conversion defines 2023-11-16 18:59:58 -05:00
friendlyelec/nanopc-t6-rk3588 boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
gardena
gateworks imx8m*_venice: move venice to OF_UPSTREAM 2024-03-17 18:39:54 -03:00
gdsys event: Use an event to replace last_stage_init() 2023-08-31 13:16:55 -04:00
ge MAINTAINERS: Update after GEHC spin-off 2024-02-19 08:19:39 -03:00
geekbuying/geekbox boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
google Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
grinn global: Remove duplicate common.h inclusions 2023-12-21 08:54:37 -05:00
hardkernel boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
highbank scsi: Forceably finish migration to DM_SCSI 2023-11-07 18:36:06 -05:00
hisilicon poplar: add myself as co-maintainer 2024-02-13 15:38:11 -05:00
hoperun/hihope-rzg2 ARM: renesas: Rename arch-/mach-rmobile to arch-/mach-renesas 2024-03-02 14:29:36 -05:00
hpe/gxp
htc/endeavoru board: htc: endeavoru: add an early SPL RCM hook 2024-01-05 18:05:42 +02:00
huawei/hg556a board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
imgtec common: return type board_get_usable_ram_top 2023-08-15 18:21:17 +02:00
intel Merge tag 'u-boot-socfpga-next-20240319' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next 2024-03-19 09:10:30 -04:00
inteno/xg6846 bmips: Add Inteno XG6846 board 2023-11-06 10:20:21 -05:00
inversepath/usbarmory
iomega/iconnect
is1 board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
isee
itead/sonoff-ihost board: rockchip: Add Sonoff iHost board 2024-02-04 18:45:58 +08:00
k+p
keymile board/keymile/kmcent2: fix update-nor indentation 2023-12-21 11:59:49 -05:00
kobol/helios4 board: helios-4: add config fragment for spi booting 2024-03-05 08:27:59 +01:00
kontron Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
kosagi/novena
l+g/vinco
LaCie
lego/ev3 tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
lg board: lg: x3-t30: switch to DM pinmux 2023-12-19 21:24:30 +02:00
liebherr arm: xea: Add support for boot image source descriptor in SPL 2024-01-15 10:55:42 -03:00
logicpd tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
Marvell Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
maxbcm
mediatek board: mediatek: add MT8365 EVK board support 2023-12-19 10:09:06 -05:00
menlo common: return type board_get_usable_ram_top 2023-08-15 18:21:17 +02:00
microchip treewide: Remove clk_free 2024-01-29 22:35:02 -05:00
mikrotik/crs3xx-98dx3236
mntre/imx8mq_reform2
mqmaker/miqi_rk3288 boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
msc/sm2s_imx8mp msc_sm2s_imx8mp: Convert to DM_SERIAL 2024-02-19 08:19:39 -03:00
mscc common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
myir/mys_6ulx
netgear board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
novtech/meerkat96
nuvoton board: nuvoton: update console environment variable 2023-11-22 19:11:27 -05:00
nvidia common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
olimex/mx23_olinuxino
opalkelly/zynq
openpiton/riscv64
out4/o4-imx6ull-nano
phytec Prepare v2024.04-rc5 2024-03-25 22:15:47 -04:00
phytium ARM add initial support for the Phytium Pe2201 Board. 2024-01-16 17:05:29 -05:00
pine64 Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
polyhex/imx8mp_debix_model_a imx: imx8mp: Add support for Polyhex Debix Model A SBC 2023-12-13 09:32:06 -03:00
purism/librem5 librem5: properly set the fdtfile env variable 2023-12-13 10:00:43 -03:00
qca
qualcomm board: qcs404-evb: drop board code 2024-03-01 14:52:47 +00:00
radxa Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
raidsonic/ib62x0
raspberrypi/rpi rpi5: Use devicetree to retrieve board revision 2024-01-30 17:39:46 +01:00
renesas Merge patch series "ARM: renesas: Rename R-Mobile to Renesas" 2024-03-02 14:30:25 -05:00
rikomagic/mk808 boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
rockchip Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
ronetix
sagem/f@st1704 board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
samsung Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
sandbox sandbox: Audit config.h and common.h usage 2023-12-21 08:54:37 -05:00
schneider/rzn1-snarc
Seagate
seeed
sfr/nb4_ser board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
sielaff/imx6dl-sielaff Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
siemens siemens: factoryset: use correct config for soc specific implementation 2024-02-05 13:32:48 -05:00
sifive board: sifive: spl: Initialized the PWM setting in the SPL stage 2024-01-31 16:52:24 +08:00
silinux/ek874 ARM: renesas: Rename arch-/mach-rmobile to arch-/mach-renesas 2024-03-02 14:29:36 -05:00
sipeed/maix treewide: Remove clk_free 2024-01-29 22:35:02 -05:00
skyworth/hc2910-2aghd05 hc2910-2aghd05: Remove empty config header 2024-02-27 14:18:30 -05:00
socionext/developerbox board: developerbox: fix mem_map setup timing 2024-03-13 18:47:11 -04:00
socrates
softing
solidrun board: solidrun: clearfog: fix serdes 1 / eth2 speed for clearfog gtr 2024-01-22 12:47:45 +01:00
somlabs/visionsom-6ull
sophgo/milkv_duo riscv: sophgo: milkv_duo: initial support added 2024-01-31 16:52:45 +08:00
sr1500
st stv0991: Remove stv0991 board and architecture code 2024-03-13 18:47:11 -04:00
starfive/visionfive2 board: starfive: maintainer: Add visionfive2 PCIe driver 2024-03-12 14:36:13 +08:00
ste/stemmy
storopack/smegw01 smegw01: Remove misuse of CONFIG_ENV_IS_NOWHERE 2023-10-16 08:46:01 +02:00
sunxi sunxi: H616: Add OrangePi Zero 2W board support 2024-03-03 23:43:43 +00:00
Synology
synopsys treewide: Remove clk_free 2024-01-29 22:35:02 -05:00
sysam Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
tbs/tbs2910
tcl/sl50 tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
technexion pico-imx7d: add baseboard SD card boot detect 2023-12-13 15:55:13 -03:00
terasic board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
thead/th1520_lpi4a
theadorable
thecus/n2350
theobroma-systems Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
ti board: ti: introduce basic board files for the am62px family 2024-03-13 10:10:05 -04:00
timll
topic/zynq
toradex apalis-imx8: Fix sc_misc_otp_fuse_read() error check 2024-03-17 17:59:50 -03:00
tplink/wdr4300
tq/tqma6 global: Drop common.h inclusion 2023-12-21 08:54:37 -05:00
traverse fsl-layerscape: drop obsolete PPA secure firmware support 2023-10-10 10:13:32 +08:00
turing/turing-rk1-rk3588 boards: Remove empty BOARD_SPECIFIC_OPTIONS 2024-03-13 12:40:43 -04:00
udoo udoo: Use checkboard() instead of show_board_info() 2023-11-28 12:53:04 -05:00
vamrs/rock960_rk3399 Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next 2024-03-15 09:15:31 -04:00
variscite imx9: Fix OP-TEE support 2024-03-04 08:18:13 -03:00
vocore/vocore2 board: Remove essentially empty board files and Makefiles 2023-10-09 15:24:31 -04:00
vscom/baltos arm: baltos: remove custom linker script 2024-03-29 10:39:25 -04:00
wandboard global: Remove duplicate common.h inclusions 2023-12-21 08:54:37 -05:00
warp7
work-microwave/work_92105 cmd: Convert existing long help messages to the new macro 2023-10-16 10:24:58 -04:00
xen/xenguest_arm64 xen: xenguest_arm64: map all VIRTIO MMIO region 2024-03-01 18:34:08 -05:00
xilinx Kconfig: Centralize prompting for SYS_CONFIG_NAME 2024-02-27 14:18:54 -05:00
zyxel arm: kirkwood: Add support for ZyXEL NSA325 board 2023-10-16 11:10:42 +02:00