All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Peter Seiderer <ps.report@gmx.net>
Cc: Martin Bark <martin@barkynet.com>,
	Arthur Courtel <arthur.courtel@smile.fr>,
	Mahyar Koshkouei <mahyar.koshkouei@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v5 1/6] package/rpi-firmware: rework boot/config file handling
Date: Sun, 17 Oct 2021 22:21:59 +0200	[thread overview]
Message-ID: <20211017202159.GN2400@scaer> (raw)
In-Reply-To: <20210921202137.7092-1-ps.report@gmx.net>

Peter, All,

On 2021-09-21 22:21 +0200, Peter Seiderer spake thusly:
> Try to be less smart (focused on the one target/one use-case),
> instead reduce the rpi-firmware package to a selectable list
> of (verbatim) installed firmware files.
[--SNIP--]
> With this changes a better support for custom use-cases should
> be possible, specially multi-target SD cards as suggested by
> Stefan Agner ([1]).
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2021-February/303318.html
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Thanks for your persistence in working on this! :-)

[--SNIP--]
> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> index 6a2bf05248..38a84100e9 100644
> --- a/package/rpi-firmware/rpi-firmware.mk
> +++ b/package/rpi-firmware/rpi-firmware.mk
> @@ -10,6 +10,27 @@ RPI_FIRMWARE_LICENSE = BSD-3-Clause
>  RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
>  RPI_FIRMWARE_INSTALL_IMAGES = YES
>  
> +RPI_FIRMWARE_FILES = \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN), bootcode.bin) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI), start.elf fixup.dat) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X), startx.elf fixupx.dat) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD), start_cd.elf fixup_cd.dat) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4), start4.elf fixup4.dat) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X), start4x.elf fixup4x.dat) \
> +	$(if $(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD), start4cd.elf fixup4cd.dat)
> +
> +define RPI_FIRMWARE_INSTALL_BIN
> +	$(foreach f,$(RPI_FIRMWARE_FILES), \
> +		$(INSTALL) -D -m 0644 $(@D)/boot/$(f) $(BINARIES_DIR)/rpi-firmware/$(f)
> +	)
> +endef
> +
> +ifneq ($(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE),)

BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE is a kconfig string, so if the
string is empty, the variable will be "", i.e.e two double quotes, and
this is not empty for make.

I've fixed that by defining the usual qstripped variable.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> +define RPI_FIRMWARE_INSTALL_CONFIG
> +	$(INSTALL) -D -m 0644 $(BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE) $(BINARIES_DIR)/rpi-firmware/config.txt
> +endef
> +endif
> +
>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
>  define RPI_FIRMWARE_INSTALL_DTB
>  	$(foreach dtb,$(wildcard $(@D)/boot/*.dtb), \
> @@ -41,19 +62,10 @@ define RPI_FIRMWARE_INSTALL_TARGET_CMDS
>  endef
>  endif # INSTALL_VCDBG
>  
> -ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI),y)
> -# bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM
> -define RPI_FIRMWARE_INSTALL_BOOTCODE_BIN
> -	$(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin
> -endef
> -endif
> -
>  define RPI_FIRMWARE_INSTALL_IMAGES_CMDS
> -	$(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt
>  	$(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt
> -	$(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf
> -	$(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat
> -	$(RPI_FIRMWARE_INSTALL_BOOTCODE_BIN)
> +	$(RPI_FIRMWARE_INSTALL_BIN)
> +	$(RPI_FIRMWARE_INSTALL_CONFIG)
>  	$(RPI_FIRMWARE_INSTALL_DTB)
>  	$(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS)
>  endef
> -- 
> 2.33.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.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

      parent reply	other threads:[~2021-10-17 20:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 20:21 [Buildroot] [PATCH v5 1/6] package/rpi-firmware: rework boot/config file handling Peter Seiderer
2021-09-21 20:21 ` [Buildroot] [PATCH v5 2/6] board/raspberrypicm4io: enable RTC and USB overlays Peter Seiderer
2021-10-17 20:27   ` Yann E. MORIN
2021-10-17 20:54     ` Peter Seiderer
2021-10-20 19:47       ` Yann E. MORIN
2022-01-13 22:13   ` Thomas Petazzoni
2021-09-21 20:21 ` [Buildroot] [PATCH v5 3/6] board/raspberrypicm4io-64: " Peter Seiderer
2022-01-13 22:13   ` Thomas Petazzoni
2021-09-21 20:21 ` [Buildroot] [PATCH v5 4/6] package/rpi-firmware: add option for the debug set of start/fixup boot files Peter Seiderer
2021-10-17 20:22   ` Yann E. MORIN
2021-09-21 20:21 ` [Buildroot] [PATCH v5 5/6] package/rpi-firmware: convert dtb overlay install loop to make-level foreach loop Peter Seiderer
2021-10-17 20:22   ` Yann E. MORIN
2021-09-21 20:21 ` [Buildroot] [PATCH v5 6/6] package/rpi-wifi-firmware: provide convenience links for RPi3A+, RPi3B+ and RPi4B firmware configuration files Peter Seiderer
2021-10-17 20:23   ` Yann E. MORIN
2021-10-17 20:21 ` 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=20211017202159.GN2400@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=arthur.courtel@smile.fr \
    --cc=buildroot@buildroot.org \
    --cc=mahyar.koshkouei@gmail.com \
    --cc=martin@barkynet.com \
    --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.