1

I am trying to compile a linux module, which is supposed to run on a arm-64-bit architecture (Cortex-A53). Part of the functionality is to flush the cache at some point, which worked previously on a arm-32-bit architecture. How can I build the Kernel Headers which include the relevant Headers like cache.h and cacheflush.h?

I am using the Xilinx-Toolchain (Vivado & SDK, PetaLinux Tools) to generate all the required Embedded Linux components like bootloader, kernel image and device tree. Furthermore I have cloned the Xilinx-Linux-Repository, switched to the current branch and configured PetaLinux Tools to use the specific Xilinx-Linux-Repo to generate the components using the repository. My platform is the Avnet-UltraZed-EG-IOCC Board and I am using a Debian-10 root filesystem for development. The Module I am trying to compile has worked on other Zynq-7000 Dev. Boards using the outercache.h to flush the cache.

1) Using PetaLinux to build the Boot-Files, Kernel Image and Device Tree

Host $ petalinux-config <hw-desc>  
Host $ petalinux-build  
Host $ petalinux-package ...  

2) cloning the Xilinx-Linux-Repo and building the Header Files

Host $ git clone <xlnx-lnx-repo>; cd <xlnx-lnx-repo>  
Host $ make xilinx_zynqmp_defconfig  
Host $ make deb-pkg  
Host $ make headers_install  
Host $ ls usr/include/*  
Host $ find usr/include/ -name "outercache.h" # Header not found  
Host $ find <xlnx-lnx-repo>/ -name "outercache.h" # Header found under arch/arm/include/asm/outercache.h 

3) booting the System with Debian

UZ3EG $ find /usr/include/ -name "outercache.h" # Header not found  
UZ3EG $ sudo dpkg -I linux-header* linux-image* linux-libc*  
UZ3EG $ cd /lib/modules/<uname -r>/build  
UZ3EG $ make headers_install  
UZ3EG $ make modules  
UZ3EG $ find usr/include/ -name "outercache.h" # Header not found  

I am unsure as to which headers will work, but I expect to find cache.h and cacheflush.h after building the headers into /usr/include/asm/*.h

jboockmann
  • 1,011
  • 2
  • 11
  • 27

0 Answers0