You can use the Linux source tree to build standalone/external images for your Digi Embedded Yocto platform.
Prepare the sources and build environment
To follow a standalone/external build workflow, you need to:
Clone the Linux kernel repository (https://github.com/digi-embedded/linux.git) to your development machine if you haven’t already done so. Specify the appropriate branch to check out. For ConnectCore 8X on Digi Embedded Yocto 2.6, the branch is: v4.14/dey-2.6/maint.:
git clone https://github.com/digi-embedded/linux.git -b v4.14/dey-2.6/maint
You can also create new branches for your own development needs, but you must periodically merge them with the official branches to get source code updates.
Set up the build environment so your current shell session has the variables needed for the build, such as toolchain path, cross-compile prefixes, and target architecture.
If you don’t already have it, download the Digi Embedded Yocto toolchain for your platform from the Digi support page and install it. See Download and install the toolchain.
Source the environment setup script:
Export the LDFLAGS variable with the following value (or the kernel won’t compile):
export LDFLAGS="-O1 --hash-style=gnu --as-needed"
Configure the kernel
Now that the environment is ready, you can configure the kernel for your platform:
You can also look at the kernel recipes included in Digi Embedded Yocto: each recipe (.bb file) specifies a Linux branch (SRCBRANCH variable) and a set of machines that can use it (COMPATIBLE_MACHINE variable).
After running this command, you can modify your chosen configuration via an ncurses interface with:
Change the kernel configuration as needed, then save and close the configuration tool.
If you wish to save your custom configuration for future builds, save it as a defconfig, copy the generated file to arch/arm64/configs, and name it as you like:
make savedefconfig cp defconfig arch/arm64/configs/my_custom_defconfig
Compile the kernel
Once you have configured the kernel, you can compile it. To build a kernel image and the device tree blobs, run:
|The -j8 flag specifies the number of parallel jobs to run during the build. Set it to twice the number of cores on your development machine to speed up compilation.|
You can find the final kernel Image.gz in arch/arm64/boot and the device tree blobs in arch/arm64/boot/dts/digi.
You can choose to compile only the device tree blobs with:
For information on additional make commands, run: