How to set the default defconifg in a new machine?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set the default defconifg in a new machine?

Jump to solution
775 Views
rockerr
Contributor II

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`?

Labels (1)
Tags (1)
0 Kudos
1 Solution
741 Views
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.

View solution in original post

4 Replies
607 Views
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 Kudos
742 Views
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.

675 Views
rockerr
Contributor II
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 Kudos
677 Views
rockerr
Contributor II

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 Kudos