Feature #1217
closedUtilize latest features of Buildroot
100%
Description
There are a number of items I can use to improve PiBox.
This list will expand over time.Use a skeleton overlay directory instead of the customize packageBuild out of treeAdd make buildroot-pkg-statsAdd make buildroot-show-infoAdd make buildroot-graph-depends manual.html#_graphing_the_dependencies_between_packagesAdd make buildroot-graph-sizeInstall toolchain to ~/toolchain/version using deb toolsInstall Buildroot staging tree to ~/.cache/pibox for use by package builds.Build buildroot before kernel - kernel tools often depend on sysroot/rootfs toolsUse squashfs packaging of firmware and userland and add via an overlay setupUse proper package directoriesUse patch directoriesFix rundock to run BASH from the current directory (re: use -w option).Add -targets to component and top level builds. Use .target to hide targets that shouldn't be called directly.
Related issues
Updated by Hammel about 2 months ago
- Related to Feature #1100: Update lightsw registration to match new imrest requirements. added
Updated by Hammel about 2 months ago
- Related to deleted (Feature #1100: Update lightsw registration to match new imrest requirements.)
Updated by Hammel about 2 months ago
- Related to Action Item #775: Check if migration to Buildroot recommended customizations is warranted added
Updated by Hammel 22 days ago
Buildroot target support¶
-show-info is implemented and working.
The other new targets have problems:
$ make buildroot-graph-depends ERROR: The 'dot' program from Graphviz is needed for graph-depends make[1]: *** [Makefile:881: graph-depends-requirements] Error 1 make: *** [configs/buildroot.mk:258: buildroot-graph-depends] Error 2 $ make buildroot-graph-size /bin/bash: line 1: mkdir: No such file or directory make[1]: *** [Makefile:896: graph-size] Error 127 make: *** [configs/buildroot.mk:265: buildroot-graph-size] Error 2 $ make buildroot-pkg-stats /usr/bin/env: 'python3': No such file or directory make[1]: *** [Makefile:925: pkg-stats] Error 127 make: *** [configs/buildroot.mk:258: buildroot-pkg-stats] Error 2
It appears these won't work with the version of Buildroot in use currently. I'll probably need to bump the Buildroot version. There are targets in place that are disabled for these features until that is done.
Updated by Hammel 21 days ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Buildroot customize overlay¶
To use custom skeleton overlays:¶
Disable System>RootFS Skeleton-Remove configuration for System>custom target skeleton path-Add package/customize/skeleton as a path to System>Root filesystem overlay directories-Update buildroot.mkrebuild target deletes and recopies skeleton directory (no need to clean up target anymore)Update -preconfig-customizeUpdate -preconfig to remove kernel modules (they will be installed as an overlay lowerdir instead)Update -preconfig to remove gles (they will be installed as an overlay lowerdir instead)
After that's done, we still need these¶
Generate kernel modules as squashfs for use in overlayRemove GLES build - it's now handled by Buildroot with rpitoolsAdd kernel modules squashfs to install script.Update Busybox init script to mount kernel modules squashfs file and add it to overlay.Check if CUSTOMSRC is still needed in post-build.sh
Testing¶
Build old system that way it was for referenceBuild new systemCompare files and SD installationsBoot both on hardware (rpi3)
Notes¶
- Testing buildroot.mk updates (1-4)
libpibox fails because of incorrect use of relative addressing when including "pibox.h" in pbgetdisplay.c. Setting #define PTESTS before including pibox.h fixes the problem.libpibox fails because libpibox.mk in Buildroot package copies pbgetdisplay, but the build isn't generating it.
- Bumping to 2015.05.01
- glib2 build fails due to odd include path:
- /home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2025.05.1.bld/staging/arm-buildroot-linux-gnueabihf/sysroot/home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2025.05.1.bld/staging/arm-buildroot-linux-gnueabihf/sysroot/home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2025.05.1.bld/staging/arm-buildroot-linux-gnueabihf/sysroot/usr/include
- glib2 build fails due to odd include path:
Updated by Hammel 18 days ago
- Related to Feature #1215: Create a package for libleak and remote logging added
Updated by Hammel 18 days ago
- Related to deleted (Feature #1215: Create a package for libleak and remote logging)
Updated by Hammel 18 days ago
- Blocked by Feature #1215: Create a package for libleak and remote logging added
Updated by Hammel 17 days ago
Kernel modules packaging¶
This might need to be split into modules and firmware to make it easier to upgrade.
kernel.cfg:KERNEL_BLDDIR = $(BLDDIR)/$(KERNEL_VERSION).bldKERNEL_MODULES_PKG = modules.squashfs
mkdir -p $(KERNEL_BLDDIR)/kernel-pkg:rsync -a $(KERNEL_SRCDIR)/modules/ $(BLDDIR)/$(KERNEL_VERSION).bldsudo mksquashfs $(KERNEL_BLDDIR)/ $(PKGDIR)/$(KERNEL_MODULES_PKG) -comp xz -noappend -all-root
Updated by Hammel 17 days ago
GLES¶
This is actually the rpitools that buildroot now generates. But it was a subset of that. The rpitools that was in buildroot.mk was the rest of it. The rpitools in Buildroot proper builds all of it.
That means that both the buildroot.mk:buildroot-rpitools target and the gles.cfg/gles.mk can go away now.
The rpifirmware.cfg/rpifirmware.mk are the files that go into /boot/firmware. That should stay as it is.
Update¶
GLES is disabled in config.mk, but .cfg/.mk files have not been deleted yet.
Updated by Hammel 17 days ago
- Description updated (diff)
Installing toolchain¶
Package as .debCurrent packaging just includes the toolchain/bin. It needs to include all of blddir/crosstool.bld/install, sans he build.log.
Install to ${HOME}/.pibox/$(hw)/toolchain (re: XCC_INSTALL_DIR)Include uninstall supportInclude show installed support
Default PiBox builds to use installed toolchain instead of local build.Do this in xcc.cfg by setting the XCC_PREFIXDIR using overrides, in this orderInitialize to XCC_INSTALL_DIRIf XCC_DIR is set, use a local build ($(XCC_BLDDIR)/install)If XI is set, use that
Default component builds continue to use XCC_PREFIXDIR.- Apps will use the following, in this order of precedence
- Default to ~/.pibox/$(HW)/toolchain (requires setting -b <rpi|rpi2|rpi4|xeon> (re: board to reference HW) option in cross.sh or BOARD= in environment for GNU Make)
- XI if set in the environment
- the -t option if set
This is probably where I should make apps build via the shared docker image but I'll leave that for a separate issue.
Updated by Hammel 17 days ago
Package and Patch directories¶
These are not necessary currently. The packages added by PiBox are correctly added by Buildroot standards. The patches applied by PiBox are to Buildroot files, not patches to packages managed by Buildroot. The latter would use the patch directories suggested by this task.
So this can be marked done too.
Updated by Hammel 11 days ago
- Blocked by deleted (Feature #1215: Create a package for libleak and remote logging)
Updated by Hammel 11 days ago
- Blocks Feature #1215: Create a package for libleak and remote logging added
Updated by Hammel 7 days ago
- % Done changed from 70 to 90
One last full test build, then test on hardware, before closing this issue.
Build is in progress.
After this test the toolchain can be removed from the pkg target. It should be built on it's own and installed manually before the pkg target is run.
Updated by Hammel 5 days ago
Build completed but only after fixing toolchain to properly use build directories during build and not the install directories during the build.
Also, removed toolchain from pkg meta target. Toolchains must now be built and installed separately from the rest of PiBox.
Still requires a test on target hardware.