This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Error while cross compiling a kernel 4.1.13gitxxxx with toolchain ti-processor-sdk-linuxam335xx-evm-2.00.01.07-Linux-x86-Install.bin for TI am335x beagle bone black platform related to intel e1000e directory : drivers/net/ethernet/intel/e1000e

Hi TI community

Thank you for the wonderful support  forum.


Please help me out this issue while i am cross compiling a kernel 4.1.13gitxxxx with toolchain ti-processor-sdk-linuxam335xx-evm-2.00.01.07-Linux-x86-Install.bin , i am copying .config of kernel generated using ARCH=arm menuconfig to my board defconfig file = tisdk_am335x-evm_defconfig  and compiling using script given in sdk : make linux clean; make linux (2 error)
In  .config of kernel if i disable intel e1000 related config_enable flag still it gave error related to intel  ei40 etc.

My host machine  :ubuntu 14.04 LTS kernel version : 3.13.0-46-generic 
Any help appreciated !


Following are error  during compilation stage:

CC [M]  drivers/net/ethernet/intel/e1000e/netdev.o
  CC [M]  drivers/net/wimax/i2400m/usb.o
  LD [M]  drivers/net/wimax/i2400m/i2400m.o
  LD [M]  drivers/net/wimax/i2400m/i2400m-usb.o
  CC [M]  drivers/net/ethernet/intel/e1000e/ptp.o
  CC [M]  drivers/net/wireless/ray_cs.o
  CC [M]  drivers/scsi/libiscsi_tcp.o
  CC [M]  drivers/scsi/iscsi_tcp.o
  CC [M]  drivers/scsi/iscsi_boot_sysfs.o
  CC [M]  drivers/net/wireless/wl3501_cs.o
  LD [M]  drivers/net/ethernet/intel/e1000e/e1000e.o
  CC [M]  drivers/scsi/ips.o
  CC [M]  drivers/net/ethernet/intel/i40e/i40e_main.o
  CC [M]  drivers/net/ethernet/intel/i40evf/i40evf_main.o
drivers/scsi/ips.c:210:2: warning: #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
#warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
  ^
In file included from drivers/net/ethernet/intel/i40evf/i40e_adminq.h:32:0,
                from drivers/net/ethernet/intel/i40evf/i40e_type.h:33,
                from drivers/net/ethernet/intel/i40evf/i40evf.h:45,
                from drivers/net/ethernet/intel/i40evf/i40evf_main.c:27:
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:302:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:1538:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:1538:29: error: enumerator value for 'i40e_static_assert_i40e_aqc_configure_partition_bw_data' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
                            ^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:302:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:302:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:1875:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:1875:28: error: enumerator value for 'i40e_static_assert_i40e_aqc_nvm_config_data_feature' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
                            ^
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h:302:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
In file included from drivers/net/ethernet/intel/i40e/i40e_adminq.h:32:0,
                from drivers/net/ethernet/intel/i40e/i40e_type.h:33,
                from drivers/net/ethernet/intel/i40e/i40e.h:57,
                from drivers/net/ethernet/intel/i40e/i40e_main.c:28:
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1540:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1540:29: error: enumerator value for 'i40e_static_assert_i40e_aqc_configure_partition_bw_data' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
                            ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1877:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1877:28: error: enumerator value for 'i40e_static_assert_i40e_aqc_nvm_config_data_feature' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
                            ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
make[6]: *** [drivers/net/ethernet/intel/i40evf/i40evf_main.o] Error 1
make[5]: *** [drivers/net/ethernet/intel/i40evf] Error 2
make[5]: *** Waiting for unfinished jobs....
  CC [M]  drivers/net/ethernet/intel/i40e/i40e_ethtool.o
make[6]: *** [drivers/net/ethernet/intel/i40e/i40e_main.o] Error 1
make[6]: *** Waiting for unfinished jobs....
  CC [M]  drivers/net/wireless/rndis_wlan.o
  CC [M]  drivers/net/wireless/zd1201.o
