Customizing ARTIK Linux Build
Having compiled, loaded, and played with the base version of your Linux build for verification, you have the option of customizing it to use your chosen configurations. Although you could manually edit the configuration files, we recommend you use the
kconfig-frontends tool to add and remove drivers and features.
From time to time, you may also need to install patches.
The system is highly configurable through
Kconfig files. Each file contains declarations for the required configuration variables and provides configuration options. Main Kconfig file entries point to Kconfig files in subdirectories, giving a sub-menu of choices related to the main entry option.
Installing Kconfig Tools
You'll need to do a quick tool installation on your Linux development PC.
Open a bash terminal window.
Change to your working directory, such as
Kconfig-frontendtool for menu configuration.
git clone https://bitbucket.org/nuttx/tools.git tools
./configure --enable-mconf --disable-gconf --prefix=/usr
sudo make install
We chose the
mconf frontend, giving you the menu style seen in the example image we show.
Using the Kconfig tool is fairly intuitive once you get familiar with it. The best way to do so is to open up the tool and view the selections.
There are two configurable entities:
u-boot-artik– the U-Boot code
linux-artik– the Linux kernel
cd into the directory you want to configure, then issue the
make menuconfig command to use the tool. You will need to specify your CPU architecture on the command line as shown in the instructions.
Example: Add PPP Module
The point-to-point protocol (PPP) is used to establish a communications connection between two nodes. The Cellular Modem project requires that this driver module be built into the Linux kernel, so it provides a good example of using the Kconfig tool to enable PPP in the kernel.
Start Kconfig to configure the Linux kernel.
make ARCH=arm artik530_raptor_defconfig
make ARCH=arm menuconfig
make ARCH=arm64 artik710_raptor_defconfig
make ARCH=arm64 menuconfig
Within the menu, use the down arrow to arrive at the selections noted.
Device Drivers --->
and hit Enter to select.
etwork device support --->
and hit Enter.
PPP (point-to-point protocol) support
and hit Space to select (so it shows
< M >).
Enabling PPP displays the following options. Select all of them, one at a time, using the space bar. Verify that your selections match the image below.
- Use the right arrow to select `Save` (Enter), then use the arrow keys (or hit the ESC key twice) to exit each menu until you are out of `Kconfig`.
- Go to
Make each module.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- Image -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j4
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image -j4
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs -j4
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules -j4
Save your configuration file.
make ARCH=arm savedefconfig
mv defconfig arch/arm/configs/artik530_raptor_defconfig
make ARCH=arm64 savedefconfig
mv defconfig arch/arm64/configs/artik710_raptor_defconfig
Build the complete image, or just the kernel.
./release.sh ...(use your usual command line here)
-- OR --
./build_kernel.sh -b artikXXXs_ubuntu(replace XXX with 530, 710)
- To move the updated modules, follow the directions in Updating Device Firmware.
On the first boot, type
to load the new driver module.
Example: Add GSM modem support
Using menuconfig, you can also enable GSM modem support over USB. Refer to the Cellular Modem project for an example.
Follow the same procedure as in the previous example (step 2). This time, under:
Device Drivers ---> USB support ---> USB Serial Converter support --->
< > USB driver for GSM and CDMA modems
by pressing the M key so that it will 'make' as a module.
On your first boot after loading the new images, run
to include the new module.
Updating Device Firmware
To incorporate the updated modules on your ARTIK device, you have multiple choices.
Transfer them using
scp: follow the GitHub procedure for your OS branch and module.
Burn the complete sdfuse image the usual way, using a microSD card.
Use the dfu-util (Device Firmware Update) utility available under Linux.
Patch files are supplied to enable specific configuration features. They are simple to install.
Set up and clean your build environment as always, using the base code revision specified for use with your patch.
Go to the
linux-artikdirectory within the environment.
Save your patch file, such as
patchfile.patch, to this location.
patch < patchfile.patchto apply each patch.
Compile and load the image as always.
Click here for an example of why you would use patch code.