Custom imx93 image for openwrt using yocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Custom imx93 image for openwrt using yocto

1,814 次查看
TomC818
Contributor III

Hi! I am trying to build an image for openwrt using the yocto bsp, I added the meta-openwrt layer to the build system which supposedly already support scarthgap.
https://github.com/kraj/meta-openwrt  
Then I created a new layer for adding custom image for combining imx image with openwrt, which i required openwrt-image-base.bb and imx-image-multimedia.bb and basically combined the packages required for both image.

I then added these lines to local.conf to setting the build system for building for openwrt:


INHERIT += "openwrt-distro-defaults"
TCLIBC = "musl"
DISTRO_FEATURES:append = " procd"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
DISTRO_FEATURES:append = " systemd"
INIT_MANAGER = "systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"


But when i try to build the resulting image I got an error:
firmwared was skipped: missing required distro feature 'systemd' (not in DISTRO_FEATURES)
NOTE: Runtime target 'firmwared' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['firmwared']
ERROR: Required build target 'openwrt-imx-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['openwrt-imx-image', 'firmwared']

Firmwared is already included by openembedded so that shouldn't have been a problem, and as I manually added the systemd to the distro,  supposedly the feature should already been enabled. 

Is it something related to the openwrt distro that forbidden systemd? What should I do to solve the error? I am out of idea, help would be deeply appreciated. 

Thanks in advance.

标签 (1)
标记 (3)
0 项奖励
回复
4 回复数

1,569 次查看
pengyong_zhang
NXP Employee
NXP Employee

Hi @TomC818 

Sorry to reply late, Please refer the below link for OpenWRT using:

https://github.com/nxp-imx/imx_openwrt

B.R

0 项奖励
回复

1,775 次查看
pengyong_zhang
NXP Employee
NXP Employee

hi @TomC818 

ou need to make sure the systemd feature is enabled You have added systemd to DISTRO_FEATURES, but it may not be added to the OpenWRT layer configuration. You need to make sure that the meta-openwrt layer also supports systemd. You can add the following line to the meta-openwrt configuration file or local.conf:

DISTRO_FEATURES:append = " systemd"
PREFERRED_PROVIDER_virtual/init-manager = "systemd"

In local.conf and meta-openwrt configuration, make sure systemd is enabled.
Make sure nothing else is disabling systemd, such as procd.
Check and add firmwared package dependencies.

And about the Openwrt for i.MX, you can refer the below link:

https://github.com/nxp-imx/imx_openwrt

B.R

0 项奖励
回复

1,760 次查看
TomC818
Contributor III
thx for the reply, but as I said, I added these lines already in the local.conf:

INHERIT += "openwrt-distro-defaults"
TCLIBC = "musl"
DISTRO_FEATURES:append = " procd"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
DISTRO_FEATURES:append = " systemd"
INIT_MANAGER = "systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"


Anyway I tried different configs and I found out that if I comment out the line to inherit openwrt-distro in the local.conf, the build environment can detect systemd, and if I leave it in, the build environment will fail again.

Are you aware of any reason of this behaviour? Or is that so openwrt distro has conflict that mess with the build environment?

Are there anyway that I can work around it and continue to inherit openwrt distro to the build?
0 项奖励
回复

1,757 次查看
TomC818
Contributor III

quick update, I found that the class of openwrt-distro-default will disable systemd.
https://github.com/kraj/meta-openwrt/blob/master/classes/openwrt-distro-defaults.bbclass

if i disable using firmwared, is it going to mess up the functioning of the build and image. Firmwared is a package included by the defualt imx images. what should i do in this situation?
0 项奖励
回复