All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: buildroot@buildroot.org
Cc: Peter Seiderer <ps.report@gmx.net>
Subject: Re: [Buildroot] [PATCH] package/rpi-firmware: add option to use custom cmdline.txt
Date: Mon, 31 Oct 2022 13:13:26 +0100	[thread overview]
Message-ID: <20221031121326.GA1058960@scaer> (raw)
In-Reply-To: <20220724131202.1364133-1-yann.morin.1998@free.fr>

All,

On 2022-07-24 15:12 +0200, Yann E. MORIN spake thusly:
> Currently, the cmdline.txt file is installed in $(BINARIES_DIR) by the
> rpi-firmware package. Overriding files in there can not be done with an
> overlay (which only applies to $(TARGET_DIR)), and thus requires using
> either a post-build or post-image script, which is not always very
> practical when a custom file must be used.
> 
> Like was done in 689b9ac439ab (package/rpi-firmware: rework boot/config
> file handling) for config.txt, add an option to allow users to specify
> the path to a custom cmdline.txt.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Peter Seiderer <ps.report@gmx.net>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  .../rpi-firmware => board/raspberrypi}/cmdline.txt     |  0
>  package/rpi-firmware/Config.in                         |  7 +++++++
>  package/rpi-firmware/rpi-firmware.mk                   | 10 +++++++++-
>  3 files changed, 16 insertions(+), 1 deletion(-)
>  rename {package/rpi-firmware => board/raspberrypi}/cmdline.txt (100%)
> 
> diff --git a/package/rpi-firmware/cmdline.txt b/board/raspberrypi/cmdline.txt
> similarity index 100%
> rename from package/rpi-firmware/cmdline.txt
> rename to board/raspberrypi/cmdline.txt
> diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in
> index 8070dc3019..a9aeaed745 100644
> --- a/package/rpi-firmware/Config.in
> +++ b/package/rpi-firmware/Config.in
> @@ -69,6 +69,13 @@ config BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE
>  	  Path to a file stored as config.txt in the boot partiton
>  	  of the generated SD card image.
>  
> +config BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE
> +	string "Path to a file stored as boot/cmdline.txt"
> +	default "board/raspberrypi/cmdline.txt"  # legacy
> +	help
> +	  Path to a file stored as cmdline.txt in the boot partiton
> +	  of the generated SD card image.
> +
>  config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS
>  	bool "Install Device Tree Blobs (DTBs)"
>  	default y
> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> index d4d1d07b3f..6f5902fd52 100644
> --- a/package/rpi-firmware/rpi-firmware.mk
> +++ b/package/rpi-firmware/rpi-firmware.mk
> @@ -35,6 +35,14 @@ define RPI_FIRMWARE_INSTALL_CONFIG
>  endef
>  endif
>  
> +RPI_FIRMWARE_CMDLINE_FILE = $(call qstrip,$(BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE))
> +ifneq ($(RPI_FIRMWARE_CMDLINE_FILE),)
> +define RPI_FIRMWARE_INSTALL_CMDLINE
> +	$(INSTALL) -D -m 0644 $(RPI_FIRMWARE_CMDLINE_FILE) \
> +		$(BINARIES_DIR)/rpi-firmware/cmdline.txt
> +endef
> +endif
> +
>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>  define RPI_FIRMWARE_INSTALL_DTB
>  	$(foreach dtb,$(wildcard $(@D)/boot/*.dtb), \
> @@ -79,9 +87,9 @@ endef
>  endif # INSTALL_VCDBG
>  
>  define RPI_FIRMWARE_INSTALL_IMAGES_CMDS
> -	$(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt
>  	$(RPI_FIRMWARE_INSTALL_BIN)
>  	$(RPI_FIRMWARE_INSTALL_CONFIG)
> +	$(RPI_FIRMWARE_INSTALL_CMDLINE)
>  	$(RPI_FIRMWARE_INSTALL_DTB)
>  	$(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS)
>  endef
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-10-31 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 13:12 [Buildroot] [PATCH] package/rpi-firmware: add option to use custom cmdline.txt Yann E. MORIN
2022-10-31 12:13 ` Yann E. MORIN [this message]

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=20221031121326.GA1058960@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=ps.report@gmx.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.