Ned Ludd | 1 Oct 01:19
Picon
Favicon

Re: cross compiling kdrive needs portage

On Sun, 2007-09-30 at 23:47 +0200, Pal Szasz wrote:
> Hi!
> 
> I'm trying to crosscompile kdrive (using crossdev and the ROOT env var).
> However kdrive has dependency on portage, so it tries to build portage 
> as well. I suppose I don't really need portage for the target device, 
> the dependency is just there to check that the correct portage is used 
> to build.
> 
> Is there an easy and clean way to tell portage to build kdrive only (and 
> other dependencies) without portage?

Build kdrive and all the other apps as packages (FEATURES=buildpkg)
that you will want in the target ROOT first. Then do 
ROOT=/dev/shm/embedded-foo emerge -qKpv kdrive virtual/libc etc..

This will make emerge only use the rdepends from the ebuilds.

Also be sure that you set PKGDIR= to something other than the default 
just incase you already use binpkgs for anything as you don't want to 
mix/match host/target pkgs.

In a pinch you can always use the -O option also.

--

-- 
Ned Ludd <solar@...>

Siong-Ui Te | 1 Oct 05:14
Picon

Re: include baselayout in initramfs

I found temporary solution to this.
Here is my /init:

---
#!/bin/ash
umask 022
exec <dev/console >dev/console 2>&1
exec chroot . /sbin/init
---
and I modified rootfs in /etc/fstab as following
/               /               tmpfs        noatime         0 0

However, I encountered another problem.
The initscripts shows the following messages:
/lib/udev/modprobe.sh: /etc/init.d/functions.sh: line 10: declare: not found

any suggestions?
Natanael Copa | 1 Oct 08:39
Picon
Gravatar

Re: include baselayout in initramfs

On Mon, 2007-10-01 at 11:14 +0800, Siong-Ui Te wrote:
> I found temporary solution to this.
> Here is my /init:
> ---
> #!/bin/ash
> umask 022
> exec <dev/console >dev/console 2>&1
> exec chroot . /sbin/init
> 
> ---
> and I modified rootfs in /etc/fstab as following
> /               /               tmpfs        noatime         0 0
> 
> However, I encountered another problem.
> The initscripts shows the following messages: 
> /lib/udev/modprobe.sh: /etc/init.d/functions.sh: line 10: declare: not
> found
> 
> any suggestions?

This is a bash thing. I think you would need baselayout-2 to do this
without bash.

-nc

Mike Frysinger | 1 Oct 11:53
Picon
Favicon
Gravatar

Re: include baselayout in initramfs

On Sunday 30 September 2007, Siong-Ui Te wrote:
> I found temporary solution to this.
> Here is my /init:
>
> ---
> #!/bin/ash
> umask 022
> exec <dev/console >dev/console 2>&1
> exec chroot . /sbin/init

chroot looks silly ... simply doing `exec /sbin/init` should be sufficient

> and I modified rootfs in /etc/fstab as following
> /               /               tmpfs        noatime         0 0

you didnt have stuff in /etc/fstab before ?  you'd need that regardless ...

you could also place a file "/fastboot" in your initramfs ... that'd skip all 
fsck scripts ...
-mike
Cees Koolen | 1 Oct 12:12
Picon

Re: crossdev ppc-softfloat-linux-gnu gcc 3.4.5 libc 2.3.6 failed

Both -t and powerpc in stead of ppc worked for the first error. The crossdev
tool results in another error. This time it fails to build glibc. There seems to
be something wrong with the kernel header version but I do not understand fully why.

It complaints that the version is to old and shoud be at least 2.6.6 (for NPTL).
So I tried to run in again with kernel version 2.6.19 and it results in the same
error.

#crossdev  --k 2.6.19 -s4 --target powerpc-softfloat-linux-gnu

(With or without the --k option, the result is the same.

Thanks a lot for the response before!
Cees

Mike Frysinger wrote:
> On Friday 28 September 2007, Cees Koolen wrote:
>> -t -s4
> 
> as noted, this is wrong ... drop the -t
> 
>> --target ppc-softfloat-linux-gnu
> 
> ppc is not valid ... you want powerpc
> 
>> --gcc 3.4.5 --libc 2.3.6   
> 
> old versions not supported anymore ... it may work, it may not
> 
>>  * This version of linux-headers does not support unknown.
> 
> most likely caused by the incorrect target you're using ... 
> it's "powerpc-...", not "ppc-..."
> -mike
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3 to /
 * glibc-libidn-2.3.5.tar.bz2 RMD160 ;-) ...                              [ ok ]
 * glibc-libidn-2.3.5.tar.bz2 SHA1 ;-) ...                                [ ok ]
 * glibc-libidn-2.3.5.tar.bz2 SHA256 ;-) ...                              [ ok ]
 * glibc-libidn-2.3.5.tar.bz2 size ;-) ...                                [ ok ]
 * glibc-2.3.5-patches-1.16.tar.bz2 RMD160 ;-) ...                        [ ok ]
 * glibc-2.3.5-patches-1.16.tar.bz2 SHA1 ;-) ...                          [ ok ]
 * glibc-2.3.5-patches-1.16.tar.bz2 SHA256 ;-) ...                        [ ok ]
 * glibc-2.3.5-patches-1.16.tar.bz2 size ;-) ...                          [ ok ]
 * glibc-linuxthreads-2.3.5.tar.bz2 RMD160 ;-) ...                        [ ok ]
 * glibc-linuxthreads-2.3.5.tar.bz2 SHA1 ;-) ...                          [ ok ]
 * glibc-linuxthreads-2.3.5.tar.bz2 SHA256 ;-) ...                        [ ok ]
 * glibc-linuxthreads-2.3.5.tar.bz2 size ;-) ...                          [ ok ]
 * glibc-fedora-20041219T2331.tar.bz2 RMD160 ;-) ...                      [ ok ]
 * glibc-fedora-20041219T2331.tar.bz2 SHA1 ;-) ...                        [ ok ]
 * glibc-fedora-20041219T2331.tar.bz2 SHA256 ;-) ...                      [ ok ]
 * glibc-fedora-20041219T2331.tar.bz2 size ;-) ...                        [ ok ]
 * glibc-manpages-2.3.5.tar.bz2 RMD160 ;-) ...                            [ ok ]
 * glibc-manpages-2.3.5.tar.bz2 SHA1 ;-) ...                              [ ok ]
 * glibc-manpages-2.3.5.tar.bz2 SHA256 ;-) ...                            [ ok ]
 * glibc-manpages-2.3.5.tar.bz2 size ;-) ...                              [ ok ]
 * glibc-2.3.5.tar.bz2 RMD160 ;-) ...                                     [ ok ]
 * glibc-2.3.5.tar.bz2 SHA1 ;-) ...                                       [ ok ]
 * glibc-2.3.5.tar.bz2 SHA256 ;-) ...                                     [ ok ]
 * glibc-2.3.5.tar.bz2 size ;-) ...                                       [ ok ]
 * glibc-infopages-2.3.5.tar.bz2 RMD160 ;-) ...                           [ ok ]
 * glibc-infopages-2.3.5.tar.bz2 SHA1 ;-) ...                             [ ok ]
 * glibc-infopages-2.3.5.tar.bz2 SHA256 ;-) ...                           [ ok ]
 * glibc-infopages-2.3.5.tar.bz2 size ;-) ...                             [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking glibc-2.3.5.tar.bz2 ;-) ...                                   [ ok ]
 * checking glibc-linuxthreads-2.3.5.tar.bz2 ;-) ...                      [ ok ]
 * checking glibc-libidn-2.3.5.tar.bz2 ;-) ...                            [ ok ]
 * checking glibc-2.3.5-patches-1.16.tar.bz2 ;-) ...                      [ ok ]
 * checking glibc-manpages-2.3.5.tar.bz2 ;-) ...                          [ ok ]
 * checking glibc-infopages-2.3.5.tar.bz2 ;-) ...                         [ ok ]
 * checking glibc-fedora-20041219T2331.tar.bz2 ;-) ...                    [ ok ]
