Debian Bullseye 11 with 5.4-2.1.x-imx_var01 Linux release¶
DART-6UL in this wiki refers to both the Variscite DART-6UL and VAR-SOM-6UL SOMs.
Overview¶
This page describes how to build and install Debian distribution (Bullseye) on Variscite boards with DART-6UL.
Please note that the build script is based on debootstrap. As described in the following instructions, it's kindly suggested to create the build folder on the main Ubuntu volume on your host PC rather than an external media.
Using an external media, although automatically mounted, will cause debootstrap to complain about access rights (even when running the script with sudo).
For additional details about this release, refer to the Release Notes.
Create build environment¶
These instructions were tested on Ubuntu 18.04/20.04 x64 host PCs. When using other distributions, there may be issues.
Note: Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer.
To learn more, please see Variscite's Docker Build Environment guide.
Windows with WSL/WSL2 is not supported for development
Installing required packages¶
On Ubuntu building machine:
$ sudo apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx \
lvm2 dosfstools gpart binutils bison git lib32ncurses5-dev libssl-dev gawk wget \
git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev \
autoconf libtool libglib2.0-dev libarchive-dev xterm sed cvs subversion \
kmod coreutils texi2html bc docbook-utils help2man make gcc g++ \
desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial automake groff curl \
lzop asciidoc u-boot-tools mtd-utils device-tree-compiler flex cmake zstd udisks2 libgnutls28-dev \
python-pysqlite2 python-git python-m2crypto python-pyelftools
While installing the packages, Ubuntu 20.04 users may receive the warning
Since the package is only available in up to Ubuntu 18.04, just ignore it and run:
Note: If you are using Ubuntu 20.04 the QEMU package must be updated to latest version (>= 1:4.2-3ubuntu6.19).
To check the currently installed version of the qemu-user-static package on Ubuntu 20.04 LTS, use the below command:
Deploy source¶
Important update:
As of March 31, 2023, all codeaurora.org repositories have been migrated to other platforms, and the project has been shut down.
For more information, please visit: https://bye.codeaurora.org/
In this context, errors may occur when deploying the Debian sources, such as:
fatal: unable to look up source.codeaurora.org (port 9418) (No address associated with hostname)
Variscite has updated all relevant software repositories. Please refer to the patch(es):
Download archive containing the build script and support files for building Debian Bullseye for this board:
$ cd ~
$ git clone https://github.com/varigit/debian-var.git -b debian_bullseye_var01 debian_imx6ul-var-dart
Create environment (Internet connection should be available):
This environment prepared to build.
Make Debian¶
Build all¶
Internet connection should be available
$ cd ~/debian_imx6ul-var-dart
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c all |& tee build.log
Build by parts¶
Build bootloader¶
Build kernel, dtb files, kernel modules, and kernel headers¶
$ cd ~/debian_imx6ul-var-dart
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c kernel
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c modules
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c kernelheaders
Build rootfs¶
Internet connection should be available
Pack rootfs¶
To create the root file system archive (rootfs.tar.gz) and UBI image (rootfs.ubi.img), run the following commands:
$ cd ~/debian_imx6ul-var-dart
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c rtar
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c rubi
Note: The NAND filesystem is console only and may not have all the features as eMMC/SD card
To fit the NAND UBIFS filesystem as per your need, optimize the UBIFS by removing the packages.
Create boot SD card¶
- Follow the above steps for make rootfs, kernel, bootloader;
- Insert the SD card to card reader connected to a host system;
- Run the following commands (Caution! All data on the card will be destroyed):
$ cd ~/debian_imx6ul-var-dart
$ sudo MACHINE=imx6ul-var-dart ./var_make_debian.sh -c sdcard -d /dev/sdX
where '/dev/sdX' path to the block SD device in your system.
Create a boot SD card image using a loop device¶
It is also possible to use the "MACHINE=imx6ul-var-dart ./var_make_debian.sh" script to create a boot SD card image, while using a loop device instead of attaching a real SD card.
Create an empty file using the following command:
The above command creates a 3700MiB file representing the SD card.
Attach the first available loop device to this file:
To find the actual loop device being used, run:
Write the content to the loop device to generate the SD card image:
(Replace /dev/loopX with your actual loop device, e.g. /dev/loop0)
Detach the loop device from the file:
To compress the SD card image file use the following command:
To write the SD card image to a real SD card device use the following command:
(Replace /dev/sdX with your actual SD device, e.g. /dev/sdb)
Boot the board with a bootable SD card¶
Note: The WiFi is not operational when booting from SD card, as the WiFi and SD card are using the same SDIO interface.
A typical use-case is to boot from an SD card, flash the eMMC/NAND flash, and re-boot from the eMMC/NAND flash to have the WiFi operational.
Setting the Boot Mode¶
Booting your system from an SD card requires switching the Boot DIP switches. See picture below.
On the VAR-6ULCustomBoard (with a DART-6UL):
- "00" The current position in the picture will set the system to boot from SD card
- "01" Moving the right switch will set the system to boot from eMMC
- "10" Moving the left switch will set the system to boot from NAND flash
- "11" is illegal.
Be aware that your system has eMMC or NAND but never both.
On the Concerto-Board (with a VAR-SOM-6UL):
- ON-EXT: Boot from the external storage (SD card) - the current position in the picture
- OFF-INT: Boot from the SOM's internal storage (eMMC/NAND flash)
Automatic device tree selection in U-Boot¶
Enable/Disable Automatic Device Tree selection¶
To enable the automatic device tree selection in U-Boot (already enabled by default):
To disable the automatic device tree selection in U-Boot, set the device tree file manually:
Comment:
Make sure you don't set an inappropriate dtb file, like a dtb with nand on a SOM that has eMMC, or a dtb for mx6ull on a SOM with an mx6ul SOC.
Build Results¶
The resulted images are located in ~/debian_imx6ul-var-dart/output/.
|
Image name
|
How to use
|
|---|---|
| rootfs.tar.gz | Root filesystem tarball used for installation on SD card and eMMC |
| rootfs.ubi.img | Console only image for installation on NAND flash |
| zImage | Linux kernel image |
| SPL.nand | SPL built for NAND. The SPL is pre-U-Boot SW component, required for DDR initialization |
| SPL.mmc | SPL built for SD card and eMMC boot. The SPL is pre-U-Boot SW component, required for DDR initialization |
| u-boot.img.nand | U-Boot built for NAND flash |
| u-boot.img.mmc | U-Boot built for SD card or eMMC |
| kernel-headers | kernel headers folder for package creation |
|
Device Tree name
|
Details
|
| imx6ull-var-dart-6ulcustomboard-emmc-sd-card.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-dart-6ulcustomboard-emmc-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-dart-6ulcustomboard-emmc-wifi.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-dart-6ulcustomboard-emmc-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-dart-6ulcustomboard-nand-sd-card.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-dart-6ulcustomboard-nand-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-dart-6ulcustomboard-nand-wifi.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ull-var-dart-6ulcustomboard-nand-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-dart-6ulcustomboard-emmc-sd-card.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-dart-6ulcustomboard-emmc-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-dart-6ulcustomboard-emmc-wifi.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-dart-6ulcustomboard-emmc-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-dart-6ulcustomboard-nand-sd-card.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-dart-6ulcustomboard-nand-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-dart-6ulcustomboard-nand-wifi.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-dart-6ulcustomboard-nand-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6UL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-dart-6ulcustomboard-emmc-sd-card.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-dart-6ulcustomboard-emmc-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-dart-6ulcustomboard-emmc-wifi.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-dart-6ulcustomboard-emmc-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-dart-6ulcustomboard-nand-sd-card.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-dart-6ulcustomboard-nand-sd-card-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-dart-6ulcustomboard-nand-wifi.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-dart-6ulcustomboard-nand-wifi-wm8731.dtb | Device tree blob for DART-6UL with i.MX6ULZ SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ull-var-som-concerto-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-som-concerto-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-som-concerto-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-som-concerto-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-som-concerto-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-som-concerto-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-som-concerto-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ull-var-som-concerto-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-som-concerto-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-som-concerto-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-som-concerto-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-som-concerto-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-som-concerto-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-som-concerto-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-som-concerto-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-som-concerto-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6UL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-som-concerto-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-som-concerto-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-som-concerto-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-som-concerto-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-som-concerto-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-som-concerto-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-som-concerto-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-som-concerto-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Concerto board with i.MX6ULZ SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ull-var-som-symphony-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-som-symphony-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ull-var-som-symphony-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-som-symphony-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ull-var-som-symphony-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-som-symphony-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ull-var-som-symphony-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ull-var-som-symphony-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-som-symphony-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-som-symphony-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ul-var-som-symphony-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-som-symphony-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ul-var-som-symphony-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-som-symphony-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ul-var-som-symphony-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ul-var-som-symphony-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6UL SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-som-symphony-board-emmc-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, eMMC & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-som-symphony-board-emmc-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, eMMC, WM8731 & SD card enabled. (NAND flash & WiFi disabled) |
| imx6ulz-var-som-symphony-board-emmc-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, eMMC & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-som-symphony-board-emmc-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, eMMC, WM8731 & WiFi enabled. (NAND flash & SD card disabled) |
| imx6ulz-var-som-symphony-board-nand-sd-card.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, NAND flash & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-som-symphony-board-nand-sd-card-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, NAND flash, WM8731 & SD card enabled. (eMMC & WiFi disabled) |
| imx6ulz-var-som-symphony-board-nand-wifi.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, NAND flash & WiFi enabled. (eMMC & SD card disabled) |
| imx6ulz-var-som-symphony-board-nand-wifi-wm8731.dtb | Device tree blob for VAR-SOM-6UL on Symphony board with i.MX6ULZ SOC, NAND flash, WM8731 & WiFi enabled. (eMMC & SD card disabled) |
Linux console access¶
| User name | User password | User descriptor |
|---|---|---|
| root | root | system administrator |
| user | user | local user |
| x_user | used for X session access |
Flash images to NAND / eMMC¶
In case you are using a SOM with NAND flash, run the following command as root to install Debian on it:
In case you are using a SOM with eMMC, run the following command as root to install Debian on it:
The above scripts are located in /usr/sbin in the rootfs of the SD card used to boot Debian.
How-to: Test and use an interface¶
Please see this section in the Yocto developer guide page. It is the same for Debian.
How-to: Modify the kernel configuration¶
To modify the kernel configuration (add/remove features and drivers) please follow the steps below:
1. $ cd ~/debian_imx6ul-var-dart/src/kernel
2. $ sudo make ARCH=arm mrproper
3. $ sudo make ARCH=arm imx_v7_var_defconfig
4. $ sudo make ARCH=arm menuconfig
5. Navigate the menu and select the desired kernel functionality
6. Exit the menu and answer "Yes" when asked "Do you wish to save your new configuration?"
7. $ sudo make ARCH=arm savedefconfig
8. $ sudo cp arch/arm/configs/imx_v7_var_defconfig arch/arm/configs/imx_v7_var_defconfig.orig
9. $ sudo cp defconfig arch/arm/configs/imx_v7_var_defconfig
10. Follow the instructions above to rebuild kernel and modules, repack rootfs images and recreate SD card
How-to: Build and install a custom device tree¶
To build and install a custom device tree, add the filename to G_LINUX_DTB in https://github.com/varigit/debian-var/blob/debian_bullseye_var01/variscite/imx6ul-var-dart/imx6ul-var-dart.sh
Build a sample C "Hello, world!" program¶
Create a file called myhello.c with the following content:
Export the C (cross-)compiler path:
$ export CC=~/debian_imx6ul-var-dart/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
Compile:
Now you should have an app called myhello, that can be run on your target board.
You can add it to your rootfs image or copy it directly to the rootfs on the board (using scp, for example).

