From: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
To: openembedded-devel@lists.openembedded.org
Subject: Re: building uClinux using OE
Date: Fri, 22 Feb 2008 19:32:06 +0100 [thread overview]
Message-ID: <20080222183206.GA14832@deadlock.dhs.org> (raw)
In-Reply-To: <47B4708B.6050008@student.utwente.nl>
[-- 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
next prev parent reply other threads:[~2008-02-22 18:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-02-17 15:28 ` Alan Carvalho de Assis
2008-02-19 13:07 ` Sergey 'Jin' Bostandzhyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080222183206.GA14832@deadlock.dhs.org \
--to=jin@mediatomb.cc \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.