Current Software Specifications: Difference between revisions
Hiiripollo (talk | contribs) No edit summary |
Hiiripollo (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
= Software Stack: From First Boot to Full Distribution = | = Software Stack: From First Boot to Full Distribution = | ||
'''Note: This is an initial draft of the software roadmap for the PowerPC Notebook project. | '''Note: This is an initial draft of the software roadmap for the PowerPC Notebook project. At this stage, this is more of brain dump, rather than a polished roadmap. Contributions and comments are welcome.''' | ||
'''Target architecture: | |||
'''Target architecture: PPC64 Big Endian.''' | |||
== Introduction == | == Introduction == | ||
The software stack for the PowerPC Notebook is a critical enabler for the hardware. Our challenge is to bring up a modern, open-source Linux system on non-mainstream architecture (PowerPC), using a custom motherboard based on the NXP T2080 SoC. That means: | The software stack for the PowerPC Notebook is a critical enabler for the hardware. Our challenge is to bring up a modern, open-source Linux system on non-mainstream architecture (PowerPC), using a custom motherboard based on the NXP T2080 (?) SoC. That means: | ||
* Bootstrapping software from scratch, with limited upstream support | * Bootstrapping software from scratch, with limited upstream support | ||
* Building and testing a minimal Linux system to prove hardware works | * Building and testing a minimal Linux system to prove hardware works | ||
* Gradually evolving toward a user-friendly, maintainable Linux distribution | * Gradually evolving toward a user-friendly, maintainable Linux distribution | ||
We outline a '''progressive roadmap''': from booting the board to building our own distro, using modern infrastructure and tools wherever possible. | We outline a '''progressive roadmap''': from booting the board to building our own distro, using modern infrastructure and tools wherever possible. | ||
| Line 21: | Line 21: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Task !! Description | ! Task !! Description | ||
|- | |- | ||
| Set up cross toolchain || Use NXP’s PowerPC GCC SDK for T2080 | | Set up cross toolchain || Use NXP’s PowerPC GCC SDK for T2080 | ||
|- | |- | ||
| Build U-Boot || Start from <code>T2080RDB_defconfig</code>, customize for our board | | Build U-Boot || Start from <code>T2080RDB_defconfig</code>, customize for our board | ||
|- | |- | ||
| Write Device Tree (DTS) || Tailor the .dts to our motherboard’s peripherals | | Write Device Tree (DTS) || Tailor the .dts to our motherboard’s peripherals | ||
|- | |- | ||
| Build kernel || Use NXP's patched or mainline kernel with minimal config | | Build kernel || Use NXP's patched or mainline kernel with minimal config | ||
|- | |- | ||
| Load root filesystem || Use Initramfs, NFS, SD card or TFTP | | Load root filesystem || Use Initramfs, NFS, SD card or TFTP | ||
|- | |- | ||
| Test via serial console || Use UART for logs and early debugging | | Test via serial console || Use UART for logs and early debugging | ||
|} | |} | ||
| Line 37: | Line 37: | ||
=== Why === | === Why === | ||
* Validates CPU, memory, and power circuitry | * Validates CPU, memory, and power circuitry | ||
* Enables testing and debugging of other peripherals | * Enables testing and debugging of other peripherals | ||
* Serves as foundation for OS bring-up and userland development | * Serves as foundation for OS bring-up and userland development | ||
| Line 48: | Line 48: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Component !! Functionality | ! Component !! Functionality | ||
|- | |- | ||
| U-Boot || Initialize CPU, memory, load kernel | | U-Boot || Initialize CPU, memory, load kernel | ||
|- | |- | ||
| Linux kernel || Hardware detection and device drivers | | Linux kernel || Hardware detection and device drivers | ||
|- | |- | ||
| Root filesystem || BusyBox or minimal Debian NFS root | | Root filesystem || BusyBox or minimal Debian NFS root | ||
|- | |- | ||
| Serial console || Primary I/O for early interaction | | Serial console || Primary I/O for early interaction | ||
|- | |- | ||
| Storage access || SD, SATA, or USB (at least one working path) | | Storage access || SD, SATA, or USB (at least one working path) | ||
|- | |- | ||
| Device tree blob || Custom for motherboard | | Device tree blob || Custom for motherboard | ||
|} | |} | ||
| Line 64: | Line 64: | ||
=== Goal === | === Goal === | ||
* Boot into a shell prompt | * Boot into a shell prompt | ||
* Validate basic system resources (<code>/proc/cpuinfo</code>, <code>dmesg</code>, etc.) | * Validate basic system resources (<code>/proc/cpuinfo</code>, <code>dmesg</code>, etc.) | ||
* Confirm networking, storage, and peripheral availability | * Confirm networking, storage, and peripheral availability | ||
== 3. Nice-to-Haves: Editors, Tools, and Utilities == | == 3. Nice-to-Haves: Editors, Tools, and Utilities == | ||
| Line 75: | Line 75: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Category !! Tools | ! Category !! Tools | ||
|- | |- | ||
| Editors || nano, vim | | Editors || nano, vim | ||
|- | |- | ||
| Networking || curl, wget, ping, ssh | | Networking || curl, wget, ping, ssh | ||
|- | |- | ||
| Debugging || gdb, strace, perf, valgrind | | Debugging || gdb, strace, perf, valgrind | ||
|- | |- | ||
| System info || htop, lshw, i2c-tools, lsusb | | System info || htop, lshw, i2c-tools, lsusb | ||
|- | |- | ||
| Disk tools || fdisk, parted, e2fsprogs, btrfs-progs | | Disk tools || fdisk, parted, e2fsprogs, btrfs-progs | ||
|- | |- | ||
| Package management || apt, dpkg, or apk (depending on base) | | Package management || apt, dpkg, or apk (depending on base) | ||
|} | |} | ||
| Line 96: | Line 96: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Component !! Details | ! Component !! Details | ||
|- | |- | ||
| Base System || Debian PPC64, Gentoo, or Void PPC | | Base System || Debian PPC64, Gentoo, or Void PPC | ||
|- | |- | ||
| Kernel || Custom-built with PowerPC Notebook config | | Kernel || Custom-built with PowerPC Notebook config | ||
|- | |- | ||
| Init system || systemd or OpenRC | | Init system || systemd or OpenRC | ||
|- | |- | ||
| Package management || apt (Debian), emerge (Gentoo), xbps (Void) | | Package management || apt (Debian), emerge (Gentoo), xbps (Void) | ||
|- | |- | ||
| Desktop environment || XFCE, MATE, GNOME (PPC64 builds) | | Desktop environment || XFCE, MATE, GNOME (PPC64 builds) | ||
|- | |- | ||
| Installer || CLI or graphical installer image | | Installer || CLI or graphical installer image | ||
|- | |- | ||
| Update system || apt repos or rsync-based delta updates | | Update system || apt repos or rsync-based delta updates | ||
|- | |- | ||
| Branding || Custom themes, logos, powerpcnotebook.org | | Branding || Custom themes, logos, powerpcnotebook.org | ||
|} | |} | ||
| Line 116: | Line 116: | ||
=== Distro Build Systems to Consider === | === Distro Build Systems to Consider === | ||
* debootstrap / live-build (Debian-based builds) | * debootstrap / live-build (Debian-based builds) | ||
* Buildroot (for minimal rootfs + kernel images) | * Buildroot (for minimal rootfs + kernel images) | ||
* Yocto Project (flexible meta-distribution) | * Yocto Project (flexible meta-distribution) | ||
* Gentoo Catalyst (for full ISO or stage builds) | * Gentoo Catalyst (for full ISO or stage builds) | ||
== 5. CI/CD Pipelines and Build Infrastructure == | == 5. CI/CD Pipelines and Build Infrastructure == | ||
| Line 127: | Line 127: | ||
=== CI/CD Goals === | === CI/CD Goals === | ||
* Automatically build U-Boot, kernel, and rootfs images | * Automatically build U-Boot, kernel, and rootfs images | ||
* Run tests on emulated environments (QEMU PPC64) | * Run tests on emulated environments (QEMU PPC64) | ||
* Deploy daily/weekly builds for community testing | * Deploy daily/weekly builds for community testing | ||
* Detect regressions early and validate commits | * Detect regressions early and validate commits | ||
=== Tools === | === Tools === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Use Case !! Toolchain | ! Use Case !! Toolchain | ||
|- | |- | ||
| CI/CD pipelines || GitHub Actions, GitLab CI, Buildbot | | CI/CD pipelines || GitHub Actions, GitLab CI, Buildbot | ||
|- | |- | ||
| Emulated testing || QEMU PowerPC64 + expect/serial scripts | | Emulated testing || QEMU PowerPC64 + expect/serial scripts | ||
|- | |- | ||
| Cross-builds || Docker + <code>powerpc64-linux-gnu-gcc</code> toolchains | | Cross-builds || Docker + <code>powerpc64-linux-gnu-gcc</code> toolchains | ||
|- | |- | ||
| Image hosting || GitHub Pages, Netlify, custom CDN | | Image hosting || GitHub Pages, Netlify, custom CDN | ||
|- | |- | ||
| Build orchestration || cbuild, Yocto Autobuilder, Jenkins | | Build orchestration || cbuild, Yocto Autobuilder, Jenkins | ||
|} | |} | ||
| Line 149: | Line 149: | ||
=== Example CI Flow === | === Example CI Flow === | ||
# Push to <code>main</code> branch | # Push to <code>main</code> branch | ||
# GitHub Actions builds U-Boot, kernel, and rootfs | # GitHub Actions builds U-Boot, kernel, and rootfs | ||
# QEMU boots the image and verifies UART output | # QEMU boots the image and verifies UART output | ||
# Artifacts are uploaded to <code>artifacts.powerpcnotebook.org</code> | # Artifacts are uploaded to <code>artifacts.powerpcnotebook.org</code> | ||
| Line 160: | Line 160: | ||
=== Use Cases === | === Use Cases === | ||
* Build U-Boot or Linux kernel from any host | * Build U-Boot or Linux kernel from any host | ||
* Package testing in isolated environments | * Package testing in isolated environments | ||
* Running PPC-specific tools in reproducible containers | * Running PPC-specific tools in reproducible containers | ||
=== Example Images === | === Example Images === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Image Name !! Description | ! Image Name !! Description | ||
|- | |- | ||
| powerpc-dev-env || Full dev env with toolchain and make | | powerpc-dev-env || Full dev env with toolchain and make | ||
|- | |- | ||
| powerpc-kernel-builder || Kernel-specific builder and configs | | powerpc-kernel-builder || Kernel-specific builder and configs | ||
|- | |- | ||
| powerpc-debian-chroot || Debootstrap PPC64 rootfs for package test | | powerpc-debian-chroot || Debootstrap PPC64 rootfs for package test | ||
|} | |} | ||
| Line 181: | Line 181: | ||
=== Relevant Debian Practices === | === Relevant Debian Practices === | ||
* Reproducible Builds | * Reproducible Builds | ||
* Debian Ports infrastructure | * Debian Ports infrastructure | ||
* <code>live-build</code> and <code>debootstrap</code> | * <code>live-build</code> and <code>debootstrap</code> | ||
* Debian Installer (<code>d-i</code>) | * Debian Installer (<code>d-i</code>) | ||
* QA tools: lintian, piuparts, autopkgtest | * QA tools: lintian, piuparts, autopkgtest | ||
=== Related Projects to Watch === | === Related Projects to Watch === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Project !! Relevance | ! Project !! Relevance | ||
|- | |- | ||
| Debian PowerPC || Maintains PPC64 ports and packages | | Debian PowerPC || Maintains PPC64 ports and packages | ||
|- | |- | ||
| Void PPC || Maintains lightweight PPC builds | | Void PPC || Maintains lightweight PPC builds | ||
|- | |- | ||
| Gentoo PPC || Flexible, source-based PPC support | | Gentoo PPC || Flexible, source-based PPC support | ||
|- | |- | ||
| Yocto/OpenEmbedded || Board support packages and rootfs config | | Yocto/OpenEmbedded || Board support packages and rootfs config | ||
|- | |- | ||
| OpenPOWER Firmware || Future firmware replacement roadmap | | OpenPOWER Firmware || Future firmware replacement roadmap | ||
|} | |} | ||
== 8. Build Tooling (WIP | == 8. Build Tooling (WIP/Placeholders) == | ||
This section will document the exact steps, tools, and workflows needed to build every part of the software stack. | This section will document the exact steps, tools, and workflows needed to build every part of the software stack. | ||
| Line 216: | Line 216: | ||
* Secure image signing (U-Boot SPL, FIT images, secure boot) | * Secure image signing (U-Boot SPL, FIT images, secure boot) | ||
* Emulator-based validation and test harnesses | * Emulator-based validation and test harnesses | ||
'''Note:''' Details for each item will be populated progressively as we finalize architecture and test results. | '''Note:''' Details for each item will be populated progressively as we finalize architecture and test results. | ||
Revision as of 19:47, 13 May 2025
Software Stack: From First Boot to Full Distribution
Note: This is an initial draft of the software roadmap for the PowerPC Notebook project. At this stage, this is more of brain dump, rather than a polished roadmap. Contributions and comments are welcome.
Target architecture: PPC64 Big Endian.
Introduction
The software stack for the PowerPC Notebook is a critical enabler for the hardware. Our challenge is to bring up a modern, open-source Linux system on non-mainstream architecture (PowerPC), using a custom motherboard based on the NXP T2080 (?) SoC. That means:
- Bootstrapping software from scratch, with limited upstream support
- Building and testing a minimal Linux system to prove hardware works
- Gradually evolving toward a user-friendly, maintainable Linux distribution
We outline a progressive roadmap: from booting the board to building our own distro, using modern infrastructure and tools wherever possible.
1. Basic Plan: Booting the First Prototype
The first goal is to ensure our hardware can boot into a minimal Linux environment.
What Needs to Be Done
| Task | Description |
|---|---|
| Set up cross toolchain | Use NXP’s PowerPC GCC SDK for T2080 |
| Build U-Boot | Start from T2080RDB_defconfig, customize for our board
|
| Write Device Tree (DTS) | Tailor the .dts to our motherboard’s peripherals |
| Build kernel | Use NXP's patched or mainline kernel with minimal config |
| Load root filesystem | Use Initramfs, NFS, SD card or TFTP |
| Test via serial console | Use UART for logs and early debugging |
Why
- Validates CPU, memory, and power circuitry
- Enables testing and debugging of other peripherals
- Serves as foundation for OS bring-up and userland development
2. Essentials: Proving the Prototype Works
Once we can boot, we need a minimal userland to interact with the system.
Components Required
| Component | Functionality |
|---|---|
| U-Boot | Initialize CPU, memory, load kernel |
| Linux kernel | Hardware detection and device drivers |
| Root filesystem | BusyBox or minimal Debian NFS root |
| Serial console | Primary I/O for early interaction |
| Storage access | SD, SATA, or USB (at least one working path) |
| Device tree blob | Custom for motherboard |
Goal
- Boot into a shell prompt
- Validate basic system resources (
/proc/cpuinfo,dmesg, etc.) - Confirm networking, storage, and peripheral availability
3. Nice-to-Haves: Editors, Tools, and Utilities
Once the system is up, we add tools to support development, testing, and usability.
Suggested Additions
| Category | Tools |
|---|---|
| Editors | nano, vim |
| Networking | curl, wget, ping, ssh |
| Debugging | gdb, strace, perf, valgrind |
| System info | htop, lshw, i2c-tools, lsusb |
| Disk tools | fdisk, parted, e2fsprogs, btrfs-progs |
| Package management | apt, dpkg, or apk (depending on base) |
4. Distro: Building Our Own PowerPC Linux Distribution
Eventually, we want a user-facing Linux distribution specifically optimized for the PowerPC Notebook.
Building Blocks
| Component | Details |
|---|---|
| Base System | Debian PPC64, Gentoo, or Void PPC |
| Kernel | Custom-built with PowerPC Notebook config |
| Init system | systemd or OpenRC |
| Package management | apt (Debian), emerge (Gentoo), xbps (Void) |
| Desktop environment | XFCE, MATE, GNOME (PPC64 builds) |
| Installer | CLI or graphical installer image |
| Update system | apt repos or rsync-based delta updates |
| Branding | Custom themes, logos, powerpcnotebook.org |
Distro Build Systems to Consider
- debootstrap / live-build (Debian-based builds)
- Buildroot (for minimal rootfs + kernel images)
- Yocto Project (flexible meta-distribution)
- Gentoo Catalyst (for full ISO or stage builds)
5. CI/CD Pipelines and Build Infrastructure
To ensure maintainability, reproducibility, and collaboration, we aim to adopt continuous integration and modern DevOps practices.
CI/CD Goals
- Automatically build U-Boot, kernel, and rootfs images
- Run tests on emulated environments (QEMU PPC64)
- Deploy daily/weekly builds for community testing
- Detect regressions early and validate commits
Tools
| Use Case | Toolchain |
|---|---|
| CI/CD pipelines | GitHub Actions, GitLab CI, Buildbot |
| Emulated testing | QEMU PowerPC64 + expect/serial scripts |
| Cross-builds | Docker + powerpc64-linux-gnu-gcc toolchains
|
| Image hosting | GitHub Pages, Netlify, custom CDN |
| Build orchestration | cbuild, Yocto Autobuilder, Jenkins |
Example CI Flow
- Push to
mainbranch - GitHub Actions builds U-Boot, kernel, and rootfs
- QEMU boots the image and verifies UART output
- Artifacts are uploaded to
artifacts.powerpcnotebook.org
6. Docker Images for Build and Dev Environments
Pre-configured Docker images help developers build and test quickly across any host system.
Use Cases
- Build U-Boot or Linux kernel from any host
- Package testing in isolated environments
- Running PPC-specific tools in reproducible containers
Example Images
| Image Name | Description |
|---|---|
| powerpc-dev-env | Full dev env with toolchain and make |
| powerpc-kernel-builder | Kernel-specific builder and configs |
| powerpc-debian-chroot | Debootstrap PPC64 rootfs for package test |
7. Inspirations from Debian and Other Projects
We aim to reuse and adapt ideas from existing projects to accelerate development.
Relevant Debian Practices
- Reproducible Builds
- Debian Ports infrastructure
live-buildanddebootstrap- Debian Installer (
d-i) - QA tools: lintian, piuparts, autopkgtest
Related Projects to Watch
| Project | Relevance |
|---|---|
| Debian PowerPC | Maintains PPC64 ports and packages |
| Void PPC | Maintains lightweight PPC builds |
| Gentoo PPC | Flexible, source-based PPC support |
| Yocto/OpenEmbedded | Board support packages and rootfs config |
| OpenPOWER Firmware | Future firmware replacement roadmap |
8. Build Tooling (WIP/Placeholders)
This section will document the exact steps, tools, and workflows needed to build every part of the software stack.
Build Tooling Overview
- Cross-toolchain setup (e.g. NXP SDK, crosstool-ng, LLVM)
- U-Boot build and customization
- Linux kernel configuration and build
- Root filesystem generation methods (debootstrap, Buildroot, Yocto)
- Build orchestration (Makefiles, shell scripts, CI runners)
- Packaging tools for our distro (dpkg, xbps, etc.)
- Secure image signing (U-Boot SPL, FIT images, secure boot)
- Emulator-based validation and test harnesses
Note: Details for each item will be populated progressively as we finalize architecture and test results.