* building uClinux using OE @ 2008-02-14 15:55 Sergey 'Jin' Bostandzhyan 2008-02-14 16:47 ` Koen Kooi 2008-02-17 15:28 ` Alan Carvalho de Assis 0 siblings, 2 replies; 6+ messages in thread From: Sergey 'Jin' Bostandzhyan @ 2008-02-14 15:55 UTC (permalink / raw) To: openembedded-devel Hi, I'd like to be able to build uClinux using OE and I hope to gather some pointers to the right direction. I think it would generally be a nice thing to have, so I would like to do the work in a way that it could be incorporated in OE, provided that you guys are interested. According to the post below the toolchain should not be a problem: http://mailman.uclinux.org/pipermail/uclinux-dev/2007-May/042993.html "uClinux development on ARM now uses a standard arm-linux targeted tool chain. We add the elf2flt tool, but it is otherwise a standard arm-linux toolchain." As far as I know the uClinux/ARM kernel patches are already in the mainline: http://opensrc.sec.samsung.com/ uClibc is also already supported by OE, not sure if I would have to add an option for uC-libc. So basically it seems that almost everything that is needed is already there. What is missing? - applying elf2flt processing to produced binaries - have a way of knowing that the particular build is done for the uClinux targets (maybe for some tweaks in .bb files if required or to apply patches only when necessary, allthough ifdef __uClinux__ defines could be used) - not sure what else? I do not have any uClinux experience yet, and it seems to be quite difficult to gather all the bits and pieces of information, so I'd appreciate comments and suggestions, especially if you see that I am missing something. I'd also be interested in your thoughts on what would be the best way to integrate it into OE. Kind regards, Jin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building uClinux using OE 2008-02-14 15:55 building uClinux using OE Sergey 'Jin' Bostandzhyan @ 2008-02-14 16:47 ` Koen Kooi 2008-02-19 13:01 ` Sergey 'Jin' Bostandzhyan 2008-02-22 18:32 ` Sergey 'Jin' Bostandzhyan 2008-02-17 15:28 ` Alan Carvalho de Assis 1 sibling, 2 replies; 6+ messages in thread From: Koen Kooi @ 2008-02-14 16:47 UTC (permalink / raw) To: Using the OpenEmbedded metadata to build Distributions -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sergey 'Jin' Bostandzhyan schreef: | Hi, | | I'd like to be able to build uClinux using OE and I hope to gather some | pointers to the right direction. | | I think it would generally be a nice thing to have, so I would like to do | the work in a way that it could be incorporated in OE, provided that you | guys are interested. | | According to the post below the toolchain should not be a problem: | http://mailman.uclinux.org/pipermail/uclinux-dev/2007-May/042993.html | "uClinux development on ARM now uses a standard arm-linux targeted tool chain. | We add the elf2flt tool, but it is otherwise a standard arm-linux toolchain." | | As far as I know the uClinux/ARM kernel patches are already in the mainline: | http://opensrc.sec.samsung.com/ | | uClibc is also already supported by OE, not sure if I would have to add | an option for uC-libc. | | So basically it seems that almost everything that is needed is already there. | | What is missing? | | - applying elf2flt processing to produced binaries That should happen automagically, we just need to stage some more binutils-cross headers for elf2flt to build | - have a way of knowing that the particular build is done for the uClinux | targets (maybe for some tweaks in .bb files if required or to apply patches | only when necessary, allthough ifdef __uClinux__ defines could be used) | | - not sure what else? Since you can't (practically) do shared libraries, all packaging (and probably staging) will be wrong, since you won't have libfoo.so.1, but something different. | I do not have any uClinux experience yet, and it seems to be quite difficult | to gather all the bits and pieces of information, so I'd appreciate comments | and suggestions, especially if you see that I am missing something. | | I'd also be interested in your thoughts on what would be the best way to | integrate it into OE. I had a go at this a while ago, but I had to halt working on it since the uboot on the blackfin site refuses to load the uImage on the blackfin site, leaving me without a good testing target. I think forcing static linking would be the fastest way to get an image built, we can work on details (flat, shared-flat, fdpic, etc) after that. regards, Koen - -- koen@dominion.kabel.utwente.nl will go go away in december 2007, please use k.kooi@student.utwente.nl instead. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFHtHCLMkyGM64RGpERAl7KAJ4sD85YqG+OrTVUx+eLuCb9js4TvQCffI35 7wUmhJZu6YpoBfu6e4kbEg0= =Ez6i -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building uClinux using OE 2008-02-14 16:47 ` Koen Kooi @ 2008-02-19 13:01 ` Sergey 'Jin' Bostandzhyan 2008-02-22 18:32 ` Sergey 'Jin' Bostandzhyan 1 sibling, 0 replies; 6+ messages in thread From: Sergey 'Jin' Bostandzhyan @ 2008-02-19 13:01 UTC (permalink / raw) To: openembedded-devel; +Cc: Using the OpenEmbedded metadata to build Distributions Hi, On Thu, Feb 14, 2008 at 05:47:07PM +0100, Koen Kooi wrote: [...] > | What is missing? > | > | - applying elf2flt processing to produced binaries > > That should happen automagically, we just need to stage some more > binutils-cross headers for elf2flt to build OK, I'll see that I get elf2flt to build, I'll surely have some questions about the "automagically" part later on :) > | - have a way of knowing that the particular build is done for the uClinux > | targets (maybe for some tweaks in .bb files if required or to apply > patches > | only when necessary, allthough ifdef __uClinux__ defines could be used) > | > | - not sure what else? > > Since you can't (practically) do shared libraries, all packaging (and > probably staging) will be wrong, since you won't have libfoo.so.1, but > something different. OK, I'll keep that in mind. > | I do not have any uClinux experience yet, and it seems to be quite > difficult > | to gather all the bits and pieces of information, so I'd appreciate > comments > | and suggestions, especially if you see that I am missing something. > | > | I'd also be interested in your thoughts on what would be the best way to > | integrate it into OE. > > I had a go at this a while ago, but I had to halt working on it since > the uboot on the blackfin site refuses to load the uImage on the > blackfin site, leaving me without a good testing target. > I think forcing static linking would be the fastest way to get an image > built, we can work on details (flat, shared-flat, fdpic, etc) after that. How far did you come with the stuff you did back then? Did you merge anything of it into OE and if yes, could you please point me to the things you did so I can pick up from there? Thanks, Jin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building uClinux using OE 2008-02-14 16:47 ` Koen Kooi 2008-02-19 13:01 ` Sergey 'Jin' Bostandzhyan @ 2008-02-22 18:32 ` Sergey 'Jin' Bostandzhyan 1 sibling, 0 replies; 6+ messages in thread From: Sergey 'Jin' Bostandzhyan @ 2008-02-22 18:32 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 1805 bytes --] Hi Koen, On Thu, Feb 14, 2008 at 05:47:07PM +0100, Koen Kooi wrote: > That should happen automagically, we just need to stage some more > binutils-cross headers for elf2flt to build OK... I am not sure if I got the idea, so please correct me if I am wrong: elf2flt needs to be told what target arch it will be used for, but it should be compiled using native libiberty.a and libbfd.a? At least running ./elf2flt without any options prints me "Compiled for arm architecture" at the end of the usage summary. I am not yet sure if it produces any meaningful output or how I could test it to be sure (it asks for some relocation info files), so any hints would be greatly appreciated. And also... how would this "automagically" part work, what do I do next? > I had a go at this a while ago, but I had to halt working on it since > the uboot on the blackfin site refuses to load the uImage on the > blackfin site, leaving me without a good testing target. > I think forcing static linking would be the fastest way to get an image > built, we can work on details (flat, shared-flat, fdpic, etc) after that. I found your elf2flt_svn.bb recipe and used it as a starting point. I had to apply the patch from here in order to compile binutils with uclibc: http://bugs.openembedded.org/show_bug.cgi?id=3178 I attached my diffs. Kind regards, Jin > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (Darwin) > > iD8DBQFHtHCLMkyGM64RGpERAl7KAJ4sD85YqG+OrTVUx+eLuCb9js4TvQCffI35 > 7wUmhJZu6YpoBfu6e4kbEg0= > =Ez6i > -----END PGP SIGNATURE----- > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel [-- Attachment #2: elf2flt_svn.patch --] [-- Type: text/plain, Size: 616 bytes --] --- ../../../../org.openembedded.dev/packages/uclibc/elf2flt_svn.bb 2008-02-20 16:11:45.000000000 +0100 +++ elf2flt_svn.bb 2008-02-22 18:51:13.000000000 +0100 @@ -9,7 +9,8 @@ S = "${WORKDIR}/${PN}" -EXTRA_OECONF = " --with-libbfd=${STAGING_DIR}/${TARGET_SYS}/lib/libbfd.a \ - --with-libiberty=${STAGING_DIR}/${TARGET_SYS}/lib/libiberty.a \ +EXTRA_OECONF = " --with-libbfd=${STAGING_LIBDIR_NATIVE}/libbfd.a \ + --with-libiberty=${STAGING_LIBDIR_NATIVE}/libiberty.a \ --with-bfd-include-dir=${STAGING_DIR}/${TARGET_SYS}/include \ " + [-- Attachment #3: binutils_stage_and_libm.patch --] [-- Type: text/plain, Size: 2556 bytes --] diff -Naur ../../../../org.openembedded.dev/packages/binutils/binutils-2.18/binutils-uclibc-configure-add-libm.patch ./binutils-2.18/binutils-uclibc-configure-add-libm.patch --- ../../../../org.openembedded.dev/packages/binutils/binutils-2.18/binutils-uclibc-configure-add-libm.patch 1970-01-01 01:00:00.000000000 +0100 +++ ./binutils-2.18/binutils-uclibc-configure-add-libm.patch 2008-02-22 15:07:54.000000000 +0100 @@ -0,0 +1,12 @@ +*** binutils-2.18/gas/configure.orig 2007-11-08 10:44:45.000000000 +0100 +--- binutils-2.18/gas/configure 2007-11-08 10:43:50.000000000 +0100 +*************** _ACEOF +*** 12855,12860 **** +--- 12855,12861 ---- + fi + done + ++ need_libm=yes + # do we need the math library? + case "${need_libm}" in + yes) --- ../../../../org.openembedded.dev/packages/binutils/binutils.inc 2008-02-20 16:11:36.000000000 +0100 +++ ./binutils.inc 2008-02-22 19:07:04.000000000 +0100 @@ -84,9 +84,14 @@ install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/filenames.h ${STAGING_INCDIR}/ install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ + + mkdir -p ${STAGING_INCDIR}/elf + install -m 0644 ${S}/include/elf/arm.h ${STAGING_INCDIR}/elf + install -m 0644 ${S}/include/elf/reloc-macros.h ${STAGING_INCDIR}/elf } do_install () { --- ../../../../org.openembedded.dev/packages/binutils/binutils-cross.inc 2008-02-20 16:11:36.000000000 +0100 +++ ./binutils-cross.inc 2008-02-22 18:20:14.000000000 +0100 @@ -10,6 +10,9 @@ do_stage () { oe_runmake install + + oe_libinstall -a -C ${B}/libiberty libiberty ${STAGING_LIBDIR_NATIVE}/ + oe_libinstall -a -C ${B}/bfd libbfd ${STAGING_LIBDIR_NATIVE}/ # We don't really need these, so we'll remove them... rm -rf ${CROSS_DIR}/lib/ldscripts --- ../../../../org.openembedded.dev/packages/binutils/binutils_2.18.bb 2008-02-20 16:11:36.000000000 +0100 +++ ./binutils_2.18.bb 2008-02-22 15:11:38.000000000 +0100 @@ -11,6 +11,7 @@ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \ + file://binutils-uclibc-configure-add-libm.patch;patch=1 \ " # powerpc patches ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building uClinux using OE 2008-02-14 15:55 building uClinux using OE Sergey 'Jin' Bostandzhyan 2008-02-14 16:47 ` Koen Kooi @ 2008-02-17 15:28 ` Alan Carvalho de Assis 2008-02-19 13:07 ` Sergey 'Jin' Bostandzhyan 1 sibling, 1 reply; 6+ messages in thread From: Alan Carvalho de Assis @ 2008-02-17 15:28 UTC (permalink / raw) To: openembedded-devel Hi Jin, 2008/2/14, Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>: > Hi, sic > > uClibc is also already supported by OE, not sure if I would have to add > an option for uC-libc. > Although uC-libc is not so "up to date" I think it can be important to device with small flash memory (like Netburn MOD5272) since it create smallest binary footprint. > So basically it seems that almost everything that is needed is already there. > > What is missing? > > - applying elf2flt processing to produced binaries > > - have a way of knowing that the particular build is done for the uClinux > targets (maybe for some tweaks in .bb files if required or to apply patches > only when necessary, allthough ifdef __uClinux__ defines could be used) > > - not sure what else? > > I do not have any uClinux experience yet, and it seems to be quite difficult > to gather all the bits and pieces of information, so I'd appreciate comments > and suggestions, especially if you see that I am missing something. > > I'd also be interested in your thoughts on what would be the best way to > integrate it into OE. > Do you add all kernels supported by uClinux distro (2.0.x, 2.4.x and 2.6.x) ? I think your idea to add uClinux support on OE is fantastic! > Kind regards, > Jin > > > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: building uClinux using OE 2008-02-17 15:28 ` Alan Carvalho de Assis @ 2008-02-19 13:07 ` Sergey 'Jin' Bostandzhyan 0 siblings, 0 replies; 6+ messages in thread From: Sergey 'Jin' Bostandzhyan @ 2008-02-19 13:07 UTC (permalink / raw) To: openembedded-devel Hi, On Sun, Feb 17, 2008 at 12:28:27PM -0300, Alan Carvalho de Assis wrote: > > uClibc is also already supported by OE, not sure if I would have to add > > an option for uC-libc. > > > Although uC-libc is not so "up to date" I think it can be important to > device with small flash memory (like Netburn MOD5272) since it create > smallest binary footprint. I will probably start with uClibc since it's already in OE, I am not sure if my project requires uC-libc, I guess I will look at that when I get a little further. > > I do not have any uClinux experience yet, and it seems to be quite difficult > > to gather all the bits and pieces of information, so I'd appreciate comments > > and suggestions, especially if you see that I am missing something. > > > > I'd also be interested in your thoughts on what would be the best way to > > integrate it into OE. > > > > Do you add all kernels supported by uClinux distro (2.0.x, 2.4.x and 2.6.x) ? I will focus on 2.6.x, I do not have any hardware to test with the older kernels and the project I am working on also requires a 2.6.x version. > I think your idea to add uClinux support on OE is fantastic! Let's hope we succeed in doing so :) Kind regards, Jin ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-22 18:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-14 15:55 building uClinux using OE Sergey 'Jin' Bostandzhyan 2008-02-14 16:47 ` Koen Kooi 2008-02-19 13:01 ` Sergey 'Jin' Bostandzhyan 2008-02-22 18:32 ` Sergey 'Jin' Bostandzhyan 2008-02-17 15:28 ` Alan Carvalho de Assis 2008-02-19 13:07 ` Sergey 'Jin' Bostandzhyan
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.