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.

Compilation error in Compiling linux kernel with ethernet and PHY disabled for AM335x Starter kit

Hi, I have to build kernel image with ethernet and PHY disabled in that.

I have followed these steps

http://processors.wiki.ti.com/index.php/AMSDK_Linux_User%27s_Guide for compiling the kernel .

With default settings uImage is perfectly built and with customizing configuration with disabling PHY and ethernet this error comes.

root@EMMYS1314:/home/jasdeep/ti-sdk-am335x-evm-05.05.00.00/board-support/linux-3.2.0-psp04.06.00.08.sdk# make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `am33xx_evm_tx_clk_dly_phy_fixup':
twl-common.c:(.text+0x1361c): undefined reference to `mdiobus_write'
twl-common.c:(.text+0x13630): undefined reference to `mdiobus_write'
arch/arm/mach-omap2/built-in.o: In function `am335x_evm_setup':
twl-common.c:(.text+0x139ac): undefined reference to `phy_register_fixup_for_uid'
twl-common.c:(.text+0x13a38): undefined reference to `phy_register_fixup_for_uid'
make: *** [.tmp_vmlinux1] Error 1

If we disable only ethernet then it compiles properly. if we disable both , then this error comes. Please help me to resolve this error.

  • Hi,

    Your SDK version is getting old. The latest one is 06.00.00.00. It can be downloaded from here: http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html

    Judging by some google results this error has been current earlier this year, so I suppose it has been fixed in the latest version of the SDK. Please download it and see if the error persists.

    Best regards,
    Miroslav

  • Hi Miroslav,

    Earlier i was using sdk 05.05 . Now i downloaded the latest i.e 06.00 but still its giving the same error.

    root@EMMYS1314:/home/jasdeep/ti-sdk-am335x-evm-06.00/board-support/linux-3.2.0-psp04.06.00.11# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
      CHK     include/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
      CALL    scripts/checksyscalls.sh
      CHK     include/generated/compile.h
      CHK     kernel/config_data.h
      GEN     .version
      CHK     include/generated/compile.h
      UPD     include/generated/compile.h
      CC      init/version.o
      LD      init/built-in.o
      LD      .tmp_vmlinux1
    arch/arm/mach-omap2/built-in.o: In function `am33xx_evm_tx_clk_dly_phy_fixup':
    :(.text+0x143ac): undefined reference to `mdiobus_write'
    :(.text+0x143c0): undefined reference to `mdiobus_write'
    arch/arm/mach-omap2/built-in.o: In function `am335x_evm_setup':
    :(.text+0x14930): undefined reference to `phy_register_fixup_for_uid'
    :(.text+0x149c0): undefined reference to `phy_register_fixup_for_uid'
    make: *** [.tmp_vmlinux1] Error 1

    In Configuration i have disabled ethernet and PHY both.

  • Obviously the linker can't find the symbols for these functions (mdiobus_write() and phy_register_fixup_for_uid()) since they have not been compiled.

    Try putting #ifdef CONFIG_ETHERNET or #ifdef CONFIG_PHYLIB around the function calls inside <linux_folder>/arch/arm/mach-omap2/board-am335xevm.c. The functions where you will find these function calls are shown in the linker error output.

    The other approach is to just comment out these lines, but this would be considered a hack, which may later cause bugs if you decide to enable CONFIG_ETHERNET and CONFIG_PHYLIB and forget about the commented out lines.

    Best regards,
    Miroslav

  • Hi,

    I used #ifdef CONFIG_PHYLIB and it worked . But the problem now i am facing is i have disabled only PHY and ethernet drivers in configuration.But i am not able to use Wifi /Bluetooth. I have to disable only Ethernet and not these . Can u pls suggest how to disable ethernet alone.

    Earlier i tried with disabling ethernet only and enabling PHY but ethernet was still working.Pls help.

  • Please attach the boot log as a file.

    This is strange. The CONFIG_WLAN shouldn't depend on neither CONFIG_PHYLIB, nor CONFIG_ETHERNET.

    Best regards,
    Miroslav