Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,135 Views

Yocto build with custom device tree from Quartus

Background: 

I am working with the Atlas/DE0-Nano-SoC Cyclone V board, and I have Yocto (krogoth branch) building fine with the linux-altera kernel (4.6 from krogoth branch, patched with PREEMPT RT) and Linaro gcc (5.3 from master branch), using the default device tree (socfpga_cyclonev_de0_sockit - actually, it builds and installs about 5 of them, and I have to rename this one on the SD card to socfpga.dtb). 

 

Problem: 

Now I want to work with the FPGA, and I'm starting out by pushing some I/O out through the FPGA fabric to the GPIO pins. I have the devicetree source generated from Quartus and sopc2dts. 

 

I was rather surprised that none of the Altera/Rocketboards or Yocto documentation seems cover integrating a custom device tree with the Yocto build, but I have scoured the web looking for information, and have come up short on finding an actual solution. 

 

Things I've done/tried: 

- adding to the kernel recipe to copy the .dts into the kernel source 

- change KERNEL_DEVICETREE to match: 

--- the base filename of the .dts (socfpga_cyclone5_mydevtree) 

--- the full filename of the .dts (socfpga_cyclone5_mydevtree.dts) 

--- the full filename of the desired .dtb (socfpga_cyclone5_mydevtree.dtb) 

--- the full path and filename of the .dts (/path/to/socfpga_cyclone5_mydevtree.dts) 

- similarly change KERNEL_DEVICETREE_cyclone5 

- change both KERNEL_DEVICETREE and KERNEL_DEVICETREE_cyclone5 to matching or different versions of the above 

- editing the Makefile in ${TMPDIR}/work-shared/cyclone5/kernel-source/arch/arm/boot/dts to include a target for my desired .dtb 

- many other things that seemed to make sense at the time... 

 

I can actually get the device tree blob built (but it requires running bitbake twice and changing KERNEL_DEVICETREE and/or KERNEL_DEVICETREE_cyclone5 between runs - I'd like to fix that). Then bitbake errors out building the SD card image because somehow it's still trying to include 5+ versions of the .dtb, even though I have overwritten the variable it's supposed to be looking at for that list (KERNEL_DEVICETREE). 

 

Any help would be greatly appreciated! 

 

Thanks,
0 Kudos
0 Replies
Reply