u-boot-brain/include
Simon Glass 1979063264 binman: Support accessing binman tables at run time
Binman construct images consisting of multiple binary files. These files
sometimes need to know (at run timme) where their peers are located. For
example, SPL may want to know where U-Boot is located in the image, so
that it can jump to U-Boot correctly on boot.

In general the positions where the binaries end up after binman has
finished packing them cannot be known at compile time. One reason for
this is that binman does not know the size of the binaries until
everything is compiled, linked and converted to binaries with objcopy.

To make this work, we add a feature to binman which checks each binary
for symbol names starting with '_binman'. These are then decoded to figure
out which entry and property they refer to. Then binman writes the value
of this symbol into the appropriate binary. With this, the symbol will
have the correct value at run time.

Macros are used to make this easier to use. As an example, this declares
a symbol that will access the 'u-boot-spl' entry to find the 'pos' value
(i.e. the position of SPL in the image):

   binman_sym_declare(unsigned long, u_boot_spl, pos);

This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any
binary that includes it. Binman then updates the value in that binary,
ensuring that it can be accessed at runtime with:

   ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);

This assigns the variable u_boot_pos to the position of SPL in the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-12-12 19:53:45 -07:00
..
andestech
asm-generic log: Plumb logging into the init sequence 2017-12-07 15:17:00 -05:00
bedbug powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
cavium
configs ata: Migrate CONFIG_MVSATA_IDE to Kconfig 2017-12-12 18:16:06 -05:00
cramfs
dm dm: core: fix member name in ofnode_union documentation 2017-11-17 07:15:52 -07:00
dt-bindings ARC: clk: introduce HSDK CGU clock driver 2017-12-11 11:36:23 +03:00
environment/ti env: ti: boot: Show boot status information 2017-09-29 14:07:58 -04:00
faraday
fsl-mc driver: net: fsl-mc: flib changes for MC 10.3.0 2017-12-06 14:55:17 -08:00
jffs2
linux mtd: nand: include <asm/cache.h> from include/linux/mtd/rawnand.h 2017-12-04 22:00:01 +09:00
lzma
mtd mtd: cfi: Add support for status register polling 2017-09-26 10:57:53 +02:00
net
pcmcia
power
samsung
spmi
synopsys
tee
test test: compression: Convert to unit test framework 2017-12-04 09:58:20 -05:00
u-boot include: Add a variadic macro to call a callback for all arguments 2017-10-02 21:52:16 -04:00
usb bitops: collect BIT macros to include/linux/bitops.h 2017-11-29 00:28:57 +09:00
zfs
_exports.h env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
.gitignore
ACEX1K.h
adc.h
addr_map.h
ahci.h ata: Fix ahci wording 2017-11-28 16:08:52 +01:00
ali512x.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
altera.h
android_image.h
ansi.h
api_public.h
api.h
armcoremodule.h
asm-offsets.h Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value 2010-10-26 21:05:30 +02:00
ata.h
atf_common.h
atmel_hlcdc.h
atmel_lcd.h lib: at91: Add logo files used via API of DM_VIDEO 2017-09-14 16:02:43 -04:00
atmel_lcdc.h
atmel_mci.h
atsha204a-i2c.h
autoboot.h
axp152.h
axp209.h
axp221.h
axp809.h
axp818.h
axp_pmic.h
backlight.h
bcd.h
binman_sym.h binman: Support accessing binman tables at run time 2017-12-12 19:53:45 -07:00
bios_emul.h
bitfield.h
blk.h part: extract MBR signature from partitions 2017-09-20 10:20:19 +02:00
bmp_layout.h
boot_fit.h fit: use 'const' for the input of fdt_offset() and locate_dtb_in_fit() 2017-10-05 21:31:04 -04:00
bootcount.h
bootm.h
bootretry.h
bootstage.h bootstage: Drop unused options 2017-09-16 14:57:44 +08:00
bouncebuf.h
btrfs.h fs: btrfs: Add U-Boot fs handlers. 2017-10-02 21:52:18 -04:00
bus_vcxk.h
bzlib.h
cbfs.h
charset.h efi_loader: new function utf8_to_utf16 2017-12-01 13:22:55 +01:00
circbuf.h
cli_hush.h
cli.h
clk-uclass.h
clk.h dtoc: Rename the phandle struct 2017-09-15 05:27:47 -06:00
cmd_spl.h
command.h Kconfig: Drop CONFIG_CMD_PORTIO and associated command 2017-08-11 15:41:52 -04:00
common_timing_params.h
common.h Move debug and logging support to a separate header 2017-12-07 15:17:00 -05:00
commproc.h
compiler.h
config_defaults.h
config_distro_bootcmd.h distro bootcmd: define bootloader name for x86 2017-11-30 13:50:17 +08:00
config_distro_defaults.h
config_fallbacks.h vsprintf.c: add GUID printing 2017-09-12 17:58:00 -04:00
config_fsl_chain_trust.h common: Move CONFIG_BOOTARGS to Kconfig 2017-08-14 17:06:06 -04:00
config_phylib_all_drivers.h Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig 2017-08-07 15:22:29 -05:00
config_uncmd_spl.h
console.h
cortina.h net/phy: Add support for CS4315/CS4340 PHY 2014-12-05 08:06:11 -08:00
cpsw.h
cpu.h
crc.h
cros_ec_message.h
cros_ec.h
ddr_spd.h
debug_uart.h
dfu.h
dialog_pmic.h
display_options.h
display.h
div64.h
dm9000.h
dm-demo.h
dm.h
dma.h
dp83848.h
ds1722.h
dt-structs.h dtoc: Rename the auto-generated dt-structs.h file 2017-09-15 05:27:48 -06:00
dw_hdmi.h
dwc3-omap-uboot.h
dwc3-sti-glue.h sti: fix STMicroelectronics copyright 2017-11-06 09:51:01 -05:00
dwc3-uboot.h
dwc_ahsata.h dm: sata: dwc_ahsata: Add support for driver model 2017-08-17 16:44:17 +09:00
dwmmc.h dm: mmc: Drop CONFIG_DM_MMC_OPS 2017-08-17 16:59:55 +09:00
e500.h
ec_commands.h
edid.h
eeprom_field.h
eeprom_layout.h
efi_api.h efi_loader: efi_gop: use correct types for parameters 2017-12-01 13:22:56 +01:00
efi_loader.h efi_loader: helper function to add EFI object to list 2017-12-01 13:41:01 +01:00
efi_selftest.h efi_selftest: test protocol management 2017-12-01 13:22:55 +01:00
efi.h efi_loader: capitalize EFI_LOCATE_SEARCH_TYPE values 2017-12-01 13:22:55 +01:00
elf.h
env_attr.h
env_callback.h usb: gadget: g_dnl: Sync internal SN variable with env 2017-09-05 20:17:08 -04:00
env_default.h common: Move CONFIG_BOOTARGS to Kconfig 2017-08-14 17:06:06 -04:00
env_flags.h
environment.h env: Remove CONFIG_ENV_AES support 2017-11-21 07:43:31 -05:00
errno.h
ethsw.h
exports.h env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
ext4fs.h
ext_common.h
exynos_lcd.h
fastboot.h
fat.h fs/fat: Clean up open-coded sector <-> cluster conversions 2017-09-15 09:03:15 -04:00
fb_mmc.h
fb_nand.h
fdt_simplefb.h
fdt_support.h spl: fit: add SPL_FIT_IMAGE_TINY config to reduce code-size 2017-11-26 00:39:08 +01:00
fdt.h libfdt: change fdt.h to a wrapper of scripts/dtc/libfdt/* 2017-11-17 07:44:13 -05:00
fdtdec.h fdt: Add compatible strings for Arria 10 2017-11-26 02:34:10 +01:00
fis.h
flash.h mtd: cfi: Add support for status register polling 2017-09-26 10:57:53 +02:00
fm_eth.h
fpga.h
fs_internal.h fs: Create a common fs_devread for ext4/reiserfs/zfs 2017-10-02 21:51:50 -04:00
fs.h fs: btrfs: Add U-Boot fs handlers. 2017-10-02 21:52:18 -04:00
fsl_csu.h fsl-lsch2: csu: correct the workaround A-010315 2017-08-09 09:57:33 -07:00
fsl_dcu_fb.h
fsl_ddr_dimm_params.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
fsl_ddr_sdram.h
fsl_ddr.h
fsl_ddrc_version.h driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
fsl_devdis.h
fsl_diu_fb.h
fsl_dspi.h
fsl_dtsec.h
fsl_errata.h
fsl_esdhc.h mmc: fsl_esdhc: Fix PIO timeout 2017-11-07 10:26:27 +01:00
fsl_fman.h
fsl_ifc.h
fsl_immap.h fsl-layerscape: Consolidate registers space defination for CCI-400 bus 2017-09-11 07:55:36 -07:00
fsl_lpuart.h
fsl_mdio.h
fsl_memac.h
fsl_mmdc.h
fsl_pmic.h
fsl_qe.h
fsl_sec_mon.h
fsl_sec.h
fsl_secboot_err.h
fsl_sfp.h
fsl_tgec.h
fsl_usb.h
fsl_validate.h
fsl_wdog.h imx_watchdog: Do not assert WDOG_B on watchdog init 2016-10-04 12:01:14 +02:00
fuse.h
g_dnl.h
gdsys_fpga.h
generic-phy.h
gt64120.h
hash.h
hw_sha.h
hwconfig.h
i2c_eeprom.h
i2c.h
i2s.h
i8042.h
ide.h block: ide: Drop CONFIG_IDE_LED 2017-09-03 15:30:35 -04:00
image-sparse.h
image.h image: add IH_OS_ARM_TRUSTED_FIRMWARE for ARM Trusted Firmware 2017-11-26 00:39:06 +01:00
imx_thermal.h
imximage.h imx: move imximage header to common location 2017-08-23 10:41:58 +02:00
init_helpers.h
initcall.h
input.h
inttypes.h
iomux.h
ioports.h
iotrace.h
ipu_pixfmt.h
key_matrix.h
keyboard.h
kgdb.h
lattice.h
lcd_console.h
lcd.h
lcdvideo.h
ld9040.h
led-display.h
led.h
libata.h
libfdt_env.h lib: libfdt: wrap scripts/dtc/libfdt/* where possible 2017-11-17 07:44:13 -05:00
libfdt.h Do not attempt to use the systemwide libfdt 2017-11-06 09:59:02 -05:00
libtizen.h
linker_lists.h linker_lists: remove incorrect comment 2017-09-07 10:44:37 -04:00
linux_logo.h
lmb.h
log.h log: Add a test command 2017-12-07 15:17:00 -05:00
lxt971a.h
lynxkdi.h
mailbox-uclass.h
mailbox.h
malloc.h
mapmem.h
mb862xx.h
mc9sdz60.h
mc13783.h
mc13892.h
mc34704.h
MCD_dma.h
MCD_progCheck.h
MCD_tasksInit.h
memalign.h
membuff.h
menu.h
micrel.h
mii_phy.h
miiphy.h
mipi_display.h
misc.h
mk48t59.h
mmc.h cmd: mmc: add mmc partconf read capability 2017-08-17 17:00:11 +09:00
mpc8xx_irq.h
mpc8xx.h
mpc83xx.h
mpc85xx.h
mpc86xx.h
mpc106.h
msc01.h Update Paul Burton's email address 2017-11-28 21:59:30 +01:00
mtd_node.h
mtd.h
mv88e6352.h
mvebu_mmc.h
mvmfp.h
nand.h mtd: nand: Rename nand.h into rawnand.h 2017-12-04 22:00:00 +09:00
net.h env: Rename some other getenv()-related functions 2017-08-16 08:31:11 -04:00
netdev.h
ns16550.h Revert "serial: ns16550: Add RX interrupt buffer support" 2017-08-24 11:00:47 +08:00
ns87308.h
nuvoton_nct6102d.h
nvme.h nvme: Add show routine to print detailed information 2017-08-13 15:17:31 -04:00
of_live.h
onenand_uboot.h
os.h Revert "sandbox: remove os_putc() and os_puts()" 2017-12-07 15:17:00 -05:00
palmas.h board: ti: dra76-evm: Add support for powering on mmc ldo 2017-09-11 16:19:43 -04:00
panel.h
part_efi.h part: move efi_guid_t 2017-09-20 10:20:00 +02:00
part.h disk: Provide API to get partition by name for specific type 2017-10-06 11:28:17 -04:00
pc_keyb.h
pca953x.h
pca9564.h
pca9698.h
pch.h
pci_gt64120.h
pci_ids.h nvme: Detect devices that are class Storage Express 2017-08-13 15:17:32 -04:00
pci_msc01.h Update Paul Burton's email address 2017-11-28 21:59:30 +01:00
pci_rom.h
pci.h pci: Add helper for implementing memory-mapped config space accesses 2017-10-06 11:27:40 -04:00
pcmcia.h
pe.h efi_loader: set loaded image code/data type properly 2017-09-20 11:10:24 +02:00
phy.h net: phy: Add Amlogic Meson GXL Internal PHY support 2017-11-17 07:44:13 -05:00
phys2bus.h
physmem.h
post.h Drop the log buffer 2017-12-07 15:17:00 -05:00
power-domain-uclass.h
power-domain.h
ppc_asm.tmpl
ppc_defs.h
ps2mult.h
pwm.h
pwrseq.h
pxa_lcd.h
qfw.h
radeon.h
ram.h
rc4.h
regmap.h dtoc: Add support for 32 or 64-bit addresses 2017-09-15 05:27:38 -06:00
reiserfs.h
relocate.h board_f: Make relocation functions generic 2017-04-05 16:36:57 -04:00
remoteproc.h
reset-uclass.h
reset.h
rtc_def.h
rtc.h
s6e63d6.h
s_record.h
SA-1100.h
samsung-usb-phy-uboot.h
sandbox-adc.h
sandboxblockdev.h
sandboxfs.h
sata.h dm: sata: Support driver model with the 'sata' command 2017-08-17 16:44:17 +09:00
scf0403_lcd.h
scsi.h
sdhci.h dm: mmc: Drop CONFIG_DM_MMC_OPS 2017-08-17 16:59:55 +09:00
sdp.h usb: gadget: add SDP driver 2017-08-23 10:41:58 +02:00
search.h env: Rename setenv() to env_set() 2017-08-16 08:22:18 -04:00
serial.h serial: serial-uclass: Add generic serial RX buffer support 2017-08-24 11:00:47 +08:00
sh_pfc.h
sh_tmu.h
sja1000.h
slre.h
smbios.h
smsc_lpc47m.h
smsc_sio1007.h
sound.h
sparse_defs.h
sparse_format.h
spartan2.h
spartan3.h
spd_sdram.h
spd.h
spi_flash.h
spi.h
spl.h spl: change load_addr and entry_point to uintptr_t 2017-11-26 00:39:07 +01:00
splash.h
status_led.h
stdio_dev.h
stdio.h stdio.h: move printf() stuff from <common.h> to <stdio.h> 2017-10-04 07:55:21 -04:00
stdlib.h
stm32_rcc.h stm32: migrate clock structs in include/stm32_rcc.h 2017-11-29 22:30:50 -05:00
stratixII.h
sy8106a.h
sym53c8xx.h
syscon.h dtoc: Add support for 32 or 64-bit addresses 2017-09-15 05:27:38 -06:00
sysreset.h
tables_csum.h
tca642x.h
tegra-kbc.h
thermal.h
thor.h USB: gadget: added a saner gadget downloader registration API 2014-05-05 08:21:47 +02:00
ti-usb-phy-uboot.h
time.h
timer.h
timestamp.h
tmu.h
tpm.h tpm: add more useful NV storage permission flags 2017-11-17 07:15:52 -07:00
tps6586x.h
trace.h
tsec.h
tsi108.h
tsi148.h
twl4030.h
twl6030.h
ubi_uboot.h
ubifs_uboot.h
ubispl.h
uboot_aes.h
universe.h
usb_cdc_acm.h
usb_defs.h
usb_ether.h
usb_mass_storage.h
usb.h dm: usb: emul: Drop usb_emul_reset() 2017-10-01 16:32:51 +02:00
usbdescriptors.h
usbdevice.h
usbroothubdes.h
uuid.h uuid: add selection by string for known partition type GUID 2015-11-12 15:58:58 -05:00
vbe.h vbe: Drop vbe_get_video_info() 2017-08-24 11:00:47 +08:00
version.h
video_bridge.h dm: video: bridge: add operation to read EDID 2017-10-26 14:17:01 +02:00
video_console.h dm: video: Add basic ANSI escape sequence support 2017-09-29 17:53:21 +02:00
video_easylogo.h
video_fb.h
video_font_4x6.h
video_font_data.h
video_font.h
video_logo.h
video.h dm: video: Add basic ANSI escape sequence support 2017-09-29 17:53:21 +02:00
virtex2.h
vsc7385.h
vsc9953.h
vsprintf.h vsprintf.h: include <linux/types.h> 2017-10-04 12:00:19 -04:00
vxworks.h
w83c553f.h
wait_bit.h
watchdog.h
wdt.h wdt: Update uclass to make clear that the timeout is in ms 2017-08-13 15:17:34 -04:00
winbond_w83627.h
xilinx.h
xyzModem.h
zfs_common.h
zynqmppl.h arm64: zynqmp: Fix SVD mask for getting chip ID 2017-08-02 09:11:52 +02:00
zynqpl.h