>>> Unpacking source...

 * Checking gcc for __thread support ... yes
 * Checking kernel version (>=2.6.6) ... yes
 * Checking linux-headers version (>=2.6.6) ... no

 * You need linux-headers of at least version 2.6.6
 * for NPTL support!
 * 
 * ERROR: cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_unpack
 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'
 *   ebuild.sh, line 44:   Called src_unpack
 *   glibc-2.3.5-r3.ebuild, line 1084:   Called toolchain-glibc_src_unpack
 *   glibc-2.3.5-r3.ebuild, line 164:   Called check_nptl_support
 *   glibc-2.3.5-r3.ebuild, line 723:   Called die
 * 
 * linux-headers version too low!
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/powerpc-softfloat-linux-gnu/portage/cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3/temp/build.log'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * 

 * Messages for package cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3:

 * You need linux-headers of at least version 2.6.6
 * for NPTL support!
 * 
 * ERROR: cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_unpack
 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'
 *   ebuild.sh, line 44:   Called src_unpack
 *   glibc-2.3.5-r3.ebuild, line 1084:   Called toolchain-glibc_src_unpack
 *   glibc-2.3.5-r3.ebuild, line 164:   Called check_nptl_support
 *   glibc-2.3.5-r3.ebuild, line 723:   Called die
 * 
 * linux-headers version too low!
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/powerpc-softfloat-linux-gnu/portage/cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3/temp/build.log'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * 
Mike Frysinger | 1 Oct 14:00
Picon
Favicon
Gravatar

Re: crossdev ppc-softfloat-linux-gnu gcc 3.4.5 libc 2.3.6 failed

On Monday 01 October 2007, Cees Koolen wrote:
> >>> Emerging (1 of 1) cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3 to /

as mentioned, if you wish to use older versions, you'll probably run into 
problems and you'll have to back port fixes from newer ebuilds yourself
-mike
Cees Koolen | 1 Oct 14:25
Picon

Re: crossdev ppc-softfloat-linux-gnu gcc 3.4.5 libc 2.3.6 failed

Now I called it without any specific version requests.

# crossdev  -s4 --target powerpc-softfloat-linux-gnu
----------------------------------------------------------------------------------------------------------------------------------
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   ppc
 * Target System:         powerpc-softfloat-linux-gnu
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest]

 * PORTDIR_OVERLAY:       /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/powerpc-softfloat-linux-gnu
 * PORTAGE_TMPDIR:        /var/tmp/cross/powerpc-softfloat-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  - ~
 -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...
                                            [ ok ]
 * Log: /var/log/portage/cross-powerpc-softfloat-linux-gnu-binutils.log
 * Emerging cross-binutils ...
                                            [ ok ]
 * Log: /var/log/portage/cross-powerpc-softfloat-linux-gnu-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...
                                            [ ok ]
 * Log: /var/log/portage/cross-powerpc-softfloat-linux-gnu-linux-headers.log
 * Emerging cross-linux-headers ...
                                            [ ok ]
 * Log: /var/log/portage/cross-powerpc-softfloat-linux-gnu-glibc.log
 * Emerging cross-glibc ...

 * glibc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-powerpc-softfloat-linux-gnu-info.log
 * /var/log/portage/cross-powerpc-softfloat-linux-gnu-glibc.log

Regards,

Cees

Mike Frysinger wrote:
> On Monday 01 October 2007, Cees Koolen wrote:
>>>>> Emerging (1 of 1) cross-powerpc-softfloat-linux-gnu/glibc-2.3.5-r3 to /
> 
> as mentioned, if you wish to use older versions, you'll probably run into 
> problems and you'll have to back port fixes from newer ebuilds yourself
> -mike
Mike Frysinger | 1 Oct 14:53
Picon
Favicon
Gravatar

Re: crossdev ppc-softfloat-linux-gnu gcc 3.4.5 libc 2.3.6 failed

On Monday 01 October 2007, Cees Koolen wrote:
> Now I called it without any specific version requests.
>
> # crossdev  -s4 --target powerpc-softfloat-linux-gnu

the output you've given lacks any actual version information, so i have no 
idea what version of glibc is being built

the default should be glibc-2.5-r4 as that is what is ppc stable
-mike
Jason | 1 Oct 14:54
Gravatar

xmerge and kernel modules ebuilds

Didn't find this on google and thought it might be useful for those on
the list.

Status: cross-compile toolchain built, xmerge and xkmake work.
Problem: can't xmerge kernel module ebuilds
Symptoms:  Error messages like the following:

### Start Error Msg ###

 * Preparing ath_hal module
make -C /usr/armeb-softfloat-linux-uclibc/usr/src/linux
M=/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal
modules
make[1]: Entering directory
`/usr/armeb-softfloat-linux-uclibc/usr/src/linux-2.6.19-gentoo-r5'
  CC [M]
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/ah_os.o
  HOSTCC
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/uudecode.o
  HOSTLD
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/uudecode
  UUDECODE
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/xscale-be-elf.hal.o
  LD [M]
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/ath_hal.o
ld:
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/ah_os.o:
Relocations in generic ELF (EM: 40)
/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/ah_os.o:
could not read symbols: File in wrong format
make[2]: ***
[/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal/ath_hal.o]
Error 1
make[1]: ***
[_module_/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_hal]
Error 2
make[1]: Leaving directory
`/usr/armeb-softfloat-linux-uclibc/usr/src/linux-2.6.19-gentoo-r5'
make: *** [all] Error 2

### End Error Msg ###

Solution:
	# export MAKE=`which xkmake`
	# xmerge -av madwifi-ng

hth,

Jason.
Mike Frysinger | 1 Oct 15:07
Picon
Favicon
Gravatar

Re: xmerge and kernel modules ebuilds

On Monday 01 October 2007, Jason wrote:
> Didn't find this on google and thought it might be useful for those on
> the list.
>
> Status: cross-compile toolchain built, xmerge and xkmake work.
> Problem: can't xmerge kernel module ebuilds
> Symptoms:  Error messages like the following:
>
> ### Start Error Msg ###
>
>  * Preparing ath_hal module
> make -C /usr/armeb-softfloat-linux-uclibc/usr/src/linux
> M=/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath
>_hal modules
> make[1]: Entering directory
> `/usr/armeb-softfloat-linux-uclibc/usr/src/linux-2.6.19-gentoo-r5'
>   CC [M]
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/ah_os.o HOSTCC
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/uudecode.o HOSTLD
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/uudecode UUDECODE
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/xscale-be-elf.hal.o LD [M]
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/ath_hal.o ld:
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/ah_os.o: Relocations in generic ELF (EM: 40)
> /var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_h
>al/ah_os.o: could not read symbols: File in wrong format
> make[2]: ***
> [/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.3.2/ath_
>hal/ath_hal.o] Error 1
> make[1]: ***
> [_module_/var/tmp/portage/net-wireless/madwifi-ng-0.9.3.2/work/madwifi-0.9.
>3.2/ath_hal] Error 2
> make[1]: Leaving directory
> `/usr/armeb-softfloat-linux-uclibc/usr/src/linux-2.6.19-gentoo-r5'
> make: *** [all] Error 2
>
> ### End Error Msg ###
>
> Solution:
> 	# export MAKE=`which xkmake`
> 	# xmerge -av madwifi-ng

good to know ... usually i'm lazy and so i just set the ARCH and CROSS_COMPILE 
values manually in my kernel Makefiles so i dont have to remember to set the 
values properly ...

perhaps longer term solution is to get the kernel eclasses to automagically 
set CROSS_COMPILE to ${CHOST}- ... i'll open a bug for it ...
-mike

Gmane