Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

Arrow SoCKit Linaro Desktop with ACDS 14.0 and Linux 3.13

Altera_Forum
Honored Contributor II
1,369 Views

Hi, I thought I'd provide some tips on using Arrow SoCKit Linaro Linux Desktop on ACDS 14.0, as I got it working just recently. This assumes you already have this one installed successfully: 

http://www.rocketboards.org/foswiki/view/projects/sockitlinarolinuxdesktop 

 

* Used Makefile provided in <ACDS 14.0>/embedded/examples/hardware/cv_soc_devkit_ghrd 

 

* The preloader and uboot image built seem to work fine this time. 

make preloader uboot; 

cd software/preloader; 

cat preloader-mkpimage.bin u-boot.img > boot-partition.img 

dd if=boot-partition.img bs=512 of=<boot partition of microsdcard> 

 

* Use script git_clone.sh in embedded/embeddedsw/socfpga/source to get socfpga-3.13 kernel. 

make socfpga_defconfig 

make -j4 uImage 

 

* Tedious: the default uImage is now too big for the default 10Mb partition on the microsd card. Went through menuconfig and turned off a lot of stuff. Also turned on CONFIG_FB and CONFIG_FB_ALTERA_VIP. My kernel .config file is attached as config-3.13.txt. This should just squeeze onto the boot partition with the uncompressed soc_system.rbf file. 

 

* USB didn't work initially: that's because the default example cv_soc_devkit_ghrd soc_system.dts doesn't match the kernel dts. I copied hps_0_usb0 and hps_0_usb1 from arch/arm/boot/dts/socfpga.dtsi to my soc_system.dts (built from sopc2dts). Don't forget usbphy0. I then had to compile the dts to dtb using Altera's 13.1 embedded/hotools/gnu/H-i686-pc-linux-gnu/bin/dtc which is no longer provided in 14.0. 

 

Working HPS USB 3.13 DTS looks like this: 

 

usbphy0: usbphy@0 { 

# phy-cells = <0>; 

compatible = "usb-nop-xceiv"; 

status = "okay"; 

}; 

 

 

hps_0_usb1: usb@0xffb40000 { 

compatible = "snps,dwc2"; 

reg = < 0xFFB40000 0x0000FFFF >; 

interrupt-parent = < &hps_0_arm_gic_0 >; 

interrupts = < 0 128 4 >; 

clocks = < &usb_mp_clk >; 

clock-names = "otg"; 

phys = <&usbphy0>; 

phy-names = "usb2-phy"; 

enable-dynamic-fifo = <1>; 

host-rx-fifo-size = <0xa00>; 

host-perio-tx-fifo-size = <0xa00>; 

host-nperio-tx-fifo-size = <0xa00>; 

dma-desc-enable = <0>; 

status = "okay"; 

}; //end usb@0xffb40000 (hps_0_usb1) 

 

* The qsys file auto-upgraded to 14.0 without problems. 

 

That got me booted up and running Linaro.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
402 Views

Also: I overlooked error: kernel: spi_master spi0: problem registering spi master 

This can be fixed by using the entries for spi0 and spi1 from the kernel socfpga.dtsi,  

 

hps_0_spim0: spi@0xfff00000 { 

... 

 

tx-dma-channel = <&hps_0_dma 16>; 

rx-dma-channel = <&hps_0_dma 17>; 

... 

hps_0_spim1: spi@0xfff01000 { 

... 

bus-num = < 1 >; 

 

tx-dma-channel = <&hps_0_dma 20>; 

rx-dma-channel = <&hps_0_dma 21>; 

}
0 Kudos
Reply