diff options
| author | Tom Rini <trini@konsulko.com> | 2019-10-16 18:10:31 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-10-16 18:10:31 -0400 |
| commit | c83b1bb923421e95e499b22b010d2f9f463c1226 (patch) | |
| tree | 48860f46e83dc30d9a77fac61c979fb3625588d7 /scripts | |
| parent | d2a93a88631929169d3ef1c537430330404f96f7 (diff) | |
| parent | d11ef4d54cab0e740efbceb9c6b5697a41770eea (diff) | |
Merge tag 'dm-pull-15oct19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
binman enhancements:
- Dropping some test Elf files and building them from source instead
- Refactoring of x86 16-bit entries
- Support for SPL symbols within sections
- Handle the 'notes' sections and hidden symbols in recent binutils
- Improved error reporting with a tool fails
libfdt and documentation fixes
vboot required-key test
driver model power-domain controls
patman Message-Id enhancement
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.spl | 22 | ||||
| -rw-r--r-- | scripts/dtc/libfdt/fdt_addresses.c | 45 | ||||
| -rw-r--r-- | scripts/dtc/libfdt/libfdt.h | 4 |
3 files changed, 42 insertions, 29 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 7af6b120b6..0f3d89b215 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -229,9 +229,11 @@ ALL-y += $(obj)/boot.bin endif ifdef CONFIG_TPL_BUILD -ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-tpl.bin +ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-tpl.bin \ + $(obj)/u-boot-x86-reset16-tpl.bin else -ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin +ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-spl.bin \ + $(obj)/u-boot-x86-reset16-spl.bin endif ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin @@ -337,12 +339,20 @@ OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \ $(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE $(call if_changed,objcopy) -OBJCOPYFLAGS_u-boot-x86-16bit-spl.bin := -O binary -j .start16 -j .resetvec -$(obj)/u-boot-x86-16bit-spl.bin: $(obj)/u-boot-spl FORCE +OBJCOPYFLAGS_u-boot-x86-start16-spl.bin := -O binary -j .start16 +$(obj)/u-boot-x86-start16-spl.bin: $(obj)/u-boot-spl FORCE $(call if_changed,objcopy) -OBJCOPYFLAGS_u-boot-x86-16bit-tpl.bin := -O binary -j .start16 -j .resetvec -$(obj)/u-boot-x86-16bit-tpl.bin: $(obj)/u-boot-tpl FORCE +OBJCOPYFLAGS_u-boot-x86-start16-tpl.bin := -O binary -j .start16 +$(obj)/u-boot-x86-start16-tpl.bin: $(obj)/u-boot-tpl FORCE + $(call if_changed,objcopy) + +OBJCOPYFLAGS_u-boot-x86-reset16-spl.bin := -O binary -j .resetvec +$(obj)/u-boot-x86-reset16-spl.bin: $(obj)/u-boot-spl FORCE + $(call if_changed,objcopy) + +OBJCOPYFLAGS_u-boot-x86-reset16-tpl.bin := -O binary -j .resetvec +$(obj)/u-boot-x86-reset16-tpl.bin: $(obj)/u-boot-tpl FORCE $(call if_changed,objcopy) LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c index eff4dbcc72..788c143113 100644 --- a/scripts/dtc/libfdt/fdt_addresses.c +++ b/scripts/dtc/libfdt/fdt_addresses.c @@ -1,6 +1,7 @@ /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2014 David Gibson <david@gibson.dropbear.id.au> + * Copyright (C) 2018 embedded brains GmbH * * libfdt is dual licensed: you can use it either under the terms of * the GPL, or the BSD license, at your option. @@ -55,42 +56,44 @@ #include "libfdt_internal.h" -int fdt_address_cells(const void *fdt, int nodeoffset) +static int fdt_cells(const void *fdt, int nodeoffset, const char *name) { - const fdt32_t *ac; - int val; + const fdt32_t *c; + uint32_t val; int len; - ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len); - if (!ac) - return 2; + c = fdt_getprop(fdt, nodeoffset, name, &len); + if (!c) + return len; - if (len != sizeof(*ac)) + if (len != sizeof(*c)) return -FDT_ERR_BADNCELLS; - val = fdt32_to_cpu(*ac); - if ((val <= 0) || (val > FDT_MAX_NCELLS)) + val = fdt32_to_cpu(*c); + if (val > FDT_MAX_NCELLS) return -FDT_ERR_BADNCELLS; - return val; + return (int)val; } -int fdt_size_cells(const void *fdt, int nodeoffset) +int fdt_address_cells(const void *fdt, int nodeoffset) { - const fdt32_t *sc; int val; - int len; - - sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len); - if (!sc) - return 2; - if (len != sizeof(*sc)) + val = fdt_cells(fdt, nodeoffset, "#address-cells"); + if (val == 0) return -FDT_ERR_BADNCELLS; + if (val == -FDT_ERR_NOTFOUND) + return 2; + return val; +} - val = fdt32_to_cpu(*sc); - if ((val < 0) || (val > FDT_MAX_NCELLS)) - return -FDT_ERR_BADNCELLS; +int fdt_size_cells(const void *fdt, int nodeoffset) +{ + int val; + val = fdt_cells(fdt, nodeoffset, "#size-cells"); + if (val == -FDT_ERR_NOTFOUND) + return 1; return val; } diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h index cf86ddba88..c400f2f5d5 100644 --- a/scripts/dtc/libfdt/libfdt.h +++ b/scripts/dtc/libfdt/libfdt.h @@ -734,7 +734,7 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset); /** * fdt_get_alias_namelen - get alias based on substring * @fdt: pointer to the device tree blob - * @name: name of the alias th look up + * @name: name of the alias to look up * @namelen: number of characters of name to consider * * Identical to fdt_get_alias(), but only examine the first namelen @@ -1109,7 +1109,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset); * * returns: * 0 <= n < FDT_MAX_NCELLS, on success - * 2, if the node has no #address-cells property + * 1, if the node has no #size-cells property * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid * #size-cells property * -FDT_ERR_BADMAGIC, |
