Project

General

Profile

Actions

Feature #1224

open

Port all apps to use installed toolchain.

Added by Hammel 24 days ago. Updated 16 days ago.

Status:
In Progress
Priority:
Immediate
Assignee:
Category:
00 - Basic Build Issues
Target version:
Start date:
13 Sep 2025
Due date:
% Done:

20%

Estimated time:
Severity:
01 - Critical

Description

This just means that the "-t" option or the TC variable should default to the installation directory for the toolchain.
However, we need to know which hardware we're building for, so all cross.sh need a -b (for "board") option added that can be one of
  1. rpi1
  2. rpi2 (for rpi2, rpi3)
  3. rpi4
  4. xeon

It might be worthwhile to add common code to a sourced script in the toolchain tree. Then all the cross.sh could do "source <toolchain>/common.sh" and Makefiles could include <toolchain>/common. Or these could go in the higher level ~/.pibox, since these would be board inspecific common bits.


Related issues

Blocked by PiBox - Feature #1225: rundock updates to avoid interactive shellClosedHammel14 Sep 2025

Actions
Actions #1

Updated by Hammel 23 days ago

  • Blocked by Feature #1225: rundock updates to avoid interactive shell added
Actions #2

Updated by Hammel 23 days ago

  • % Done changed from 0 to 20

Support for GNU Make builds has been added with the app-defs.mk installation via the xcc-install target. That file can be included in config.mk for GNU Make based builds. See libleak for an example. The use of this can greatly simplify the GNU Make based builds.

Support for autoconf based builds is in development. It isn't clear if the app-defs.mk can be integrated into the .am files or if a shell script will need to be created that slurps it in an parses it into something cross.sh can utilize.

Actions #3

Updated by Hammel 23 days ago

  • Status changed from New to In Progress
Actions #4

Updated by Hammel 20 days ago

There are now two template implementations for using the new installed toolchain and staging tree.
libleak shows how to use them with GNU Make based builds.
picam shows to use them with autoconf based builds.
The set of builds to port to each example are taken from the metabuild configurations.

GNU Make builds to port (these support -showconfig in cross.sh)

  • mjpg-streamer : cmake example
  • omxplayer
  • pmsui
  • piboxwww : supports -P for PiSentry
  • psplash : supports -T to enable for TFT displays
  • piconf : supports -S <system> - needs fix to clamp to known values
  • ironman+www : supports -S <system>
  • ironman+monitor
  • ironman+ironmancfg
  • lcdshow
  • libleak

Autoconf builds to port (these do not have -showconfig support in cross.sh)

  • appmgr : supports -P for PiPlayer
  • launcher supports
    -f             Force use of colored icons
    -k             Make a kiosk launcher
    -p             Make a piplayer launcher
    -P             Make a piplayer launcher but add terminal app
    -s             Show the config used to run the build.
    -T             Install test configs with app
    -x             Make a xeon launcher
    
  • libpibox
  • pigtk
  • piboxd
    -a             If set, then package for AutoKiosk System.
    -p             If set, then package for PiPlayer System.
    -S             If set, then package for PiSentry System.
    -x             If set, then package for Xeon System.
    
  • piclock : supports -P for PiPlayer
  • pipics
  • pnc
  • videofe
    -k num         Kiosk modes
                   0: Non-kiosk (normal media center mode)
                   1: touchscreen kiosk (video picture frame)
                   2: auto-kiosk (auto-starting, looping videos)
    
  • musicfe
  • picam : supports -P for PiSentry
  • pixm
  • pinet : supports
    -S             Set the SSID for the node.
    -x             Enable use on Xeon.
    
  • ironman+imrest
  • ironman+sensors
  • raspi2fb
  • pistore
  • pistore+pistoreweb
  • (xeon) pidialer - needs xeon build ported to install toolchain and staging tree.
After these are done, the metabuilds need to be updated to support the changed build processes, specifically by using cross.sh on all apps.
Then the various sandboxes need to be updated, rebuilt and installed.
Then the metabuilds for apps needs to be tested against each board type. A -b option for boards needs to be added, which will also determine which Systems are meaningful to the build.
  • rpi1
    • Player
    • Kiosk
    • AutoKiosk
  • rpi2
    • autokiosk
    • ironman
    • kiosk
    • media
    • pisentry
    • pistore
    • player
  • rpi4
    • media
    • pisentry
  • xeon

Finally, the new builds + apps need to be tested on hardware.

RM #1224: Migrated to app-defs.mk + docker + cross.sh usage.
RM #1224: Disable AC features of app-defs.mk.

Build:
./cross.sh -b rpi2
./cross.sh -s -b rpi2
./cross.sh -d -b rpi2
./cross.sh -b rpi -t "clobber app-init"
./cross.sh -c

Other options are app specific, such as -T or -S.

Actions #5

Updated by Hammel 16 days ago

cmake programs need to be told where the toolchain stuff is.

First, take a look at these examples and this explanation. The latter gives an example that could be turned into a template under $(HOME)/.pibox. The app-defs.mk can copy this to the top of the build directory and replace tags with build specifics, like the toolchain and staging tree locations based on select board for the build. Then cmake builds can references it

-DCMAKE_TOOLCHAIN_FILE=$(stage)/$1/toolchain.cmake

But this doesn't actually set the pkg-config stuff, just the toolchain stuff.

If it can be set in the environment and used by cmake, try this.

    PKG_CONFIG_LIBDIR=${STAGING_DIR}/usr/lib/pkgconfig:${STAGING_DIR}/usr/share/pkgconfig
    PKG_CONFIG_SYSROOT_DIR=$STAGING_DIR

Alternatively, try modifying this and passing it as

-DCMAKE_TOOLCHAIN_FILE=$(stage)/$1/toolchain.cmake
string(REPLACE "/share/cmake" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSROOT ${RELOCATED_HOST_DIR}/sysroot)
set(CMAKE_FIND_ROOT_PATH ${RELOCATED_HOST_DIR}/sysroot)
set(CMAKE_PROGRAM_PATH ${RELOCATED_HOST_DIR}/../tools/bin)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_COMPILER aarch64-qsys-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-qsys-linux-gnu-g++)
set(PKG_CONFIG_EXECUTABLE aarch64-qsys-linux-gnu-pkg-config)
Actions

Also available in: Atom PDF