raspberry:cross-platform-compile:setup-for-different-debian-versions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry:cross-platform-compile:setup-for-different-debian-versions [2026/09/13 08:54] – [Get Raspberry Pi-specific archive GPG Key] oscar | raspberry:cross-platform-compile:setup-for-different-debian-versions [2026/09/13 09:28] (current) – [Links] oscar | ||
|---|---|---|---|
| Line 64: | Line 64: | ||
| * Extract their contents into a target filesystem tree. | * Extract their contents into a target filesystem tree. | ||
| With `--variant=extract`, | With `--variant=extract`, | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| ## Install host tools | ## Install host tools | ||
| On the Debian x86-64 host: | On the Debian x86-64 host: | ||
| Line 99: | Line 103: | ||
| ``` | ``` | ||
| + | ---- | ||
| ## Distribution vs. Revision Strategy | ## Distribution vs. Revision Strategy | ||
| Knowing the target distribution (e.g.Bookworm) is enough to select the correct release, but not necessarily the exact package revisions. A production Pi may not yet have the latest Bookworm security updates available from its repositories. Choose one of these policies: | Knowing the target distribution (e.g.Bookworm) is enough to select the correct release, but not necessarily the exact package revisions. A production Pi may not yet have the latest Bookworm security updates available from its repositories. Choose one of these policies: | ||
| - **Current release policy:** Build against the latest packages currently available for the target release and keep production systems updated to that level. | - **Current release policy:** Build against the latest packages currently available for the target release and keep production systems updated to that level. | ||
| - **Pinned baseline policy:** Pin package versions or repository snapshots to a tested production baseline. | - **Pinned baseline policy:** Pin package versions or repository snapshots to a tested production baseline. | ||
| + | |||
| + | |||
| + | ---- | ||
| ## Inspect the target | ## Inspect the target | ||
| Line 141: | Line 149: | ||
| The output can be copied back to the development host. | The output can be copied back to the development host. | ||
| + | |||
| + | ---- | ||
| ## Raspberry Pi Repositories | ## Raspberry Pi Repositories | ||
| Raspberry Pi OS requires two separate repositories because it combines standard Linux software with custom hardware-specific code created by Raspberry Pi Ltd. | Raspberry Pi OS requires two separate repositories because it combines standard Linux software with custom hardware-specific code created by Raspberry Pi Ltd. | ||
| Line 178: | Line 188: | ||
| deb http:// | deb http:// | ||
| ``` | ``` | ||
| + | |||
| + | ---- | ||
| ## Prepare repository signing keys | ## Prepare repository signing keys | ||
| The following two repositories are essential for the Raspberry Pi, and we need both to be setup on the build host as well: | The following two repositories are essential for the Raspberry Pi, and we need both to be setup on the build host as well: | ||
| Line 260: | Line 272: | ||
| ``` | ``` | ||
| + | |||
| + | |||
| + | ---- | ||
| ## Create Raspberry Pi OS source list | ## Create Raspberry Pi OS source list | ||
| Line 272: | Line 287: | ||
| a new release. | a new release. | ||
| + | ### Disable Source list | ||
| + | To assure that normal Apt operation does not include installing and upgrading Raspberry packages, we need to disable `rpios-bookwork-x-cross-armhf.list`. This is done by renaming the `.list` file extention to `.list.disabled`. This way Apt does not recognize the file and skips it. | ||
| + | To run mmdebstrap, the file extentions has to be changed temporarily. | ||
| + | ``` | ||
| + | # mv rpios-bookwork-x-cross-armhf.list rpios-bookwork-x-cross-armhf.list.disabed | ||
| + | ``` | ||
| + | |||
| + | ---- | ||
| ## Choose target development packages | ## Choose target development packages | ||
| Line 296: | Line 319: | ||
| sysroot by adding `--simulate` to the command in the next section. | sysroot by adding `--simulate` to the command in the next section. | ||
| + | |||
| + | ---- | ||
| ## Resolve and download the sysroot | ## Resolve and download the sysroot | ||
| + | ### Enable Source list | ||
| + | To avoid that normal Apt operation include download Raspberry packages, we renamed the Raspberry repository list file in / | ||
| + | ``` | ||
| + | # mv / | ||
| + | / | ||
| + | ``` | ||
| + | ### Run mmdebstrap | ||
| mmdebstrap (in unprivileged mode) uses unshare --user to create a user namespace where your user is remapped to "fake root" (UID 0) inside the namespace. It relies on mapping entries in /etc/subuid and / | mmdebstrap (in unprivileged mode) uses unshare --user to create a user namespace where your user is remapped to "fake root" (UID 0) inside the namespace. It relies on mapping entries in /etc/subuid and / | ||
| ``` | ``` | ||
| Line 321: | Line 353: | ||
| `mmdebstrap` downloads and extracts the requested packages and their hard dependencies. It does not modify the production Pi or install these packages into the host root filesystem. | `mmdebstrap` downloads and extracts the requested packages and their hard dependencies. It does not modify the production Pi or install these packages into the host root filesystem. | ||
| + | ### Disable Source list | ||
| + | After mmdebstrap has completed, move the `.list` file to `.list.disabled`. This extention assures that normal Apt operation does not include download Raspberry packages. | ||
| + | ``` | ||
| + | # mv rpios-bookwork-x-cross-armhf.list rpios-bookwork-x-cross-armhf.list.disabed | ||
| + | ``` | ||
| + | ### Insprect sysroot | ||
| Inspect the important paths: | Inspect the important paths: | ||
| - | |||
| ``` | ``` | ||
| $ find " | $ find " | ||
| Line 341: | Line 378: | ||
| ``` | ``` | ||
| + | |||
| + | ---- | ||
| ## Compile a direct GCC test | ## Compile a direct GCC test | ||
| Line 380: | Line 419: | ||
| and run it there before using the environment for production releases. | and run it there before using the environment for production releases. | ||
| + | |||
| + | ---- | ||
| ## CPU compatibility warning | ## CPU compatibility warning | ||
| Line 414: | Line 455: | ||
| Never combine armhf and arm64 files in one sysroot. | Never combine armhf and arm64 files in one sysroot. | ||
| + | |||
| + | ---- | ||
| ## Links | ## Links | ||
| * [[https:// | * [[https:// | ||
raspberry/cross-platform-compile/setup-for-different-debian-versions.1789289659.txt.gz · Last modified: by oscar
