diff --git a/config b/config index 84a92082..4dad581a 100644 --- a/config +++ b/config @@ -117,13 +117,6 @@ CONFIG_GRM2K=n # # # -# [ADI LINUX SCRIPTS] -# ADI Scripts for Linux images: semi-random collection of small shell scripts which run on various Linux images (on various platforms) which talk to a varity of different ADI boards and parts -# Github: https://github.com/analogdevicesinc/linux_image_ADI-scripts -CONFIG_LINUX_SCRIPTS=n -# -# -# # [RASPBERRY PI BOOT FILES] # Contains boot files for Raspberry PI installed from the ADI Package Repository. CONFIG_RPI_BOOT_FILES=y diff --git a/docs/build-flow.rst b/docs/build-flow.rst index 203cbf3b..2cff9920 100644 --- a/docs/build-flow.rst +++ b/docs/build-flow.rst @@ -85,7 +85,7 @@ Example: .. code-block:: bash - CONTAINER_ID=$(docker inspect --format="{{.Id}}" debian_bookworm_rootfs_container) + CONTAINER_ID=$(docker inspect --format="{{.Id}}" debian_trixie_rootfs_container) sudo docker cp $CONTAINER_ID:armhf_rootfs . Docker Container Configuration diff --git a/docs/configuration.rst b/docs/configuration.rst index 6af021a6..e2c1ba20 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -44,9 +44,9 @@ These options control the fundamental aspects of your Kuiper image: - ``armhf`` - Target architecture: ``armhf`` (32-bit) or ``arm64`` (64-bit) * - ``DEBIAN_VERSION`` - - ``bookworm`` - - Debian version to use (e.g., ``bookworm``, ``bullseye``). Other - versions may have missing functionalities or unsupported tools + - ``trixie`` + - Debian version to use (e.g., ``trixie``, ``bookworm``, ``bullseye``). + Versions other than the default may have limited support ---- @@ -94,7 +94,8 @@ Desktop Environment ADI Libraries and Tools ----------------------- -These options control which ADI libraries and tools are included in the image: +These options control which ADI libraries and tools are included in the image. +Libraries are installed from Analog Devices' package repository. .. list-table:: :header-rows: 1 @@ -106,60 +107,21 @@ These options control which ADI libraries and tools are included in the image: * - ``CONFIG_LIBIIO`` - ``n`` - Install Libiio library (``y``/``n``) - * - ``CONFIG_LIBIIO_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for Libiio - * - ``BRANCH_LIBIIO`` - - ``libiio-v0`` - - Git branch to use for Libiio * - ``CONFIG_PYADI`` - ``n`` - Install Pyadi library (``y``/``n``). Requires Libiio - * - ``BRANCH_PYADI`` - - ``main`` - - Git branch to use for Pyadi * - ``CONFIG_LIBM2K`` - ``n`` - Install Libm2k library (``y``/``n``). Requires Libiio - * - ``CONFIG_LIBM2K_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for Libm2k - * - ``BRANCH_LIBM2K`` - - ``main`` - - Git branch to use for Libm2k * - ``CONFIG_LIBAD9166_IIO`` - ``n`` - Install Libad9166 library (``y``/``n``). Requires Libiio - * - ``CONFIG_LIBAD9166_IIO_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for Libad9166 - * - ``BRANCH_LIBAD9166_IIO`` - - ``libad9166-iio-v0`` - - Git branch to use for Libad9166 * - ``CONFIG_LIBAD9361_IIO`` - ``n`` - Install Libad9361 library (``y``/``n``). Requires Libiio - * - ``CONFIG_LIBAD9361_IIO_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for Libad9361 - * - ``BRANCH_LIBAD9361_IIO`` - - ``libad9361-iio-v0`` - - Git branch to use for Libad9361 * - ``CONFIG_GRM2K`` - ``n`` - Install GRM2K (``y``/``n``). Requires Libiio, Libm2k, and Gnuradio - * - ``CONFIG_GRM2K_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for GRM2K - * - ``BRANCH_GRM2K`` - - ``main`` - - Git branch to use for GRM2K - * - ``CONFIG_LINUX_SCRIPTS`` - - ``n`` - - Install ADI Linux scripts (``y``/``n``) - * - ``BRANCH_LINUX_SCRIPTS`` - - ``kuiper2.0`` - - Git branch to use for Linux scripts ---- @@ -177,41 +139,20 @@ These options control which ADI applications are included in the image: - Description * - ``CONFIG_IIO_OSCILLOSCOPE`` - ``n`` - - Install IIO Oscilloscope (``y``/``n``). Requires Libiio, + - Install IIO Oscilloscope (``y``/``n``). Requires Libiio, Libad9166_IIO, and Libad9361_IIO - * - ``CONFIG_IIO_OSCILLOSCOPE_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for IIO Oscilloscope - * - ``BRANCH_IIO_OSCILLOSCOPE`` - - ``v0.18-main`` - - Git branch to use for IIO Oscilloscope * - ``CONFIG_IIO_FM_RADIO`` - ``n`` - Install IIO FM Radio (``y``/``n``) - * - ``BRANCH_IIO_FM_RADIO`` - - ``main`` - - Git branch to use for IIO FM Radio * - ``CONFIG_FRU_TOOLS`` - ``n`` - Install FRU tools (``y``/``n``) - * - ``BRANCH_FRU_TOOLS`` - - ``main`` - - Git branch to use for FRU tools * - ``CONFIG_JESD_EYE_SCAN_GTK`` - ``n`` - Install JESD Eye Scan GTK (``y``/``n``) - * - ``CONFIG_JESD_EYE_SCAN_GTK_CMAKE_ARGS`` - - *(see config file)* - - CMake build arguments for JESD Eye Scan GTK - * - ``BRANCH_JESD_EYE_SCAN_GTK`` - - ``main`` - - Git branch to use for JESD Eye Scan GTK * - ``CONFIG_COLORIMETER`` - ``n`` - Install Colorimeter (``y``/``n``). Requires Libiio - * - ``BRANCH_COLORIMETER`` - - ``main`` - - Git branch to use for Colorimeter * - ``CONFIG_SCOPY`` - ``n`` - Install Scopy (``y``/``n``) diff --git a/docs/customization.rst b/docs/customization.rst index 9c7304ca..d4fc16de 100644 --- a/docs/customization.rst +++ b/docs/customization.rst @@ -1,16 +1,23 @@ .. _customization: -Custom Script Integration -========================= +Advanced Customization +====================== -Kuiper allows you to run additional scripts during the build process to -customize the resulting image. This feature enables advanced customization -beyond the standard configuration options. +This guide covers advanced customization options for developers and advanced +users who need to extend the build process beyond standard configuration +options. ---- +Custom Script Integration +-------------------------- + +Kuiper allows you to run additional scripts during the build process to +customize the resulting image. This feature enables advanced customization +beyond the standard configuration options. + Using the Example Script ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ To use the provided example script: @@ -20,15 +27,13 @@ To use the provided example script: EXTRA_SCRIPT=stages/07.extra-tweaks/01.extra-scripts/examples/extra-script-example.sh -2. If you need to pass ``config`` file parameters to the script, uncomment +2. If you need to pass ``config`` file parameters to the script, uncomment the line where it sources the config file in the example script. 3. Add your custom commands to the example script file. ----- - Using Your Own Custom Script ----------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To use your own custom script: @@ -39,6 +44,87 @@ To use your own custom script: 3. Make sure your script is executable (``chmod +x your-script.sh``). -Custom scripts are executed in the chroot environment of the target system -during the build process, allowing you to install additional packages, modify +Custom scripts are executed in the chroot environment of the target system +during the build process, allowing you to install additional packages, modify system files, or perform any other customization. + +---- + +Building from Source +-------------------- + +By default, ADI libraries are installed from Analog Devices' package +repository. For development, testing unreleased features, or custom builds, +you can build libraries from source by modifying the stage scripts. + +How to Enable Source Builds +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Library installation is controlled by stage scripts in ``stages/05.adi-tools/``. +Each script has a ``USE_ADI_REPO`` variable that controls the installation +method: + +- ``USE_ADI_REPO=y`` - Install from package repository (default) +- ``USE_ADI_REPO=n`` - Build from source using git + +**Example: Building libiio from source** + +Edit ``stages/05.adi-tools/01.install-libiio/run.sh`` and set: + +.. code-block:: bash + + USE_ADI_REPO=n + +You can also customize the git branch and CMake arguments: + +.. code-block:: bash + + BRANCH_LIBIIO=libiio-v0 + CONFIG_LIBIIO_CMAKE_ARGS="-DWITH_HWMON=ON \ + -DWITH_SERIAL_BACKEND=ON \ + -DWITH_MAN=ON \ + -DWITH_EXAMPLES=ON \ + -DPYTHON_BINDINGS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_COLOR_MAKEFILE=OFF \ + -Bbuild -H." + +The same pattern applies to other libraries (``libm2k``, ``libad9361-iio``, +``libad9166-iio``, etc.) and applications (``iio-oscilloscope``, +``jesd-eye-scan-gtk``, ``gr-m2k``, etc.). Each has corresponding ``BRANCH_`` +and ``CMAKE_ARGS`` variables in their respective stage scripts. + +Library Dependencies +~~~~~~~~~~~~~~~~~~~~ + +When building from source, dependencies must be satisfied. Enable required +dependencies in the ``config`` file: + +.. list-table:: + :header-rows: 1 + :class: bold-header + + * - Library/Application + - Required Dependencies + * - ``CONFIG_PYADI`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_LIBM2K`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_LIBAD9166_IIO`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_LIBAD9361_IIO`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_IIO_OSCILLOSCOPE`` + - ``CONFIG_LIBIIO``, ``CONFIG_LIBAD9166_IIO``, ``CONFIG_LIBAD9361_IIO`` + * - ``CONFIG_COLORIMETER`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_JESD_EYE_SCAN_GTK`` + - ``CONFIG_LIBIIO`` + * - ``CONFIG_GRM2K`` + - ``CONFIG_LIBIIO``, ``CONFIG_LIBM2K``, ``CONFIG_GNURADIO`` + +.. note:: + + Dependencies are handled automatically when using package installation + (the default). Manual dependency management is only needed when building + from source. diff --git a/docs/hardware-configuration.rst b/docs/hardware-configuration.rst index e4dfd1c3..4447bd48 100644 --- a/docs/hardware-configuration.rst +++ b/docs/hardware-configuration.rst @@ -377,7 +377,7 @@ Platform-Specific Manual Steps If required boot files are missing from your Kuiper image, install them using the ADI package repository. See the :doc:`Repositories - ` section for detailed instructions. + ` section for detailed instructions. AMD/Xilinx Platforms .................... @@ -589,7 +589,7 @@ Device tree manipulation utility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To manage the Device Tree using the ``dtoverlay`` command-line tool, first -enable the :ref:`repositories rpi`, then install the ``raspi-utils-dt`` +enable the :ref:`package-management-rpi`, then install the ``raspi-utils-dt`` package: .. shell:: diff --git a/docs/index.rst b/docs/index.rst index a34b8ba2..6ba67f69 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -22,26 +22,16 @@ system configuration. Quick Start ----------- -Get up and running with Kuiper: +Get up and running with Kuiper in two simple steps: -#. :doc:`Check prerequisites ` (Ubuntu 22.04 + Docker for - building) -#. Get Kuiper image: - - - **Quick option**: Download pre-built from :git-kuiper:`GitHub - Actions ` - - **Custom option**: Clone repository and build your own - - .. code-block:: bash - - git clone --depth 1 https://github.com/analogdevicesinc/kuiper - cd kuiper - sudo ./build-docker.sh - - For detailed instructions, see the :doc:`Quick Start ` section. +#. Download a tested release image (Basic or Full) from + `ADI Kuiper Releases `_ #. :doc:`Write the image to an SD card and boot your device ` +For other options including latest development builds or custom builds, see +the :doc:`Quick Start ` guide. + ---- What's Included @@ -51,7 +41,7 @@ Kuiper provides a configurable development environment tailored for ADI hardware: **Core System** - Debian Bookworm base with optimized configurations for ARM devices + Debian Trixie base with optimized configurations for ARM devices **ADI Libraries (Optional)** libiio, pyadi-iio, libm2k, libad9361, libad9166 for hardware communication @@ -85,7 +75,7 @@ Basic Image (Default) **What's included:** -- Debian Bookworm base system with essential utilities +- Debian Trixie base system with essential utilities - Boot files for Raspberry Pi, Xilinx, and Intel platforms - User account setup (analog/analog) with sudo access - Network configuration and SSH access @@ -171,9 +161,9 @@ Documentation :maxdepth: 2 :caption: Advanced Topics - stage-reference + package-management customization - repositories + stage-reference .. toctree:: :maxdepth: 2 diff --git a/docs/package-management.rst b/docs/package-management.rst new file mode 100644 index 00000000..1c45a856 --- /dev/null +++ b/docs/package-management.rst @@ -0,0 +1,190 @@ +.. _package-management: + +Package Management +================== + +Kuiper uses package repositories to install and manage software. This page +explains the available repositories and how to install, update, and manage +packages on your Kuiper system. + +---- + +.. _package-management-kuiper: + +Kuiper Repository +----------------- + +The Kuiper APT repository provides Debian packages for Analog Devices libraries, +applications, and boot files. All packages are pre-built, tested, and optimized +for Kuiper. + +**Advantages of using the Kuiper repository:** + +- Easy installation, removal, and upgrading of packages (``apt install``, + ``apt remove``, ``apt upgrade``) +- Automatic dependency resolution and conflict detection +- Simplified version management +- Debug symbol packages available for most packages (``*-dbgsym``) + +Available Packages +~~~~~~~~~~~~~~~~~~ + +ADI Libraries ++++++++++++++ + +.. list-table:: + :header-rows: 1 + :class: bold-header + + * - Package + - Description + - Additional Packages + * - ``libiio0`` + - Library for interfacing with Linux IIO devices + - ``libiio-dev``, ``libiio-utils``, ``python3-libiio``, ``iiod`` + * - ``libm2k`` + - Library for interfacing with the ADALM2000 + - ``libm2k-dev``, ``libm2k-tools``, ``python3-libm2k``, ``libm2k-csharp`` + * - ``libad9361`` + - Library for managing multi-chip sync and FIR filters for AD9361 + - ``libad9361-dev``, ``python3-libad9361`` + * - ``libad9166`` + - Library for calibration gain and offset for AD9166 + - ``libad9166-dev``, ``python3-libad9166``, ``libad9166-dbgsym`` + +ADI Applications +++++++++++++++++ + +.. list-table:: + :header-rows: 1 + :class: bold-header + + * - Package + - Description + * - ``iio-oscilloscope`` + - GTK+ application for interfacing with IIO devices + * - ``scopy`` + - Software oscilloscope and signal analysis toolset + * - ``colorimeter`` + - Application for the EVAL-CN0363-PMDZ (with ``colorimeter-dbgsym``) + * - ``jesd-eye-scan-gtk`` + - JESD204 Eye Scan visualization utility (with ``jesd-eye-scan-gtk-dbgsym``) + * - ``iio-fm-radio`` + - Simple IIO FM Radio receiver (with ``iio-fm-radio-dbgsym``) + * - ``fru-tools`` + - Tools to display/manipulate FMC FRU info (with ``fru-tools-dbgsym``) + * - ``gr-m2k`` + - GNU Radio blocks for ADALM-2000 (with ``gr-m2k-dev``, ``python3-gr-m2k``) + * - ``adi-scripts`` + - ADI scripts for Linux images + +Boot Files +++++++++++ + +Boot files are organized by processor architecture: + +.. list-table:: + :header-rows: 1 + :class: bold-header + + * - Hardware Platform Examples + - Package + - Architecture + * - ZedBoard, ZC702, ZC706, Cora Z7s, ADRV9361-Z7035, ADRV9364-Z7020 + - ``adi-zynq-boot`` + - armhf + * - ZCU102, ADRV9009-ZU11EG, Jupiter SDR + - ``adi-zynqmp-boot`` + - arm64 + * - VCK190, VPK180, VHK158 + - ``adi-versal-boot`` + - arm64 + * - Arria10 SoC Development Kit + - ``adi-arria10-boot`` + - armhf + * - Cyclone 5 SoC Kit, DE10-Nano, Arradio board + - ``adi-cyclone5-boot`` + - armhf + * - Raspberry Pi + - ``adi-rpi-boot`` + - armhf, arm64 + +Discovering Packages +~~~~~~~~~~~~~~~~~~~~ + +Search for all ADI packages: + +.. code-block:: bash + + apt search adi + +Search for specific package types: + +.. code-block:: bash + + apt search libiio + apt search "adi-.*-boot" + +View detailed package information: + +.. code-block:: bash + + apt show libiio0 + apt show iio-oscilloscope + +Installing and Updating Packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Install a package: + +.. code-block:: bash + + sudo apt update + sudo apt install libiio0 + +Install with development and Python bindings: + +.. code-block:: bash + + sudo apt install libiio0 libiio-dev python3-libiio + +Install with debug symbols: + +.. code-block:: bash + + sudo apt install iio-oscilloscope iio-oscilloscope-dbgsym + +Upgrade all installed packages: + +.. code-block:: bash + + sudo apt update + sudo apt upgrade + +Upgrade a specific package: + +.. code-block:: bash + + sudo apt update + sudo apt upgrade libiio0 + +---- + +.. _package-management-rpi: + +Raspberry Pi Repository +----------------------- + +By default, the Kuiper image includes the official Raspberry Pi package +repository in ``/etc/apt/sources.list.d/raspi.list``. This repository +provides access to Pi-specific packages and optimizations. + +**Using the Raspberry Pi repository:** + +1. Edit ``/etc/apt/sources.list.d/raspi.list`` and uncomment the first line +2. Update the package lists: ``sudo apt update`` +3. Install packages as needed: ``sudo apt install `` + +This gives you access to RPI-specific packages such as GPIO libraries, +VideoCore tools, and other hardware-specific packages. + diff --git a/docs/quick-start.rst b/docs/quick-start.rst index 7792283c..271e79b8 100644 --- a/docs/quick-start.rst +++ b/docs/quick-start.rst @@ -3,41 +3,78 @@ Quick Start =========== -This guide will help you get a Kuiper image quickly, either by downloading -a pre-built image or building your own with custom settings. +This guide will help you get a Kuiper image. Choose from three options +depending on your needs: download a tested release, get the latest development +build, or create a custom build with your own configuration. ---- -Choose Your Path ----------------- +Getting a Kuiper Image +---------------------- -**Option A: Download Pre-built Image (5 minutes)** - Get a ready-to-use basic Kuiper image immediately: +Release Images (Recommended) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Download the latest build from :git-kuiper:`GitHub Actions - ` - - Skip to :doc:`Using Kuiper Images ` to write it to an - SD card +**Best for**: Production use, evaluation, getting started quickly -**Option B: Build Custom Image (30-60 minutes)** - Build your own image with specific configurations: +**Time**: ~5 minutes (download only) - - Follow the build process below for full customization - - Configure exactly what tools and features you need +Download a tested and stable Kuiper release. Two versions are available: ----- +- **Basic Image**: Minimal system with essential boot files, no desktop + environment or ADI tools +- **Full Image**: Complete system with XFCE desktop, ADI libraries and + applications, development tools + +For detailed information about what's included in each version, see +:doc:`Kuiper Versions `. + +**Download**: `ADI Kuiper Releases `_ + +After downloading, skip to :ref:`quick-start-next-steps`. + +Latest Development Builds +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Best for**: Testing latest features, development work, early access + +**Time**: ~5 minutes (download only) + +Download the most recent automated builds from the main branch. These include +the latest changes and improvements but may have less testing than official +releases. -Building Your Own Image ------------------------ +**Download**: :git-kuiper:`GitHub Actions +` -If you chose Option B above, follow these steps to build a custom Kuiper -image: +After downloading, skip to :ref:`quick-start-next-steps`. + +Build Custom Image +~~~~~~~~~~~~~~~~~~ + +**Best for**: Custom configurations, specific tool combinations, specialized +deployments + +**Time**: 30-60 minutes (build time) + +Build your own image with complete control over included components and +configuration. + +Prerequisites ++++++++++++++ + +Ensure your build environment meets the :doc:`prerequisites ` +before starting: + +- Ubuntu 22.04 LTS (recommended) +- Docker installed and configured +- At least 10GB free disk space +- Repository cloned to a path without spaces Clone the Repository -~~~~~~~~~~~~~~~~~~~~ +++++++++++++++++++++ -After ensuring your build environment meets the :doc:`prerequisites -`, clone the repository: +Clone the repository: .. code-block:: bash @@ -45,32 +82,31 @@ After ensuring your build environment meets the :doc:`prerequisites cd kuiper Review Default Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++++++++++++++++++++++++++++++ -The default configuration will build a basic 32-bit (armhf) Debian Bookworm -image with Raspberry Pi boot files. For most users, this is sufficient to get -started: +The default configuration will build a basic 32-bit (armhf) Debian Trixie image +with Raspberry Pi boot files. For most users, this is sufficient to get started: - Target architecture: ``armhf`` (32-bit) -- Debian version: ``bookworm`` +- Debian version: ``trixie`` - Essential boot files included: Yes - Desktop environment: No - ADI tools: None (can be enabled as needed) -This configuration creates what we call the "Basic Image" that includes only -essential components. For details on exactly what stages and components are +This configuration creates what we call the "Basic Image" that includes only +essential components. For details on exactly what stages and components are included in this basic build, see :ref:`kuiper-versions-basic-image`. -For ADI evaluation boards, you can configure your target hardware now by -setting ``ADI_EVAL_BOARD`` and ``CARRIER`` in the config file, or configure +For ADI evaluation boards, you can configure your target hardware now by +setting ``ADI_EVAL_BOARD`` and ``CARRIER`` in the config file, or configure later after deployment. See :ref:`ADI Evaluation Boards Configuration ` for further information. -For customization options, see the :doc:`Configuration ` +For customization options, see the :doc:`Configuration ` section. Build the Image -~~~~~~~~~~~~~~~ ++++++++++++++++ Run the build script with sudo: @@ -86,21 +122,23 @@ The build process will: 4. Install selected components based on your configuration 5. Create a bootable image -This process typically takes 30-60 minutes depending on your system and +This process typically takes 30-60 minutes depending on your system and internet speed. Locate the Output -~~~~~~~~~~~~~~~~~ ++++++++++++++++++ -After a successful build, your Kuiper image will be available as a zip file -in the ``kuiper-volume/`` directory within the repository. The filename will +After a successful build, your Kuiper image will be available as a zip file +in the ``kuiper-volume/`` directory within the repository. The filename will follow the pattern ``image_YYYY-MM-DD-ADI-Kuiper-Linux-[arch].zip``. ---- -Using the Kuiper Image ----------------------- +.. _quick-start-next-steps: + +Next Steps +---------- -Now that you obtained a bootable image, you can follow the steps in :doc:`Using -Kuiper Images ` section in order to write the image to an SD -card and boot your device. +Now that you have a Kuiper image (from release, latest build, or custom build), +proceed to :doc:`Using Kuiper Images ` to write the image to +an SD card and boot your device. diff --git a/docs/repositories.rst b/docs/repositories.rst deleted file mode 100644 index 2f45d901..00000000 --- a/docs/repositories.rst +++ /dev/null @@ -1,116 +0,0 @@ -.. _repositories: - -Repositories -============ - -Kuiper uses multiple package repositories to install and update software. -These repositories are configured during the build process in the bootstrap -stage. - ----- - -.. _repositories adi: - -ADI Repository --------------- - -The ADI APT repository is a collection of Debian package files that -facilitates the distribution and installation of Analog Devices software -packages. The repository contains .deb packages with boot files for carriers -and Raspberry Pi. - -**Advantages of using the ADI repository:** - -- Easy installation, removal, and upgrading of packages (``apt install``, - ``apt remove``, ``apt upgrade``) -- Simplified version management -- Package manager handles dependency resolution and conflict detection -- Centralized distribution of ADI-specific packages - -**Architecture-Specific Boot Packages:** - -Boot files are organized by processor architecture. ADI provides packages for -each supported architecture family: - -.. list-table:: - :header-rows: 1 - - * - Hardware Platform Examples - - Architecture Package - * - ZedBoard, ZC702, ZC706, Cora Z7s, ADRV9361-Z7035, ADRV9364-Z7020 - - ``adi-zynq-boot`` - * - ZCU102, ADRV9009-ZU11EG, Jupiter SDR - - ``adi-zynqmp-boot`` - * - VCK190, VPK180, VHK158 - - ``adi-versal-boot`` - * - Arria10 SoC Development Kit - - ``adi-arria10-boot`` - * - Cyclone 5 SoC Kit, DE10-Nano, Arradio board - - ``adi-cyclone5-boot`` - * - Raspberry Pi - - ``adi-rpi-boot`` - -ADI packages follow standard Debian conventions with consistent package names -and version-based differentiation, allowing standard package management -operations. - -**Discovering Available Packages:** - -To see all available ADI packages and their versions: - -.. code-block:: bash - - apt search "adi-.*-boot" - -To see detailed information about a specific package: - -.. code-block:: bash - - apt show adi-zynq-boot - ----- - -.. _repositories rpi: - -Raspberry Pi Repository ------------------------ - -By default, the Kuiper image includes the official Raspberry Pi package -repository in ``/etc/apt/sources.list.d/raspi.list``. This repository -provides access to Pi-specific packages and optimizations. - -**Using the Raspberry Pi repository:** - -1. Edit ``/etc/apt/sources.list.d/raspi.list`` and uncomment the first line -2. Update the package lists: ``sudo apt update`` -3. Install packages as needed: ``sudo apt install `` - -This gives you access to RPI-specific packages such as GPIO libraries, -VideoCore tools, and other hardware-specific packages. - ----- - -Install Packages ----------------- - -To install packages from either repository on your running Kuiper system: - -.. code-block:: bash - - sudo apt update - sudo apt install - -For example, to install boot files for your hardware architecture: - -.. code-block:: bash - - sudo apt update - sudo apt install adi-zynq-boot - -To upgrade to a newer version when available: - -.. code-block:: bash - - sudo apt update - sudo apt upgrade adi-zynq-boot - diff --git a/kuiper-stages.sh b/kuiper-stages.sh index 2703dee7..c665b541 100644 --- a/kuiper-stages.sh +++ b/kuiper-stages.sh @@ -11,6 +11,7 @@ source config # Declare ANSI escape codes to color the output in the terminal MAGENTA="`tput setaf 5`" +LIGHT_BLUE="`tput setaf 6`" RESET="`tput sgr0`" export LOG_FILE="kuiper-volume/build.log" @@ -35,7 +36,6 @@ export CONFIG_GNURADIO=${CONFIG_GNURADIO:-n} export CONFIG_GRM2K=${CONFIG_GRM2K:-n} export CONFIG_JESD_EYE_SCAN_GTK=${CONFIG_JESD_EYE_SCAN_GTK:-n} export CONFIG_COLORIMETER=${CONFIG_COLORIMETER:-n} -export CONFIG_LINUX_SCRIPTS=${CONFIG_LINUX_SCRIPTS:-n} export CONFIG_RPI_BOOT_FILES=${CONFIG_RPI_BOOT_FILES:-n} export EXPORT_SOURCES=${EXPORT_SOURCES:-n} diff --git a/stages/04.configure-desktop-env/03.cosmetic/files/wallpaper.png b/stages/04.configure-desktop-env/03.cosmetic/files/wallpaper.png index 8dd6b822..a6e31a04 100644 Binary files a/stages/04.configure-desktop-env/03.cosmetic/files/wallpaper.png and b/stages/04.configure-desktop-env/03.cosmetic/files/wallpaper.png differ diff --git a/stages/05.adi-tools/13.install-linux_image_ADI-scripts/run.sh b/stages/05.adi-tools/13.install-linux_image_ADI-scripts/run.sh index b809039f..22e29834 100644 --- a/stages/05.adi-tools/13.install-linux_image_ADI-scripts/run.sh +++ b/stages/05.adi-tools/13.install-linux_image_ADI-scripts/run.sh @@ -9,12 +9,10 @@ USE_ADI_REPO=y BRANCH_LINUX_SCRIPTS=kuiper2.0 -if [ "${CONFIG_LINUX_SCRIPTS}" = y ]; then +if [ "${USE_ADI_REPO}" = y ]; then + chroot "${BUILD_DIR}" apt-get install --no-install-recommends -y adi-scripts - if [ "${USE_ADI_REPO}" = y ]; then - chroot "${BUILD_DIR}" apt-get install --no-install-recommends -y adi-scripts - - else +else chroot "${BUILD_DIR}" << EOF cd /usr/local/src @@ -24,8 +22,4 @@ chroot "${BUILD_DIR}" << EOF # Install linux_image_ADI-scripts cd linux_image_ADI-scripts && make -j $NUM_JOBS EOF - fi - -else - echo "linux_image_ADI-scripts won't be installed because CONFIG_LINUX_SCRIPTS is set to 'n'." fi diff --git a/stages/08.export-stage/03.generate-license/run-chroot.sh b/stages/08.export-stage/03.generate-license/run-chroot.sh index 9ee7649d..4b5ffdcb 100644 --- a/stages/08.export-stage/03.generate-license/run-chroot.sh +++ b/stages/08.export-stage/03.generate-license/run-chroot.sh @@ -311,10 +311,8 @@ if [ "${CONFIG_GRM2K}" = y ]; then html_pre_file /usr/local/src/gr-m2k/COPYING gr-m2k fi -if [ "${CONFIG_LINUX_SCRIPTS}" = y ]; then - package_table_items $((var++)) "linux_image_ADI-scripts" " " "GPL-3.0" "https://github.com/analogdevicesinc/linux_image_ADI-scripts" - html_pre_file /usr/local/src/linux_image_ADI-scripts/LICENSE linux_image_ADI-scripts -fi +package_table_items $((var++)) "linux_image_ADI-scripts" " " "GPL-3.0" "https://github.com/analogdevicesinc/linux_image_ADI-scripts" +html_pre_file /usr/local/src/linux_image_ADI-scripts/LICENSE linux_image_ADI-scripts dpkg -l | awk '/ii/ { print $2 " " $3 }' | while read -r line do diff --git a/stages/08.export-stage/04.export-image/files/configure-setup.sh b/stages/08.export-stage/04.export-image/files/configure-setup.sh deleted file mode 100644 index 34906529..00000000 --- a/stages/08.export-stage/04.export-image/files/configure-setup.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: BSD-3-Clause -# -# kuiper2.0 - Embedded Linux for Analog Devices Products -# -# Copyright (c) 2024 Analog Devices, Inc. -# Author: Larisa Radu - -show_help() { - -cat << EOF -Usage: - sudo $(basename "$0") [OPTIONS] [bootloader-dev] - -Description: - Script that prepares Kuiper image to boot on a carrier board. - -Arguments: - eval-board Name of the project - carrier Carrier board name - bootloader-dev Bootloader device (default: /dev/mmcblk0p3) - -Options: - -b, --boot-partition PATH Path to boot partition (default: /boot) - -h, --help Show this help message - -Notes: - - Options must be specified before positional arguments. - - The -b option affects which projects are listed by --help. To see projects - on an attached SD card, use: sudo $(basename "$0") -b /media/\$USER/BOOT --help - -Examples: - # Running directly on the board: - sudo $(basename "$0") ad4003 zed - sudo $(basename "$0") --help - - # Configuring SD card from PC: - sudo $(basename "$0") -b /media/\$USER/BOOT ad4003 zed - sudo $(basename "$0") -b /media/\$USER/BOOT --help - sudo $(basename "$0") -b /media/\$USER/BOOT /dev/sdb3 -EOF - - echo -e "\n\nAvailable projects in your Kuiper image:\n" - - { - # Print header - echo -e "ADI Eval Board\tCarrier" - - # Print projects and boards - find ${BOOT_PARTITION} -type f -name "*.json" 2>/dev/null | while read -r file; do - jq -r ' - .projects[]? - | select(has("name") and has("board")) - | [.name, .board] - | @tsv - ' "$file" - done - } | column -t -s $'\t' -} - -# Check if the script is run as root -if [ "$(id -u)" != "0" ] ; then - echo "This script must be run as root" - exit 1 -fi - -BOOT_PARTITION="/boot" - -# Parse optional flags and their arguments, stopping at the first positional argument -while [[ $# -gt 0 ]]; do - case $1 in - -h|--help) - show_help - exit 0 - ;; - -b|--boot-partition) - if [[ -z "$2" || "$2" == -* ]]; then - echo "Error: --boot-partition requires a path argument" >&2 - exit 2 - fi - BOOT_PARTITION="$2" - shift 2 - ;; - -*) - echo "Error: Unknown option $1" >&2 - show_help - exit 2 - ;; - *) - break - ;; - esac -done - -# Validate positional arguments -if [[ $# -lt 2 ]]; then - echo -e "Error: Missing required arguments.\n" >&2 - show_help - exit 2 -fi - -ADI_EVAL_BOARD=${1} -CARRIER=${2} -BOOTLOADER_DEV=${3:-"/dev/mmcblk0p3"} - -if [[ ! -z "${ADI_EVAL_BOARD}" && ! -z "${CARRIER}" ]]; then - - # Extract project description from .json by selecting the project set in the configuration file - PROJECT_DESCRIPTION=$(find ${BOOT_PARTITION} -type f -name "*.json" \ - -exec jq -c '.projects[]? | select(.name=="'${ADI_EVAL_BOARD}'" and .board=="'${CARRIER}'")' {} + \ - | head -n 1) - - # Check if project exists - if [[ -z "${PROJECT_DESCRIPTION}" ]]; then - echo "Cannot find project ${ADI_EVAL_BOARD} for board ${CARRIER}. Setup not configured." - else - # Extract kernel path from the project description and adjust for boot partition location - kernel=$(echo "$PROJECT_DESCRIPTION" | jq -r '.kernel' | sed "s|^/boot|${BOOT_PARTITION}|") - - # Copy kernel to Kuiper boot directory - cp -v ${kernel} ${BOOT_PARTITION} - if [ $? -ne 0 ]; then - echo "Something went wrong while copying the kernel. Boot partition can't be configured." - exit - fi - - # Extract paths with boot files from the project description and adjust for boot partition location - paths=$(echo "$PROJECT_DESCRIPTION" | jq -r '.files[].path' | sed "s|^/boot|${BOOT_PARTITION}|") - - # Add the correct prefix for all paths and copy them to Kuiper boot directory - cp -v $paths ${BOOT_PARTITION} - if [ $? -ne 0 ]; then - echo "Something went wrong while copying boot files. Boot partition can't be configured." - exit - fi - - # Check if project platform is Intel - if [[ ! -z $(echo "$PROJECT_DESCRIPTION" | jq 'select(.platform == "intel")') ]]; then - - # Create folder if it doesn't exist and move copied extlinux.conf to extlinux folder - mkdir -p ${BOOT_PARTITION}/extlinux/ && mv -v ${BOOT_PARTITION}/extlinux.conf ${BOOT_PARTITION}/extlinux/ - - # Extract preloader file from the project description and adjust for boot partition location - preloader=$(echo "$PROJECT_DESCRIPTION" | jq -r '.preloader' | sed "s|^/boot|${BOOT_PARTITION}|") - - # Write preloader file to corresponding image partition - dd if=${preloader} of=${BOOTLOADER_DEV} status=progress - if [ $? -ne 0 ]; then - echo "Something went wrong while copying the preloader. Boot partition can't be configured." - exit - fi - - # Remove leftover extlinux configuration for other platforms - else - if [[ -d "${BOOT_PARTITION}/extlinux" ]]; then - rm -rfv ${BOOT_PARTITION}/extlinux/ - fi - fi - echo "Successfully prepared boot partition for running project ${ADI_EVAL_BOARD} on ${CARRIER}." - fi -else - echo "Setup won't be configured because setup variables are null." -fi diff --git a/stages/08.export-stage/04.export-image/run.sh b/stages/08.export-stage/04.export-image/run.sh index 4a2c4b2a..f8adc0cf 100644 --- a/stages/08.export-stage/04.export-image/run.sh +++ b/stages/08.export-stage/04.export-image/run.sh @@ -118,10 +118,6 @@ if [ "${CONFIG_RPI_BOOT_FILES}" = y ]; then sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${BUILD_DIR}/boot/cmdline.txt" fi -# Configure setup for a specific project and board -# Pass parameter BOOTLOADER_DEV because for Intel projects the bootloader partition needs to be written -install -m 755 "${BASH_SOURCE%/run.sh}"/files/configure-setup.sh "${BUILD_DIR}/usr/bin" - if [[ ! -z "${ADI_EVAL_BOARD}" && ! -z "${CARRIER}" ]]; then chroot "${BUILD_DIR}" << EOF