Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
embedded gentoo uclibc env-update [SOLVED... sort of]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Wed Aug 27, 2008 5:19 am    Post subject: embedded gentoo uclibc env-update [SOLVED... sort of] Reply with quote

**UPDATE**

Problem was averted by using a stage 1 install (stage1-x86-uclibc-2008.0.tar.bz2)

**END UPDATE**

Hey everyone,
I am not sure this is the thread for this post but I will shoot for now. I am installing gentoo on a tmz104 pc/104 board (x86 architecture), I know gentoo works as I was able to run a live disk on it... (ironically of all the distros I tried, debian freebsd, netbsd etc... gentoo was the only one that worked.) The problem ariises not with the board itself but instead my actual computer. I try to build the gentoo embedded environment on my computer in a folder, so i download the latest stage3 tarball which is stage3-x86-uclibc-2008 and do the following commands:
Code:

#tar -xvjpf stage1-x86-uclibc-2008.0.tar.bz2 -C /opt/gentoo_uclibc/
#mkdir -p /opt/gentoo_uclibc/usr/portage
#mount -o bind /proc/ /opt/gentoo_uclibc/proc
#mount -o bind /usr/portage /opt/gentoo_uclibc/usr/portage
#chroot /opt/gentoo_uclibc/ /bin/bash
I have no name!@localhost / $


At this point it seems confusing as I don't appear to be root after chrooting and it says "I have no name!", but the annoying part comes up with this:

Code:

I have no name!@localhost / $ env-update
Traceback (most recent call last):
  File "/usr/sbin/env-update", line 27, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 98, in ?
    from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
  File "/usr/lib/portage/pym/portage_data.py", line 83, in ?
    if secpass < 1 and portage_gid in os.getgroups():
OSError: [Errno 38] Function not implemented


I cannot seem to wrap my head around this one as I get stuck with env-update, emerge etc... BUT if I do a normal stage 3 x86 for a regular gentoo install instead of a uclibc stage on the same computer, it works fine... So my question is why env-update failing?

For reference I used these sources for information:

http://www.bulah.com/embedded-guide.html
http://gentoo-wiki.com/TinyGentoo

Any help would be greatly appreciated!
Roguetech


Last edited by roguetech on Sun Aug 31, 2008 3:49 am; edited 3 times in total
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Wed Aug 27, 2008 8:01 am    Post subject: Reply with quote

Within the uclibc chroot, what's your UID (echo $UID or just run `whoami`)?

If it's something like "4294967295", then you've probably run into the same issue I and at least one other gentoo user encountered before, see here.

If this is the case, then it's actually a kernel configuration issue, you need to enable CONFIG_UID16, which is "Enable 16-bit UID system calls" under "General setup -> Configure standard kernel features (for small systems)" in menuconfig.

That's what we get for over "optimizing" our kernels. ;)

fwiw, I believe more recent versions of uclibc no longer require this, however it'll probably be a while before we see it in portage.

anyways, HTH
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Thu Aug 28, 2008 3:15 am    Post subject: Reply with quote

Well I am getting the 4294967295 value when I type echo $UID.
Now is that "Enable 16-bit UID system calls" needs to be enabled on the host kernel?
Remember I cannot even run env-update or emerge...
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Thu Aug 28, 2008 3:45 am    Post subject: Reply with quote

roguetech wrote:
Well I am getting the 4294967295 value when I type echo $UID.
Now is that "Enable 16-bit UID system calls" needs to be enabled on the host kernel?
Remember I cannot even run env-update or emerge...
Yes, in the host kernel.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Fri Aug 29, 2008 1:23 am    Post subject: Reply with quote

Well i compiled in the "Enable 16-bit UID system calls" into the kernel and that seemed to fix things! Thanks for the help! I really appreciate it!
Although I was wondering if any of the documentation should be updated to include compiling "Enable 16-bit UID system calls" into the host kernel?
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Fri Aug 29, 2008 4:50 am    Post subject: Reply with quote

Huh well i ran into a problem, seems that when I try and run:
Code:
emerge -auDN world


After a couple of packages I run into a problem with sys-devel/patch-2.5.9r1, here is the build log:
Code:

>>> Unpacking source...
>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/sys-devel/patch-2.5.9-r1/work
Child died with signal 11
Error exit delayed from previous errors
 *
 * ERROR: sys-devel/patch-2.5.9-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2376:  Called unpack 'src_unpack'
 *               ebuild.sh, line  348:  Called die
 * The specific snippet of code:
 *                                      tar zoxf "${srcdir}${x}" ${tar_opts} || die "$myfail"
 *  The die message:
 *   failure unpacking patch-2.5.9.tar.gz
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/patch-2.5.9-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/patch-2.5.9-r1/temp/environment'.
 *


This is my makefile:

Code:
CFLAGS="-Os -mtune=i386 -pipe -fforce-addr"
CXXFLAGS="-Os -mtune=i386 -pipe -fforce-addr"

# LDFLAGS is unsupported.  USE AT YOUR OWN RISK!
# LDFLAGS="-Wl,-O1"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="i386-gentoo-linux-uclibc"
UCLIBC_CPU="386"
FEATURES="ccache buildpkg"
USE="minimal"
PKGDIR="${PORTDIR}/packages/uclibc"


Any suggestions?
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Sat Aug 30, 2008 1:42 am    Post subject: Reply with quote

It seems that error is occurring with other packages as well:

Code:
>>> Emerging (1 of 37) app-arch/bzip2-1.0.5-r1 to /
 * bzip2-1.0.5.tar.gz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking bzip2-1.0.5.tar.gz ;-) ...                                    [ ok ]
>>> Unpacking source...
>>> Unpacking bzip2-1.0.5.tar.gz to /var/tmp/portage/app-arch/bzip2-1.0.5-r1/work
Child died with signal 11
Error exit delayed from previous errors
 *
 * ERROR: app-arch/bzip2-1.0.5-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2391:  Called unpack 'src_unpack'
 *               ebuild.sh, line  348:  Called die
 * The specific snippet of code:
 *                  tar zoxf "${srcdir}${x}" ${tar_opts} || die "$myfail"
 *  The die message:
 *   failure unpacking bzip2-1.0.5.tar.gz
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.5-r1/temp/environment'.
 *

 * Messages for package app-arch/bzip2-1.0.5-r1:

 *
 * ERROR: app-arch/bzip2-1.0.5-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2391:  Called unpack 'src_unpack'
 *               ebuild.sh, line  348:  Called die
 * The specific snippet of code:
 *                  tar zoxf "${srcdir}${x}" ${tar_opts} || die "$myfail"
 *  The die message:
 *   failure unpacking bzip2-1.0.5.tar.gz
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-arch/bzip2-1.0.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/bzip2-1.0.5-r1/temp/


It seems the ebuilds are not unpacking properly:

Code:
tar -zoxf package.tar.gz


I used a standard portage snapshot, is there a special one for uclibc stages?
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Sun Aug 31, 2008 3:46 am    Post subject: Reply with quote

Well fixed the problem... sort of using a stage 1 uclibc install stage, perhaps the stage 3 has problems? Looks like I have an embedded system of about 4.6MB. Again thanks for the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum