Skip to contentSkip to conversation

Building multiple u-boot binaries in oe-core?

DISCUSSION Ulf Samuelsson 3 participants 4 messages Oct 18, 2011 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

I added the functionality for building multiple u-boot binaries to classic openembedded, but this has not been implemented in oe-core. I find that rather useful. Anyone disagreeing?

The core of this is:

do_compile () {
    if ! [ "x${UBOOT_MACHINES}" == "x" ] ; then
        for board in ${UBOOT_MACHINES} ; do
            if ! [ `grep ${board}_config Makefile | wc -c` == 0 ] ; then
                mkdir -p binaries/${board}
                oe_runmake O=binaries/${board} distclean
                oe_runmake O=binaries/${board} ${board}_config
                oe_runmake O=binaries/${board} all
            fi
        done
    else
           oe_runmake ${UBOOT_MACHINE}
           oe_runmake all
    fi
}

Note that I removed the _config part from UBOOT_MACHINES.

At the moment, the binary after youv'e done
"make beagleboard_config; make" will be called:
u-boot-beagleboard_config-${PV}-${PR}.bin

I think "u-boot-beagleboard-${PV}-${PR}.bin" is nicer.

There aren't that many boards in oe-core at the moment. Isn't this a good time to get rid of UBOOT_MACHINE altogher and/or redefine it without the "_config"

P.S: I am working on another project right now, so I don't know when I have time to test this out on oe-core, so anyone else interested, feel free to implement it

Signature · 2 lines
Best Regards
Ulf Samuelsson
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 18-10-11 10:13, Ulf Samuelsson schreef:

Quoted 13 lines

I added the functionality for building multiple u-boot binaries to classic openembedded, but this has not been implemented in oe-core. I find that rather useful. Anyone disagreeing?

The core of this is:

do_compile () { if ! [ "x${UBOOT_MACHINES}" == "x" ] ; then for board in ${UBOOT_MACHINES} ; do if ! [ grep ${board}_config Makefile | wc -c == 0 ] ; then mkdir -p binaries/${board} oe_runmake O=binaries/${board} distclean oe_runmake O=binaries/${board} ${board}_config oe_runmake O=binaries/${board} all fi done else oe_runmake ${UBOOT_MACHINE} oe_runmake all fi }

Quoted 8 lines

Note that I removed the _config part from UBOOT_MACHINES.

At the moment, the binary after youv'e done "make beagleboard_config; make" will be called: u-boot-beagleboard_config-${PV}-${PR}.bin

I think "u-boot-beagleboard-${PV}-${PR}.bin" is nicer.

There aren't that many boards in oe-core at the moment.

4 qemu machine to be exact

Quoted 2 lines

Isn't this a good time to get rid of UBOOT_MACHINE altogher and/or redefine it without the "_config"

Not sure, there are a *lot* of BSPs out there where _config is expected to be there.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOnTfkMkyGM64RGpERAhgKAJ934JngAAMd33iLVGrYVKYKJ7Am8ACfaxKL GdSJOI5qgK2eFk7OwHwD3eU=
=62Sb
-----END PGP SIGNATURE-----

#3 lore raw

2011-10-18 10:25, Koen Kooi skrev:

Quoted 9 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 18-10-11 10:13, Ulf Samuelsson schreef:

Quoted 5 lines

I added the functionality for building multiple u-boot binaries to classic openembedded, but this has not been implemented in oe-core. I find that rather useful. Anyone disagreeing?

The core of this is:

do_compile ()
{

	if ! [ "x${UBOOT_MACHINES}" == "x" ] ; then
	    for board in ${UBOOT_MACHINES} ; do
		if ! [ `grep ${board}_config Makefile | wc -c` == 0 ] ; then
			mkdir -p binaries/${board}
			oe_runmake O=binaries/${board} distclean
			oe_runmake O=binaries/${board} ${board}_config
			oe_runmake O=binaries/${board} all
		fi
	    done
	else
	    oe_runmake ${UBOOT_MACHINE}
	    oe_runmake all
	fi
}
| Note that I removed the _config part from UBOOT_MACHINES.
|
| At the moment, the binary after youv'e done "make beagleboard_config;
| make" will be called: u-boot-beagleboard_config-${PV}-${PR}.bin
| I think "u-boot-beagleboard-${PV}-${PR}.bin" is nicer.

| There aren't that many boards in oe-core at the moment.

Quoted 6 lines

4 qemu machine to be exact

Quoted 2 lines

Isn't this a good time to get rid of UBOOT_MACHINE altogher and/or redefine it without the "_config"

Not sure, there are a *lot* of BSPs out there where _config is expected to be there.

A simple "sed" script would fix most if not all of the machine descriptions. Doing it the way I did it in openembedded classic, will of course remove the need, but leaving the u-boot recipe somewhat unclean.

Quoted 14 lines

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFOnTfkMkyGM64RGpERAhgKAJ934JngAAMd33iLVGrYVKYKJ7Am8ACfaxKL GdSJOI5qgK2eFk7OwHwD3eU=
=62Sb
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 2 lines
Best Regards
Ulf Samuelsson
#4 lore raw
In reply to Koen Kooi
Quoted 7 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 18-10-11 10:13, Ulf Samuelsson schreef:

Quoted 3 lines

I added the functionality for building multiple u-boot binaries to classic openembedded, but this has not been implemented in oe-core. I find that rather useful. Anyone disagreeing?

I find this very useful and will need to do something similar soon if you don't get to it first ;) I've already internally used some of your old stuff I believe.

Quoted 8 lines
Quoted 8 lines

The core of this is:

do_compile () { if ! [ "x${UBOOT_MACHINES}" == "x" ] ; then for board in ${UBOOT_MACHINES} ; do if ! [ grep ${board}_config Makefile | wc -c == 0 ] ; then mkdir -p binaries/${board} oe_runmake O=binaries/${board} distclean oe_runmake O=binaries/${board} ${board}_config oe_runmake O=binaries/${board} all fi done else oe_runmake ${UBOOT_MACHINE} oe_runmake all fi }

For us UBOOT_MACHINES = "P4008DS P4080DS_SPIFLASH P4080DS_SDCARD P4080DS_NAND"

Sometimes u-boot has different final output images, so maybe having the machine.conf files do something like

UBOOT_OUTPUT["P4080DS_NAND"] = u-boot-nand.bin

So we can automagically have this work in the u-boot recipe.

Quoted 1 line
Quoted 1 line

Note that I removed the _config part from UBOOT_MACHINES.

I think upstream u-boot does not require this anymore.

Quoted 4 lines
Quoted 4 lines

At the moment, the binary after youv'e done "make beagleboard_config; make" will be called: u-boot-beagleboard_config-${PV}-${PR}.bin

I think "u-boot-beagleboard-${PV}-${PR}.bin" is nicer.

I agree.

Quoted 6 lines
Quoted 1 line

There aren't that many boards in oe-core at the moment.

4 qemu machine to be exact

Quoted 2 lines

Isn't this a good time to get rid of UBOOT_MACHINE altogher and/or redefine it without the "_config"

Seems fine either way to me, but I tend to think UBOOT_MACHINE could go away.

Quoted 2 lines

Not sure, there are a *lot* of BSPs out there where _config is expected to be there.

Are these using an old u-boot?

-M