On Wed, Aug 12, 2015 at 3:47 PM, Mike Frysinger <vap...@gentoo.org> wrote:

> On 12 Aug 2015 15:20, Leno Hou wrote:
> > 2.  How to control endian difference via profiles ? i.e.  *How to get
> > ppc64le as a full stage/profile along side ppc64* ?
> >      Could you give me in detail ?
>
> you probably want to create a new profile dir:
>         profiles/arch/powerpc/ppc64/little-endian/
> then add a make.defaults file with the right CHOST defaults.  as we find
> packages that have problems on little endian, that provides you a safe
> space to mask features too.
>
> then create a new target for linux users:
>
> profiles/default/linux/powerpc/ppc64/13.0/64bit-userland/little-endian/
> that'll inherit the arch/powerpc/ppc64/little-endian parent
>
> > 5.  https://wiki.gentoo.org/wiki/Porting   The Section 'Converting to
> > Gentoo' needs to be updated.
> >      From portage-2.2.20 on, please download portage and install it by
> > 'python setup.py install'
>
> you mean my bootstrap-portage script ?
>

See my comments in below mail.

>
> > **Most importantly, Any Ideas/steps of how to  porting gentoo on  ppc64le
> > architecture?**
>
> do you have hardware ?  then it's simply a matter of booting Gentoo in it
> and
> filing/fixing bugs :).
>

YES. We have KVM virtual machine of ppc64le.  Can we booting/filing/fixing
by KVM ?

> -mike
>

Greetings !~~


*What I have done according to your suggestions.*

Once you have these packages, you can easily install Portage.

root #wget http://distfiles.gentoo.org/distfiles/portage-2.2.20.tar.bz2
root #tar -xvf portage-2.2.20
root #cd portage-2.2.20 && python setup.py install



1, sync up and we should have our Portage tree!

root #emerge --sync

Then we need to create a new  profile for the new architecture  ppc64le:

root #cd /usr/portage/profiles/arch/powerpc/ppc64/ && mkdir little-endian
root #cd little-endian
root #echo '..' > parent
root #cat << EOF > make.defaults
CHOST="powerpc64le-linux-gnu"
EOF


2, create a new target for linux users:

root #cd
/usr/portage/profiles/default/linux/powerpc/ppc64/13.0/64bit-userland/
root #mkdir little-endian && cd little-endian
root #cat << EOF > parent
..
../../../../../../../arch/powerpc/ppc64/little-endian
EOF
root #cd /etc/portage
root #ln -s
../../usr/portage/profiles/default/linux/powerpc/ppc64/13.0/64bit-userland/little-endian
make.profile
root #cd /etc/portage
root #cat << EOF > make.conf
PORTDIR_OVERLAY=/usr/local/portage
MAKEOPTS="-j8"
CFLAGS="-mcpu=power8 -mtune=power8 -O2 -pipe -I/gentoo/usr/include
-L/gentoo/usr/lib64 -L/gentoo/lib -L/gentoo/lib64 -lpthread "
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"
LDFLAGS="-I/gentoo/usr/include -L/gentoo/usr/lib64 -L/gentoo/lib
-L/gentoo/lib64 -lpthread "
LC_ALL="en_US.UTF-8"
FEATURES="buildpkg"
USE="python_targets_python2_7"
EOF


3, Fix Problem with sandbox

root #apt-get install pax-utils build-essential gawk
root # emerge --nodeps  --ask sandbox


4, Build the whole system

root #ROOT=/gentoo emerge @system
Results: https://bpaste.net/show/e6db5a5a70aa


           Should `ROOT=/gentoo emerge glibc`  or `ROOT=/gentoo emerge gcc`
first to fix the circle dependencies ?
           Please let me know forward/steps to port gentoo on ppc64le.

 /etc/portage/package.accept_keywords  in ppc64le and bug reports as
following links.
>=dev-libs/libffi-3.2.1 ~ppc64
>=dev-libs/gmp-6.0.0a ~ppc64

Links:
https://bugzilla.redhat.com/show_bug.cgi?id=1083429
https://github.com/ffi/ffi/issues/413

Reply via email to