Project

General

Profile

Linux Kernel

Critical Link has a kernel repository on our local git server. The kernel project for the MitySOM-5CSX tracks the rocketboards.org kernel, and only modifications to support the MitySOM-5CSX module have been added. Currently, that amounts to a new kernel configuration file and device tree settings file.

The current supported kernel version is: 3.16

Building the kernel outside of Yocto

  1. Grab the kernel from our git repo
    git clone git://support.criticallink.com/home/git/linux-socfpga.git
    
  2. Change into that directory
    cd linux-socfpga
    
  3. Check out the 3.16 branch
    git checkout -b socfpga-3.16 origin/socfpga-3.16
    
  4. Change into the Altera Embedded Shell.
    Quartus 14.1 Installed
    ~/altera/14.1/embedded/embedded_command_shell.sh
    

    Quartus 13.1 Installed
    ~/altera/13.1/embedded/embedded_command_shell.sh
    
  5. Set a base configuration for the Kernel
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mitysom5csx_devkit_defconfig
    
  6. (Optional) Add any custom configurations to the kernel
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
    

    Note: If you are using an machine missing the ncurses library, you will get an error indicating to install ncurses. To do this on the xubuntu build VM just run the following command:
    sudo apt-get install libncurses5-dev
    
  7. Build the Kernel
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j 4 LOADADDR=0x8000 uImage
    

    Note: If an error of "mkimage" command not found - U-Boot images will not be built is given. Install uboot-mkimage
    sudo apt-get install uboot-mkimage
    
  8. Once the kernel build is complete a message will be given stating where the Kernel image (uImage) is located, I.E.:
      Image arch/arm/boot/uImage is ready
    
  9. Build the device tree blob(DTB)
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x8000 dtbs
    
    • arch/arm/boot/dts/socfpga_mitysom5csx_devkit.dtb - 5CSX-H6-42A
    • arch/arm/boot/dts/socfpga_mitysom5csx_devkit_hdmi.dtb - 5CSX-H6-42A
    • arch/arm/boot/dts/socfpga_mitysom5csx-h6-53b_devkit.dtb - 5CSX-H6-53B
    • arch/arm/boot/dts/socfpga_mitysom5cse_devkit.dtb - 5CSE-L8-3YA
    • arch/arm/boot/dts/socfpga_mitysom5csx-h6-4ya_devkit.dtb - 5CSX-H6-4YA or 5CSX-H5-4YA
    • arch/arm/boot/dts/socfpga_mitysom5cse-h4-3ya_devkit.dtb - 5CSE-h4-3YA
  10. Build the kernel modules
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x8000 modules
    
  11. Copy the modules to a temporary location so after they can be moved to the SD card. The following will create a folder called lib in your /tmp directory. This lib folder will have all the kernel modules built in the previous step
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x8000 INSTALL_MOD_PATH=/tmp modules_install
    
  12. Copy the lib folder to the root[/] of the partition that holds the filesystem on the SD card, by default this is partition 2.

socfpga-4.1.33-ltsi

There is currently an alpha branch for the socfpga-4.1.33-ltsi branch. This branch was forked from https://github.com/altera-opensource/linux-socfpga/tree/socfpga-4.1.33-ltsi. It is still under testing, with the following interfaces checked out: USB host mode and ethernet.

DEFCONFIG: socfpga_mitysom_defconfig
DTS: socfpga_mitysom5csx_devkit.dts

There is an issue found with this branch: the dtb of the device tree has grown and will overwrite the kernel when u-boot loads the dtb into RAM. Changing the loadfdtaddr U-Boot environment variable will solve this issue.

Example of how to change it in u-boot:

set loadfdtaddr 0x1900000
saveenv

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