From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS
Date: Fri, 10 Jan 2020 11:39:45 -0500 [thread overview]
Message-ID: <20200110163945.GN31026@bill-the-cat> (raw)
In-Reply-To: <20200108213833.10869-1-agust@denx.de>
On Wed, Jan 08, 2020 at 10:38:32PM +0100, Anatolij Gustschin wrote:
> This can be used for device tree size reduction similar as
> CONFIG_OF_SPL_REMOVE_PROPS option. For tbs2910 board this
> shrinks the image size: all -2304.0 bss -16.0 text -2288.0
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> dts/Kconfig | 8 ++++++++
> scripts/Makefile.lib | 3 ++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/dts/Kconfig b/dts/Kconfig
> index 64c98dd723..49224bee93 100644
> --- a/dts/Kconfig
> +++ b/dts/Kconfig
> @@ -311,6 +311,14 @@ config OF_SPL_REMOVE_PROPS
> can be discarded. This option defines the list of properties to
> discard.
>
> +config OF_REMOVE_PROPS
> + string "List of device tree properties to drop"
> + depends on OF_CONTROL
> + default "interrupt-parent interrupts" if PINCTRL
> + help
> + Some properties are not used by U-Boot and can be discarded.
> + This option defines the list of properties to discard.
> +
> config SPL_OF_PLATDATA
> bool "Generate platform data for use in SPL"
> depends on SPL_OF_CONTROL
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 4ea898a421..3b124369ad 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -235,7 +235,8 @@ $(obj)/%.tab.h: $(src)/%.y FORCE
> # ===========================================================================
>
> quiet_cmd_shipped = SHIPPED $@
> -cmd_shipped = cat $< > $@
> +cmd_shipped = cat $< | $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \
> + $(addprefix -P ,$(subst $\",,$(CONFIG_OF_REMOVE_PROPS)))
>
> $(obj)/%: $(src)/%_shipped
> $(call cmd,shipped)
On further thinking, this will make it harder in the case of passing the
DTB directly to the kernel. We should guard this option by something
else first.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/2043dfdd/attachment.sig>
next prev parent reply other threads:[~2020-01-10 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 21:38 [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS Anatolij Gustschin
2020-01-08 21:38 ` [PATCH 2/2] tbs2910: add custom CONFIG_OF_REMOVE_PROPS list to defconfig Anatolij Gustschin
2020-01-09 12:06 ` Soeren Moch
2020-01-08 21:57 ` [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS Tom Rini
2020-01-10 16:39 ` Tom Rini [this message]
2020-01-10 17:01 ` Masahiro Yamada
2020-01-12 14:08 ` Anatolij Gustschin
2020-01-10 19:13 ` Masahiro Yamada
2020-01-10 19:49 ` Tom Rini
2020-01-12 14:06 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200110163945.GN31026@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox