Dual ethernet on Android 14 i.MX8 MP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Dual ethernet on Android 14 i.MX8 MP

Dual ethernet on Android 14 i.MX8 MP

Overview

The purpose of this document is to provide a guide on how to enable Dual Ethernet with the GKI Development. Reference: How to enable dual ethernet on Android 11

For a better reference how to build Android i.MX image please look at the next chapter 3 Building the Android Platform for i.MX in the Android User's Guide

1. Build the Android Image with the next modifications

  • The 2nd ethernet port is DWMAC from synopsys and phy used is realtek RTL8211F. To add them into the SharedBoardConfig.mk and remove the camera drivers.
    diff --git a/imx8m/evk_8mp/SharedBoardConfig.mk b/imx8m/evk_8mp/SharedBoardConfig.mk
    index f68eb49e..3e95708e 100644
    --- a/imx8m/evk_8mp/SharedBoardConfig.mk
    +++ b/imx8m/evk_8mp/SharedBoardConfig.mk
    @@ -82,7 +82,12 @@ BOARD_VENDOR_KERNEL_MODULES += \
         $(KERNEL_OUT)/drivers/rtc/rtc-snvs.ko \
         $(KERNEL_OUT)/drivers/pci/controller/dwc/pci-imx6.ko \
         $(KERNEL_OUT)/drivers/net/phy/realtek.ko \
    -    $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko
    +    $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko \
    +    $(KERNEL_OUT)/drivers/net/phy/micrel.ko \
    +    $(KERNEL_OUT)/drivers/net/pcs/pcs_xpcs.ko \
    +    $(KERNEL_OUT)/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.ko \
    +    $(KERNEL_OUT)/drivers/net/ethernet/stmicro/stmmac/stmmac.ko \
    +    $(KERNEL_OUT)/drivers/net/ethernet/stmicro/stmmac/stmmac-platform.ko
     ifeq ($(POWERSAVE),true)
     BOARD_VENDOR_KERNEL_MODULES += \
         $(KERNEL_OUT)/drivers/soc/imx/lpa_ctrl.ko \
    @@ -219,15 +224,12 @@ BOARD_VENDOR_RAMDISK_KERNEL_MODULES +=     \
         $(KERNEL_OUT)/drivers/perf/fsl_imx8_ddr_perf.ko \
         $(KERNEL_OUT)/drivers/cpufreq/cpufreq-dt.ko \
         $(KERNEL_OUT)/drivers/cpufreq/imx-cpufreq-dt.ko \
    -    $(KERNEL_OUT)/drivers/media/i2c/ov5640.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-capture.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-isi-capture.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-isi-hw.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-isi-mem2mem.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-mipi-csi2-sam.ko \
         $(KERNEL_OUT)/drivers/dma/imx-sdma.ko \
    -    $(TARGET_OUT_INTERMEDIATES)/VVCAM_OBJ/basler-camera-driver-vvcam.ko \
    -    $(TARGET_OUT_INTERMEDIATES)/VVCAM_OBJ/os08a20.ko \
         $(KERNEL_OUT)/drivers/staging/media/imx/imx8-media-dev.ko \
         $(TARGET_OUT_INTERMEDIATES)/VVCAM_OBJ/vvcam-dwe.ko \
         $(TARGET_OUT_INTERMEDIATES)/VVCAM_OBJ/vvcam-isp.ko \​
  • To let the Android framework's EthernetTracker and EthernetNetworkFactory know which interfaces to manage, the framework level configure

    • config_ethernet_iface_regex
    • config_ethernet_interfaces

    must be overlay in device/nxp/imx8m/evk_8mp/overlay/frameworks/base/core/res/res/values/config.xml:

    diff --git a/imx8m/evk_8mp/overlay/frameworks/base/core/res/res/values/config.xml b/imx8m/evk_8mp/overlay/frameworks/base/core/res/res/values/config.xml
    index 298d50cc..63f6787e 100644
    --- a/imx8m/evk_8mp/overlay/frameworks/base/core/res/res/values/config.xml
    +++ b/imx8m/evk_8mp/overlay/frameworks/base/core/res/res/values/config.xml
    @@ -22,7 +22,12 @@
     <resources>
     
         <!--For Android we support eth0 now -->
    -    <string translatable="false" name="config_ethernet_iface_regex">eth0</string>
    +    <string translatable="false" name="config_ethernet_iface_regex">eth\\d</string>
    +
    +    <string-array translatable="false" name="config_ethernet_interfaces">
    +        <item>eth0;12,13,14,15,16,18,19</item>
    +        <item>eth1;12,13,14,15,16,18,19</item>
    +    </string-array>
     
         <!-- List of regexpressions describing the interface (if any) that represent tetherable
              USB interfaces.  If the device doesn't want to support tething over USB this should
    -- 
  • Apply the patch 0001-PATCH-Add-defines-for-ETH-support-drivers.patch
  • Build the Android Image
    # Change to the MY_ANDROID Directory
    $ source build/envsetup.sh
    $ lunch evk_8mp-userdebug
    $ ./imx-make.sh -j4 2>&1 | tee build-log.txt​

 

GKI Development

Follow and apply the next community post: Export new symbols of GKI development Android 14

Set the GKI repo

  1. $ repo init -u https://android.googlesource.com/kernel/manifest -b common-android14-6.1
    $ repo sync
    $ git remote add device https://github.com/nxp-imx/linux-imx.git
    $ git remote update
    $ git fetch device --tags
    $ git checkout android-14.0.0_1.2.0
    $ cd ..
    #Be sure that symbolic links are created correctly
    $ ln -s ${MY_ANDROID}/vendor/nxp-opensource/verisilicon_sw_isp_vvcam verisilicon_sw_isp_vvcam
    $ ln -s ${MY_ANDROID}/vendor/nxp-opensource/nxp-mwifiex nxp-mwifiex
    $ BUILD_FOR_GKI=yes
    $ BUILD_CONFIG=common/build.config.imx
    $ tools/bazel run //common:imx_abi_update_symbol_list
  2. Apply the following changes in the GKI Kernel tree: gki/common: Patch: 0001-PATCH-GKI-Kernel-tree-Drivers-for-the-ETH1-Interface.patch
  3. Build the GKI Image
    tools/bazel run //common:kernel_aarch64_dist​
  4. Follow the build android boot.img and system_dlkm.img
    $ cp out/kernel_aarch64/dist/boot.img ${MY_ANDROID}/vendor/nxp/fsl-proprietary/
    gki/boot.img
    $ cd ${MY_ANDROID}
    $ TARGET_IMX_KERNEL=true make bootimage
    # Change directory to the gki folder
    $ cp out/kernel_aarch64/dist/system_dlkm_staging_archive.tar.gz ${MY_ANDROID}/vendor/nxp/fsl-proprietary/gki/system_dlkm_staging_archive.tar.gz
    $ cd ${MY_ANDROID}/vendor/nxp/fsl-proprietary/gki
    $ tar -xzf system_dlkm_staging_archive.tar.gz -C system_dlkm_staging
    $ cd ${MY_ANDROID}
    $ make system_dlkmimag​e
  5. Create the tar.gz file for flash the android image (*.img, *.bat, *.sh, *.bin, *.imx)
  6. Boot the image and type lsmod to ensure the drivers are installed.mario_castaneda_0-1719280397418.png

Regards,

Mario

 

 

添付
コメント

Hi,

Can you please give information on why do we need to disable camera drivers to enable ethernet?

Regards. 

評価なし
バージョン履歴
最終更新日:
‎06-24-2024 10:15 PM
更新者: