How to build OpenNSL for AS5712 (and, AS6712)

724 views
Skip to first unread message

yoshihiro...@gmail.com

unread,
Jan 10, 2018, 8:43:59 PM1/10/18
to opennetworklinux
Hi all,

Someone, please help us.

We are trying to make the binary of OpenNSL for AS5712 (and, AS6712) from the source code.
However, the error occurred according to the making procedure and the binary of OpenNSL was not able to be made.
The procedure is as follows.

Procedure1
  ONL is installed in AS5712.
  This procedure succeeded.
  This ONL is "latest-DEB8-AMD64-installed.installer", and we obtained it from https://opennetlinux.org/binaries.
  The ONL version is "ONL-2.0.0", and the kernel version is "3.16.39-OpenNetworkLinux".


Procedure2
  We developed the OpenNLS files obtained from Github(https://github.com/Broadcom-Switch/OpenNSL) with AS5712.
  Also this procedure was able to be ended normally.

Procedure3
  We tried make install of OpenNSL on AS5712 according to the following procedure.
   # cd /etc/OpenNSL-master/sdk-6.5.10-gpl-modules/systems/bde/linux/user/kernel
   # make
  This procedure was output the following error and failed.
  
"fatal error: /lib/modules/3.16.39-OpenNetworkLinux/build/include/linux/autoconf.h: No such file or directory".
Some files seems to be missing.

  Please refer to the attached file for a detailed content of the error.

Regards,
Watanabe


error detail.txt

Steven Noble

unread,
Jan 10, 2018, 10:52:41 PM1/10/18
to yoshihiro...@gmail.com, opennetworklinux
Hello,

Have you tried :

export LINUX_UAPI_SPLIT=1



--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yoshihiro...@gmail.com

unread,
Jan 11, 2018, 1:03:09 AM1/11/18
to opennetworklinux
Thanks Steven!

However, the same error occurred though it executed according to the following procedure. 

# export LINUX_UAPI_SPLIT=1

# cd /etc/OpenNSL-master/sdk-6.5.10-gpl-modules/systems/bde/linux/user/kernel
# make
 fatal error: /lib/modules/3.16.39-OpenNetworkLinux/build/include/linux/autoconf.h: No such file or directory

Additional information
The versions of OpenNLS that we are using is "OpenNSL-master.zip(3.4.1.6)".

Other advices, please.

2018年1月11日木曜日 12時52分41秒 UTC+9 Steven Noble:

To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.

Steven Noble

unread,
Jan 11, 2018, 1:08:25 AM1/11/18
to yoshihiro...@gmail.com, opennetworklinux
Are you pointing the build system at the kernel built by onl or using the current system one? 

To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.

yoshihiro...@gmail.com

unread,
Jan 11, 2018, 3:13:19 AM1/11/18
to opennetworklinux
Hi Steven.

We installed ONL on AS5712 according to the following procedure.


 #install_url tftp://IP-address/latest-DEB8-AMD64-installed.installer

Afterwards, we tried the build of OpenNSL on the AS5712.

Regards,
Watanabe


2018年1月11日木曜日 15時08分25秒 UTC+9 Steven Noble:

Steven Noble

unread,
Jan 11, 2018, 9:22:46 AM1/11/18
to yoshihiro...@gmail.com, opennetworklinux
Hi,

We do not include the headers, etc in the installer package as we need the installer to be as small as possible. 

The available kernel modules on the broadcom github should be for the 3.16.39-OpenNetworkLinux kernel. 

I will check when I get into the office. 


To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.

yoshihiro...@gmail.com

unread,
Jan 12, 2018, 12:33:35 AM1/12/18
to opennetworklinux
Hi Steven-san.

I understood that the installer package do not include the header files.
I am sorry, Could you teach us the obtaining method those heder files.

Regards,
Watanabe

2018年1月11日木曜日 23時22分46秒 UTC+9 Steven Noble:

Steven Noble

unread,
Jan 12, 2018, 5:34:09 AM1/12/18
to yoshihiro...@gmail.com, opennetworklinux
Hello,

The easiest way to do it is to download a compile Open Network Linux:

git clone https://github.com/opencomputeproject/OpenNetworkLinux.git
cd OpenNetworkLinux
make docker

then you will have the most recent kernel (with the fixes for the Spectre and Meltdown bugs) and you can compile OpenNSL against those.

January 11, 2018 at 9:33 PM
Hi Steven-san.

I understood that the installer package do not include the header files.
I am sorry, Could you teach us the obtaining method those heder files.

Regards,
Watanabe

2018 年1月11日木曜日 23時22分46秒 UTC+9 Steven Noble:
Hi,

We do not include the headers, etc in the installer package as we need the installer to be as small as possible. 

The available kernel modules on the broadcom github should be for the 3.16.39-OpenNetworkLinux kernel. 

I will check when I get into the office. 

On Jan 11, 2018 12:13 AM, <yoshihiro...@gmail.com> wrote:
Hi Steven.

We installed ONL on AS5712 according to the following procedure.


 #install_url tftp://IP-address/latest-DEB8-AMD64-installed.installer

Afterwards, we tried the build of OpenNSL on the AS5712.

Regards,
Watanabe


2018 年1月11日木曜日 15時08分25秒 UTC+9 Steven Noble:
Are you pointing the build system at the kernel built by onl or using the current system one? 
On Jan 10, 2018 10:03 PM, <yoshihiro...@gmail.com> wrote:
Thanks Steven!

However, the same error occurred though it executed according to the following procedure. 

# export LINUX_UAPI_SPLIT=1

# cd /etc/OpenNSL-master/sdk-6.5.10-gpl-modules/systems/bde/linux/user/kernel
# make

 fatal error: /lib/modules/3.16.39-OpenNetworkLinux/build/include/linux/autoconf.h: No such file or directory

Additional information
The versions of OpenNLS that we are using is "OpenNSL-master.zip(3.4.1.6)".

Other advices, please.

2018 年1月11日木曜日 12時52分41秒 UTC+9 Steven Noble:

January 11, 2018 at 12:13 AM
Hi Steven.

We installed ONL on AS5712 according to the following procedure.


 #install_url tftp://IP-address/latest-DEB8-AMD64-installed.installer

Afterwards, we tried the build of OpenNSL on the AS5712.

Regards,
Watanabe


2018 年1月11日木曜日 15時08分25秒 UTC+9 Steven Noble:
--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
January 10, 2018 at 10:03 PM
Thanks Steven!

However, the same error occurred though it executed according to the following procedure. 

# export LINUX_UAPI_SPLIT=1
# cd /etc/OpenNSL-master/sdk-6.5.10-gpl-modules/systems/bde/linux/user/kernel
# make

 fatal error: /lib/modules/3.16.39-OpenNetworkLinux/build/include/linux/autoconf.h: No such file or directory

Additional information
The versions of OpenNLS that we are using is "OpenNSL-master.zip(3.4.1.6)".

Other advices, please.

2018年1月11日木曜日 12時52分41秒 UTC+9 Steven Noble:

--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
January 10, 2018 at 5:43 PM

thegr...@gmail.com

unread,
Jan 12, 2018, 9:36:55 AM1/12/18
to opennetworklinux


Example for Linux 3.16.39:


I build ONL in a Debian 8 machine, then install ONL on the target. To build SDKs on the target I need the Linux header files. I copy recursively the following folder from the Debian 8 machine [replace /home/devel with the direcotry name where you created the OpenNetworkLinux folder]:


/home/devel/OpenNetworkLinux/REPO/jessie/extracts/onl-kernel-3.16-lts-x86-64-all_amd64/usr/share/onl/packages/amd64/onl-kernel-3.16-lts-x86-64-all/mbuilds/


to the target folder


/lib/modules/3.16.39-OpenNetworkLinux


then rename the folder 


/lib/modules/3.16.39-OpenNetworkLinux/mbuilds -> /lib/modules/3.16.39-OpenNetworkLinux/build

Steven Noble

unread,
Jan 12, 2018, 10:48:51 AM1/12/18
to thegr...@gmail.com, opennetworklinux
I would suggest setting the kernel source and kbuild to the onl build on the machine and then compiling the modules. Moving to the machine requires you to install a lot of extra build packages that are not necessary for the system to run. 

--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.

yoshihiro...@gmail.com

unread,
Jan 14, 2018, 7:51:26 PM1/14/18
to opennetworklinux
Hi Steven.

Thank you for the advice a lot.

We try according to your advice.

Regards,
Watanabe

2018年1月13日土曜日 0時48分51秒 UTC+9 Steven Noble:
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.

Hannes Stefani

unread,
Nov 16, 2022, 7:17:55 AM11/16/22
to opennetworklinux
Any help to build this on AS5610-52X?

Ezpeer Chen

unread,
Nov 22, 2022, 3:15:44 AM11/22/22
to opennetworklinux
You can get kernel source from "packages/base/any/kernels/archives/linux-xxxxx".

If you have kernel source then you can build kernel module for target device.



Hannes Stefani 在 2022年11月16日 星期三晚上8:17:55 [UTC+8] 的信中寫道:

Hannes Stefani

unread,
Nov 23, 2022, 3:55:45 AM11/23/22
to opennetworklinux
Can you show me step by step what i have to do? Do i have to build it on the target (as5610) or an own ubuntu vm or so ?

Hannes Stefani

unread,
Nov 23, 2022, 3:59:33 AM11/23/22
to opennetworklinux
I've tried this: https://github.com/Broadcom-Switch/OpenNSL/issues/34#issuecomment-424718956

Until step 3 everything is working but building opennsl with the kernel headers isn't working in any way i try... i've nearly tried any related issue listed on github but i dont know what im missing...

can anyone share the exact steps to compile opennsl with kernel 3.16.76 for powerpc ?

Ezpeer Chen

unread,
Dec 1, 2022, 5:31:34 AM12/1/22
to opennetworklinux
Where is your detail error log ? (including all build code procedure)

Hannes Stefani 在 2022年11月23日 星期三下午4:59:33 [UTC+8] 的信中寫道:

Hannes Stefani

unread,
Dec 1, 2022, 8:14:20 AM12/1/22
to opennetworklinux
Bildschirmfoto 2022-11-24 um 14.04.42.png
Bildschirmfoto 2022-11-24 um 14.13.10.png

Hannes Stefani

unread,
Dec 1, 2022, 8:20:45 AM12/1/22
to opennetworklinux
The first image shows the attempt with all needed .h (c-headers) files and CFLAGS with include them and it failes with "pointer targets in passing argument 2 of....."  and at the end is "cc1 all warnings are treated as errors". from that on i dont know further what im doing wrong. if i ignore the warnings with another flag it also wont run obviusly :/ this is shown in the second picture.

is there anything i can do ?

Ezpeer Chen

unread,
Dec 15, 2022, 5:29:20 AM12/15/22
to opennetworklinux
I follow this  https://github.com/Broadcom-Switch/OpenNSL/issues/34#issuecomment-424718956


3.build OpenNSL kernel modules.

#> export KERNDIR=/opt/work/OpenNetworkLinux/packages/base/amd64/kernels/kernel-3.16-lts-x86-64-all/builds/linux-3.16.53
#> cd OpenNSL-master/sdk-6.5.12-gpl-modules/systems/linux/user/x86-smp_generic_64-2_6
#> make

It is working with no error.


Priv 在 2022年12月1日 星期四晚上9:20:45 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages