Skip to content

Build Instructions Out-of-Date #3288

@Brandon-Hurst

Description

@Brandon-Hurst

The current build instructions point here at the time of writing:
https://analogdevicesinc.github.io/linux/getting_started.html#how-to-build

This links to our DocuWiki page here:
https://wiki.analog.com/resources/tools-software/linux-build/generic/raspberrypi

These instructions are currently out-of-date and have a few major problems. In order, here are some things I noticed:

  • Instructions clone raspberrypi/tools which uses a deprecated GCC toolchain. The recommendation here is to instead install the latest apt package e.g. sudo apt-get install gcc-arm-linux-gnueabihf.
  • CROSS_COMPILE build variable is called out as "path to cross-compile toolchain" which is not correct. This variable is the prefix to the toolchain to use. For example, if using arm-linux-gnueabihf-gcc, then one would write CROSS_COMPILE=arm-linux-gnueabihf- when building.
  • A couple dependencies are missing (may have been added since). For building, flex and bison are required and may be installed with apt e.g. sudo apt-get install flex bison. For menuconfig libncurses5-dev is also needed e.g. sudo apt-get install libncurses5-dev. The current page doesn't mention dependency installs.
  • The defconfigs shown do not include adi modifications. For example, under arch/arm/config, there exist adi_bcm2711_defconfig files as opposed to bcm2711_defconfig. I'm assuming these may make patches required for some ADI drivers?
  • More of a suggestion, but possibly cloning a single branch or using lower fetch depth could speed up the process significantly due to the sheer amount of branches and history.

As a reference, I used these steps to build a kernel with the rpi-6.12.y branch:

# Install dependencies and up-to-date gcc toolchain 
sudo apt-get install gcc-arm-linux-gnueabihf flex bison libncurses5-dev

# Clone the repository (single branch, low depth for speed)
git clone --branch rpi-6.12.y --single-branch --depth 1 https://github.com/analogdevicesinc/linux.git linux-adi
cd linux-adi

# Config for e.g. RPi Compute Module 4
ARCH=arm make adi_bcm2711_defconfig

# Build kernel
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions