Skip to content

Comments

BSP: store overlay folder definition to /etc/armbian-release to be used in armbian-config#7198

Merged
igorpecovnik merged 1 commit intomainfrom
overlaydir
Sep 15, 2024
Merged

BSP: store overlay folder definition to /etc/armbian-release to be used in armbian-config#7198
igorpecovnik merged 1 commit intomainfrom
overlaydir

Conversation

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Sep 9, 2024

Description

This way we don't need to calculate yet again. Before merging, we need to figure out which other are used.

Does not add any functionality to build framework.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • Any dependent changes have been merged and published in downstream modules

@igorpecovnik igorpecovnik requested a review from a team as a code owner September 9, 2024 17:30
@igorpecovnik igorpecovnik added Work in progress Unfinished / work in progress 11 Milestone: Fourth quarter release labels Sep 9, 2024
@github-actions github-actions bot added size/small PR with less then 50 lines Hardware Hardware related like kernel, U-Boot, ... Framework Framework components labels Sep 9, 2024
igorpecovnik added a commit to armbian/configng that referenced this pull request Sep 9, 2024
- keep window clean of not needed informations
- fix wront title / backtitle settings
igorpecovnik added a commit to armbian/configng that referenced this pull request Sep 10, 2024
- keep window clean of not needed informations
- fix wront title / backtitle settings
@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge Needs review Seeking for review and removed Work in progress Unfinished / work in progress Ready to merge Reviewed, tested and ready for merge labels Sep 10, 2024
@SuperKali
Copy link
Member

SuperKali commented Sep 12, 2024

@igorpecovnik It might be useful though to create a variable where you can take the overlays for created for each individual board, since at the moment armbian configuration on the environment through armbian-config only takes overlays called rockchip-rk3588-* and this would not make sense "I think" since the boards have different PINs, what do you think?

@igorpecovnik
Copy link
Member Author

You mean listing overlays in board file, like BOARD_OVERLAYS="overlay1,overlay2, ..." ? There are some common, some specific ... perhaps it would be best to apply logic to overlay files itself:
https://github.com/armbian/linux-rockchip/tree/rk-6.1-rkr3/arch/arm64/boot/dts/rockchip/overlay

rk3588-uart8-m1 = common, always there
rock-5a-radxa-camera-4k = displayed only for specific board, so filter can be determined from BOARD variable.

@SuperKali
Copy link
Member

rock-5a-radxa-camera-4k = displayed only for specific board, so filter can be determined from BOARD variable.

Exactly, I don't know if already present such logic, as I'm working in moving the type code to enable dsi0 for display on overlay, and that's why I was wondering if it's already possible to do that by enabling like the youyeetoo-r1-v3-lcd-dsi0.dts overlay within the armbianEnv.txt environment or via armbian-config (which from what I understand will be replaced)

@SuperKali
Copy link
Member

It is currently handled like this:

overlay_prefix=rockchip-rk3588
fdtfile=rockchip/rk3588s-youyeetoo-r1.dtb
overlays=opp-oc-24ghz

Any overlay added in overlays is rewritten with the prefix rockchip-rk3588 and in turn is searched with the name rockchip-rk3588-opp-oc-24ghz where it actually exists, but what if we need to activate an overlay called something else? Also because I see that not all of them start with rockchip-rk3588 as a prefix, but usually have the name board-type-overlay.dts here https://github.com/armbian/linux-rockchip/tree/rk-6.1-rkr3/arch/arm64/boot/dts/rockchip/overlay

@igorpecovnik
Copy link
Member Author

but usually have the name board-type-overlay.dts

We could change "usually" into "mandatory" there. As I don't want to have yet another property to be maintained at armbian framework level. This PR only replaces calculation that used to be done at armbian-config. Also this information is not getting changed just like that, while new overlays are keep coming.

@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Sep 15, 2024
Copy link
Collaborator

@viraniac viraniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igorpecovnik igorpecovnik merged commit 4a1e102 into main Sep 15, 2024
@igorpecovnik igorpecovnik deleted the overlaydir branch September 15, 2024 09:42
@rpardini
Copy link
Member

rpardini commented Sep 15, 2024

This ended up adding stuff to bsp-cli. To avoid disappointments in the future, I suggest adding it; otherwise when changes are made to OVERLAYDIR the bsp-cli won't be rebuilt automatically.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <[email protected]>
Date: Sun, 15 Sep 2024 20:28:53 +0200
Subject: bsp-cli: hash OVERLAYDIR as it is now included in
 /etc/armbian-release

Fixes: 4a1e10219c6f6a0f417ba1a45abe276a675dd85b
---
 lib/functions/artifacts/artifact-armbian-bsp-cli.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/functions/artifacts/artifact-armbian-bsp-cli.sh b/lib/functions/artifacts/artifact-armbian-bsp-cli.sh
index ee028d52f..c5020ee29 100644
--- a/lib/functions/artifacts/artifact-armbian-bsp-cli.sh
+++ b/lib/functions/artifacts/artifact-armbian-bsp-cli.sh
@@ -53,20 +53,21 @@ function artifact_armbian-bsp-cli_prepare_version() {
 		"has_extlinux: ${bootscript_info[has_extlinux]}"
 		"UBOOT_FW_ENV: ${UBOOT_FW_ENV}"                               # not included in bootscript
 		"KEEP_ORIGINAL_OS_RELEASE: ${KEEP_ORIGINAL_OS_RELEASE:-"no"}" # /etc/os-release
 		"BOARDFAMILY: ${BOARDFAMILY}"                                 # /etc/armbian-release
 		"LINUXFAMILY: ${LINUXFAMILY}"                                 # /etc/armbian-release
 		"IMAGE_TYPE: ${IMAGE_TYPE}"                                   # /etc/armbian-release
 		"BOARD_TYPE: ${BOARD_TYPE}"                                   # /etc/armbian-release
 		"INITRD_ARCH: ${INITRD_ARCH}"                                 # /etc/armbian-release
 		"KERNEL_IMAGE_TYPE: ${KERNEL_IMAGE_TYPE}"                     # /etc/armbian-release
 		"VENDOR: ${VENDOR}"                                           # /etc/armbian-release
+		"OVERLAYDIR: ${OVERLAYDIR}"                                   # /etc/armbian-release
 		"BOOT_SOC: ${BOOT_SOC}"                                       # /etc/armbian-release # See https://github.com/armbian/build/pull/6411
 		"hash_vars_no_normalize: ${hash_vars_no_normalize}"           # The non-normalized part, above
 	)
 	declare hash_variables="undetermined" # will be set by calculate_hash_for_variables(), which normalizes the input
 	calculate_hash_for_variables "${vars_to_hash[@]}"
 	declare vars_config_hash="${hash_variables}"
 	declare var_config_hash_short="${vars_config_hash:0:${short_hash_size}}"
 
 	declare -a dirs_to_hash=(
 		"${SRC}/packages/bsp/common" # common stuff
-- 
Armbian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

4 participants