On Tue, Apr 26, 2022 at 6:59 AM JH <[email protected]> wrote: > > Hi, > > I followed Yocto document 2.3.3 Changing the Configuration to set up a > complete working Linux kernel defconfig in my kernel bbappend, I > copied the defconfig to build/.config: > do_compile:prepend () { > install -m 0644 ${WORKDIR}/defconfig ${WORKDIR}/build/.config > } > > I hope the build system can just use the defconfig in build/.config, > but that did not work, the build system still ran Restart config... to > compare the defconfig and to generate and overwrite build/.config. How > can I suppress the build system not to run the "Restart config" > process, just to run the compile process using the build/.config I > copied to build/.config?
You can't suppress the kernel's config step, it is always going to run. You can't just copy over .config and have the kernel build. The behaviour of the configuration depends on the kernel recipe and bbclasses in play. I can answer from the context of linux-yocto/kernel-yocto.bbclass and the default kernel.bbclass. If you have a file called "defconfig" in your SRC_URI, it will be copied into the kernel's .config and then yes, the kernel configuration step will be run. The kernel's config subsystem will apply its logic, and what your final .config is .. may or may not be exactly what that input defconfig. If the defconfig is a full copy of a .config (which is what they used to be), then you can use either allnoconfig as the mode, or all defconfig as the mode .. it won't make much of a difference since most settings are fully specified. But the kernel-yocto processing assumes an older defconfig style, and will use allnoconfig when it sees a 'defconfig' and the mode isn't explicitly specified. If the defconfig was created using savedefconfig or similar, then you'd want to specify the mode as alldefconfig, since you need those defaults to be used to get a functional .config created. Bruce > > I tried to add KCONFIG_MODE = "alldefconfig" in my kernel bbappend, > but it did not work either. > > Appreciate your advice. > > Thank you very much. > > Kind regards, > > JH > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#56925): https://lists.yoctoproject.org/g/yocto/message/56925 Mute This Topic: https://lists.yoctoproject.org/mt/90705185/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
