How to set the default defconifg in a new machine?

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

How to set the default defconifg in a new machine?

跳至解决方案
2,668 次查看
rockerr
Contributor III

I'm working with i.MX93 evaluation board. To introduce changes to the machine device tree, a new custom machine has to be created and that's what I did, however during the build that had machine set to `imx93-custom-evk`, *bitbake* started to complain about lack of `defconfig` file, like below:

 

| ***
| *** Can't find default configuration "arch/../configs/imx93_11x11_custom_evk_defconfig"!
| ***
| make[2]: *** [/build-ixm/tmp/work/imx93_custom_evk-poky-linux/u-boot-imx/2023.04-r0/git/scripts/kconfig/Makefile:96: imx93_11x11_custom_evk_defconfig] Error 1
| ERROR: oe_runmake failed
| make[1]: Leaving directory 'build-ixm/tmp/work/imx93_custom_evk-poky-linux/u-boot-imx/2023.04-r0/build/imx93_11x11_custom_evk_defconfig'
| make: Leaving directory '/build-ixm/tmp/work/imx93_custom_evk-poky-linux/u-boot-imx/2023.04-r0/git'
| WARNING: exit code 1 from a shell command.
| make[1]: *** [/build-ixm/tmp/work/imx93_custom_evk-poky-linux/u-boot-imx/2023.04-r0/git/Makefile:575: imx93_11x11_custom_evk_defconfig] Error 2
| make: *** [Makefile:177: sub-make] Error 2

 

 

My way of omitting this was to let my new machine use the old `UBOOT_CONFIG_BASENAME = "imx93_11x11_evk"` and not UBOOT_CONFIG_BASENAME = "imx93_custom_evk". I suppose this is considered to be an ugly hack, however I cannot find the original defcong anywhere, is there a better way to achieve this?

How does that u-boot defconfig differ from the regular linux kernel configuration file `.config`?

There's one more problem, it seems that to build the machine a `<machine>-aud-hat.dts` file is required, are there any resources on how such file should be created? Or is it okay if I just copy and rename `imx93-11x11-evk-aud-hat.dts`?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
2,634 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I hope you are doing well.

I suggest you take a look on chapter 3.1.2 "How to build and load U-Boot in Yocto Project" of i.MX Porting Guide

Best regards.

在原帖中查看解决方案

4 回复数
2,500 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

To include new device tree files it is suggested to use patches.

Other way you could try is modify the default device tree files and modify them to build the image with the corresponding changes. Also you could try to compile only the device tree.

You should edit the append it created and add the .dtb for your .dts to the KERNEL_DEVICETREE variable.

Best regards.

0 项奖励
回复
2,635 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I hope you are doing well.

I suggest you take a look on chapter 3.1.2 "How to build and load U-Boot in Yocto Project" of i.MX Porting Guide

Best regards.

2,568 次查看
rockerr
Contributor III
What exactly does the step 5 of 3.1.2 mean - "Edit the machine configuration file with UBOOT_CONFIG options."? Should the UBOOT_CONFIG_BASENAME be changed from the one used in the reference board config, or should it remain the same?
0 项奖励
回复
2,570 次查看
rockerr
Contributor III

Okay, so I managed to follow the steps and get a successful build, however this is still using the original imx93-11x11-evk device tree and I'd like to use one of my own, or somehow insert new content into that original DT. How can I do that? Is there a way that doesn't involve patches?
Do the device trees listen in KERNEL_DEVICETREE:append:use-nxp-bsp have to be copied under the name of my custom DT config?

0 项奖励
回复