Build the Linux kernel out of tree - noritake-itron/itron-bsp-manual GitHub Wiki

Noritake-Itron Board Support Platform User Manual

Build the Linux kernel out of tree

<< back to Home

Index

Obtain sources and the toolchain

<< . 1 . >>

Obtain and install the toolchain

To build the U-Boot you have to use the appropriate toolchain.

You can build and install the toolchain by using the follow Yocto toolchain guide:

The Yocto toolchain

Obtain Linux kernel sources

To get Linux kernel sources you have to clone or download the Linux kernel repository.

Below there is instruction how to clone the repository by using the git software:

git clone [email protected]:noritake-itron/linux-imx.git
cd linux-imx
git checkout imx_4.9.11_1.0.0_ga-itron

Update Linux kernel sources

To update the Linux kernel please use the git command:

cd linux-imx
git pull

Setup and build the Linux kernel

###### << . 2 . >>

Source the environment setup script

You can have two version of the toolchain: Framebuffer or X11.

For the U-Boot, it doesn't matter which version you will use.

wayland version

source /opt/fslc-framebuffer/2.4.1/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi

or

xwayland version

source /opt/fslc-x11/2.4.1/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi

Build the Linux kernel

Clean build

make mrproper

Choose one of the following configurations:

TX10

make tx10_defconfig

Build everything:

make -j4

Build uImage/zImage only

TX070S or TX101S - uImage

make -j4 LOADADDR=0x10008000 uImage

TX070L or TX070U - zImage

make -j4  zImage

Build modules only:

TX070S or TX101S

make -j4 LOADADDR=0x10008000 modules

TX070L or TX070U

make -j4 modules

Build device trees only:

make -j4 dtbs

Deploy the Linux kernel to an SD card

<< . 3 . >>

If you want to install the built Linux kernel on an SD card.

Copy the kernel image (uImage/zImage) and the corresponding DTB file to SD card:

TX070S

$ cp arch/arm/boot/uImage /media/user/BOOT-TX070S/
cp arch/arm/boot/dts/tx070s.dtb /media/user/BOOT-TX070S && sync
Note: Replace user with the correct username
Note: Replace user with the correct username
Note: Copy the DTB file appropriate for your SOM board

Install kernel modus:

sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/media/user/rootfs
Note: Replace user with the correct username

If you want to use our recovery SD card to flash the built U-Boot to NAND flash/eMMC, then copy it to the appropriate location in the SD card:

TX070S or TX101S

$ sudo cp arch/arm/boot/uImage /media/user/rootfs/opt/images/Yocto/
$ sudo cp arch/arm/boot/dts/tx*.dtb /media/user/rootfs/opt/images/Yocto/
Note: Replace user with the correct username

TX070L or TX070U

$ sudo cp arch/arm/boot/zImage /media/user/rootfs/opt/images/Yocto/
$ sudo cp arch/arm/boot/dts/tx*.dtb /media/user/rootfs/opt/images/Yocto/
Note: Replace user with the correct username

Customise the Linux kernel

* << . 4

Configure the kernel

The default kernel configuration files are part of the kernel source tree and are located at:

arch/arm64/configs/

TX10

arch/arm64/configs/tx10_defconfig

You can edit that file manually:

gedit arch/arm64/configs/tx10_defconfig

Or use the kernel configuration menu:

make menuconfig virtual/kernel

When you finish and save your optimal configuration you can replace the imx_tx070s_defconfig (or a different config file) file with the .config file or create your own configuration:

cp .config arch/arm/configs/tx070_defconfig
cp .config arch/arm/configs/my_config_defconfig

Replace the Linux logo

The Linux logo is the second logo during the booting process.

Create the logo image

The maximum resolution of your logo is the same like the resolution of your module (tx101s - 1280x800; tx070s - 1024x600; tx070u/l - 800x480).

Note: for tx070s the maximum height is 590 px

You can use any software you like to create your image.

We encourage to use the open source GIMP.

When your image is ready you have to export logo to the Netpbm format (.ppm), for example:

logo_linux_custom.ppm

You have to install the required software - netpmb (only if not installed):

sudo apt-get install netpbm

Use the netpbm software to reduce the colors to 224:

ppmquant 224 logo_linux_custom.ppm > logo_linux_custom_224.ppm

Put the last file into ASCII mode:

pnmnoraw logo_linux_custom_224.ppm > logo_linux_custom_ascii_224.ppm

Change the name of the final file to the name used in your Linux kernel:

mv logo_linux_custom_ascii_224.ppm logo_tx070s_clut224.ppm
Note: I you need replace tx070s with the name of your machine (tx101s,tx070l,tx070u)

Prepare and rebuild the new Linux kernel

If you have the new prepared logo (appropriate for your machine) you can add that file to kernel sources.

Please copy the file to logo driver directory:

cp logo_tx070s_clut224.ppm */your-path/*linux-imx/drivers/video/logo/

To build and deploy the new Linux kernel you have to follow two guides above:

Setup and build the Linux kernel

Deploy the Linux kernel to an SD card

Disable the Linux logo

You can disable the Linux logo in the configuration file.

In the Configure the kernel section is instruction on how to configure the kernel.

To disable logo you have to edit the corresponding configuration file for example tx070s_defconfig and edit the logos section:

CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
CONFIG_LOGO_TX070S_CLUT224=y
# CONFIG_LOGO_TX101S_CLUT224 is not set
# CONFIG_LOGO_TX070L_CLUT224 is not set
# CONFIG_LOGO_TX070U_CLUT224 is not set

In that case, you can comment out and change to is not set options: CONFIG_LOGO and CONFIG_LOGO_TX070S_CLUT224:

# CONFIG_LOGO is not set
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
# CONFIG_LOGO_TX070S_CLUT224 is not set
# CONFIG_LOGO_TX101S_CLUT224 is not set
# CONFIG_LOGO_TX070L_CLUT224 is not set
# CONFIG_LOGO_TX070U_CLUT224 is not set

When you will add those changes and you will reconfigure and rebuild the Linux kernel you will disable the Linux logo.

Use the default Linux logo with the penguin

All steps are almost the same as in Disable the Linux logo.

You have only change the final configuration to:

CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_LOGO_TX070S_CLUT224 is not set
# CONFIG_LOGO_TX101S_CLUT224 is not set
# CONFIG_LOGO_TX070L_CLUT224 is not set
# CONFIG_LOGO_TX070U_CLUT224 is not set

After the reconfiguration and rebuilding, you will have the logo with (a) small penguin(s). The number of the penguins is equal to the number of CPU cores in the module.

<< back to Top
<< back to Home