Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Stéphane Veyret" <sveyret@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] rpi-firmware: do not rename startup files
Date: Wed, 24 Jun 2020 21:35:31 +0200	[thread overview]
Message-ID: <20200624193531.27761-1-sveyret@gmail.com> (raw)

Bug: 13026

When booting, a Raspberry Pi will load the appropriate start files,
depending on the provided configuration. For example, if the config.txt
file contains:
gpu_mem=16
the board will automatically load the cut-down startup files
(start_cd.elf and fixup_cd.dat on non-Rpi4).

Unfortunately, even when the appropriate version is selected in the
configuration menu (in this example,
BR2_PACKAGE_RPI_FIRMWARE_BOOT="_cd") if the rpi-firmware makefile takes
the good files, it renames them to non-qualified, i.e. start.elf and
fixup.dat. But as these are not the files searched by the Raspberry Pi,
the board will not start.

Signed-off-by: St?phane Veyret <sveyret@gmail.com>

---
Changes v1 -> v2:
  - update config.txt instead of keeping firmware name, as suggested by
    Yann E. MORIN. Note that this requires to update the name anyway
    for RPi 4.
---
 package/rpi-firmware/config.txt      | 5 +++++
 package/rpi-firmware/rpi-firmware.mk | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/rpi-firmware/config.txt b/package/rpi-firmware/config.txt
index 58cc966a87..8121624a78 100644
--- a/package/rpi-firmware/config.txt
+++ b/package/rpi-firmware/config.txt
@@ -18,3 +18,8 @@ disable_overscan=1
 gpu_mem_256=100
 gpu_mem_512=100
 gpu_mem_1024=100
+
+# We always use the same name, the real used variant is selected by
+# BR2_PACKAGE_RPI_FIRMWARE_{DEFAULT,X,CD}
+start_file=start.elf
+fixup_file=fixup.dat
diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
index 6ad67ab0e5..b412b08cff 100644
--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -44,8 +44,8 @@ endif # INSTALL_VCDBG
 ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4),y)
 # bootcode.bin is not used on rpi4, because it has been replaced by boot code in the onboard EEPROM
 define RPI_FIRMWARE_INSTALL_BOOT
-	$(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start4.elf
-	$(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup4.dat
+	$(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf
+	$(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat
 endef
 else
 define RPI_FIRMWARE_INSTALL_BOOT
-- 
2.26.2

             reply	other threads:[~2020-06-24 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 19:35 Stéphane Veyret [this message]
2020-06-25 21:58 ` [Buildroot] [PATCH v2] rpi-firmware: do not rename startup files Yann E. MORIN

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=20200624193531.27761-1-sveyret@gmail.com \
    --to=sveyret@gmail.com \
    --cc=buildroot@busybox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox