Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firmware handling of upstream kernel and Device Tree files #3237

Closed
pelwell opened this issue Sep 17, 2019 · 21 comments
Closed

Firmware handling of upstream kernel and Device Tree files #3237

pelwell opened this issue Sep 17, 2019 · 21 comments

Comments

@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2019

Although most users are unaware of it, the RPi firmware has special support for "upstream" (compiled from source code found on kernel.org) Linux kernels and Device Tree files. Specifically, the upstream_kernel=1 flag can be used to request that the relevant upstream DTB files are loaded, falling back to the downstream variants as necessary and applying the upstream overlay to help bridge the gap between the two worlds.

This mechanism has relied on the fact that the upstream developers have used a different naming convention for their DT files, basing them on the package name (BCM283x) as opposed to the die name (BCM27xx) (*). The Pi 4B SoC chip is called BCM2711 - there is no BCM2838, although the name is guaranteed free for use - and against expectations the upstream devs have chosen to also use bcm2711 as their SoC identifier. This will break the select-by-filename logic used up to now, so an alternative is needed.

Another little-known firmware feature is the ability to request that overlays are loaded from a different subdirectory of the boot partition (on SD card or network share). This is controlled by the overlay_prefix setting, the default for which is overlays/.

A third item for consideration is that it would be useful to be able to store multiple independent operating systems on a single image and select between them at boot time based on a config.txt setting. This would allow (for example) a "recovery" OS for the case when a bad kernel build prevents the device from booting (almost a daily occurrence for me, sometimes). I've recently implemented a physical "64-bit switch" on my daily driver Pi4 that pulls GPIO5 to ground, activating the [gpio5=0] section that sets arm_64bit=1. It would be nice to be able to extend that to multiple alternate builds of the same kernel type, etc.

Pulling these strands together brings me to suggest a new config.txt setting - os_prefix. The default value would be the empty string, but if set it would be prepended to the names of "OS" files. Booting with os_prefix=backup- might load backup-kernel.img, whereas os_prefix=backup/ would cause the firmware to look in the backup directory.

What constitutes an "OS" file? The kernel, .dtbs and cmdline.txt definitely fit the description, and I'm declaring that the firmware files (bootcode.bin, start*.elf, fixup*.dat) don't. Overlays fall into a grey area - making them OS-specific is conceptually cleanest and most flexible, making them common saves a small amount of space. I'm leaning towards a hybrid scheme whereby the firmware looks for ${os_prefix}${overlay_prefix}README(**) and, if found, sets overlay_prefix to ${os_prefix}${overlay_prefix}, otherwise leaving it unchanged. This allows shared and unshared overlays, but prevents a pick-and-mix approach.

The proposal for the handling of upstream files is that setting upstream_kernel=1 has an implicit side-effect of setting os_prefix=upstream/ (unless os_prefix is explicitly set). Putting all upstream kernel files into a subdirectory allows upstream and downstream to coexist, regardless of the names of the individual files.

N.B. os_prefix and upstream_kernel only affect automatic file selection - they have no effect on explicit cmdline=, kernel=, device_tree= and ramfsfile= settings which are always relative to the root of the boot partition (or the network equivalent).

Does anybody have any improvements to suggest or concerns about this approach?

(*) This could be the wrong way round - all that matters is that that each chip effectively has two names.
(**) The network and USB boot mechanisms don't have a way to test for the existence of a directory, only a file (and in the case of a non-directory prefix it wouldn't make sense anyway) so test for the existence of the README instead.

@pelwell
Copy link
Contributor Author

pelwell commented Sep 17, 2019

@MilhouseVH Am I right in thinking that LibreELEC uses a custom overlay_prefix? Does this scheme work for you?

@MilhouseVH
Copy link

@pelwell No, LibreELEC does not use overlay_prefix, and I don't see any issues with your proposed scheme at this stage. @HiassofT do you have any concerns?

@HiassofT
Copy link
Contributor

No concerns from me and I think keeping upstream kernels, device trees etc in a separate directory is a good idea.

That's also the setup I chose quite a while ago when testing upstream kernels on a Raspbian SD card

@lategoodbye
Copy link
Contributor

Thanks for making a suggestion to handle these conflicts. The final goal would be use one DTB for up- and downstream kernel. Without the dwc_otg / dwc2 conflict on the BCM2711 this is much easier to achieve.

Until we reach this point, this sounds like a great improvement.

Btw i plan to submit the first PR for 4.19 to "push" the downstream kernel into the upstream direction. This would contain mostly the upstream DT changes until Linux 5.4.

@lategoodbye
Copy link
Contributor

@mbgg @vianpl Any comments?

@mbgg
Copy link
Contributor

mbgg commented Sep 18, 2019

From the distro perspective (at least talking for openSUSE) we are booting U-Boot, which uses distro_boot. Latter looks for broadcom/bcm2711-rpi-4-b.dtb on the FAT partition. If present it uses this to boot the kernel, otherwise it falls back to the DTB provided by the FW.

So I don't have a need for upstream_kernel=1. My understanding is that os_prefix gets ignored for the kernel if you provide kernel=u-boot.bin explicitly. That's the only thing that could break the way we use config.txt for now.

In general, at openSUSE we use FW -> U-Boot -> Grub boot path, so we handle different kernels through the Grub menu.

@pelwell
Copy link
Contributor Author

pelwell commented Sep 18, 2019

My understanding is that os_prefix gets ignored for the kernel if you provide kernel=u-boot.bin explicitly.

That's correct - I've amended the original post to make that clear.

@lategoodbye
Copy link
Contributor

The promised PR #3244 is available now.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Oct 21, 2019
kernel: irs1125 infineon tof camera support
See: raspberrypi/linux#3261

kernel: unicam fixes for YUYV one to many mappings
See: raspberrypi/linux#3290

kernel: Add w5500 support (for #3276)
See: raspberrypi/linux#3278

firmware: arm_loader: Add os_prefix option
See: raspberrypi/linux#3237

firmware: Add support for arbitrary memory specification
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Oct 21, 2019
kernel: irs1125 infineon tof camera support
See: raspberrypi/linux#3261

kernel: unicam fixes for YUYV one to many mappings
See: raspberrypi/linux#3290

kernel: Add w5500 support (for #3276)
See: raspberrypi/linux#3278

firmware: arm_loader: Add os_prefix option
See: raspberrypi/linux#3237

firmware: Add support for arbitrary memory specification
@pelwell
Copy link
Contributor Author

pelwell commented Oct 29, 2019

After some internal discussion I changed the file location logic to make it simpler (i.e. more consistent) and more flexible. In the new scheme, os_prefix is applied to all OS files (kernels, cmdline.txt, dtbs, initramfs). It is also applied to overlay_prefix, provided ${os_prefix}${overlay_prefix}README exists.

If upstream_kernel=1, the firmware sets os_prefix=upstream/ provided os_prefix hasn't already been set and it can locate the kernel or the dtb there (remember that we can't check for the existence of a directory).

To allow the OS prefix to be skipped, all user-specified filenames may include a leading / character, making the paths absolute w.r.t. the boot directory/FAT partition.

This revised logic is in the most recent firmware release. Please report any issues you find.

@pelwell pelwell changed the title RFC: Firmware handling of upstream kernel and Device Tree files Firmware handling of upstream kernel and Device Tree files Oct 29, 2019
@stiltr
Copy link

stiltr commented Nov 5, 2019

While not quite the original purpose of this issue, I noticed that this lays a lot of the ground work for an A/B rootfs. I am currently using Mender and it requires u-boot to handle booting to the different root partitions / kernels. It looks like with a couple additions to the firmware, u-boot might not be necessary. Is this something you'd be willing to incorporate into the firmware? I know one important feature currently missing is a boot count. At first glance, the rest of the features could be handled through config.txt or possibly a new special file with setting specific to this sort of setup. Is something that might be possible or am I just dreaming?

@pelwell
Copy link
Contributor Author

pelwell commented Nov 6, 2019

The main problem with implementing some kind of boot count is the extremely limited storage that survives a reset - we have 6 bits (yes, bits) to play with. Currently 0x3f means HALT, otherwise it is a partition number for the boot partition. 63 is a huge number of partitions, so there is some scope for, errm... partitioning it, but I think two bits would be the limit.

Please outline how you think such an A/B rootfs ought to work, and we'll see whether it sounds feasible without a huge amount of effort.

@stiltr
Copy link

stiltr commented Dec 6, 2019

Hi @pelwell! Sorry for the delayed response!

I think two bits would work perfectly for the boot count.

The general idea with the A/B setup is to provide atomic image updates than can be rolled back if unsuccessful. New images are written to the secondary root partition and then re-booted into. If successful, it becomes the primary partition. Wash, rinse, repeat.

I've been discussing this with mirzak over on the Mender forum and I think we've got it mostly sorted out. I've done my best to keep this generic. The neat thing is that this would essentially be dual function and would add a nice (optional) recovery feature for people not utilizing an A/B setup. I'll do my best to outline the proposed additions below.

  • A 2-bit counter (bootcount) that would persist across power cycles.
  • A userspace tool that would allow bootcount to be read and reset.
  • 3 new optional flags for config.txt
    • upgrade_available Signals that a new image has been installed and should be booted. Unused in non-A/B scenarios. Defaults to 0 if not specified.
    • bootlimit Sets the threshold for failed boots (set to 1 for A/B setup, 4 if unspecified.)
    • recovery_os_prefix Same idea as os_prefix, but for the "recovery" os.
  • New boot logic approximated below.
if(bootcount<bootlimit && upgrade_available==0)
  //Normal boot
  boot();
elseif(bootcount<bootlimit && upgrade_available==1)
  //Upgrade is pending, boot to it
  os_prefix=recovery_os_prefix;
  boot();
elseif(bootcount>=bootlimit && upgrade_available==1)
  //Upgrade failed, boot normal os
  boot();
elseif(bootcount>=bootlimit && upgrade_available==0)
  //Normal boot failed, fall back to recovery
  /*Note: This may not be the desired behavior in all situations.
  An additional flag was proposed to select this behavior, but it
  could also be handled by modifying the recovery_os_prefix or
  otherwise disabling the "recovery os" in userspace. This would
  keep the code here simple and stop forced "insecure" boots. */
  boot();

Root partitions would be specified in separate cmdline.txt's for each os_prefix. Userspace tools would handle updating the os_prefix and upgrade_available flags before/after updates.

Does this sound like something that might be feasible to incorporate? I'd be thrilled to get rid of my custom version of u-boot in favor of the stock bootloader. If I failed to explain something satisfactorily, just let me know and I'll give it another go. Also, if you'd rather this was submitted as it's own issue, I'm happy to do that as well.

Cheers!

PS
It just occurred to me that rather than having the boot logic in the FW, an alternative might be sections in config.txt like [bootcount=1] or similar. I'm not sure if that's feasible or even a good idea, but I thought I'd mention it as it popped into by head as I was about to hit submit.

netbsd-srcmastr pushed a commit to NetBSD/src that referenced this issue Dec 16, 2019
commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83
Author: popcornmix <popcornmix@gmail.com>
Date:   Wed Dec 11 15:30:08 2019 +0000

and include firmware for RPI4

Firmware has bee updated to support mainline linux kernels as described in
raspberrypi/linux#3237
ryo pushed a commit to IIJ-NetBSD/netbsd-src that referenced this issue Dec 16, 2019
commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83
Author: popcornmix <popcornmix@gmail.com>
Date:   Wed Dec 11 15:30:08 2019 +0000

and include firmware for RPI4

Firmware has bee updated to support mainline linux kernels as described in
raspberrypi/linux#3237
@stiltr
Copy link

stiltr commented Jan 15, 2020

Just checking in to see if there was any movement on this, one way or the other. Thanks!

@pelwell
Copy link
Contributor Author

pelwell commented Jan 16, 2020

Your reply came in at a busy time, and not being at all what I expected it was put to one side for later review. And now a month later I'm reminded why I couldn't just say "yes, sure!".

My original answer was based on the idea of using another few bits of the very scarce reset-proof state, but that doesn't survive a power cycle so could only be used with a user-accessible reset signal (removing the need to pull the power cable in the event of a boot failure). The current firmware never writes to persistent storage, and making it do so is a big step that we are reluctant to take. A boot count, by definition, relies on changing state at every boot (twice, in the event of a successful boot). One can think of journal-like schemes where a pool of sectors is used to spread the load of maintaining the count, but it's still write operations, and that's a road we don't want to go down.

@dividuum
Copy link

The current firmware never writes to persistent storage [...]

The recovery.bin from the eeprom firmware upgrade process renames itself, so at least in theory it seems possible. Maybe keeping the state within a magical filename itself is easier than writing to their content, as that requires fewer indirection and checks? That said: I totally understand and agree with the reluctance to add any more state changing code to the firmware as the seems fragile and probably adds a ton of new error paths and A/B booting is already possible without these changes.

@pelwell
Copy link
Contributor Author

pelwell commented Jan 16, 2020

Ah - recovery.bin is a special case, and doesn't really form part of what I think of as the firmware (start*.elf), although clearly it is. You are right that such a change is possible, but it's not feasibility that's preventing us proceeding - see Ian Malcolm's views on could and should.

@lurch
Copy link
Contributor

lurch commented Feb 3, 2020

ping @agherzan I've just stumbled across this issue and it sounds like it might be of interest to BalenaOS too? 😉

@pelwell A bit of a pie-in-the-sky question, but would there ever be any config.txt settings that somebody might want to set to different values for different OSes? If it doesn't make the logic too complicated, would it be worth adding config.txt filter-sections based on the current value of os_prefix? 🤷‍♂️ (I'm not an OS developer, so this isn't something I'm looking for myself, I'm just playing devil's advocate 😈 )

@agherzan
Copy link
Contributor

@lurch let's ask @ZubairLK and co.

@stiltr
Copy link

stiltr commented Mar 14, 2020

@pelwell, apologies for the extremely delayed reply. While certainly not the news I was hoping for, I completely understand the reluctance to add writing to persistent storage to the firmware. I guess it's back to uboot for me... Thanks again for taking the time to look it over!

@lurch
Copy link
Contributor

lurch commented Mar 19, 2020

@pelwell Does the lovely documentation in raspberrypi/documentation#1433 mean that this feature has now been implemented, and this issue should be closed?

@pelwell
Copy link
Contributor Author

pelwell commented Mar 19, 2020

Yup.

@pelwell pelwell closed this as completed Mar 19, 2020
mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Jan 12, 2021
- firmware: Unicam: Request frequency of 250MHz when running camera use cases

- firmware: arm_loader: Fix UART unmapping

- firmware: uart1: Revert to the old core-frequency-locking method
  See: #1267

- firmware: arm_loader: Provide a sensible device_tree_end default
  See: #1259

- firmware: mmal_ril: Fix size reported on ENOSPC error
  See: #1269

- firmware: hvs: Trigger the EOLn timer at the field rate when interlaced
  See: #1227

- firmware: bootloader_state: Add support for a custom TFTP prefix parameter

- firmware: arm_loader: GIC stub => 2711 stu
- See: #1255

- firmware: arm_loader: Add os_prefix option
  See: raspberrypi/linux#3237

- firmware: Add support for arbitrary memory specification

- firmware: arm_loader: Fix explicit kernel name handling
  See: #1277

- firmware: Added a new display power mailbox call

- firmware: Update display_power gencmd with optional display id
  See: raspberrypi/linux#3050

- firmware: Remove legacy pkgconfig to avoid Mesa conflicts
  See: raspberrypi/userland#585

- firmware: Update display_power gencmd with optional display id

- firmware: sysman: Fix unsafe check for h264 being enabled
  See: popcornmix/omxplayer#749

- firmware: platform: Reduce absolute microvolts threshold to 500000

- firmware: tv_server: Also initialise ts queue on composite
  See: https://forum.kodi.tv/showthread.php?tid=348205

- firmware: Loop to init hotplug

- firmware: hdmi: Change HDMI state machine and BVB clocks as turbo clocks

- firmware: hdmi: Add EOF timeout to unjam failed mode changes

- firmware: platform: Differentiate between boostable and turbo clocks

- firmware: arm_dt: Set WL_ON and BT_ON from .dtb

- firmware: Fixup chosing of bit depth in legacy graphics
  See: raspberrypi/linux#3331

- firmware: vec: Setup WideScreen Signalling outside of copy protection
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=256489

- firmware: Add global reset mailbox

- firmware: 2711: De-couple start.elf clock setup from the bootloader

- firmware: scaler: Correct defines for SCALER_POS0_START_Y_[MASK|SHIFT] (HVS4)

- firmware: platform: Fix missing HDMI PHY power down bit

- firmware: Reduce voltage as part of DVFS

- firmware: arm-loader: Inherit 2711 mac-address from the bootloader
  See: http://git/vc4/vc4/merge_requests/687

- firmware: arm_loader: Respect all required frequencies when throttling

- firmware: Fixup vcgencmd display_power return values

- firmware: platform: Allow fixed voltage with avs_disable=1

- firmware: EMMC: Use PLLD for EMMC for 250MHz host-clock
  See: #1289

- firmware: platform: Round down effective frequencies when they exceed max
  See: #1290

- firmware: arm_loader: Pass video mode via kernel command for composite
  See: #1285

- firmware: Fix lens shading table generation buglet
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=190586&start=75#p1534672

- firmware: hdmi: Use RB2 timing for 2560x1440@60 if pixel clock is 241.5 MHz

- firmware: arm_dt: Look for ethernet0 before ethernet

- firmware: arm_dt: Set PCIe dma-ranges from memory size

- firmware: hdmi: HDMI SM clock must not run slower than audio MAI clock
  See: #1295

- firmware: arm_loader: Pass video mode via kernel command for composite (master)
  See: #1285

- firmware: power: Use Pi4 PMIC values on Pi3+

- firmware: Fix filtered handling of array variables
  See: #1296

- firmware: Update libfdt to v1.5.1+
  See: raspberrypi/userland#582

- firmware: dtoverlay: Extend DT parameter syntax

- firmware: memorymap: Include FW revision in start.elf

- firmware: Fixup for vcgencmd display_power
  See: #1224

- firmware: Add hdmi_wifi_pixel_freq_adj config option

- firmware: Revert mmal: Support 64 bit clients
  See: raspberrypi/userland#586

- firmware: arm_dt/dtoverlay fixes for ARM side camera driver power control

- firmware: arm_ldconfig: Support multiple initramfs files
  See: #1318

- firmware: Add support for backlight enable

- firmware: master: arm_ldconfig: Support multiple initramfs files
  See: #1318

- firmware: power: Make pmicrd/pmicwr available to all

- firmware: platform: Only throttle down from arm_freq

- firmware: platform: Bump desired ring osc to 3.7 on Pi3/CM3

- firmware: arm_loader: Add 2ms delay before resetting SD_IO

- firmware: isp/tuner: Resetting to a lamp mode cancels manual_gains_used_

- firmware: board_info: Fix uninitialised phy_addr handling in network boot

- firmware: IL video_decode: Default to H264 as MPEG4 isn't supported

- firmware: IL egl_render: Fail the create on Pi4

- firmware: arm_dispmanx: Column pitch for YUV10COL is in lines not bytes

- firmware: platform: 2711: Also add chicken bits to dvfs voltage

- firmware: MMAL / video_render: Allow column stride to be set on column formats

- firmware: vc_image/video_decode: Move +16 lines for di_adv from vc_image to decoder

- firmware: platform: 2711: Support overclocking gpu frequencies
  See: #1290

- firmware: gencmd: Fix measure_clock name for CLOCK_OUTPUT_108

- firmware: mmal isp: Remote alignment requirements for RGB24 formats

- firmware: Add missing flags for VC_IMAGE_PROP_YUVUV_4K_CHROMA_ALIGN

- firmware: platform: Compromise on gpu overclock settings
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=262649&start=100#p1610362

- firmware: Add the ability to export labels from overlays

- firmware: loader: 4-byte align initramfs blocks
  See: #1318

- firmware: vd3/video_decode: Do not add 16 lines of context when video is 1920 tall
  See: #1334

- firmware: Allow use of 24 bit framebuffers
  See: #1338

- firmware: arm_loader: Add non-os_prefix cmdline.txt fallback

- firmware: board_info: Set board-info memory size according to SDRAM mode registers

- firmware: arm_loader: Treat min frequencies as optional
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=264786

- firmware: arm_loader: Add overvoltage_delta for manufacture tests

- firmware: Support Isp stats and params

- firmware: arm_loader: Make EMMC2 dma-ranges patch more tolerant

- firmware: bootromfs: Delete unwanted assert

- firmware: usb_eth: Increase timeouts for TFTP requests and retransmit ACK

- firmware: isp component: rtos_common_mem: Fix handle acquire usage with wrap handles

- firmware: il: video_render: Require 4k chroma alignment on YUVUV transpose
  See: #1334

- firmware: vc_image: Don't align the YUVUV pitch to SDRAM pages if not aligning to 4k
  See: raspberrypi/linux#3492

- firmware: isp component: rtos_common_mem: Fix smallalloc test in mem_handle_acquire_if_valid

- firmware: platform: 2711: Make chicken-bit pip size vary with pmic quantum

- firmware: USB device boot for CM4

- firmware: arm_loader: Add SET_LAUNCH_VPU1 mailbox message

- firmware: il: camera: Add config.txt param awb_auto_is_greyworld for NoIR camera
  See: #1167

- firmware: arm_loader: Provisional support for high peris

- firmware: arm_loader: Only add margins to cmdline if non-zero

- firmware: clock: Support clock_measure_pll on pi0-3

- firmware: platform: Back to CLOCK_PLL_CHAN_CPER for emmc on pi0-3

-  firmware: gpu_server: Fixup after LAUNCH_VPU1 commit

- firmware: power: Add a notch to compensate for trim on 2835

- firmware: isp/tuner: Resetting to a lamp mode cancels manual_gains_used_ (master)

- firmware: armstubs: Rebuild with latest source

- firmware: arm_loader: Avoid resetting the GPIO expander

- firmware: vcos_genversion: Fix up legacy variant names

- firmware: dtoverlay: Add overlay_map functionality
  See: raspberrypi/linux#3520

-  firmware: isp_tuner: Add in the slave AWB tuner handling

- firmware: arm_dt: Apply os_prefix to device_tree= files

- firmware: clock_2711: Fix PLL analog setup

- firmware: board_info: Also include CM3+ for pmic trait
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=267576&start=25#p1643032

- firmware: Switch to building from common firmware branch

- firmware: isp: make AGC metering respect the (digital zoom) crop region

- firmware: Avoid linking in khronos on Pi4

- firmware: clock: Reset PLLC after switching VPU to OSC

- firmware: arm_loader: Make 4GB available if arm_peri_high

- firmware: arm_loader: Complete arm_peri_high support
  See: #1374

- firmware: board_info: Split Model B into rev1 and rev2
  See: raspberrypi/linux#3537

- firmware: power: Clamp voltage to platform limits for all power supplies

- firmware: isp: Ensure lens shading (LS) is enabled when a valid LS table is received

- firmware: otp: Fix advanced boot row definition

- firmware: bootcode: Fix issue booting with webcams

- firmware: isp: fix ISP component to return non-zero focus FoMs

- firmware: Fix for IMX477 focal length, f_number and aperture

- firmware: Update firmware for USB MSD boot

- firmware: platform: Fix overflow on high arm overclocks

- firmware: video_encode: Add option to include header bytes with frame

- firmware: DSI display: Close I2C handle if the display doesn't probe

- firmware: mmal/vc: Add mapping for OMX_IndexConfigBufferStall / MMAL_PARAMETER_VIDEO_STALL_THRESHOLD
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=70&t=273123&p=1655481

- firmware: hdmi: Request an I2C interrupt for EDID reading

- firmware: i2c: Move using_interrupt flag into periph_setup

- firmware: camera: Latency reduction for captures

- firmware: IL camera fixes for reduced startup time

- firmware: mmal_ril: Correct a use of portdef.video to portdef.image

- firmware: vc_image: SDRAM page alignment is optional for YUV10_COL
  See: https://forum.libreelec.tv/thread/21985-noise-artefacts-when-playing-back-4k-hevc-video-on-rpi4-le-9-2-1-no-problems-on/

- firmware: imx477: Correct the logic for extending hblank on long exposures

- firmware: il: isp: Ensure HR output is active and ISP is open before starting a frame

- firmware: isp_ctrl: Fail in start_[raw|yuv]_frame if ISP is not idle
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=275489

- firmware: vcfw: Fix PMIC max voltage
  See: https://forum.libreelec.tv/thread/22097-libreelec-leia-9-2-3

- firmware: ISP raw14 and mono input, 16bpc YUV output. Camera subsystem not messing with GPIO0

- firmware: isp: fix assert from initial setting of ISP denoise parameters

- firmware: arm_ldconfig: Don't pad initramfs files
  See: #1395

- firmware: board_info: Add and use BT_FLOWCONTROL trait

- firmware: logging: Add missing checks for uart_output_enabled

- firmware: host_applications: Install debug_sym.h

- firmware: logging: Inherit uart_2ndstage config from the bootloader

- firmware: Fix Pi4 regression in previous build

- firmware: platform: Resolve BT flow control contention
  See: Hexxeh/rpi-firmware#227

- firmware: hdmi: Limit the valid CEA modes to those defined in the table
  See: https://forum.libreelec.tv/thread/22135-regression-raspberry-pi-3-hdmi-output-broken-after-upgrade-to-9-2-x

- firmware: imx477: Add switch to allow switching of on-sensor DPC

- firmware: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET
  See: https://forum.kodi.tv/showthread.php?tid=354589

- firmware: arm_ldconfig: Honour the kernel8 text offset
  See: #1415

- firmware: jpeghw: Skip repeated 0xFF padding bytes between markers
  See: RPi-Distro/vlc#8

- firmware: arm_loader: Allow interlaced HDMI modes from FKMS
  See: raspberrypi/linux#3698

- firmware: arm_loader: Limit rather than reject boosts with disable_auto_turbo

- firmware: i2c: Clearing the TA bit may time out
  See: #1422

- firmware: arm_loader: Add an accelerated memmove

- firmware: arm_loader: memmove kernel to preferred text_offset
  See: #1421

- firmware: filesystem: Fix GPT regression on USB after SD fix
  See: #1420

- firmware: arm_loader: Don't enable the ARM USB IRQ
  See: raspberrypi/linux#3703

- firmware: hdmi: Remove M2MC/BVB min turbo clock request

- firmware: IL: camera: Fix stereoscopic pool allocations

- firmware: arm_loader: Add support for double clock/pixel_rep for FKMS
  See: raspberrypi/linux#3725

- firmware: scalerlib: Set the default chroma location for YUV10 to match 8bit

- firmware: scalerlib: Set chroma_vrep correctly for YUV10COL

- firmware: isp: check the hi-res resize filter mode when the input crop changes

- firmware: arm_loader: Knock 1.7 seconds off boot time
  See: #1375

- firmware: Imx477 external sync signals

- firmware: bootloader: Some tweaks for LED, UART, USB timeouts

- firmware: platform: Avoid vco issue with low arm_freq_min on Pi0-3
  See: #1431

- firmware: arm_loader: Don't try to load to 0 a.k.a. NULL
  See: #1445

- firmware: armstub7: Configure the top 32 STB interrupts

- firmware: dispmanx: Remove elements cleanly that are totally offscreen negatively
  See: raspberrypi/linux#3735

- firmware: hdmi: Set the altered mode, not the caller's mode
  See: #1446

- firmware: dt-blob: Declare CM4 GPIO expander pins

- firmware: clocks: Make frequency_t 64-bit

- firmware: Revert frequency_t: Make 64-bit

- firmware: ISP/tuner: Increase max exposure time for fixed ISO modes on IMX219 and 477
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=281603

- firmware: sdhost_arasan: Ignore DCRC after CMD12
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=282928

- firmware: firmware: frequency_t: Make 64-bit

- firmware: pi4: allow pllb changes while running
  See: #1431

- firmware: board_info: Give the CUSTOM boards the PMIC_NCP6343 trait

- firmware: dispmanx/displays: Allow both DPI and DSI displays simultaneously

- firmware: imx477: Release the I2C semaphore once finished, not before

- firmware: clock: Allow overclocking pllb
  See: raspberrypi/linux#3823

- firmware: hdmi/edid: Reduce the bias to all but the first detailed timing

- firmware: hdmi/edid: Add option to ignore any odd horizontal timings on Pi4

- firmware: sdcard: Hybrid MBR - only select GPT if it is the first primary partition
  See: #1465

- firmware: audioplus: Avoid broken audio when requesting hdmi audio device when using composite display
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=283639

- firmware: platform: Add support for SCB clock and set to 250MHz

- firmware: Revert arm_loader: Move first call to set_turbo after arm->start

- firmware: arm_ldconfig: GZIP-compressed ARMv8 kernel support

- firmware: arm_ldconfig: Restore the fallback load address
  See: #1467

- firmware: ilcamera: Disable timeouts on trigger sink devices

- firmware: genet: Flush RBUF/TBUF and clear mac-address on stop
  See: raspberrypi/linux#3850

- firmware: dmalib: Add support for 40-bit 2d memcpy

- firmware: sdcard: Reduce SD read overhead

- firmware: sdhost_arasan: Increase time threshold before suspend

- firmware: video_decode: Only shutdown codec on both ports being disabled

- firmware: vc_image_helper: Avoid misaligned exception due to uninitialised pointer

- firmware: arm_loader: Make arm clock accesses only see their own boosts
  See: #1469

- firmware: arm_loader: enable simple_fb iff there is a display
  See: raspberrypi/linux#3878

- firmware: arm_loader: Mark V3D early boost as for the ARM
  See: #1469

- firmware: arm_loader: Update armstubs with those from PR 117
  See: raspberrypi/tools#117

- firmware: Revert sdcard: Reduce SD read overhead

- firmware: arm_loader: Add GET/SET_VPU_VECTOR mailbox calls

- firmware: arm_ldconfig: Don't invalidate the dcache for most of memory
  See: #1445

- firmware: arm_loader: Allow arm to see force_turbo and uart boosts

- firmware: hdmi: Timeout HDMI EDID reads

- firmware: pwm_sdm: move modulator to VPU0
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=195178&p=1723639

- firmware: Add tryboot mechanism to provide a fallback if an OS upgrade fails

- firmware: camplus: stills_denoise: Release the VRF between iterations

- firmware: vc_image: Further fixup of fix_alignment
  See: #1334

- firmware: arm_loader: Support large PCIe window with <8GB RAM
  See: https://www.raspberrypi.org/forums/viewtopic.php?p=1759627#p1759627

- firmware: filesys: Close the brfs from filesys_power(..., 0)

- firmware: platform: Avoid vco issue with low arm_freq_min on Pi0-3
  See: #1431

- firmware: video_encode: Allow level 5.0 and 5.1
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=291447

- firmware: xhci: Don't reset BCM2711 XHCI from filesys in start.elf

- firmware: bootcode.bin: Add support for tryboot

- firmware: Switch DA9121 PMIC to PWM mode when ARM > 600 MHz

- firmware: arm_dt: Handle parent interrupt controllers when masking

- firmware: config: Add cm4 and pi400 config section filters

- firmware: MMAL/IL/ISP component: Set the ISP boost frequency once on open

- firmware: sdcard: Remove legacy NOOBS support to support booting from primary partition 4

- firmware: arm_loader: Move 2711 RAM to PCIe address 16GB

- firmware: video_decode: Add parameter to disable timestamp validation

- firmware: Imx477 camera tuning fixes
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=291032#p1770287
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=291032&start=25#p1771066

- firmware: Use DMA40 for PWM audio

- firmware: imx477: Replace existing 720p120 mode with a new 1332x990 120fps mode

- firmware: arm_loader: Allow max_framebuffers=0 to disable framebuffers
  See: #1507

- firmware: dmalib: Allow sdcard to borrow channel 6
  See: #1511
  See: Hexxeh/rpi-firmware#251
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=294932

- firmware: DSI interrupt fixes, and HDMI SM clock for deep colour

- firmware: dmalib: Keep 40-bit DMA clear of L2 alias

- firmware: audioplus: Fix hang when switching destination
  See: #1516

- firmware: HAT/I2C updates

- firmware: MMAL/IL: Add support for the 16bpp Bayer/Grey raw 10/12/14 formats

- firmware: Revert firmware: HAT/I2C updates

- firmware: firmware: MMAL/IL: Add support for the 16bpp Bayer/Grey raw 10/12/14 formats

- Firmware: undo previous reverts
arnout pushed a commit to buildroot/buildroot that referenced this issue Jul 17, 2024
There are two kind of device-tree blobs up to the Rasperry Pi 3[1][2]:
 - the downstream dtbs are named after the die name (i.e. BCM27xx)
 - the upstream dtbs are name after the package name (i.e. BCM283x)

Every defconfigs install exclusively the downstream device-tree blob, at
the exception of the raspberrypi3_64_defconfig that installs both since
the begining.

This removes the upstream device-tree blob for the beauty of
consistency.

Note: It is possible to load the upstream device-tree using the
upstream_kernel property[3].

Raspberry Pi, Compute Module, Raspberry Pi Zero and Raspberry Pi Zero W
use bcm2835 for upstream and bcm2708 for downstream.

Raspberry Pi 2 uses bcm2836 for upstream and bcm2709 for downstream.

Raspberry Pi 2 rev 1.2, Raspberry Pi 3, Compute Module 3/3+ and
Raspberry Zero 2 W use bcm2837 for upstream and bcm2709 for downstream.

Raspberry Pi 4/400 and Compute Module 4/4s uses bcm2711 and Raspberry Pi
5 uses bcm2712.

[1]: raspberrypi/linux#3237
[2]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#flagship-series
[3]: https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html#upstream_kernel

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants