scripts: add makeusr.sh for bitbake-free cmake+make of the user space#300
Open
daniel-rossier wants to merge 1 commit into
Open
scripts: add makeusr.sh for bitbake-free cmake+make of the user space#300daniel-rossier wants to merge 1 commit into
daniel-rossier wants to merge 1 commit into
Conversation
Add a standalone helper, on PATH after `. env.sh`, that rebuilds a usr/
directory with plain cmake+make instead of invoking bitbake. Run it from
so3/usr or linux/usr; it operates on $PWD and auto-detects the context:
- so3/usr: musl toolchain (in-tree <cpu>-linux-musl.cmake), honours
.ib_last_arch (wipes build/ on arch switch), deploys
*.elf + out/* into build/deploy/.
- linux/usr: buildroot toolchain + CMAKE_KERNEL_PATH, also builds the
out-of-tree kernel modules and deploys hello + *.ko + the
SOO s3c-* apps into build/deploy/root/.
It faithfully reproduces the do_build/do_install_apps of the usr-so3 and
usr-linux recipes, stopping at the local deploy (build/deploy); pushing into
the rootfs image still needs the bitbake do_deploy. The kernel-module build
deliberately passes neither ARCH nor CROSS_COMPILE so the compiler resolves
from the kernel Makefile defaults / PATH, matching the toolchain the kernel
was built with.
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.
What
Adds
scripts/makeusr.sh, a standalone helper (on PATH after. env.sh) thatrebuilds a
usr/directory with plain cmake+make instead of invokingbitbake — for a fast edit/build loop on the user-space apps.
Run it from
so3/usrorlinux/usr; it operates on$PWDandauto-detects the context by the parent directory name:
build/deploy)so3/usr<cpu>-linux-musl.cmake)-DMICROPYTHON; honours.ib_last_arch(wipesbuild/on arch switch)*.elf+out/*linux/usrtoolchainfile.cmake)-DCMAKE_KERNEL_PATH; builds out-of-tree kernel moduleshello+*.ko+ SOOs3c-*→deploy/root/It faithfully reproduces the
do_build/do_install_appsof theusr-so3and
usr-linuxrecipes (meta-usr), stopping at the local deploy(
build/deploy); pushing into the actual rootfs image still needs the bitbakedo_deploy(mount + sudo rsync).Notes
ARCHnorCROSS_COMPILE— the kernel Makefile is patched withARCH ?= arm64/CROSS_COMPILE ?= aarch64-none-linux-gnu-, so thecompiler resolves from PATH, matching the toolchain the kernel was built
with. Forcing
CROSS_COMPILEfromlinux/rootfs/host/binpicks theuserspace buildroot gcc and triggers a "compiler differs" warning.
-a aarch64|arm,-t Debug|Release,-p <platform>,-m(micropython),
-c(reconfigure),-M(skip modules),-C(clean),-j N,-h.Test
Verified end-to-end in both contexts (bare-name invocation after
. env.sh):so3/usr→ 21*.elfinbuild/deploy/linux/usr→ apps +modtry.ko(aarch64) +s3c-*inbuild/deploy/root/