diff mbox series

[2/2] u-boot: Add savedefconfig task

Message ID 20221007164640.17471-2-alex.kiernan@gmail.com
State Accepted, archived
Commit efc54f1f836651c8ef27a683a9e5d583c8ce87a6
Headers show
Series [1/2] u-boot: Remove duplicate inherit of cml1 | expand

Commit Message

Alex Kiernan Oct. 7, 2022, 4:46 p.m. UTC
Add savedefconfig task which U-Boot supports (unfortunately not all
consumers of cml1 support this).

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Otavio Salvador Oct. 8, 2022, 7 p.m. UTC | #1
Em sex., 7 de out. de 2022 às 13:47, Alex Kiernan <alex.kiernan@gmail.com>
escreveu:

> Add savedefconfig task which U-Boot supports (unfortunately not all
> consumers of cml1 support this).
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
>

Kernel also does, so might be nice to add it to a specific class and reuse.
Alex Kiernan Oct. 8, 2022, 7:20 p.m. UTC | #2
That was my other thought... this was basically a cut and paste from the
kernel...

Happy to redo like that!


On Sat, 8 Oct 2022, 20:01 Otavio Salvador, <otavio.salvador@ossystems.com.br>
wrote:

>
>
> Em sex., 7 de out. de 2022 às 13:47, Alex Kiernan <alex.kiernan@gmail.com>
> escreveu:
>
>> Add savedefconfig task which U-Boot supports (unfortunately not all
>> consumers of cml1 support this).
>>
>> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
>>
>
> Kernel also does, so might be nice to add it to a specific class and reuse.
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>
diff mbox series

Patch

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index b2f33e382664..5705e5835b21 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -26,6 +26,13 @@  UBOOT_LOCALVERSION ?= ""
 
 require u-boot-configure.inc
 
+do_savedefconfig() {
+	bbplain "Saving defconfig to:\n${B}/defconfig"
+	oe_runmake -C ${B} savedefconfig
+}
+do_savedefconfig[nostamp] = "1"
+addtask savedefconfig after do_configure
+
 do_compile () {
     if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
         sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk