Hack-A-N900/Development: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
 
(15 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
<br>
 +
<span style="font-size: 20px"><b>ALWAYS CREATE A [http://metalab.at/wiki/Hack-A-N900/Backup BACKUP] BEFORE TINKERING WITH YOUR N900</b></span><br>
 +
 
== ON-Device - Getting Started ==
 
== ON-Device - Getting Started ==
  
=== Add extras, tools and sdk to /etc/apt/sources.list ===
+
<b>WARNING:</b> Accoring to this [http://talk.maemo.org/showthread.php?t=35122&page=2#19 post], installing packages from the SDK repository to your device might cripple the root fs and force you to reflash it. Anyway, the maemo scratchbox environment is awful and for small builds it is more convient to build directly on the device. Packages mentoned in this guide don't seem to cause serious problem.
 +
 
 +
=== Prerequisites ===
 +
 
 +
* [http://metalab.at/wiki/Hack-A-N900/First_Steps First Steps]
 +
 
 +
=== Add tools and sdk to /etc/apt/sources.list ===
 
<pre>
 
<pre>
#Extras
 
deb http://repository.maemo.org/extras/ fremantle free non-free
 
deb-src http://repository.maemo.org/extras/ fremantle free
 
 
 
# TOOLS
 
# TOOLS
 
deb http://repository.maemo.org/ fremantle/tools free
 
deb http://repository.maemo.org/ fremantle/tools free
Zeile 16: Zeile 21:
 
</pre>
 
</pre>
  
=== Install essential tools ===
+
Update apt cache:
 
 
 
<pre>
 
<pre>
apt-get install bash coreutils-gnu grep-gnu wget vim
+
apt-get update
 
</pre>
 
</pre>
  
Please notice that the gnu coreutils and gnu grep are prefixed with the letter 'g'.
+
=== Install build tools ===
Therefore you need to call <pre style="display: inline; padding: 2px">/usr/bin/gls</pre> to use gnu ls.
 
For some third party scripts/builds to work properly you might need to create symlinks for the gnu tools to be used.
 
  
Example:
 
 
<pre>
 
<pre>
ln -s /usr/bin/ggrep /usr/bin/grep
+
apt-get install bzip2 cpio cpp dpkg-dev g++ g++-4.2 gcc \
 +
libc6-dev libstdc++6-4.2-dev libstdc++6-4.2-dbg patch \
 +
perl perl-modules autoconf automake1.9 libtool flex bison \
 +
gdb diffutils-gnu
 
</pre>
 
</pre>
  
You might also create bash aliases for gnu utils. <b>BUT:</b> Maemo ignores [[http://de.wikipedia.org/wiki/Shebang shebangs]] and always executes shell scripts in busybox.
+
On default setups it will fail because of apt-get saving temporary files on the root partition.  
 +
Just clean the apt cache (<pre style="display: inline; padding: 2px">apt-get clean</pre>) and repeat the above command.
  
$HOME/.bashrc aliases example:
+
=== Fix scratchbox hacks ===
<pre>
 
# alias to gnu ls instead of busybux
 
alias ls='gls --color=auto'
 
  
alias ll='ls -l'
+
The tools from the SDK and TOOLS repository are meant for scratchbox and have been altered to use scratchbox paths. Instead of rewriting paths you can fake scratchbox directory structure.
alias la='ls -la'
 
alias md='mkdir'
 
alias rd='rmdir'
 
  
# aliases to gnu grep instead of busybux
+
<pre>
alias grep='ggrep'
+
mkdir -p /scratchbox/tools/
alias egrep='egrep'
+
ln -s /usr/bin /scratchbox/tools/bin
alias fgrep='fgrep'
 
 
</pre>
 
</pre>
  
=== Install build tools ===
+
linking bin seems to be enough.
 
 
<pre>
 
apt-get install bzip2 cpio cpp dpkg-dev g++ g++-4.2 gcc libc6-dev libstdc++6-4.2-dev \
 
libstdc++6-4.2-dbg patch perl perl-modules autoconf automake1.9 libtool flex bison gdb
 
</pre>
 
  
On default setups it will fail because of apt-get saving temporary files on the root partition.
+
[[Kategorie:N900]]
Just clean the apt cache (<pre style="display: inline; padding: 2px">apt-get clean</pre>) and repeat the above command.
 
<br>
 
You might want to install kernel headers:
 
<pre>
 
apt-get install linux-kernel-headers
 
</pre>
 

Aktuelle Version vom 6. September 2010, 11:55 Uhr


ALWAYS CREATE A BACKUP BEFORE TINKERING WITH YOUR N900

ON-Device - Getting Started

WARNING: Accoring to this post, installing packages from the SDK repository to your device might cripple the root fs and force you to reflash it. Anyway, the maemo scratchbox environment is awful and for small builds it is more convient to build directly on the device. Packages mentoned in this guide don't seem to cause serious problem.

Prerequisites

Add tools and sdk to /etc/apt/sources.list

# TOOLS
deb http://repository.maemo.org/ fremantle/tools free
deb-src http://repository.maemo.org/ fremantle/tools free

# SDK
deb http://repository.maemo.org/ fremantle/sdk free
deb-src http://repository.maemo.org/ fremantle/sdk free

Update apt cache:

apt-get update

Install build tools

apt-get install bzip2 cpio cpp dpkg-dev g++ g++-4.2 gcc \
libc6-dev libstdc++6-4.2-dev libstdc++6-4.2-dbg patch \ 
perl perl-modules autoconf automake1.9 libtool flex bison \ 
gdb diffutils-gnu

On default setups it will fail because of apt-get saving temporary files on the root partition.

Just clean the apt cache (

apt-get clean

) and repeat the above command.

Fix scratchbox hacks

The tools from the SDK and TOOLS repository are meant for scratchbox and have been altered to use scratchbox paths. Instead of rewriting paths you can fake scratchbox directory structure.

mkdir -p /scratchbox/tools/
ln -s /usr/bin /scratchbox/tools/bin

linking bin seems to be enough.