- Table of contents
- Linux Kernel
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¶
- Grab the kernel from our git repo
git clone git://support.criticallink.com/home/git/linux-socfpga.git
- Change into that directory
cd linux-socfpga
- Check out the 3.16 branch
git checkout -b socfpga-3.16 origin/socfpga-3.16
- 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
- Set a base configuration for the Kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mitysom5csx_devkit_defconfig
- (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
- 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-mkimagesudo apt-get install uboot-mkimage
- 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
- 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
- Build the kernel modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x8000 modules
- 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
- 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