Project

General

Profile

4.4 testing

This page has been replaced with the release of the April 2018 Alpha MDK.
https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Linux_Kernel_(2018_April_MDK_Release)

Branched from git://git.ti.com/processor-sdk/processor-sdk-linux.git, Branch: processor-sdk-linux-03.02.00
Adds initial support for the Critical Link MitySOM-335x module and dev kit.

Multiple device trees are provided for different SOM configurations.

Pre-compiled products
The following sections describe building the Linux kernel and U-Boot from source.
Pre-compiled products are provided as part of the MDK. They can be found at <MDK dir>/deploy.
If you wish to use these you can skip to the "Booting from SD Card" section.

Supported interfaces using the MitySOM-335x dev kit

Tested:

  • Console
  • MMC0
  • Ethernet (Micrel PHY)
  • RS-485 (UART3/UART4, Expansion 0/1)
  • CAN0/CAN1
  • USB/micro USB

U-Boot has been upgraded to 2017.01.
(The old instructions may be found here: https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Das_U-Boot_Port)

New U-Boot configuration names:

mitysom335x_devkit_1GB_defconfig    :   1 GB NAND SOMs
mitysom335x_devkit_512MB_defconfig  : 512 MB NAND SOMs
mitysom335x_devkit_256MB_defconfig  : 256 MB NAND SOMs

New U-Boot build steps:

source /opt/criticallink/mitysom-335x_2018-03-06/environment-setup-cortexa8hf-neon-criticallink-linux-gnueabi
make distclean
make mitysom335x_devkit_<size>_defconfig
make -j4

Bootargs:

U-Boot# setenv bootargs console=ttyS0,115200n8

Build instructions

On a Linux install or Virtual Machine, install yocto toolchain from mitysom-335x-devkit-MDK-2018-03-06.sh (as of yet unreleased).

NOTE: After TI's EZSDK release 8.0, TI has renamed their SDKs from EZSDK to Processor SDK. They also decided to reset their numbering scheme to 1.0. Their latest processor SDK should work with this example and is available here: http://www.ti.com/tool/PROCESSOR-SDK-AM335X

$ source /opt/criticallink/mitysom-335x_2018-03-06/environment-setup-cortexa8hf-neon-criticallink-linux-gnueabi
$ make distclean
$ make mitysom-335x-devkit_defconfig
$ make -j4 zImage modules
$ make INSTALL_MOD_PATH=/path/to/root_filesystem modules_install
$ make dtbs

The device tree files will be located at arch/arm/boot/dts/

Device tree configurations. Some configurations do not exist as products. See the "Purchase" section of the 335x product page, https://www.criticallink.com/product/mitysom-335x, for available SOMs.

am335x-mitysom.dtb          :   No   NAND,  No  NOR
am335x-mitysom-NOR.dtb      :   No   NAND, 8 MB NOR
am335x-mitysom-256M.dtb     : 256 MB NAND,  No  NOR
am335x-mitysom-256M-NOR.dtb : 256 MB NAND, 8 MB NOR
am335x-mitysom-512M.dtb     : 512 MB NAND,  No  NOR
am335x-mitysom-512M-NOR.dtb : 512 MB NAND, 8 MB NOR
am335x-mitysom-1G.dtb       :   1 GB NAND,  No  NOR
am335x-mitysom-1G-NOR.dtb   :   1 GB NAND, 8 MB NOR

Booting from Network (Currently Untested)

Useful U-Boot boot commands (loading Device tree, kernel, and filesystem over the network):
(you will need to set $serverip to the IP address of the EZSDK machine)

setenv fdtaddr 0x88000000; setenv fdt_high 0xFFFFFFFF; setenv kloadaddr 0x80007fc0
setenv rootpath /export/rootfs
run net_args
setenv serverip xx.xx.xx.xxx
dhcp; tftp $fdtaddr am335x-mitysom.dtb; tftp $kloadaddr zImage; bootz $kloadaddr - $fdtaddr

Booting from SD Card

Note for pre-compiled sources:
A pre-compiled kernel can be found at <MDK dir>/deploy/zImage-zImage_devkit.bin
U-Boot can be found at <MDK dir>/deploy/<nand size>_NAND. These folders contain both u-boot.img and MLO.
Device trees can be found at <MDK dir>/deploy. The names are a bit mangled with extra Yocto build information.
For example: zImage--4.4.32-devkit+git0+732d088b6c-r1-am335x-mitysom-1G-20180306220334.dtb is equivalent to am335x-mitysom-1G.dtb

If you already have an SD card from the Critical Link Dev Kit, there are two main partitions on the card: boot and rootfs. You will need to copy files to these partitions in order to boot the 4.4 kernel:

  • U-Boot: copy to the boot partition.
    $ sudo cp MLO /path/to/mounted/sdcard/boot
    $ sudo cp u-boot.img /path/to/mounted/sdcard/boot
    
  • zImage: copy to the boot partition.
    $ sudo cp arch/arm/boot/zImage /path/to/mounted/sdcard/boot
    
  • Device tree file: copy to the Boot partition:
    $ sudo cp arch/arm/boot/dts/am335x-mitysom<som configuration>.dtb /path/to/mounted/sdcard/boot/am335x-mitysom.dtb
    
  • Rootfs: copy to the rootfs partition on the sdcard. The yocto root filesystem can be found in /opt/criticallink/mitysom-335x_2018-03-06/deploy/mitysom-335x-devkit-mitysom-335x.tar.bz2
    PLEASE type carefully so you do not delete important system files.
    $ cd /path/to/mounted/sdcard/rootfs
    $ sudo rm -rf /path/to/mounted/sdcard/rootfs/*
    $ sudo tar xavf mitysom-335x-devkit-mitysom-335x.tar.bz2
    
  • Kernel modules: copy to the root filesystem.
    $ sudo cp -R path/to/installed/modules/lib/modules/4.4*  /path/to/mounted/sdcard/rootfs/lib/modules/
    
  • Syncronize disks
    This command may not print output. Wait until it completes before removing the SD card to avoid corrupting the SD card.
    sync
    
  • Unmount the SD card
    umount /path/to/mounted/sdcard/boot
    umount /path/to/mounted/sdcard/rootfs
    

Once the files have been copied to your SD card, please use these commands in U-Boot to boot the 4.4 kernel:

U-Boot# mmcinfo
U-Boot# setenv fdtaddr 0x88000000; setenv fdt_high 0xFFFFFFFF; setenv kloadaddr 0x80007fc0
U-Boot# fatload mmc 0 $kloadaddr zImage            
reading zImage
4284120 bytes read in 477 ms (8.6 MiB/s)
U-Boot# fatload mmc 0 $fdtaddr am335x-mitysom.dtb
reading am335x-mitysom.dtb
37893 bytes read in 10 ms (3.6 MiB/s)
U-Boot# run mmc_args
U-Boot# bootz $kloadaddr - $fdtaddr

You can save the current U-Boot environment to NAND using the saveenv command. In addition, once you have commands you want to use to boot (and you're typing them in manually), you can save those commands to the bootcmd variable which U-Boot runs by default:

  • U-Boot# setenv bootcmd "mmcinfo; fatload mmc 0 $kloadaddr zImage; fatload mmc 0 $fdtaddr am335x-mitysom.dtb; run mmc_args; bootz $kloadaddr - $fdtaddr"
  • U-Boot# saveenv

This will save this config to the NAND and it should run on the next boot if you do not interrupt U-Boot.

Go to top
Add picture from clipboard (Maximum size: 1 GB)