简体   繁体   中英

overriding defconfig in bbappend file

In my chip vendors recipe they define

SRC_URI += "file://defconfig"

In my own layer, I want to override their defconfig and use my own. I have a bbappend file in my recipe-kernel layer that adds my own defconfig file. My bbappend file:

SECTION = "kernel"
SUMMARY = "Kernel config and device tree customization"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://defconfig"
SRC_URI += "file://tree_changes.diff"

The tree_changes.diff file is being applied so my bbappend file is being used at least for that.

The problem is that the vendor defconfig is always used. I dont really want to touch the vendors recipes, is there any better way of overriding the defconfig?

The chip vendor (Atmel/Microchip) bbfile is here: https://github.com/linux4sam/meta-atmel/blob/dunfell/recipes-kernel/linux/linux-at91_5.4.bb

Could it be that your defconfig file is not located under ${THISDIR}/files/<machine> in your layer but rather under ${THISDIR}/files?

${THISDIR}/files/<distro> or ${THISDIR}/files/<machine> have a higher priority than just ${THISDIR}/files.

The different defconfig files are located in

  • ${THISDIR}/files/at91sam9
  • ${THISDIR}/files/sam9x60
  • ${THISDIR}/files/sama5
  • ${THISDIR}/files/sama5d4

in vendor meta-layer, so they would still be used.

So you would need to move your defconfig file to ${THISDIR}/files/<your_machine> in your custom layer. Note that FILESEXTRAPATHS_prepend = "${THISDIR}/files:" remains the same in the recipe. Yocto takes care of extending the path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM