How to add kernel modules in yocto

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

How to add kernel modules in yocto

3,987件の閲覧回数
Chethan
Contributor III

Hi,

I am using LS1046ARDB board for one of my project, in that I am able to build the yocto root file system and loaded into board it was booted properly but now my problem is I am unable to load the any of the kernel modules in it so I check the /etc/modules-load.d directory nothing is there in that.

root@DevelLinux:/etc/modules-load.d# ls
root@DevelLinux:/etc/modules-load.d#

Please help me out of this to resolve this problem (or let know how to add the kernel modules on build)

Thanks & Regards,

Chethan GR. 

ラベル(1)
0 件の賞賛
返信
9 返答(返信)

3,971件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Kernel modules are deployed in bootpartition tar ball, after execute the following command, Kernel modules are deployed in the second partition.

flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r

rootfs_lsdk2012_yocto_devel_arm64.tgz -d /dev/sdx

On the target board, Kernel modules are mounted in folder /boot/modules/ automatically after the system booting up as normal.

You also could mount the second partition of the boot device manually as the following.

root@DevelLinux:~# umount /boot
root@DevelLinux:~# mount | grep boot
root@DevelLinux:~# mount /dev/mmcblk0p2 /boot
[ 1593.148987] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
root@DevelLinux:~# ls /boot/modules/5.10.35/
build modules.builtin modules.dep modules.softdep
kernel/ modules.builtin.alias.bin modules.dep.bin modules.symbols
modules.alias modules.builtin.bin modules.devname modules.symbols.bin
modules.alias.bin modules.builtin.modinfo modules.order source

In addition, you could generate bootpartition tar ball with the following command.

$ flex-builder -i mkbootpartition

0 件の賞賛
返信

3,943件の閲覧回数
Chethan
Contributor III

Hi,

No, actually there was version problem in that my kernel version and yocto build kernel version

(my kernel version is 4.19.90 and yocto kernel version is 5.12)

so Please let me know the where I can change the version while build the my yocto root file system

Thanks & Regards

Chethan GR

 

0 件の賞賛
返信

3,932件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please generate bootpartition_LS_arm64_lts_4.19.tgz with the following commands.

$ flex-builder -c linux:linux:LSDK-20.12-V4.19 -a arm64

$ flex-builder -i mkbootpartition

0 件の賞賛
返信

3,928件の閲覧回数
Chethan
Contributor III

Hi,

After following above steppes still I am not able to load kernel modules.

Thanks & Regards

Chethan GR

0 件の賞賛
返信

3,919件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

First please generate bootpartition_LS_arm64_lts_4.19.tgz with the following command, Kernel modules are deployed in this package.

$ flex-builder -c linux:linux:LSDK-20.12-V4.19 -a arm64

$ flex-builder -i mkbootpartition

Then refer to my first post to deploy bootpartition tar ball and rootfs tar ball to the target board.

After boot up Linux OS, please mount the second partition to /boot folder to get Kernel modules.

root@DevelLinux:~# mount /dev/mmcblk0p2 /boot
[ 1593.148987] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
root@DevelLinux:~# ls /boot/modules/5.10.35/

0 件の賞賛
返信

3,920件の閲覧回数
Chethan
Contributor III

Hi,

-> I gave the command to build Linux using "$ flex-builder -c linux:linux:LSDK-20.12-V4.19 -a arm64"

-> Then build the boot tar ball using "$ flex-builder -i mkbootpartition"

Loaded into target machine

root@DevelLinux:~# ls /boot/modules/4.19.139/
extra/ modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
kernel/ modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols

But kernel modules are not loaded on boot-up time

Thanks & Regards,

Chethan GR

0 件の賞賛
返信

3,918件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please mount the second partition manually with the following command.

# mount /dev/mmcblk0p2 /boot

0 件の賞賛
返信

3,916件の閲覧回数
Chethan
Contributor III

Hi,

Below is output of manually I mounted the partition 2,

root@DevelLinux:~# mount /dev/mmcblk0p2 /boot
[ 60.546056] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
root@DevelLinux:~# lsmod
Module Size Used by
root@DevelLinux:~#

 

Thanks & Regards,

Chethan GR.

0 件の賞賛
返信

3,905件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Kernel modules cannot be inserted automatically during the system booting up, you need to insert required Kernel modules manually.

0 件の賞賛
返信