WebOS Internals PDK Gentoo

From WebOS Internals
Revision as of 11:50, 19 January 2011 by Xanadu73 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Preamble

The page at:

http://www.webos-internals.org/wiki/WebOS_Internals_PDK

Is written for Ubuntu :roll:, there are some changes that need to be made to get this to work on Gentoo.

Also, build script(s) need work. This whole process would go MUCH faster if you could tell make to thread gcc. You can't currently because it messes up curl/wget. I'll look closer at how Gentoo build scripts handle this.


GCC

(MAYBE NOT! Hold on!)

You need gcc 3.* for the qemu portions to compile. Gentoo defaults to gcc 4.*

 emerge sys-devel/gcc:3.4

Change your default compiler:

# gcc-config -l
[1] i686-pc-linux-gnu-3.4.6 
[2] i686-pc-linux-gnu-3.4.6-hardened
[3] i686-pc-linux-gnu-3.4.6-hardenednopie
[4] i686-pc-linux-gnu-3.4.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.4.6-hardenednossp
[6] i686-pc-linux-gnu-4.4.4 *
# gcc-config i686-pc-linux-gnu-3.4.6
# gcc-config -l
[1] i686-pc-linux-gnu-3.4.6 *
[2] i686-pc-linux-gnu-3.4.6-hardened
[3] i686-pc-linux-gnu-3.4.6-hardenednopie
[4] i686-pc-linux-gnu-3.4.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.4.6-hardenednossp
[6] i686-pc-linux-gnu-4.4.4

Note the change in where the asterisk is. You need to run

source /etc/profile

in any open shell you intend on using gcc-3* in. Don't forget to set the default compiler back to whatever you used to build your whole system!

gcc-config i686-pc-linux-gnu-4.4.4


KERNEL

You need to make sure kvm support is compiled in your kernel.

 Processor type and features  --->
  [*] Paravirtualized guest support  --->
   [ ]   VMI Guest support (DEPRECATED)
   [*]   KVM paravirtualized clock
   [*]   KVM Guest support
   [ ]   Lguest guest support
   -*-   Enable paravirtualization code
   [ ]     Paravirtualization layer for spinlocks

and

 [*] Virtualization  --->
  <M>   Kernel-based Virtual Machine (KVM) support
   <M>     KVM for Intel processors support
   < >     KVM for AMD processors support
   <M>   Host kernel accelerator for virtio net (EXPERIMENTAL)
   <M>   Linux hypervisor example code
   <M>   PCI driver for virtio devices (EXPERIMENTAL)
   <M>   Virtio balloon driver (EXPERIMENTAL)


PACKAGES

 emerge sys-apps/fakeroot dev-embedded/scratchbox2 app-emulation/qemu-kvm app-arch/xar


(too be continued. making notes as I go)

PROCEDE

Start setup

Uneventful


Setup Scratchbox

Uneventful


make stage

NavIt failure

