I am working with LS1046ARDB Evaluation Board to develop a network based application. I have started my project with Flex-builder(flexbuild_lsdk2108), Flex-installer(version: 1.13.2108) and Codewarrior IDE.
I have download the images from https://lsdk.github.io/components.html
boot_LS -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/boot_LS_arm64_lts_5.10.tgz
firmware image -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1046ardb_sdboot.img
Rootfs -> wget https://www.nxp.com/lgfiles/sdk/lsdk2108/rootfs_lsdk2108_ubuntu_main_arm64.tgz
I have depolyed the image's in SD card through flex-installer:
$ flex-installer -i pf -d /dev/sdx (partition and format the target storage device)
$ sudo flex-installer -b boot_LS_arm64_lts_5.10.tgz -r rootfs_lsdk2108_ubuntu_main_arm64.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdx
I have booted the board using SD card
u-boot :
Model: LS1046A RDB Board
Board: LS1046ARDB, boot from SD
CPLD: V2.3
PCBA: V2.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM: 15.9 GiB (DDR4, 64-bit, CL=15, ECC on)
DDR Chip-Select Interleaving Mode: CS0+CS1
Using SERDES1 Protocol: 4403 (0x1133)
Using SERDES2 Protocol: 21849 (0x5559)
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
=> setenv ethprime FM1@DTSEC6
=> setenv ethact FM1@DTSEC6
=> saveenv
=> boot
linux user-space :
user@localhost:~$ sudo insmod /usr/local/dpdk/rte_kni.ko kthread_mode=multiple
[sudo] password for user:
user@localhost:~$ sudo rmmod rte_kni
user@localhost:~$ ls /dev/kni
/dev/kni
user@localhost:~$ dmesg | grep kni
[ 45.396511] rte_kni: loading out-of-tree module taints kernel.
user@localhost:~$
user@localhost:~$ uname -av
Linux localhost 5.10.35 #1 SMP PREEMPT Fri Aug 27 22:03:58 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
Now KNI loaded successfully with default build taken from LSDK github
Custom Linux build from Flex-builder:
I have followed the steps in this document https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf -> 9.2.3.1 Build DPDK using Flexbuild
$ flex-builder -c linux:custom -a arm64
Linux/arm64 5.10.35 Kernel Configuration
CONFIG_MACSEC = y
CONFIG_CRYPTO_DEV_FSL_CAAM = y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST = y
CONFIG_RTC_DRV_PCF2127 = y
$ flex-builder -c linux -a arm64
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -c openssl -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
$ flex-builder -i mkboot
$ flex-builder -c apps -a arm64
$ flex-builder -i merge-component -a arm64
$ flex-builder -i packrfs
$ flex-builder -i mkfw -m ls1046ardb
$ cd build/images
$ flex-installer -i pf -d /dev/sdx (partition and format the target storage device)
$ sudo flex-installer -b boot_LS_arm64_lts_5.10_202209121352.tgz -r rootfs_lsdk2108_ubuntu_main_arm64_202209121422.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdx
I have booted the board using SD card
u-boot :
Model: LS1046A RDB Board
Board: LS1046ARDB, boot from SD
CPLD: V2.3
PCBA: V2.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM: 15.9 GiB (DDR4, 64-bit, CL=15, ECC on)
DDR Chip-Select Interleaving Mode: CS0+CS1
Using SERDES1 Protocol: 4403 (0x1133)
Using SERDES2 Protocol: 21849 (0x5559)
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
=> setenv ethprime FM1@DTSEC6
=> setenv ethact FM1@DTSEC6
=> saveenv
=> boot
linux user-space :
user@localhost:~$ sudo insmod /usr/local/dpdk/rte_kni.ko kthread_mode=multiple
insmod: ERROR: could not insert module /usr/local/dpdk/rte_kni.ko: Invalid parameters
user@localhost:~$ ls /dev/kni
ls: cannot access '/dev/kni': No such file or directory
user@localhost:~$ sudo rmmod rte_kni
rmmod: ERROR: Module rte_kni is not currently loaded
user@localhost:~$ uname -av
Linux localhost 5.10.35-dirty #14 SMP PREEMPT Thu Sep 8 13:39:50 IST 2022 aarch64 aarch64 aarch64 GNU/Linux
I found this issue due to kernel version but i don't know how to fix it, can you guide me to fix this issue.
Thanks in advance.
Solved! Go to Solution.
Thank you for your reply !
As You mention that i followed " 4.3 How to build LSDK with Flexbuild " in the "Layerscape Software Development Kit User Guide, Rev. 21.08"
ERROR :
root@localhost:/home/user# insmod /usr/local/dpdk/rte_kni.ko kthread=multiple
ERROR : insmod /usr/local/dpdk/rte_kni.ko invalid parameter
SOLUTION:
Following Steps to integrate DPDK and Kernal components in root file system
$ flex-builder -i clean-apps
$ flex-builder -c openssl -a arm64
$ flex-builder -c linux -a arm64
$ flex-builder -c dpdk -a arm64
$ flex-builder -c pktgen_dpdk -a arm64
$ flex-builder -c ovs_dpdk -a arm64
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
$ flex-builder -i mkboot
$ flex-builder -i merge-component -a arm64
$ flex-builder -i packrfs
$ flex-builder -i mkfw -m ls1046ardb
$ cd build/images
$ flex-installer -i pf -d /dev/sdc
$ sudo flex-installer -b boot_LS_arm64_lts_5.10_202210061711.tgz -r rootfs_lsdk2108_ubuntu_main_arm64_202210061712.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdc
CONSOLE LOG :
root@localhost:/home/user# uname -a
Linux localhost 5.10.35-dirty #19 SMP PREEMPT Thu Oct 6 16:41:53 IST 2022 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:/home/user# insmod /usr/local/dpdk/rte_kni.ko kthread=multiple
root@localhost:/home/user# ls /dev/kni
/dev/kni
You need to build the component into the kernel, see the section "Builds specific component",
i.e.
bld -c dpdk because it need to be packing these binaries into the target rootfs.
details in the "4.3 How to build LSDK with Flexbuild" in the ""Layerscape Software Development Kit User Guide, Rev. 21.08""
after follow the steps mentioned in the section 9.2.3 Build DPDK
Thank you for your reply !
As You mention that i followed " 4.3 How to build LSDK with Flexbuild " in the "Layerscape Software Development Kit User Guide, Rev. 21.08"
ERROR :
root@localhost:/home/user# insmod /usr/local/dpdk/rte_kni.ko kthread=multiple
ERROR : insmod /usr/local/dpdk/rte_kni.ko invalid parameter
SOLUTION:
Following Steps to integrate DPDK and Kernal components in root file system
$ flex-builder -i clean-apps
$ flex-builder -c openssl -a arm64
$ flex-builder -c linux -a arm64
$ flex-builder -c dpdk -a arm64
$ flex-builder -c pktgen_dpdk -a arm64
$ flex-builder -c ovs_dpdk -a arm64
$ flex-builder -c cryptodev_linux -a arm64
$ flex-builder -i mkrfs -r ubuntu:main
$ flex-builder -i mkboot
$ flex-builder -i merge-component -a arm64
$ flex-builder -i packrfs
$ flex-builder -i mkfw -m ls1046ardb
$ cd build/images
$ flex-installer -i pf -d /dev/sdc
$ sudo flex-installer -b boot_LS_arm64_lts_5.10_202210061711.tgz -r rootfs_lsdk2108_ubuntu_main_arm64_202210061712.tgz -f firmware_ls1046ardb_sdboot.img -d /dev/sdc
CONSOLE LOG :
root@localhost:/home/user# uname -a
Linux localhost 5.10.35-dirty #19 SMP PREEMPT Thu Oct 6 16:41:53 IST 2022 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:/home/user# insmod /usr/local/dpdk/rte_kni.ko kthread=multiple
root@localhost:/home/user# ls /dev/kni
/dev/kni