Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build kernel 6.6.22 #34

Open
marsohod4you opened this issue Jul 31, 2024 · 2 comments
Open

Cannot build kernel 6.6.22 #34

marsohod4you opened this issue Jul 31, 2024 · 2 comments

Comments

@marsohod4you
Copy link

Made following steps:

git clone https://github.com/altera-opensource/linux-socfpga.git
cd linux-socfpga/
git branch
socfpga-6.6.22-lts
make ARCH=arm socfpga_defconfig
make ARCH=arm menuconfig (disabled driver vrsioning etc, according to doc)
make ARCH=arm LOCALVERSION=zImage -j 20

Building with make immediately drops error:

nick@ubuntu16:~/fpga/DE10/linux-socfpga$ make ARCH=arm LOCALVERSION=zImage -j 20 SYNC include/config/auto.conf.cmd SYSHDR arch/arm/include/generated/uapi/asm/unistd-oabi.h SYSHDR arch/arm/include/generated/uapi/asm/unistd-eabi.h WRAP arch/arm/include/generated/uapi/asm/kvm_para.h WRAP arch/arm/include/generated/uapi/asm/bitsperlong.h WRAP arch/arm/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/arm/include/generated/uapi/asm/errno.h WRAP arch/arm/include/generated/uapi/asm/ioctl.h WRAP arch/arm/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm/include/generated/uapi/asm/msgbuf.h WRAP arch/arm/include/generated/uapi/asm/param.h WRAP arch/arm/include/generated/uapi/asm/poll.h WRAP arch/arm/include/generated/uapi/asm/resource.h WRAP arch/arm/include/generated/uapi/asm/sembuf.h WRAP arch/arm/include/generated/uapi/asm/shmbuf.h WRAP arch/arm/include/generated/uapi/asm/siginfo.h WRAP arch/arm/include/generated/uapi/asm/socket.h WRAP arch/arm/include/generated/uapi/asm/sockios.h WRAP arch/arm/include/generated/uapi/asm/termbits.h WRAP arch/arm/include/generated/uapi/asm/termios.h HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/data.o HOSTCC scripts/dtc/livetree.o UPD include/config/kernel.release HOSTCC scripts/dtc/treesource.o UPD include/generated/uapi/linux/version.h HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/util.o LEX scripts/dtc/dtc-lexer.lex.c YACC scripts/dtc/dtc-parser.tab.[ch] HOSTCC scripts/dtc/libfdt/fdt.o HOSTCC scripts/dtc/libfdt/fdt_ro.o WRAP arch/arm/include/generated/asm/early_ioremap.h WRAP arch/arm/include/generated/asm/extable.h WRAP arch/arm/include/generated/asm/flat.h WRAP arch/arm/include/generated/asm/parport.h WRAP arch/arm/include/generated/asm/compat.h UPD include/generated/utsrelease.h WRAP arch/arm/include/generated/asm/dma-mapping.h WRAP arch/arm/include/generated/asm/emergency-restart.h WRAP arch/arm/include/generated/asm/exec.h UPD include/generated/compile.h WRAP arch/arm/include/generated/asm/irq_regs.h WRAP arch/arm/include/generated/asm/kdebug.h WRAP arch/arm/include/generated/asm/kmap_size.h WRAP arch/arm/include/generated/asm/local.h WRAP arch/arm/include/generated/asm/local64.h HOSTCC scripts/dtc/libfdt/fdt_wip.o HOSTCC scripts/dtc/libfdt/fdt_sw.o WRAP arch/arm/include/generated/asm/mmiowb.h WRAP arch/arm/include/generated/asm/msi.h HOSTCC scripts/dtc/libfdt/fdt_rw.o WRAP arch/arm/include/generated/asm/preempt.h WRAP arch/arm/include/generated/asm/rwonce.h WRAP arch/arm/include/generated/asm/serial.h WRAP arch/arm/include/generated/asm/softirq_stack.h WRAP arch/arm/include/generated/asm/trace_clock.h WRAP arch/arm/include/generated/asm/unaligned.h HOSTCC scripts/dtc/libfdt/fdt_strerror.o HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o HOSTCC scripts/dtc/libfdt/fdt_addresses.o HOSTCC scripts/dtc/libfdt/fdt_overlay.o HOSTCC scripts/dtc/fdtoverlay.o HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/dtc/dtc-parser.tab.o HOSTLD scripts/dtc/fdtoverlay HOSTLD scripts/dtc/dtc HOSTCC scripts/kallsyms HOSTCC scripts/sorttable DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria5_socdk.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria10_chameleonv3.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria10_mercury_pe1.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria10_socdk_nand.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria10_socdk_qspi.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_arria10_socdk_sdmmc.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_chameleon96.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_mcvevk.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_socdk.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_de0_nano_soc.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sockit.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_socrates.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_sodia.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_vining_fpga.dtb DTC arch/arm/boot/dts/intel/socfpga/socfpga_vt.dtb SYSNR arch/arm/include/generated/asm/unistd-nr.h GEN arch/arm/include/generated/asm/mach-types.h SYSTBL arch/arm/include/generated/calls-oabi.S SYSTBL arch/arm/include/generated/calls-eabi.S CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv CC scripts/mod/devicetable-offsets.s gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command-line option ‘-mlittle-endian’ gcc: error: unrecognized command-line option ‘-mlittle-endian’ gcc: error: unrecognized command-line option ‘-mtp=cp15’ gcc: error: unrecognized command-line option ‘-mtp=cp15’ gcc: error: unrecognized command-line option ‘-mfpu=vfp’ make[2]: *** [scripts/Makefile.build:243: scripts/mod/empty.o] Error 1 make[2]: *** Waiting for unfinished jobs.... gcc: error: unrecognized command-line option ‘-mfpu=vfp’ make[2]: *** [scripts/Makefile.build:116: scripts/mod/devicetable-offsets.s] Error 1 make[1]: *** [/home/nick/fpga/DE10/linux-socfpga/Makefile:1201: prepare0] Error 2 make: *** [Makefile:234: __sub-make] Error 2

What I do wrong?
And independant question: When I build kernel, then can I use it for DE10-Standard board?

@marsohod4you
Copy link
Author

I think I found issue.
I need to export additional env var pointing to toolchain gcc.

export CROSS_COMPILE=~/x-tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

I did not see this in doc.
Which exactly toolchain is best or acceptable?

@zangman
Copy link
Owner

zangman commented Aug 1, 2024

This is explained in the setting up development environment page:

https://github.com/zangman/de10-nano/blob/master/docs/Setting-up-the-Development-Environment.md#arm-compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants