Power & Source of Big Ideas

Building mainline kernel for Neo 2

Moderators: chensy, FATechsupport

I'm following instructions from http://wiki.friendlyarm.com/wiki/index.php/Mainline_U-boot_and_Linux
There are errors when I try to build u-boot:

Code: Select all

root@na-L:/home/na# cd u-boot/
root@na-L:/home/na/u-boot# git checkout sunxi-v2017.x
Branch sunxi-v2017.x set up to track remote branch sunxi-v2017.x from origin.
Switched to a new branch 'sunxi-v2017.x'
root@na-L:/home/na/u-boot# make nanopi_h5_defconfig CROSS_COMPILE=aarch64-linux-gnu-
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
root@na-L:/home/na/u-boot# make CROSS_COMPILE=aarch64-linux-gnu-
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
  CHK     include/generated/generic-asm-offsets.h
  UPD     include/generated/generic-asm-offsets.h
  CC      arch/arm/lib/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  SHIPPED scripts/dtc/pylibfdt/libfdt.i
  PYMOD   scripts/dtc/pylibfdt/_libfdt.so
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
scripts/dtc/pylibfdt/Makefile:26: recipe for target 'scripts/dtc/pylibfdt/_libfdt.so' failed
make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
scripts/Makefile.build:425: recipe for target 'scripts/dtc/pylibfdt' failed
make[2]: *** [scripts/dtc/pylibfdt] Error 2
scripts/Makefile.build:425: recipe for target 'scripts/dtc' failed
make[1]: *** [scripts/dtc] Error 2
Makefile:491: recipe for target 'scripts' failed
make: *** [scripts] Error 2



Building kernel image and dtbs works fine.

Code: Select all

root@na-L:/home/na/linux# git checkout sunxi-4.x.y
Checking out files: 100% (34437/34437), done.
D   net/netfilter/xt_DSCP.c
D   net/netfilter/xt_HL.c
D   net/netfilter/xt_RATEEST.c
Branch sunxi-4.x.y set up to track remote branch sunxi-4.x.y from origin.
Switched to a new branch 'sunxi-4.x.y'
root@na-L:/home/na/linux# touch .scmversion
root@na-L:/home/na/linux# make sunxi_arm64_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
root@na-L:/home/na/linux# make Image dtbs ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/arm64/include/generated/uapi/asm/errno.h
  WRAP    arch/arm64/include/generated/uapi/asm/ioctl.h

...

  OBJCOPY arch/arm64/boot/Image
  DTC     arch/arm64/boot/dts/allwinner/overlays/sun50i-h5-gpio-dvfs-overlay.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-m1-plus2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-core2.dtb
  DTC     arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-k1-plus.dtb

But I also need kernel modules. When I try to make "all", I'm getting errors:

Code: Select all

root@na-L:/home/na/linux# make all ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
make[2]: *** No rule to make target 'net/netfilter/xt_HL.c', needed by 'net/netfilter/xt_HL.o'.  Stop.
scripts/Makefile.build:573: recipe for target 'net/netfilter' failed
make[1]: *** [net/netfilter] Error 2
Makefile:1024: recipe for target 'net' failed
make: *** [net] Error 2



Help would be appreciated. Thank you.
You might want to start here: https://github.com/armbian/build

Tested. And you get better results.

This is all you need to run:

Code: Select all

./compile.sh BOARD="nanopineo2" BRANCH="next" KERNEL_ONLY="yes" KERNEL_CONFIGURE="no"


If you want full image - recommended, you need to change KERNEL_ONLY="no" BUILD_DESKTOP="no" RELEASE="stretch"
Does the 2nd USB work with mainline? As far as I know, not.
gdm85 wrote:
Does the 2nd USB work with mainline? As far as I know, not.

I got 2 Neo2 with the NAS-Case and there all USB-Ports do work just fine :)

ARMBIAN 5.42.180319 nightly Debian GNU/Linux 9 (stretch) 4.14.27-sunxi64
Linux nanopineo2 4.14.27-sunxi64 #33 SMP Sun Mar 18 10:26:35 CET 2018 aarch64 GNU/Linux
@guidol I have a FriendlyElec NanoPi-NEO-Plus2

Can you share your /proc/config.gz just in case? Models are different so might not be useful at all
gdm85 wrote:
@guidol I have a FriendlyElec NanoPi-NEO-Plus2
Can you share your /proc/config.gz just in case? Models are different so might not be useful at all

OK - did only see the Neo2 at the title....

Here is the config.gz from /proc/ ou tof armbian for the Neo2

Attachments

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 825 on Wed Aug 28, 2019 3:18 pm

Users browsing this forum: No registered users and 5 guests