libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
Use CONFIG_IS_ENABLED() macro to check whether OF_LIBFDT is enabled, so that code block is compiled irrespective of SPL or U-Boot build depending on CONFIG_SPL_OF_LIBFDT(for SPL) or CONFIG_OF_LIBFDT(for U-Boot).
--- lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -1
@@ -112,7 +112,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,return FDT_ADDR_T_NONE ; } -#if !defined(CONFIG_SPL_BUILD ) && defined(CONFIG_OF_LIBFDT ) +#if CONFIG_IS_ENABLED (OF_LIBFDT )if (translate) addr =fdt_translate_address (blob, node, prop_addr);else
Signature · 1 line
2.11.0
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
2017-02-13 16:34 GMT+09:00 Vignesh R <[email protected]>:
Quoted 6 lines
Use
CONFIG_IS_ENABLED()macro to check whetherOF_LIBFDTis enabled, so that code block is compiled irrespective of SPL or U-Boot build depending onCONFIG_SPL_OF_LIBFDT(for SPL)orCONFIG_OF_LIBFDT(for U-Boot).Signed-off-by Vignesh R <[email protected]>
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
In reply to Vignesh RQuoted 6 lines · Vignesh R
Use
CONFIG_IS_ENABLED()macro to check whetherOF_LIBFDTis enabled, so that code block is compiled irrespective of SPL or U-Boot build depending onCONFIG_SPL_OF_LIBFDT(for SPL)orCONFIG_OF_LIBFDT(for U-Boot).Signed-off-by Vignesh R <[email protected]>
Thanks and regards,
Lokesh
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
Hi,
Quoted 8 lines · Lokesh Vutla
Quoted 5 lines · Vignesh R
Use
CONFIG_IS_ENABLED()macro to check whetherOF_LIBFDTis enabled, so that code block is compiled irrespective of SPL or U-Boot build depending onCONFIG_SPL_OF_LIBFDT(for SPL)orCONFIG_OF_LIBFDT(for U-Boot).
Quoted 6 lines
Quoted 1 line
Signed-off-by Vignesh R <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>Thanks and regards,
Lokesh
Unfortunately this breaks boards which use SPL and OF_CONTROL:
06: dtoc: make ScanTree recurse into subnodes
aarch64: + xilinx_zynqmp_zc1751_xm018_dc4 xilinx_zynqmp_zcu102xilinx_zynqmp_zc1751_xm015_dc1 xilinx_zynqmp_zc1751_xm019_dc5 xilinx_zynqmp_zc1751_xm016_dc2 xilinx_zynqmp_ep xilinx_zynqmp_zcu102_revB
arm: + socfpga_de0_nano_soc uniphier_pro4 uniphier_ld4_sld8zynq_zc770_xm010 zynq_zc770_xm012 zynq_zc706 evb-rk3288 socfpga_arria5 zynq_zybo rock2 socfpga_socrates uniphier_sld3 zynq_microzed socfpga_sr1500 tinker-rk3288 zynq_zed socfpga_de1_soc firefly-rk3288 sama5d2_xplained_spiflash topic_miami sama5d2_xplained_mmc socfpga_sockit zynq_zc702 socfpga_is1 zynq_picozed fennec-rk3288 zynq_zc770_xm011 zynq_zc770_xm013 popmetal-rk3288 socfpga_mcvevk topic_miamiplus socfpga_cyclone5 socfpga_vining_fpga uniphier_pxs2_ld6b
microblaze: + microblaze-generic
x86: + qemu-x86_64 chromebook_link64+lib/built-in.o: In function `fdtdec_get_addr_size_fixed':+build/../lib/fdtdec.c:117: undefined reference to `fdt_translate_address' +make[2]: *** [spl/u-boot-spl] Error 1
+make[1]: *** [spl/u-boot-spl] Error 2
+build/../lib/fdtdec.
You can move the position of fdt_support.o in common/Makefile to fix this.
It also bloats SPL on many boards which currently don't need address translation. For example firefly-rk3288 goes from ~20KB to ~26KB.
Can you add an option to enable address translation in SPL perhaps? Then it will be disabled by default on existing boards.
Regards,
Simon
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
Quoted 42 lines · Simon Glass
Hi,
Quoted 8 lines · Lokesh Vutla
Quoted 5 lines · Vignesh R
Use
CONFIG_IS_ENABLED()macro to check whetherOF_LIBFDTis enabled, so that code block is compiled irrespective of SPL or U-Boot build depending onCONFIG_SPL_OF_LIBFDT(for SPL)orCONFIG_OF_LIBFDT(for U-Boot).Quoted 6 lines
Quoted 1 line
Signed-off-by Vignesh R <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>Thanks and regards,
LokeshUnfortunately this breaks boards which use SPL and
OF_CONTROL:06: dtoc: make ScanTree recurse into subnodes
aarch64: +xilinx_zynqmp_zc1751_xm018_dc4xilinx_zynqmp_zcu102xilinx_zynqmp_zc1751_xm015_dc1xilinx_zynqmp_zc1751_xm019_dc5xilinx_zynqmp_zc1751_xm016_dc2xilinx_zynqmp_epxilinx_zynqmp_zcu102_revB
arm: +socfpga_de0_nano_socuniphier_pro4uniphier_ld4_sld8zynq_zc770_xm010zynq_zc770_xm012zynq_zc706evb-rk3288socfpga_arria5zynq_zyborock2socfpga_socratesuniphier_sld3zynq_microzedsocfpga_sr1500tinker-rk3288zynq_zedsocfpga_de1_socfirefly-rk3288sama5d2_xplained_spiflashtopic_miamisama5d2_xplained_mmcsocfpga_sockitzynq_zc702socfpga_is1zynq_picozedfennec-rk3288zynq_zc770_xm011zynq_zc770_xm013popmetal-rk3288socfpga_mcvevktopic_miamiplussocfpga_cyclone5socfpga_vining_fpgauniphier_pxs2_ld6bmicroblaze: + microblaze-generic x86: + qemu-x86_64 chromebook_link64(quoted diff) +5
-0+lib/built-in.o: In function `fdtdec_get_addr_size_fixed': +build/../lib/fdtdec.c:117: undefined reference to `fdt_translate_address' +make[2]: *** [spl/u-boot-spl] Error 1 +make[1]: *** [spl/u-boot-spl] Error 2 +build/../lib/fdtdec.
Quoted 7 lines
You can move the position of fdt_support.o in common/Makefile to fix this.
It also bloats SPL on many boards which currently don't need address translation. For example firefly-rk3288 goes from ~20KB to ~26KB.
Can you add an option to enable address translation in SPL perhaps? Then it will be disabled by default on existing boards.
Does that include when we use gcc-6.x and are able to discard all of the unused strings (which is I assume what's bloating things) ? At some point we will need to say that SoC $X/$Y/$Z only work with gcc-6.x and later due to size issues. Not that we're strictly at that point yet, and may indeed want to fix this by moving functions around to allow for the older toolchains to be able to discard the strings.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/dc4def46/attachment.sig>
PATCH 1/1 libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
In reply to Simon GlassQuoted 42 lines · Simon Glass
Hi,
Quoted 8 lines · Lokesh Vutla
Quoted 5 lines · Vignesh R
Use
CONFIG_IS_ENABLED()macro to check whetherOF_LIBFDTis enabled, so that code block is compiled irrespective of SPL or U-Boot build depending onCONFIG_SPL_OF_LIBFDT(for SPL)orCONFIG_OF_LIBFDT(for U-Boot).Quoted 6 lines
Quoted 1 line
Signed-off-by Vignesh R <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>Thanks and regards,
LokeshUnfortunately this breaks boards which use SPL and
OF_CONTROL:06: dtoc: make ScanTree recurse into subnodes
aarch64: +xilinx_zynqmp_zc1751_xm018_dc4xilinx_zynqmp_zcu102xilinx_zynqmp_zc1751_xm015_dc1xilinx_zynqmp_zc1751_xm019_dc5xilinx_zynqmp_zc1751_xm016_dc2xilinx_zynqmp_epxilinx_zynqmp_zcu102_revB
arm: +socfpga_de0_nano_socuniphier_pro4uniphier_ld4_sld8zynq_zc770_xm010zynq_zc770_xm012zynq_zc706evb-rk3288socfpga_arria5zynq_zyborock2socfpga_socratesuniphier_sld3zynq_microzedsocfpga_sr1500tinker-rk3288zynq_zedsocfpga_de1_socfirefly-rk3288sama5d2_xplained_spiflashtopic_miamisama5d2_xplained_mmcsocfpga_sockitzynq_zc702socfpga_is1zynq_picozedfennec-rk3288zynq_zc770_xm011zynq_zc770_xm013popmetal-rk3288socfpga_mcvevktopic_miamiplussocfpga_cyclone5socfpga_vining_fpgauniphier_pxs2_ld6bmicroblaze: + microblaze-generic x86: + qemu-x86_64 chromebook_link64(quoted diff) +5
-0+lib/built-in.o: In function `fdtdec_get_addr_size_fixed': +build/../lib/fdtdec.c:117: undefined reference to `fdt_translate_address' +make[2]: *** [spl/u-boot-spl] Error 1 +make[1]: *** [spl/u-boot-spl] Error 2 +build/../lib/fdtdec.
Quoted 6 lines
You can move the position of fdt_support.o in common/Makefile to fix this.
It also bloats SPL on many boards which currently don't need address translation. For example firefly-rk3288 goes from ~20KB to ~26KB.
Can you add an option to enable address translation in SPL perhaps?
Yes, there is OF_TRANSLATE. I have posted v2 with the changes:
https://patchwork.ozlabs.org/patch/740789/
Signature · 2 lines
Regards Vignesh