Checked out revision 3922.
mkdir -p ../../../downloads
tar -C build/`basename http://navit.svn.sourceforge.net/svnroot/navit/trunk` -zcf ../../../downloads/navit-svn-r3922.tar.gz .
rm -f build/.unpacked
mkdir -p build
tar -C build -z -x -f ../../../downloads/navit-svn-r3922.tar.gz
mv build/navit build/src
touch build/.unpacked
rm -f build/.patched
patch -p2 -d build/src -i `pwd`/patches/0001-apply-development-changes.patch;   patch -p2 -d build/src -i `pwd`/patches/0002-add-translations-for-new-menu.patch; 
patching file navit/speech/speech_dispatcher/speech_speech_dispatcher.c
patching file navit/xpm/Makefile.am
Hunk #1 FAILED at 1.
Hunk #2 succeeded at 183 (offset -7 lines).
Hunk #3 succeeded at 194 (offset -7 lines).
Hunk #4 succeeded at 215 (offset -7 lines).
1 out of 4 hunks FAILED -- saving rejects to file navit/xpm/Makefile.am.rej
patching file navit/xpm/navit_svg2png
patching file navit/navit_shipped.xml
patching file po/de.po.in
Hunk #2 succeeded at 1551 (offset -2 lines).
Hunk #3 FAILED at 1586.
1 out of 3 hunks FAILED -- saving rejects to file po/de.po.in.rej
make[3]: *** [build/.patched] Error 1
make[3]: Leaving directory `/srv/preware/cross-compile/packages/apps/navit'
make[2]: *** [build_apps/navit] Error 2
make[2]: Leaving directory `/srv/preware/cross-compile'
make[1]: *** [staging-armv6] Error 2
make[1]: Leaving directory `/srv/preware/cross-compile'
make: *** [stage] Error 2

Just moved the NavIt dir out of the way for now so the rest of "stage" build can complete...


FUSE failure

I got bit by the fuse macro_version error. Commented out the die as suggested.


eina 1.0.0.beta3 failure

/usr/lib/../i686-pc-linux-gnu/bin/ld: /usr/lib/crti.o: Relocations in generic ELF (EM: 40)
/usr/lib/../i686-pc-linux-gnu/bin/ld: /usr/lib/crti.o: Relocations in generic ELF (EM: 40)
/usr/lib/crti.o: could not read symbols: File in wrong format
make[7]: *** [libeina.la] Error 1
make[7]: Leaving directory `/srv/preware/cross-compile/packages/dev-e/eina/build/armv6/src/lib'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/srv/preware/cross-compile/packages/dev-e/eina/build/armv6/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/srv/preware/cross-compile/packages/dev-e/eina/build/armv6'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/srv/preware/cross-compile/packages/dev-e/eina/build/armv6'
make[3]: *** [build/armv6.built] Error 2
make[3]: Leaving directory `/srv/preware/cross-compile/packages/dev-e/eina'
make[2]: *** [build_dev-e/eina] Error 2
make[2]: Leaving directory `/srv/preware/cross-compile'
make[1]: *** [staging-armv6] Error 2
make[1]: Leaving directory `/srv/preware/cross-compile'
make: *** [stage] Error 2

arm7 portions compile fine. I just commented out arm6 from the master Makefile so it won't build v6 that at all (I only have a Pre).

Bison failure

make[8]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/lib'
make[7]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/lib'
make[6]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/lib'
Making all in data
make[6]: Entering directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/data'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/data'
Making all in src
make[6]: Entering directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/src'
/bin/sh ../build-aux/ylwrap parse-gram.y y.tab.c parse-gram.c y.tab.h parse-gram.h y.output parse-gram.output -- ../tests/bison -y --warnings=all,error  "-dv"
/srv/preware/cross-compile/packages/common/bison/build/armv7/src/../tests/bison: line 8: /srv/preware/cross-compile/packages/common/bison/build/armv7/src/bison: No such file or directory
/srv/preware/cross-compile/packages/common/bison/build/armv7/src/../tests/bison: line 8: exec: /srv/preware/cross-compile/packages/common/bison/build/armv7/src/bison: cannot execute: No such file or directory
make[6]: *** [parse-gram.c] Error 1
make[6]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/srv/preware/cross-compile/packages/common/bison/build/armv7'
make[3]: *** [build/armv7.built] Error 2
make[3]: Leaving directory `/srv/preware/cross-compile/packages/common/bison'
make[2]: *** [build_common/bison] Error 2
make[2]: Leaving directory `/srv/preware/cross-compile'
make[1]: *** [staging-armv7] Error 2
make[1]: Leaving directory `/srv/preware/cross-compile'
make: *** [stage] Error 2

Line 8 of referenced file says:

exec $PREBISON '/srv/preware/cross-compile/packages/common/bison/build/armv7/src/bison' ${1+"$@"}

"bison" doesn't exist there, but:

/srv/preware/cross-compile/packages/common/bison/build $ find -name bison
./armv6/src/bison
./armv6/tests/bison
./armv7/tests/bison

Even with armv6 disabled, it's still building it. Also, the armv7 clearly isn't being built properly.

Restarted build with "make -k stage". -k means:

-k, --keep-going
Continue as much as possible after an error.
While the target that failed, and those that depend on it, cannot be remade, 
the other dependencies of these targets can be processed all the same.


Build completed successfully, it seems.


failure