Hack-A-N900/Development
ON-Device - Getting Started
Add extras, tools and sdk to /etc/apt/sources.list
#Extras deb http://repository.maemo.org/extras/ fremantle free non-free deb-src http://repository.maemo.org/extras/ fremantle free # 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
Install essential tools
apt-get install bash coreutils-gnu grep-gnu wget vim
Change shell in /etc/passwd to bash:
root:x:0:0:root:/root:/bin/bash user:!:29999:29999::/home/user:/bin/bash
NOTE: Maemo ignores [shebangs] for shells and always executes shell scripts in busybox. You need to pass the script explicitly to any other shell:
bash ./test.sh
WARNING: Don't try to relink /bin/sh to /bin/bash. You system won't boot and you will have to reflash the device.
NOTE: Gnu coreutils and gnu grep are prefixed with the letter 'g'. Therefore you need to call
/usr/bin/gls
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:
ln -s /usr/bin/ggrep /usr/bin/grep
You might also create bash aliases for gnu utils.
$HOME/.bashrc aliases example:
# alias to gnu ls instead of busybux alias ls='gls --color=auto' alias ll='ls -l' alias la='ls -la' alias md='mkdir' alias rd='rmdir' # aliases to gnu grep instead of busybux alias grep='ggrep' alias egrep='gegrep' alias fgrep='gfgrep'
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
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.
You might want to install kernel headers:
apt-get install linux-kernel-headers