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

bootscript: sunxi: Add a dtb file path analyzer #7484

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

The-going
Copy link
Contributor

@The-going The-going commented Nov 16, 2024

Description

Device tree files and overlay files are interconnected
and always located in the same place, separated by
the overlay subdirectory.
${fdtdir}/${fdtfile}
${fdtdir}/overlay/${overlay_prefix}-${overlay_file}.dtbo

By default, we are trying to download a dtb file from
the /boot/dtb folder, which is a link to the real folder.
Depending on the time and type of build, this link may
point directly to the target folder or to a subdirectory,
i.e. possible path options:
/boot/dtb/overlay
/boot/dtb/allwinner/overlay
In the file armbianEnv.txt we can also see:
fdtfile=sun8i-*.dtb
or
fdtfile=allwinner/sun8i-*.dtb

Thus, when the user has frozen the kernel and updated
the BSP package, or vice versa, updated only the kernel,
the following options are possible in the paths after
their concatenation in the script:
/boot/dtb/sun8i-*.dtb
/boot/dtb/allwinner/sun8i-*.dtb
/boot/dtb/allwinner/allwinner/sun8i-*.dtb
But only one is real.

Define and remember default path variables.
Provide the user with the ability to specify the path
to the target folder as:
fdtdir=/path/to/dir
Check the existence of the dtb file in all reasonable
paths and set the path to it.
If not found, download the default file from the default path.

How Has This Been Tested?

  • Test A
  • Test B

I think I've tested a lot of options.
But it only seems so.

Device tree files and overlay files are interconnected
and always located in the same place, separated by
the overlay subdirectory.
${fdtdir}/${fdtfile}
${fdtdir}/overlay/${overlay_prefix}-${overlay_file}.dtbo

By default, we are trying to download a dtb file from
the /boot/dtb folder, which is a link to the real folder.
Depending on the time and type of build, this link may
point directly to the target folder or to a subdirectory,
i.e. possible path options:
/boot/dtb/overlay
/boot/dtb/allwinner/overlay
In the file armbianEnv.txt we can also see:
fdtfile=sun8i-*.dtb
or
fdtfile=allwinner/sun8i-*.dtb

Thus, when the user has frozen the kernel and updated
the BSP package, or vice versa, updated only the kernel,
the following options are possible in the paths after
their concatenation in the script:
/boot/dtb/sun8i-*.dtb
/boot/dtb/allwinner/sun8i-*.dtb
/boot/dtb/allwinner/allwinner/sun8i-*.dtb

Define and remember default path variables.
Provide the user with the ability to specify the path
to the target folder as:
fdtdir=/path/to/dir
Check the existence of the dtb file in all reasonable
paths and set the path to it.
If not found, download the default file from the default path.

Signed-off-by: The-going <[email protected]>
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

1 participant