-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
extension: add ksrc packaging #8211
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new shell script extension has been added to facilitate packaging the Linux kernel source into a Debian package. The script introduces three primary functions: one to set configuration variables for building the kernel source package, another to add the ✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (3)
extensions/linux-source-package.sh (3)
1-1
: Add a shebang or shell directive
Specify the interpreter to satisfy ShellCheck (SC2148) and ensure consistent execution. For example, add at the top:+#!/usr/bin/env bash
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
19-21
: Scope variables locally and quote values
Uselocal
for function-scoped variables and quote interpolations for safety:-declare kernel_work_dir="${SRC}/cache/sources/${LINUXSOURCEDIR}" -declare CHOSEN_KSRC=linux-source-${BRANCH}-${LINUXFAMILY} +local kernel_work_dir="${SRC}/cache/sources/${LINUXSOURCEDIR}" +local CHOSEN_KSRC="linux-source-${BRANCH}-${LINUXFAMILY}"
31-33
: Quote paths and handle failures when compressing config
Ensure file paths are quoted and errors are propagated:-cp "${SRC}/config/kernel/${LINUXCONFIG}.config" "default_${LINUXCONFIG}.config" -xz < ${kernel_work_dir}/.config > "${sources_pkg_dir}/usr/src/${LINUXCONFIG}_${version}_${REVISION}_config.xz" +cp "${SRC}/config/kernel/${LINUXCONFIG}.config" "default_${LINUXCONFIG}.config" || exit 1 +xz < "${kernel_work_dir}/.config" > "${sources_pkg_dir}/usr/src/${LINUXCONFIG}_${version}_${REVISION}_config.xz" || exit 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
extensions/linux-source-package.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
extensions/linux-source-package.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
[warning] 3-3: ARTIFACT_IGNORE_CACHE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 4-4: KERNEL_GIT appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 16-16: kernel_version_family is referenced but not assigned.
(SC2154)
[warning] 25-25: ret is referenced but not assigned.
(SC2154)
[warning] 25-25: Use single quotes, otherwise this expands now rather than when signalled.
(SC2064)
[warning] 28-28: version is referenced but not assigned.
(SC2154)
🔇 Additional comments (2)
extensions/linux-source-package.sh (2)
3-4
: Verify global variables are used by the build system
ShellCheck flagsARTIFACT_IGNORE_CACHE
andKERNEL_GIT
as unused (SC2034). Confirm these globals are consumed downstream or export/remove them accordingly.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 3-3: ARTIFACT_IGNORE_CACHE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 4-4: KERNEL_GIT appears unused. Verify use (or export if used externally).
(SC2034)
53-58
: VerifyDEB_STORAGE
and enforce error propagation
Ensure that${DEB_STORAGE}
is defined and writable sorsync
doesn't fail silently. Also, make surefakeroot dpkg-deb
errors halt the build (e.g., viaset -e
or|| exit 1
).
local sources_pkg_dir tmp_src_dir | ||
tmp_src_dir=$(mktemp -d) | ||
trap "ret=\$?; rm -rf \"${tmp_src_dir}\" ; exit \$ret" 0 1 2 3 15 | ||
sources_pkg_dir=${tmp_src_dir}/${CHOSEN_KSRC}_${REVISION}_all | ||
mkdir -p "${sources_pkg_dir}"/usr/src/ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve trap quoting and exit handling
The trap uses double quotes causing premature expansion and references ret
before assignment (SC2064, SC2154). A more robust pattern is:
-trap "ret=\$?; rm -rf \"${tmp_src_dir}\" ; exit \$ret" 0 1 2 3 15
+trap 'rc=$?; rm -rf "'"${tmp_src_dir}"'"; exit $rc' 0 1 2 3 15
Alternatively, simplify to:
trap 'rm -rf "${tmp_src_dir}"' EXIT INT TERM
🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 25-25: ret is referenced but not assigned.
(SC2154)
[warning] 25-25: Use single quotes, otherwise this expands now rather than when signalled.
(SC2064)
🤖 Prompt for AI Agents
In extensions/linux-source-package.sh around lines 23 to 27, the trap command
uses double quotes causing premature variable expansion and references the
variable ret before it is assigned. To fix this, replace the double quotes with
single quotes in the trap command to delay expansion, or simplify the trap to
just remove the temporary directory on EXIT, INT, and TERM signals without
capturing the exit code. For example, use trap 'rm -rf "${tmp_src_dir}"' EXIT
INT TERM to ensure proper cleanup without premature expansion or undefined
variable usage.
In the previous branch, the package contained only the archive and additional actions were required locally on the system to make it work. I'll see what I can do about it. |
Add the configuration file for the wifi 8821cu module
…hock 4 updated driver Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 480f49412651059a414a6a5c96887abb1877de8a to c6634ca281a9fc05b03bee224ba00910cb78ab6e. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/changed-files@480f494...c6634ca) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-version: c6634ca281a9fc05b03bee224ba00910cb78ab6e dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [setuptools](https://github.com/pypa/setuptools) from 80.4.0 to 80.8.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](pypa/setuptools@v80.4.0...v80.8.0) --- updated-dependencies: - dependency-name: setuptools dependency-version: 80.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Currently `current` picks 6.6.y kernel baseline, and `edge` picks upstream's 6.12.y tree. Make `current` pick the current SDK release (which, at the moment, is at 11.00.09 baseline), and make `edge` pick the latest un-released RC's from TI's tree. `current` is what most people will use, therefore it should be the same as our official and tested release. `edge` can be either cutting-edge (latest RC) or bleeding-edge (latest commit on cicd branch). For now, keep it cutting-edge. Signed-off-by: Suhaas Joshi <s-joshi@ti.com>
Presently, in k3 devices, we are setting TEE=bl31.bin. However TEE should be set to OPTEE, not ATF. Therefore, do the following: * clone and compile OPTEE * add variables for OPTEE platform and `make` arguments in all k3 board configs * use the compiled binary as TEE to compile U-Boot Signed-off-by: Suhaas Joshi <s-joshi@ti.com>
ATF is currently built in Debug mode for K3 family of devices. This is due to the fact that K3 Armbian images have been experimental so far. However, there is work underway to make Armbian a production-capable environment. Therefore, drop the DEBUG=1 flag from the ATF build command. Signed-off-by: Suhaas Joshi <s-joshi@ti.com>
On v2025.01 and v2025.04 I get the following error starting USB... Bus usb@ff500000: dwc3_meson_gxl_get_phys: usb2 ports: 1 probe failed, error -114 No USB controllers found So revert back to v2024.10 until sorted. Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
* correct system patch used for aliasing on Allwinner A10, A13 and A20 to ensure consistent allocation of device IDs * Re-introduce spi overlays for each bus so that when used in conjuction with a device driver overlay, the pins are correctly muxed into SPI mode * Ensure SPI overlay patches are applied * Fix typo in patch name * Move alias patches further down series.conf to ensure they are only called after the intial overlay creation * Rephrase subject heading to improve clarity * Fix interface aliases on Allwinner A10 for I2C, SPI and UART * Fix interface aliases on Allwinner A13 for I2C and UART * Fix interface aliases on Allwinner A20 for I2C, SPI and UART * Fix SPI 2 pin names in line with latest revision of the Allwinner A10 device tree * Fix SPI 2 pin names in line with latest revision of the Allwinner A20 device tree * Create overlays for each bus on the Allwinner A20 so that the corresponding pins can be set into spi mode * Create overlays for each bus on the Allwinner A10 so that the corresponding pins can be set into spi mode * Condense alias path corrections into the intial overlay creation patch instead of applying a further patch on topof it to enact these corrections * Remove references to our no longer needed addtional overlays * rename to include 'arm-dts..' for consistency with other dts related patches * Fix mistake in SPI overlay patches naming which leads to build failure * Fix typo in application of spi2 overlay that was leading to compilation failure * Amend the assigned aliases in overlay creation so that the kernel correctly maps the bus/port number to match the physical hardware numbering * Update pin labels for SPI 2 to use current names as defined in sun4i-a10.dtsi and sun7i-a20.dtsi. fixed typo in sun5i-a13-spi-spidev as compatibility field should be sun5i-a13 * Re-introduce compilation of spi bus overlays on Allwinner A10 and A20 SOCs which are necessary to ensure that the pins are correctly muxed into spi mode
imb3588 board info link: https://www.sunshine-tek.com/productinfo/1989232.html Signed-off-by: Jack Huang <jackhuang021@gmail.com>
Signed-off-by: Jack Huang <jackhuang021@gmail.com>
Signed-off-by: Jack Huang <jackhuang021@gmail.com>
imb3588 dts has been added to linux-rockchip repo Signed-off-by: Jack Huang <jackhuang021@gmail.com>
* always use http for apt repos * pass possible proxy arguments to docker * populate lower-case env variables with upper-case ones if not set otherwise
…nts and move to supported (armbian#8295) Enables kernel options that are important for making armbian viable for use on PocketBeagle 2. Can now run all examples present in the beagle examples repo: https://github.com/beagleboard/vsx-examples Signed-off-by: Ayush Singh <ayush@beagleboard.org> Andrei Aldea <andrei@beagleboard.org>
* AE for cloud, add description for vendor * fixes
The LTS variant has an HDMI port. Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Change from "y" to "m" Before [ 2.423992] rtc-hym8563 1-0051: no valid clock/calendar values available [ 2.424718] rtc-hym8563 1-0051: registered as rtc0 [ 2.425770] rtc-hym8563 1-0051: no valid clock/calendar values available [ 2.425789] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock [ 3.817166] rk808-rtc rk808-rtc.5.auto: registered as rtc1 After [ 3.790107] rk808-rtc rk808-rtc.5.auto: registered as rtc0 [ 3.801742] rk808-rtc rk808-rtc.5.auto: setting system clock to 2017-08-05T09:48:13 UTC (1501926493) [ 3.919628] rtc-hym8563 1-0051: registered as rtc1 Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
I apologize. I will not take part in this development. |
Description
A (very poorly made) attempt to address #8161
It spits out some sort of kernel source package, but I think
{version}
is still missing since I couldn't get it to work and probably needs more fixes until production-ready. I probably won't go further here due to lacking expertise in framework and bash foo.Maybe someone want to pick it up from here.
Also to do: Re-enable
BUILD_KSRC
switch to enable the extension.How Has This Been Tested?
Checklist: