Running Linux – matched version for Linux Kernel and driver debugging 1. Setup the board as described in Board Setup. 2. Extract the SD card image from CD-ROM of SoCkit: /Tools/Factory_SD_image/SoCKit_SD.rar And get SoCKit_SD.img Note: this image can boot the board individually, but does not match with the Linux Kernel executable file in /home/admin/altera/13.0sp1/embedded/embeddedsw/socfpga/prebuilt_images/vmlinux and the source code in /home/admin/altera/13.0sp1/embedded/embeddedsw/socfpga/sources/ So we need to compile the source to get the matched image, which is in step 4. 3. Write SD card image to a micro SD card, using the free tool Win32DiskImager from http://sourceforge.net/projects/win32diskimager/ on Windows 4. Compile the linux kernel source to get matched image that can be used in Linux Kernel and driver debugging Extract linux-altera-3.3.0 source code cd /home/admin/altera/13.0sp1/embedded/embeddedsw/socfpga/sources sudo tar xzf linux-altera-3.7.tgz #wait for the extraction cd linux-altera-3.7 Build ToolChain In case the U-boot or Linux kernel git trees are directly used, the build toolchain has to be manually downloaded. This section contains the instructions on how to download and setup the toolchain for this case. Note that the build toolchain is provided with the Yocto Project Source Package (see Linux Getting Started on Altera SoC Development Board - Using Yocto Source Package). And In case the Yocto Project git tree is used, the recipes will download the build chain automatically. The steps necessary to download and setup the build toolchain are: $ cd ~ $ wget https://launchpad.net/linaro-toolchain-binaries/trunk/2012.11/ +download/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_ linux.tar.bz2 $ tar xjf gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux.tar. bz2 $ export CROSS_COMPILE=/home/admin/gcc-linaro-arm-linux-gnueabihf-4.7-2 012.11-20121123_linux/bin/arm-linux-gnueabihfU-Boot This section presents instructions on how to clone the U-boot git tree and compile U-boot. It assumes that you have manually downloaded the build toolchain. $ git clone http://git.rocketboards.org/u-boot-socfpga.git $ cd u-boot-socfpga $ git checkout -b <test_branch_name> rel_13.02_RC10 $ export CROSS_COMPILE=/home/admin/gcc-linaro-arm-linux-gnueabihf-4.7-2 012.11-20121123_linux/bin/arm-linux-gnueabihf$ make mrproper $ ./MAKEALL socfpga_cyclone5 Note: replace <test_branch_name> with the name of the branch you want to use locally Then compile kernel in the source folder to get uImage and dtb files #setup build environment #in “su” mode cd /home/admin/altera/13.0sp1/embedded/embeddedsw/socfpga/sources /linux-altera-3.7 export CROSS_COMPILE=/home/admin/gcc-linaro-arm-linux-gnueabihf-4.7-2 012.11-20121123_linux/bin/arm-linux-gnueabihfexport ARCH=arm export LOADADDR=0x8000 #import default config(patch will enable new drivers in this config) make defconfig #make a new uImage PATH=/u-boot-socfpga/tools:$PATH make uImage #build the device tree #You need this device tree to get the drivers to work! make socfpga_cyclone5.dtb Replace the uImage and dtb file by the new generated uImage and dtb file(dtb file need to rename to the previous one) 5. Insert the micro SD card to the board and power up the board using PWR switch. 6. Connect a serial terminal from host PC to the serial port corresponding to UART USB connection, and use 57600 baud, no parity, 1 stop bit, no flow control settings. Sudo minicom And enter password 7. After successful boot, you will be prompted for the login name. Enter root and press Enter.