Skip to end of metadata
Go to start of metadata

The iMX7 ALPHA1 Linux kernel requires modifications to the ETH2 RGMII PHY signal delays in order to achieve adequate Ethernet performance. The steps below describe how to apply patches to the BSP, either via Yocto or the Linux source.

 

Targeted HardwarephyCORE-i.MX7, phyBOARD-Zeta i.MX7
Targeted Software

BSP Yocto FSL iMX7 ALPHA1

Date

   

Option 1: Apply Patches via Yocto

Choose this option if you are using the Yocto BSP provided with the ALPHA1 release.

  1. Download the tarball iMX7-ALPHA1_ethernet-fixup.tar.bz2 from the PHYTEC Artifactory and extract it into your desired working directory.

    tar -jxvf iMX7-ALPHA1_ethernet-fixup.tar.bz2 -C <WORKDIR>
  2. Follow the steps in the Quickstart to set up the Yocto BSP, particularly configuring the Repo tool and Building the BSP from Source

  3. Before starting the build, add the following patch to meta-phytec so that the linux-phytec-fsl recipe patches the kernel with the Ethernet fixes:

    cd $YOCTO_DIR/sources/meta-phytec
    git am <WORKDIR>/iMX7-ALPHA1_ethernet-fixup/meta-phytec_patches/0001-recipes-kernel-linux-phytec-fsl-add-patches-for-ETH2.patch
  4. Start the build as stated in the Quickstart.

    cd $YOCTO_DIR/build
    MACHINE=imx7-phyboard-zeta bitbake fsl-image-gui

    If this is not a fresh Yocto build (meaning you have already built images within this build directory), you may need to force a rebuild of the Linux kernel in order for the patches to be applied.

    cd $YOCTO_DIR/build
    MACHINE=imx7-phyboard-zeta bitbake linux-phytec-fsl -f -c fetch && bitbake linux-phytec-fsl
    MACHINE=imx7-phyboard-zeta bitbake fsl-image-gui

Option 2: Apply Directly to the Linux Source

The patches can also be applied to the Linux source directly if developing independently of Yocto. Note that if you are using Yocto, it is best to make these changes via meta layers rather than directly to the Linux source within the build directory since bitbake may overwrite the changes made to the source in the local build.

  1. Download the tarball iMX7-ALPHA1_ethernet-fixup.tar.bz2 from the PHYTEC Artifactory and extract it into your desired working directory.

    tar -jxvf iMX7-ALPHA1_ethernet-fixup.tar.bz2 -C <WORKDIR>
  2. To obtain the linux source code independently of Yocto, clone https://stash.phytec.com/scm/pub/linux-phytec-fsl.git and checkout a branch based off of the release branch "imx7-L3.14.52_1.1.0-ga"

    git clone https://stash.phytec.com/scm/pub/linux-phytec-fsl.git
    cd linux-phytec-fsl/
    git checkout -b <your_branch_name> origin/imx7-L3.14.52_1.1.0-ga
  3. Apply patches from iMX7-ALPHA1_ethernet-fixup to the linux source using git am

    git am <WORKDIR>/iMX7-ALPHA1_ethernet-fixup/linux-phytec-fsl_patches/0001-ARM-i.MX6-Add-OF-configuration-support-for-ksz9031.patch
    git am <WORKDIR>/iMX7-ALPHA1_ethernet-fixup/linux-phytec-fsl_patches/0002-NXPIMX7-169-dts-imx7-phyboard-rdk-eth1-add-PHY-fixup.patch

    The commits will now appear in the commit history for this branch:

    $ git log --oneline
    835f08c NXPIMX7-169 dts: imx7-phyboard-rdk: eth1: add PHY fixup delays
    37d0d01 ARM: i.MX6: Add OF configuration support for ksz9031
    9638493 Merge pull request #3 in DEV/linux-phytec-fsl-dev from forward/ahorstmann@phytec.co
    4ceb3dc tools: phytec: update build script to use phyBOARD-Zeta defconfig
    1db2644 dts: imx7-phyboard-rdk: Fix dts model naming issue
    ...
  4. Compile the Linux source, using toolchain built with Yocto  iMX7 ALPHA1 BSP

    make ARCH=arm CROSS_COMPILE=<Yocto BUILDDIR>/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- imx7_phyboard_zeta_defconfig
    make ARCH=arm CROSS_COMPILE=<Yocto BUILDDIR>/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- zImage
    make ARCH=arm CROSS_COMPILE=<Yocto BUILDDIR>/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- imx7-phyboard-rdk.dtb