|
#11
|
|||
|
|||
|
allnameswereout,
I just verified everything with the beta installer :-( maybe some else can test the following with the final version. Please look at the final instructions http://wiki.maemo.org/Documentation/...K_Installation and adjust the SDK installation part below. Here are updated instructions, please use these not the instructions above: 1. Re-emerge x11-base/xorg-server with the "kdrive" USE flag enabled, this will give you Xephyr. 2. Install app-arch/dpkg (Debian package maintenance system), this is needed by the maemo 5 SDK installer. 3. Instead of using the scratchbox installer from maemo, install scratchbox using portage. Unfortunately, scratchbox-devkit-git and scratchbox-devkit-svn are not yet in portage, so we roll our own ebuilds (assuming PORTDIR_OVERLAY="/usr/portage/local"): Create /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild and paste the following into it: Code:
SBOX_GROUP="sbox"
RESTRICT="strip binchecks"
DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier."
HOMEPAGE="http://www.scratchbox.org/"
SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RDEPEND="=dev-embedded/scratchbox-1.0*"
RDEPEND=""
TARGET_DIR="/opt/scratchbox"
S=${WORKDIR}/scratchbox
src_install() {
dodir ${TARGET_DIR}
cp -pRP * "${D}/${TARGET_DIR}"
}
Code:
SBOX_GROUP="sbox"
RESTRICT="strip binchecks"
DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier."
HOMEPAGE="http://www.scratchbox.org/"
SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RDEPEND="=dev-embedded/scratchbox-1.0*"
RDEPEND=""
TARGET_DIR="/opt/scratchbox"
S=${WORKDIR}/scratchbox
src_install() {
dodir ${TARGET_DIR}
cp -pRP * "${D}/${TARGET_DIR}"
}
Code:
ebuild /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild digest ebuild /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-svn-1.0.ebuild digest /etc/portage/package.keywords/maemo5 : Code:
dev-embedded/scratchbox ~* dev-embedded/scratchbox-devkit-apt-https ~* dev-embedded/scratchbox-devkit-debian ~* dev-embedded/scratchbox-devkit-doctools ~* dev-embedded/scratchbox-devkit-perl ~* dev-embedded/scratchbox-devkit-qemu ~* dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5 ~* dev-embedded/scratchbox-devkit-git ~* dev-embedded/scratchbox-devkit-svn ~* Code:
=dev-embedded/scratchbox-1.0.16 dev-embedded/scratchbox-devkit-apt-https dev-embedded/scratchbox-devkit-debian dev-embedded/scratchbox-devkit-doctools dev-embedded/scratchbox-devkit-perl dev-embedded/scratchbox-devkit-qemu dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5 Install everything: Code:
emerge -av scratchbox scratchbox-devkit-apt-https scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-devkit-qemu scratchbox-toolchain-cs2007q3-glibc2_5 scratchbox-toolchain-cs2007q3-glibc2_5 scratchbox-devkit-git scratchbox-devkit-svn Code:
/etc/init.d/scratchbox start and where to download the installer). Install the SDK as follows: Code:
./maemo-sdk-install_5.0beta2.sh -s /opt/scratchbox/ http://wiki.maemo.org/Documentation/...K_Installation 6. Install the nokia-binaries (URL shown by the installer script, see instructions for more info) 7. Follow the instructions "2. Starting/shutting down the SDK UI", but use Code:
/opt/scratchbox login Note that the versions of the scratchbox packages installed are slightly different than those installed by the maemo scratchbox installer. So far I haven't done any serious development using the SDK setup as described here nor have I tried compiling and running packages for the ARM target (unfortunately I don't have a N900 to test it). |
| The Following 6 Users Say Thank You to pinsh For This Useful Post: | ||
|
#12
|
|||
|
|||
|
Having just gone through the process of installing the Maemo 5 Final SDK on my x86_64 Gentoo system, I'll tell you what worked for me (taken and slightly modified from pinsh's instructions):
1. (as root) Re-emerge x11-base/xorg-server with the "kdrive" USE flag enabled, this will give you Xephyr. 2. (as root) Install app-arch/dpkg (Debian package maintenance system), this is needed by the maemo 5 SDK installer. 3. (as root) Instead of using the scratchbox installer from maemo, install scratchbox using portage. Unfortunately, scratchbox-devkit-git and scratchbox-devkit-svn are not yet in portage, so we roll our own ebuilds (assuming make.conf specifies PORTDIR_OVERLAY="/usr/portage/local"): Create /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild and paste the following into it: Code:
SBOX_GROUP="sbox"
RESTRICT="strip binchecks"
DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier."
HOMEPAGE="http://www.scratchbox.org/"
SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RDEPEND="=dev-embedded/scratchbox-1.0*"
RDEPEND=""
TARGET_DIR="/opt/scratchbox"
S=${WORKDIR}/scratchbox
src_install() {
dodir ${TARGET_DIR}
cp -pRP * "${D}/${TARGET_DIR}"
}
Code:
SBOX_GROUP="sbox"
RESTRICT="strip binchecks"
DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier."
HOMEPAGE="http://www.scratchbox.org/"
SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RDEPEND="=dev-embedded/scratchbox-1.0*"
RDEPEND=""
TARGET_DIR="/opt/scratchbox"
S=${WORKDIR}/scratchbox
src_install() {
dodir ${TARGET_DIR}
cp -pRP * "${D}/${TARGET_DIR}"
}
Code:
ebuild /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild digest ebuild /usr/portage/local/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-svn-1.0.ebuild digest /etc/portage/package.keywords/maemo5 : Code:
## maemo5 dev-embedded/scratchbox ~* dev-embedded/scratchbox-devkit-apt-https ~* dev-embedded/scratchbox-devkit-debian ~* dev-embedded/scratchbox-devkit-doctools ~* dev-embedded/scratchbox-devkit-perl ~* dev-embedded/scratchbox-devkit-qemu ~* dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5 ~* dev-embedded/scratchbox-devkit-git ~* dev-embedded/scratchbox-devkit-svn ~* Code:
emerge -av scratchbox scratchbox-devkit-apt-https scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-devkit-qemu scratchbox-toolchain-cs2007q3-glibc2_5 scratchbox-toolchain-cs2007q3-glibc2_5 scratchbox-devkit-git scratchbox-devkit-svn Code:
sysctl abi.vsyscall32 sysctl vm.vdso_enabled sysctl kernel.vdso Code:
sysctl abi.vsyscall32=0 Code:
abi.vsyscall32=0 5. (as root) Start scratchbox: Code:
/etc/init.d/scratchbox start Code:
gpassed sbox -a YOURUSERNAME Code:
/opt/scratchbox/sbin/sbox_adduser YOURUSERNAME Code:
./maemo-sdk-install_5.0.sh -s /opt/scratchbox/ 9. (as YOURUSERNAME) login to scratchbox: Code:
/opt/scratchbox/login Code:
[sbox-FREMANTLE_X86: ~] > sb-conf select FREMANTLE_ARMEL [sbox-FREMANTLE_ARMEL: ~] > nano /etc/apt/sources.list # add deb line stored in step 8 [sbox-FREMANTLE_ARMEL: ~] > apt-get update [sbox-FREMANTLE_ARMEL: ~] > fakeroot apt-get install nokia-binaries nokia-apps Code:
[sbox-FREMANTLE_ARMEL: ~] > sb-conf select FREMANTLE_X86 [sbox-FREMANTLE_X86: ~] > nano /etc/apt/sources.list # add deb line stored in step 8 [sbox-FREMANTLE_X86: ~] > apt-get update [sbox-FREMANTLE_X86: ~] > fakeroot apt-get install nokia-binaries nokia-apps |
|
#13
|
|||
|
|||
|
It appears that scratchbox-devkit-git and scratchbox-devkit-svn are now available in portage, so you can skip step 3. I am currently trying an install...
Ok, was able to get everything installed and working. Oops, spoke too soon. The scratchbox environment seems to work, can start the maemo GUI. Successfully compiled the helloworld.c and gtk_helloworld-1.c for x86 target. But compile fails for the ARM target. It fails with: Code:
[sbox-FREMANTLE_ARMEL: ~/MyDocs] > gcc -Wall helloworld.c -o helloworld /scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/libgcc.a when searching for -lgcc /scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc collect2: ld returned 1 exit status Last edited by erdferkel; 2009-12-08 at 18:40. Reason: It works, sort of |
|
#14
|
|||
|
|||
|
Looks like the gentoo ebuild uses an older version of the arm toolchain (1.0.12-10 instead of 1.0.12+lt1-12). I'll try modifying the ebuild to use the newer version and see whether this fixes it.
|
| The Following User Says Thank You to Rob1n For This Useful Post: | ||
|
#15
|
|||
|
|||
|
Hi Rob1n, I just tried doing what you suggested by creating an overlay with the 1.0.12+lt1-12 package and it installed successfully. But it still fails on compile. I found a quick way to test it is to do this in /opt/scratchbox:
Code:
./compilers/cs2007q3-glibc2.5-arm7/bin/arm-none-linux-gnueabi-gcc packages/hello.c -o /tmp/helloArm ./compilers/cs2007q3-glibc2.5-i486/bin/i486-pc-linux-gnu-gcc packages/hello.c -o /tmp/helloX86 |
|
#16
|
|||
|
|||
|
I've found the issue - it would appear to be stripping the binaries/libraries during install, which presumably doesn't work properly for ARM files.
Adding: Code:
RESTRICT="strip binchecks" |
|
#17
|
|||
|
|||
|
Cool, hopefully that fixes it then. Will try it out when I get a chance. Is this install process documented in a wiki page anywhere?
Ok, I modified the ebuild, did emerge, quick check works. Installed fremantle from nokia, now can compile and run under both targets! Last edited by erdferkel; 2009-12-09 at 21:27. Reason: now it works |
|
#18
|
|||
|
|||
|
Quote:
|
|
#19
|
|||
|
|||
|
I've already added this information to the bug report erdferkel opened (Gentoo bug #296294).
|
|
#20
|
||||
|
||||
|
Nice to see some Gentoo folks around here.
And thanks for documenting this. I'll try it and report back as soon as I ported my favorite editor "joe" to memo :-) Cheers Bjoern |
![]() |
|
|