Skip to contentSkip to conversation

RFC: Renaming uboot-utils

DISCUSSION Andy Wilcox 5 participants 8 messages Dec 17, 2007 1 message not in the archive

lore
Share & tools
lore
#0 lore raw
Quoted 26 lines · On Sat, 15 Dec 2007 14:14 "Leon Woestenberg" <[email protected]> wrote:
Quoted 10 lines · Koen Kooi
Quoted 9 lines

Andy Wilcox schreef:

Quoted 2 lines
Quoted 2 lines

Since uboot-utils builds a native binary (mkImage) it should really be called uboot-utils-native.

That part makes sense. FWIW, we already have a uboot-mkimage-native recipe in OE.

Also, consider u-boot-utils instead of uboot-utils. The project is called u-boot and I thought I saw both namespaces appear in the u-boot dir?
(If I'm too late, probably forget this).

Also +1 from me.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

My motivation is (a) I'd really like to build a few tools from uboot which are cross-compiled

And now you're talking about uboot-utils-cross, not uboot-utils-native

Quoted 8 lines

Not necessarely.

Anything *-cross is a tool that is built for, and runs on one platform and generates output for another.

Andy said a few tools which *are* cross-compiled, so he I think he wants to cross-compile tools, which are deployed on the target and as such do not generate output for another target.

Leon is exactly right. I meant I'd use the newly-freed u-boot-utils to build a few programs for the target - in my case, I'm interested in fw-setenv, which allows one command-line manipulation of the u-boot environment area in flash.

Sorry for any confusion.

#1 lore raw

Hello Andy,

Quoted 37 lines · you
Quoted 26 lines · On Sat, 15 Dec 2007 14:14 "Leon Woestenberg" <[email protected]> wrote:
Quoted 10 lines · Koen Kooi
Quoted 9 lines

Andy Wilcox schreef:

Quoted 2 lines
Quoted 2 lines

Since uboot-utils builds a native binary (mkImage) it should really be called uboot-utils-native.

That part makes sense. FWIW, we already have a uboot-mkimage-native recipe in OE.

Also, consider u-boot-utils instead of uboot-utils. The project is called u-boot and I thought I saw both namespaces appear in the u-boot dir?
(If I'm too late, probably forget this).

Also +1 from me.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

My motivation is (a) I'd really like to build a few tools from uboot which are cross-compiled

And now you're talking about uboot-utils-cross, not uboot-utils-native

Quoted 8 lines

Not necessarely.

Anything *-cross is a tool that is built for, and runs on one platform and generates output for another.

Andy said a few tools which *are* cross-compiled, so he I think he wants to cross-compile tools, which are deployed on the target and as such do not generate output for another target.

Quoted 6 lines

Leon is exactly right. I meant I'd use the newly-freed u-boot-utils to build a few programs for the target - in my case, I'm interested in fw-setenv, which allows one command-line manipulation of the u-boot environment area in flash.

Sorry for any confusion.

Yeah, all this discussion became rather confusing. To understand
what's it all about, a careful look at the commit was required, and that uncovered few botched things:

--- packages/uboot/u-boot-utils_1.2.0.bb 64396fa43c9fcef1ed1cd3ae82a49d140febbbd0
+++ packages/uboot/u-boot-utils_1.2.0.bb 64396fa43c9fcef1ed1cd3ae82a49d140febbbd0

+DEPENDS_openprotium = "mtd-utils"

Think again - does u-boot-utils require mtd-utils headers or tools
during compile-time? Moreover, is it required for openprotium only?

+SRC_URI_append_openprotium = " \

+        file://fw_env.c.patch;patch=1 \
+        file://tools-Makefile.patch;patch=1 \
+        file://env-Makefile.patch;patch=1 \
+        file://fw_env.config"

What so special of these patches that they apply only to
openprotium?

+EXTRA_OEMAKE_openprotium = "CROSS_COMPILE=${TARGET_PREFIX}"

Overrides above are worth privilege of doubt, but this one doesn't
need it: doing things like this in the OE mainline is rather incorrect behavior to all other projects/users.

--- packages/tasks/task-base.bb 784db9539c99a3dfc0ce43cc4b61f9cd5eba3b27 +++ packages/tasks/task-base.bb 7a9b59f5510daa79b732e48d67445e1d5ebc4c81
RDEPENDS_task-base-uboot = "\
- uboot-utils"
+ u-boot-utils-native"

More attention could have been spent here too - non-native
package *cannot* RDEPENDS on native, this is one of abort conditions in insane.bbclass. Someone who added the original line thought that uboot-utils is actually what its name suggests. When you'll be fixing it, don't forget about this:

--- conf/distro/include/angstrom-2007-preferred-versions.inc f3d89d1d37708d933d79f1a37dbef5925a80cf82
+++ conf/distro/include/angstrom-2007-preferred-versions.inc 2ee34e9004f488e328231f5a1f139e5225d0e2cf
-PREFERRED_VERSION_uboot-utils ?= "1.2.0"
+PREFERRED_VERSION_u-boot-utils-native ?= "1.2.0"

Signature · 2 lines
Best regards,
 Paul                            mailto:[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hello Andy,

[cc'ed back to the list]

Quoted 20 lines · you

Hi Paul, I appreciate the extra eyes.

Quoted 19 lines

Yeah, all this discussion became rather confusing. To understand
what's it all about, a careful look at the commit was required, and that uncovered few botched things:

uboot/u-boot-utils_1.2.0.bb 64396fa43c9fcef1ed1cd3ae82a49d140febbbd0 +1 -0
 
+DEPENDS_openprotium = "mtd-utils"
 
   Think again - does u-boot-utils require mtd-utils headers or tools

during compile-time? Moreover, is it required for openprotium only?

uboot/u-boot-utils_1.2.0.bb 64396fa43c9fcef1ed1cd3ae82a49d140febbbd0 +5 -0
+SRC_URI_append_openprotium = " \
+        file://fw_env.c.patch;patch=1 \
+        file://tools-Makefile.patch;patch=1 \
+        file://env-Makefile.patch;patch=1 \
+        file://fw_env.config"
Quoted 6 lines
Quoted 4 lines

What so special of these patches that they apply only to
openprotium?

Building fw_setenv does require mtd-utils at compile time to pick up certain headers.

Hm. Can't it be really built against just kernel headers? Pity, but
ok.

Quoted 7 lines

OP is the only distro that currently needs u-boot-utils (for fw_setenv, a target
utility). I was trying to bend that out of the way: this package won't do anything if you aren't building OP. But perhaps that was wrong - I should always built that utility, and you can use this package or not. Is the latter
way the right OE way?

Yes, I'd say the right way for mainline OE is to use machine/distro
overrides very sparingly, in selected places only. OE provides flexible overrides mechanism to address special needs a vendor may have to build its product per its requirements, but such overrides better live in vendor trees/overlays. For mainline OE, I'd say it's better to err on generality, than create complex and non-maintainable overrides maze (an example is OPIE which risked removal from OE due to this, and by now has been almost completely cleared off from any machine-specific hacks).

Quoted 14 lines
Quoted 6 lines

+EXTRA_OEMAKE_openprotium = "CROSS_COMPILE=${TARGET_PREFIX}"

Overrides above are worth privilege of doubt, but this one doesn't
need it: doing things like this in the OE mainline is rather incorrect behavior to all other projects/users.

Yeah, sorry - this is a remnant from the (broken) way the old package worked. I should have caught that.

Quoted 6 lines
tasks/task-base.bb 7a9b59f5510daa79b732e48d67445e1d5ebc4c81 renamed from tasks/task-base.bb 784db9539c99a3dfc0ce43cc4b61f9cd5eba3b27 +1 -1
 RDEPENDS_task-base-uboot = "\
-    uboot-utils"
+    u-boot-utils-native"
Quoted 10 lines
Quoted 6 lines

More attention could have been spent here too - non-native
package *cannot* RDEPENDS on native, this is one of abort conditions in insane.bbclass. Someone who added the original line thought that uboot-utils is actually what its name suggests. When you'll be fixing it, don't forget about this:

Perhaps the MACHINE|DISTRO_FEATURES uboot should just go away? It was only needed to make the native mkimage program, which really should be a kernel DEPENDS anyway. Sound reasonable?

Let's hear Rod Whitby speak up, AFAIR, he added those features. But
as far as I understand, no, they should be there, and are the way to add a particular bootloader support to *any* distro. Have a look at apex and redboot support at the same place. So, if you say that your machine has u-boot as bootloader, you'll get utils to manage it in the image. Ditto for other bootloaders.

[]

Signature · 2 lines
Best regards,
 Paul                            mailto:[email protected]
#4 lore raw
Quoted 10 lines · Paul Sokolovsky
Quoted 9 lines

OP is the only distro that currently needs u-boot-utils (for fw_setenv, a target
utility). I was trying to bend that out of the way: this package won't do anything if you aren't building OP. But perhaps that was wrong - I should always built that utility, and you can use this package or not. Is the latter
way the right OE way?

Quoted 11 lines

Yes, I'd say the right way for mainline OE is to use machine/distro
overrides very sparingly, in selected places only. OE provides flexible overrides mechanism to address special needs a vendor may have to build its product per its requirements, but such overrides better live in vendor trees/overlays. For mainline OE, I'd say it's better to err on generality, than create complex and non-maintainable overrides maze (an example is OPIE which risked removal from OE due to this, and by now has been almost completely cleared off from any machine-specific hacks).

Sounds reasonable. I'll adjust that.

Quoted 6 lines
Quoted 6 lines

Perhaps the MACHINE|DISTRO_FEATURES uboot should just go away? It was only needed to make the native mkimage program, which really should be a kernel DEPENDS anyway. Sound reasonable?

Let me answer my own question here. It appears that MACHINE|DISTRO_FEATURES was serving two purposes - one - to actually make a u-boot.bin file for the target, and two - to
generate mkimage on the build host. Given the former, it
should definitely not go away!

A few kernels will need to add the u-boot-utils-native dependency, notably the linkstation. I'll make these adjustments in the commit.

Regards,
Andy

#5 lore raw

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

Andy Wilcox schreef:

Quoted 2 lines

A few kernels will need to add the u-boot-utils-native dependency, notably the linkstation. I'll make these adjustments in the commit.

And witness the joys of using linux.inc: automagic dependency on mkimage for machines that need it!

regards,

Koen

- --
[email protected] will go go away in december 2007, please use [email protected] instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHZurFMkyGM64RGpERAtRaAJ4j2Q7fVMLaY7JbEazogWro3iYIZgCggkdD aeY0fFxhJWIZN+J5cHXlRcE=
=Fsd1
-----END PGP SIGNATURE-----

#6 lore raw

Hello Koen,

Quoted 10 lines · you

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

Andy Wilcox schreef:

Quoted 2 lines

A few kernels will need to add the u-boot-utils-native dependency, notably the linkstation. I'll make these adjustments in the commit.

And witness the joys of using linux.inc: automagic dependency on mkimage for machines that need it!

Actually, that magic is pretty dumb ;-) :

# Not every device needs mkimage to generate a kernel image, but lets make OE a bit more

# friendly and increase the "Just Works(TM) factor. Building uboot takes only a minute. 
DEPENDS += " u-boot-mkimage-openmoko-native "

P.S. As of now, u-boot, u-boot-utils-native, u-boot-mkimage-openmoko-native all stage mkimage. Waste. Need to cleanup.

Quoted 3 lines

regards,

Koen

Signature · 2 lines
Best regards,
 Paul                            mailto:[email protected]
#7 lore raw
Quoted 6 lines · Paul Sokolovsky

Hello Koen,

Quoted 2 lines

And witness the joys of using linux.inc: automagic dependency on mkimage for machines that need it!

Actually, that magic is pretty dumb ;-) :

Please refresh your metadata ;)

Koen merged my code from Poky which adds mkimage dependency ONLY for uImage devices.

Signature · 4 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant

           time is what keeps things from happening all at once
#8 lore raw
In reply to Paul Sokolovsky
Quoted 6 lines · Paul Sokolovsky
Quoted 4 lines · you

Perhaps the MACHINE|DISTRO_FEATURES uboot should just go away? It was only needed to make the native mkimage program, which really should be a kernel DEPENDS anyway. Sound reasonable?

Quoted 6 lines

Let's hear Rod Whitby speak up, AFAIR, he added those features. But
as far as I understand, no, they should be there, and are the way to add a particular bootloader support to *any* distro. Have a look at apex and redboot support at the same place. So, if you say that your machine has u-boot as bootloader, you'll get utils to manage it in the image. Ditto for other bootloaders.

Actually, I think NAiL added the uboot machine feature. I only looked at the uboot and redboot ones that were already there and added apex.

-- Rod