In file included from drivers/net/ethernet/intel/i40e/i40e_adminq.h:32:0,
                from drivers/net/ethernet/intel/i40e/i40e_type.h:33,
                from drivers/net/ethernet/intel/i40e/i40e.h:57,
                from drivers/net/ethernet/intel/i40e/i40e_ethtool.c:29:
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1540:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1540:29: error: enumerator value for 'i40e_static_assert_i40e_aqc_configure_partition_bw_data' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
                            ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:32: warning: division by zero [-Wdiv-by-zero]
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1877:1: note: in expansion of macro 'I40E_CHECK_STRUCT_LEN'
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:1877:28: error: enumerator value for 'i40e_static_assert_i40e_aqc_nvm_config_data_feature' is not an integer constant
I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
                            ^
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:304:49: note: in definition of macro 'I40E_CHECK_STRUCT_LEN'
  { i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
                                                ^
make[6]: *** [drivers/net/ethernet/intel/i40e/i40e_ethtool.o] Error 1
make[5]: *** [drivers/net/ethernet/intel/i40e] Error 2
make[4]: *** [drivers/net/ethernet/intel] Error 2
make[3]: *** [drivers/net/ethernet] Error 2
make[3]: *** Waiting for unfinished jobs....

Best Regards

Rohit kamat

  • Hello Rohit,

    Please, check this guide.
    If you issue make linux_clean and make linux commands from the processor SDK's top level directory, the compilation should succeed. I have just run these commands and there were no errors.

    Best regards,
    Kemal

  • Thanks for the reply Kemal R.Shakir

    Even one of my client using the same way, i am still following his instruction as he was successfully cross compiled like you said.
    I want to understand is compilation really depend on host machine( ubuntu 14.04 PC used for x-compile) since even i tried with the same host pc kernel 3.19.xx earlier i was using 3.12.xx .
    want to know why do we copy .config which created after make ARCH=arm menuconfig to tisdk_am335x-evm_defconfig
    if we diff both files both are having lots of difference in configuration. if i used default config file provided in sdk in /boardsupport/kernelxxx/arch/arm/configs/ then compilation is ok.

    please guide

    Best Regards
    Rohit
  • You can check the command sequence in the top Makefile:

    linux: linux-dtbs
    @echo =================================
    @echo Building the Linux Kernel
    @echo =================================
    $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) $(DEFCONFIG)
    $(MAKE) -j $(MAKE_JOBS) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) zImage
    $(MAKE) -j $(MAKE_JOBS) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules

    In this line:

    $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) $(DEFCONFIG)

    the make build system copies the tisdk_am335x-evm_defconfig to kernels root directory as .config not the .config to tisdk_am335x-evm_defconfig as you manually do.

  • Hi Kemal R. Shakir,

    you are correct  but i am being told by  my client to first generate .config of kernel and then overwrite the default tisdk_am335x-evm_defconfig then compile in processor SDK's top level directory.

    Can you verify is that valid steps, since we are looking for enabling the sdio interface for beaglebone black.

    Best Regards

    Rohit Kamat

  • No, this doesn't seem like a valid criteria. When you install the processor SDK, the kernel directory is clean and there is no .config file, if you execute make menuconfig the .config file will be generated as per configuration of your host machine (personal computer). Then if you overwrite the default tisdk_am335x-evm_defconfig with the generated .config, your PC configuration will became AM335x's default configuration. Which will probably cause many compilation errors. I would suggest you not to overwrite the default defconfig and configure the sdio interface to as per the steps from this wiki page.

  • Hi Kemal R. Shakir,
    Thanks for the reply
    Since I am doing make menuconfig with ARCH=arm so .config will be generated of arm architecture but yes i didn't provide the compiler name in kernel directory , Correct me if am wrong

    Best Regards
    Rohit
  • No, when you specify the architecture by ARCH=arm, only the architecture dependent configs will be changed and the other settings will stay the same, describing your host machine.

  • Hi Kemal R. Shakir ,

    Thanks for your Tremendous support !!


    I got the point but right now i will go for usb interface , I will later on try sdio interface.


    Thanks & regards

    Rohit Kamat