Skip to contentSkip to conversation

Please review john_lee/openmoko-toolchain

DISCUSSION John Lee 2 participants 4 messages Dec 22, 2008 – Jan 5, 2009

lore
Share & tools
lore

John Lee

author
#0 lore raw

Hi,

This branch contains just 4 extra commits but these are highly controversial.

meta-toolchain.bb: introduce POPULATE_SDK_EXTRA_TASK

In case some more modifications are required before the toolchain is packaged up, introduce this variable to do extra tasks right before packaging.

meta-toolchain-openmoko.bb: add feed to toolchain

By modifying the opkg config files in the toolchain, the toolchain can expend itself by installing packages from the repository.

We need to do some modifications to the contents of toolchain before the packaging complete, so we use this variable as a hook. The modification is to create an opkg config file so the toolchain knows where to get new packages. A better way might be to install distro-feed-configs, but that includes several opkg config files while alias 'opkg-target' uses just one: opkg.conf.

libtool-sdk_1.5.10.bb, meta-toolchain.bb, task-sdk-host.bb: introduce sysroot libtool-sdk.

Add libtool-sdk to help the meta toolchain using the .la files. Patch add_sysroot_function.patch is applied to teach libtool about LIBTOOL_SYSROOT_PATH .

task-sdk-host.bb is updated along with its consumers to include libtool-sdk, and meta-toolchain.bb is updated to include this environment variable.

After some packages is installed by user to extend the toolchain, one will find out that the .la files in the -dev packages often contain incorrect paths. In order to solve that, LIBTOOL_SYSROOT_PATH is introduced, and it works just like PKG_CONFIG_SYSROOT_DIR.

This patch is posted to upstream already:

http://lists.gnu.org/archive/html/libtool-patches/2008-12/msg00000.html

autotools.bbclass: adding do_install_append() to autotools.bbclass

This function is used to correct .la files. Many bb files use their own do_install so just adding this into the original autoclass_do_install won't work. This ensures the .la files contain correct path.

The last commit along is not enough to fix the .la files. This enforces do_install to check the .la files and fix them.

Comments? Flames?

Regards,
John

#1 lore raw
Quoted 9 lines · John Lee

Hi,

meta-toolchain-openmoko.bb: add feed to toolchain

By modifying the opkg config files in the toolchain, the toolchain can expend itself by installing packages from the repository.

Quoted 6 lines

We need to do some modifications to the contents of toolchain before the packaging complete, so we use this variable as a hook. The modification is to create an opkg config file so the toolchain knows where to get new packages. A better way might be to install distro-feed-configs, but that includes several opkg config files while alias 'opkg-target' uses just one: opkg.conf.

Suggestions for the existing patch:

* rename OPENMOKO_URI to TOOLCHAIN_FEED_URI
* move the modify_opkg_conf () to meta-toolchain.bb
* TOOLCHAIN_FEED_URI ? = "" in meta-toolchain.bb
* TOOLCHAIN_FEED_URI = "http://downloads.openmoko.org/repository/testing" in meta-toolchain-openmoko.bb or better, conf/distro/openmoko.conf

That way more distributions can use it and each distro version can have it's own SDK by setting TOOLCHAIN_FEED_URI in its distro file.

As you might have noticed /etc/opkg/arch.conf isn't in any packages (not unlike the initial devnodes), so you have to generate it for the SDK. I ran in to the same problem with the online image creator[1] and resorted to manually installing the conf files: [2]

regards,

Koen

[1] http://amethyst.openembedded.net/~koen/narcissus/
[2] http://dominion.thruhere.net/git/?p=narcissus.git;a=blob;f=README;h=4a6b5998b5c57dfe85b093e456b246f168cb8d2e;hb=HEAD

author
#2 lore raw
Quoted 26 lines · Koen Kooi
Quoted 9 lines · John Lee

Hi,

meta-toolchain-openmoko.bb: add feed to toolchain

By modifying the opkg config files in the toolchain, the toolchain can expend itself by installing packages from the repository.

Quoted 6 lines

We need to do some modifications to the contents of toolchain before the packaging complete, so we use this variable as a hook. The modification is to create an opkg config file so the toolchain knows where to get new packages. A better way might be to install distro-feed-configs, but that includes several opkg config files while alias 'opkg-target' uses just one: opkg.conf.

Suggestions for the existing patch:

* rename OPENMOKO_URI to TOOLCHAIN_FEED_URI
* move the modify_opkg_conf () to meta-toolchain.bb
* TOOLCHAIN_FEED_URI ? = "" in meta-toolchain.bb
* TOOLCHAIN_FEED_URI = "http://downloads.openmoko.org/repository/testing" in meta-toolchain-openmoko.bb or better, conf/distro/openmoko.conf

Quoted 2 lines

That way more distributions can use it and each distro version can have it's own SDK by setting TOOLCHAIN_FEED_URI in its distro file.

I renamed and moved TOOLCHAIN_FEED_URI into meta-toolchain.bb and make it default to DISTRO_FEED_URI instead of empty string, so each distro can use its own feed setting.

Quoted 4 lines

As you might have noticed /etc/opkg/arch.conf isn't in any packages (not unlike the initial devnodes), so you have to generate it for the SDK. I ran in to the same problem with the online image creator[1] and resorted to manually installing the conf files: [2]

modify_opkg_conf will add arch into the opkg conf file as well, so I think this is not necessary.

IMHO meta-toolchain.bb looks fine now. I'm now more concerned about autotools.bbclass since it's global change.

- John

author
#3 lore raw

Just fixed another minor white space vs tab error in libtool-sdk. Please review these commits. If it's okay I'll commit them on Friday. Thanks for Koen for reviewing this.

- John

Quoted 44 lines · John Lee
Quoted 26 lines · Koen Kooi
Quoted 9 lines · John Lee

Hi,

meta-toolchain-openmoko.bb: add feed to toolchain

By modifying the opkg config files in the toolchain, the toolchain can expend itself by installing packages from the repository.

Quoted 6 lines

We need to do some modifications to the contents of toolchain before the packaging complete, so we use this variable as a hook. The modification is to create an opkg config file so the toolchain knows where to get new packages. A better way might be to install distro-feed-configs, but that includes several opkg config files while alias 'opkg-target' uses just one: opkg.conf.

Suggestions for the existing patch:

* rename OPENMOKO_URI to TOOLCHAIN_FEED_URI
* move the modify_opkg_conf () to meta-toolchain.bb
* TOOLCHAIN_FEED_URI ? = "" in meta-toolchain.bb
* TOOLCHAIN_FEED_URI = "http://downloads.openmoko.org/repository/testing" in meta-toolchain-openmoko.bb or better, conf/distro/openmoko.conf

Quoted 2 lines

That way more distributions can use it and each distro version can have it's own SDK by setting TOOLCHAIN_FEED_URI in its distro file.

I renamed and moved TOOLCHAIN_FEED_URI into meta-toolchain.bb and make it default to DISTRO_FEED_URI instead of empty string, so each distro can use its own feed setting.

Quoted 4 lines

As you might have noticed /etc/opkg/arch.conf isn't in any packages (not unlike the initial devnodes), so you have to generate it for the SDK. I ran in to the same problem with the online image creator[1] and resorted to manually installing the conf files: [2]

modify_opkg_conf will add arch into the opkg conf file as well, so I think this is not necessary.

IMHO meta-toolchain.bb looks fine now. I'm now more concerned about autotools.bbclass since it's global change.