Forum Discussion
Altera_Forum
Honored Contributor
16 years agoKernel Compile Problem
Hi!
I just downloaded and set up the nios2-linux-20090825 tarball and am trying to build the kernel. I am getting the following error output and not sure why. Any ideas would be greatly appreciated! Note that I am using Ubuntu as my Linux env. make ARCH=nios2 CROSS_COMPILE=nios2-linux-gnu- O=/home/nick/nios2-linux/uClinux-dist/linux-2.6.x -j4 -C ../linux-2.6 || exit 1 make[1]: Entering directory `/home/nick/nios2-linux/linux-2.6' GEN /home/nick/nios2-linux/uClinux-dist/linux-2.6.x/Makefile CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-nios2 Using /home/nick/nios2-linux/linux-2.6 as source for kernel /home/nick/nios2-linux/linux-2.6 is not clean, please run 'make mrproper' in the '/home/nick/nios2-linux/linux-2.6' directory. make[2]: *** [prepare3] Error 1 make[1]: *** [sub-make] Error 2 make[1]: INTERNAL: Exiting with 5 jobserver tokens available; should be 4! make[1]: Leaving directory `/home/nick/nios2-linux/linux-2.6' make: *** [linux] Error 14 Replies
- Altera_Forum
Honored Contributor
Please try clean your kernel source tree with,
cd nios2-linux/linux-2.6 git clean -f -x -d Then go back to uClinux-dist and make again. - Hippo - Altera_Forum
Honored Contributor
>>cd nios2-linux/linux-2.6
git clean -f -x -d << Thanks! This gets me around my problem. Got one more question though. Im still not 100% clear on how to handle the nios2 header file. From what I've gathered so far, one now runs an Altera provided script (sopc-create-header-files) to generate the system header file and then one must copy that file to arch/nios2/include/asm as "custom_fpga.h" Is that essentially correct? - Altera_Forum
Honored Contributor
Yes. It is needed if you are using a custom fpga design rather than the golden ref design from altera.
- Hippo - Altera_Forum
Honored Contributor
Got it, thanks!
Ours is a custom system that also includes some kernel drivers that we developed here. So, we will also need to roll those into the kernel eventually. I'm sure that I will have a question or 2 about that when I get around to it since it looks like the Kconfig system in this release is substantially different from previous versions, including the old Microtronix 2.6.11 that I'm accustomed to.