feat: add cross-compilation support and Docker containerized builds for kernel packaging - #57
Open
guanquan (GuanquanTian) wants to merge 5 commits into
Conversation
…uisites before clean - Detect a build/host arch mismatch and enable cross builds via dpkg foreign-architecture, the "cross" build profile, and DEB_HOST_ARCH/GNU_TYPE/MULTIARCH propagation. - Factor debian/control generation and native-host-tool-dep patching into scripts/lib/gen-real-control.sh, shared with build-docker-image.sh. - Install fakeroot/debhelper before running `debian/rules clean`, which requires both to run. - Mark native-host build tools (e.g. llvm-*-dev) `:native` via a pattern-keyed NATIVE_HOST_TOOL_DEPS table, and restore debian/control from a backup on exit. - Support OUTPUT_DIR override, and exit with an explicit error message when apt-get build-dep or dch need root but no sudo binary is available. - Add binary-indep to the build targets so the arch:all linux-qcom-headers-* package is produced alongside the flavour packages. Signed-off-by: Guanquan Tian <guanquan@qti.qualcomm.com>
…rfile - Add scripts/Dockerfile.kernel-build, built FROM docker.io/library/ubuntu:resolute (falling back to public.ecr.aws/ubuntu/ubuntu:resolute), with build deps resolved dynamically from the kernel tree's own debian/control via `debian/rules clean`. - Add scripts/build-docker-image.sh to drive it: runs `debian/rules clean` on the host, copies the generated debian/control into a scratch build context, and passes TARGET_ARCH/CROSS build args. - The image is built from a Dockerfile checked into this repo. Signed-off-by: Guanquan Tian <guanquan@qti.qualcomm.com>
…t uid/gid - Build the local image on demand via build-docker-image.sh if not already present. - Bind-mount the current directory, OUTPUT_DIR, SOURCE_DIR's parent (where debian/rules writes .deb/.changes/.buildinfo), and the script directory (read-only). - Run the container as the invoking host uid/gid. - Resolve SOURCE_DIR from the path passed in. - Support OUTPUT_DIR override, created on the host before the container starts. Signed-off-by: Guanquan Tian <guanquan@qti.qualcomm.com>
Add scripts/README.md covering build-kernel-deb.sh, docker-build-kernel.sh, and build-docker-image.sh usage, arguments, environment variables, and cross-compilation notes. Signed-off-by: Guanquan Tian <guanquan@qti.qualcomm.com>
- Pass HTTP_PROXY/HTTPS_PROXY/NO_PROXY as Docker build args, scoped to the individual RUN steps in Dockerfile.kernel-build (not ENV), so they never leak into the built image or its containers. - Document the one-time, per-machine proxy setup and the two new env vars in scripts/README.md. - Note that linux-headers-*-qcom depends on linux-qcom-headers-*, so the latter must be installed first. Signed-off-by: Guanquan Tian <guanquan@qti.qualcomm.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
According to PR # 33 review's feedback, complete the corresponding modifications and add support for setting container content proxies.
#33