User:Tanner: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>tanner
moebian
imported>tanner
domain change maemory.com
 
(20 intermediate revisions by 4 users not shown)
Line 30: Line 30:


For your convenience I have uuencoded Tim Samoff's [http://lists.maemo.org/pipermail/maemo-community/2010-January/003870.html CLI icon]
For your convenience I have uuencoded Tim Samoff's [http://lists.maemo.org/pipermail/maemo-community/2010-January/003870.html CLI icon]
which is supposed to be added to the debian/control file of CLI apps:
which is supposed to be added to the debian/control file of CLI apps. You can download it [http://n900.tannerlab.com/tools/cli.icon.txt here].
XB-Maemo-Icon-26:
  iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
  d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACYtJREFUeNrUWkurZUcVXvXY
  59zbtyXpICEiaFrJQFDo6CDOHAi2UQdOFBw4CAqCDhU0DuIPEBtCRupIBxk4
  MBMHgpIMnChE1OAD2uADEkFpUM9z710vv7Wq6ty6u09f0+nb3Tcb6u7Hqb33
  96361qq1al/1vscfp+Ac3fjH6+S9v3owP/iYMfqyMaabz2ax62wwtnPDOPgY
  ok8pxpQoKKW9UhRC8IFI+UQ4ds7HFKLW1mujffDexRi9MXiGMQG34uborbEO
  515pckopZ7RxuN8RyflgtBrxfKeNGlNMY0ppxItGUnowSm3Rr7ezubfdnCwe
  SuMw2EsPPvi9x957+SlrNAXvCCTIWkMKvQP6JEYdorQoG6gkUIpo+SgkStyV
  SQb0RwOolACOQdBIlAaQ7XGtT4q2lGhDDCjRGsZYg8Qa71sR75WSPe5Z411o
  doPfN1rrDs/q8MaVVt5Z5T1dnM++8sEPXHnqXzduxOuv/iVutlsGKeCxJbyE
  jxN2uJc3FfkcJzHviBlG5sq/kUq8D4qvyzWKpQ/fzn94H/Mzub88L0hfJc/w
  OPc8Ijh3is8xUhqIMZr+woULscMwRmjCwoDdY+959xcXiwX9/KVfRAyV0gYD
  xTBVeY2mjJuvAR3+aMrg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GMiInnHYP
  +Dq79jU1aMBHukebLbPkuoTRVB24AbwsSx7rPYVIXzPKJh1OdA83Wxx4nYNQ
  DqGs7zJhtaFyva+KmoCPdI83duKq91iW0nn9vs0qV00hcqsSMNxry7cFzaaA
  5HqA1/T71KyiVctPqig3qV/vC/hcD2QJLWsWWvKfOgKbAn5qeV+qqPhmqqiz
  deJs8WVd6yyzabU6E7jJ8qUQSfcbfIlCPOuqKiH+gtKu72wby0sJWAqRcwH+
  mECCD+yqMLVbpGoKEUmHzxv4UlIalEZhjVosmKT5i2OtA1rLn2kVdbYE+IOS
  0uyknEp7HfUYVeQlQ65fRTZ3oxA5w2xUeaNpw18tEf99UFHWf/iLSLH8uQVf
  RyBARltrDaaEEPhbbI408jURmh/TeQWf10ZtF9iRu86mAAImSi4WeLklr5ad
  X/BCoOsMf/cdZ11HKJ/4HwdiMHyg0/2cYW8nG+X1IDefzxUI8P9ySP2KITj3
  4PMnpqT4ozZrP3bWxq7rUlmle0tsVv6xgWkg/Bg7IxPr/2K8Nbb/CTAAF12f
  5l7y6xMAAAAASUVORK5CYII=


== [http://maemo.org/packages/view/kernel-flasher-maemo/ custom Linux kernel] ==
== [http://maemo.org/packages/view/kernel-flasher-maemo/ custom Linux kernel] ==
Line 105: Line 47:
Reverting to the original kernel is simple:  "apt-get install --reinstall kernel kernel-flasher"  or reflash only the original kernel image.
Reverting to the original kernel is simple:  "apt-get install --reinstall kernel kernel-flasher"  or reflash only the original kernel image.
see [http://talk.maemo.org/showthread.php?t=43420 TMO page] for more details.
see [http://talk.maemo.org/showthread.php?t=43420 TMO page] for more details.
== GNU tools ==
the crippled busybox is installed on the N900.
command line users prefer the real GNU tools.
these are the optified packages for the device.
Most of them do not take use more RAM than busybox (a few KBs)!
[http://maemo.org/packages/view/coreutils-gnu/ coreutils-gnu]
[http://maemo.org/packages/view/diffutils-gnu/ diffutils-gnu]
[http://maemo.org/packages/view/findutils-gnu/ findutils-gnu]
[http://maemo.org/packages/view/grep-gnu/ grep-gnu]
[http://maemo.org/packages/view/sed-gnu/ sed-gnu]
[http://maemo.org/packages/view/tar-gnu/ tar-gnu]


== [http://maemo.org/packages/view/texlive-latex-base/ TeXLive 2009] ==
== [http://maemo.org/packages/view/texlive-latex-base/ TeXLive 2009] ==
Line 140: Line 94:
some experimental ports which I have not yet uploaded to extras-devel can be found in my repository
some experimental ports which I have not yet uploaded to extras-devel can be found in my repository


  deb http://www.maemory.com/N900/ fremantle free incompatible
  deb http://n900.tannerlab.com/ fremantle free incompatible


currently: python2.6, perl5.10, GNU compiler collection 4.4.3, autoconf 2.64, automake1.10
currently: python2.6, perl5.10, GNU compiler collection 4.4.3, autoconf 2.64, automake1.10
Line 176: Line 130:
and the search paths of Maemo need to be adjusted in /etc/profile and  /etc/osso-af-init/af-defines.sh:
and the search paths of Maemo need to be adjusted in /etc/profile and  /etc/osso-af-init/af-defines.sh:


* PATH=$PATH:/opt/maemo/usr/bin  (and sbin for root)
* PATH=$PATH:/opt/maemo/bin  (and sbin for root)
* ld.so.conf: add /opt/maemo/usr/lib
* ld.so.conf: add /opt/maemo/lib
* locales: [https://bugs.maemo.org/show_bug.cgi?id=8363 LOCPATH]=LOCPATH=/usr/share/locale:/opt/maemo/usr/share/locale
* locales: [https://bugs.maemo.org/show_bug.cgi?id=8363 LOCPATH]=LOCPATH=/usr/share/locale:/opt/maemo/share/locale
* MANPATH=/opt/maemo/usr/share/man
* MANPATH=/opt/maemo/share/man
* pkgconfig: /usr/share/pkgconfig:/opt/maemo/usr/share/pkgconfig
* pkgconfig: /usr/share/pkgconfig:/opt/maemo/share/pkgconfig
* info in info?: /usr/share/info:/opt/maemo/usr/share/info
* info in info?: /usr/share/info:/opt/maemo/share/info
* apps in hildon ?: /usr/share/applications:/opt/maemo/usr/share/applications
* apps in hildon: [https://bugs.maemo.org/show_bug.cgi?id=10531 Bug about Application Menu] /usr/share/applications:/opt/maemo/share/applications
* icons in hildon ?: /usr/share/icons:/opt/maemo/usr/share/icons
* icons in hildon ?: /usr/share/icons:/opt/maemo/share/icons
this list may be incomplete - please help to complete it
this list may be incomplete - please help to complete it


Line 192: Line 146:
TMPDIR=/var/tmp should be moved to /opt/tmp
TMPDIR=/var/tmp should be moved to /opt/tmp
or /var/opt should symlink to /opt/var and contain a larger tmp directory.
or /var/opt should symlink to /opt/var and contain a larger tmp directory.
A package for Maemo (tested on N800) that allows a package to set environment variables like XDG_DATA_DIRS is available: [http://svn.nomike.org/playground/trunk/opt-support/ opt-support]. I propose packages depend on opt-support and in their postinst add their variables to the file "/etc/profile.env". -- dannym
== chroot instead of /opt ==
== chroot instead of /opt ==
I have described my currently preferred [http://maemo.org/community/brainstorm/view/remove_256mb_limitation_of_the_rootfs_partition_in_the_n900/ solution as #5]
I have described my currently preferred [http://maemo.org/community/brainstorm/view/remove_256mb_limitation_of_the_rootfs_partition_in_the_n900/ solution as #5]
Line 202: Line 159:
[http://maemo.org/packages/repository/latest/fremantle_extras-devel_free_armel/all/ latest packages]
[http://maemo.org/packages/repository/latest/fremantle_extras-devel_free_armel/all/ latest packages]


== Repartitioning ==
[https://garage.maemo.org/builder/fremantle/?C=M;O=D autobuilder current builds]
 
== [[Repartitioning the flash]] ==


[http://talk.maemo.org/showpost.php?p=424811&postcount=66 how to swap FAT and ext3 parition]
[http://talk.maemo.org/showpost.php?p=424811&postcount=66 how to swap FAT and ext3 parition]
[http://talk.maemo.org/showpost.php?p=425359&postcount=68 how to implement USB mass storage with a loopback file]
[http://talk.maemo.org/showpost.php?p=425359&postcount=68 how to implement USB mass storage with a loopback file]


== Setting up a repository mirror ==
== Setting up a repository mirror on your server ==


[http://www.maemory.com/mirror/repro-maemo.tgz reprepro configuration]
[http://n900.tannerlab.com/mirror/repro-maemo.tgz reprepro configuration]


== Safely free some space on rootfs ==
== Safely free some space on rootfs ==


This script shows you how much space is freed and it
[http://n900.tannerlab.com/tools/moveroot.sh This script] shows you how much space is freed.
also detects whether something has already been moved.
It can also detect whether some directories have already been moved.
WARNING: Although this script works for most users, you should always perform a backup before running it.
Do not use this script if you have already used some other methods or scripts from [[Free_up_rootfs_space]]!
In this case reflashing is recommended.


# install gainroot
# install the rootsh package from extras
# copy & paste the following script to your MyDocs (or upload it via SSH)
# download the [http://n900.tannerlab.com/tools/moveroot.sh script] to your MyDocs (or upload it via SSH)
# in Terminal run
# in Terminal run
  sudo sh /home/user/MyDocs/moreroot.sh
  sudo gainroot
sh /home/user/MyDocs/moveroot.sh


The script:
It should have freed about 95MB on your rootfs.
Upgrading the firmware OTA after using the script is supposed to work.
#!/bin/sh
If you reflash the firmware the script will automatically remove the files from the old firmware
# N900 script to safely free space on rootfs
when you run it again.
# © 2010 by Thomas Tanner <tanner@maemory.com>
 
# licensed under GPLv3
[http://n900.tannerlab.com/tools/unmoveroot.sh This untested script] reverts the modifications and moves as many as possible files back to rootfs.
Make sure that you have enough space on rootfs for that. Otherwise it will abort the operation. Instructions are the same as for moveroot.sh,
# move root stuff to /home
except that you call unmoveroot.sh.
dirs="usr/share/icons usr/share/nokia-maps usr/share/themes usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt"
 
#optional: var/lib/dpkg
== On-device flashing of a custom kernel image ==
if test -d /home/var/cache/apt; then
 
  # keep existing apt cache
This how to flash a kernel on-device (without USB/flasher 3.5):
  rm -rf /var/cache/apt
 
  ln -s /home/var/cache/apt /var/cache/apt
# you have a kernel image /path/zImage (with it's modules installed)
else
# install the package "sdk-fiasco-gen" from SDK
  dirs="$dirs var/cache/apt"
# become root: "sudo gainroot"
  fi
# make a "fiasco" :)
(cd / && du -sc $dirs)
  fiasco-gen -o /path/zImage.fiasco -g -k /path/zImage
for d in $dirs; do
# flash it
    test -L /$d && continue
/sbin/fiasco-image-update /path/zImage.fiasco
    echo moving /$d
    rm -rf /home/$d
    mkdir -p /home/$d
    cp -a /$d /home/$d/..
    rm -rf /$d
    ln -s /home/$d /$d
done


== Reflashing & Restore ==
== Reflashing & Restore ==
Line 256: Line 212:
# store all settings with Backup on my SD card
# store all settings with Backup on my SD card
# reflash with standard http://wiki.maemo.org/Updating_the_firmware, i.e.
# reflash with standard http://wiki.maemo.org/Updating_the_firmware, i.e.
  sudo flasher-3.5 -F RX-51_2009SE_2.2009.51-1_PR_COMBINED_MR0_ARM.bin -f -R
  sudo flasher-3.5 -F ''<current firmware image>''.bin -f -R
# restore old backup except programs
# restore old backup except programs
# install gainroot
# install rootsh from System
# in Terminal:
# in Terminal:
  sudo sh /home/backup/restore
  sudo sh /home/backup/restore.sh
with following script in /home/backup (feedback and patches are welcome).
with [http://n900.tannerlab.com/tools/restore.sh this script (for PR<1.2] or  [http://n900.tannerlab.com/tools/restore1.2.sh this script (PR1.2)] in /home/backup (feedback and patches are welcome).
It expects that you made a backup of /root and your selected modified files (e.g. /etc/ssh) in /home/backup.
It expects that you made a backup of /root and your selected modified files (e.g. /etc/ssh) in /home/backup.
The file "pkgs" should contain a list (line by line) of the package names you want to install.
The file "pkgs" should contain a list (line by line) of the package names you want to install.
#!/bin/sh
# N900 restore script
# © 2010 by Thomas Tanner <tanner@maemory.com>
# licensed under GPLv3
set -x
# script and data must be in /home/backup
cd /home/backup
# remove old opt
rm -rf /home/opt
mkdir /home/opt
# copy /root backup
rm -rf /root
cp -a root /
# copy modifed files for /etc
cp -a etc/* /etc
# enable user ssh login with ~/.ssh/authorized_keys
sed 's/^user:!/user:\*/' /etc/passwd > /etc/passwd.tmp
cp /etc/passwd.tmp /etc/passwd # mv
# move root stuff to /home
dirs="usr/share/icons usr/share/nokia-maps usr/share/themes usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt"
#optional: var/lib/dpkg
if test -d /home/var/cache/apt; then
  # keep existing apt cache
  rm -rf /var/cache/apt
  ln -s /home/var/cache/apt /var/cache/apt
else
  dirs="$dirs var/cache/apt"
fi
(cd / && du -sc $dirs)
for d in $dirs; do
    test -L /$d && continue
    echo moving /$d
    rm -rf /home/$d
    mkdir -p /home/$d
    cp -a /$d /home/$d/..
    rm -rf /$d
    ln -s /home/$d /$d
done
mount /home/user/MyDocs # non-standard partition layout
apt-get update
apt-get -y install mc python-support openssh-server
# install my standard set of packages
apt-get -y install `cat pkgs`

Latest revision as of 06:50, 21 June 2010

Packages

info about some of the packages I've uploaded to extras-devel

see also http://wiki.maemo.org/Packaging

A backport of Debhelper 7 for Fremantle is available in extras-devel. It works transparently and can coexist with debhelper 5 in the SDK. It also works on the autobuilder, if you specify

Build-Depends: debhelper7

in debian/control. The following lines in debian/rules are necessary to use it:

PATH:=/usr/bin/dh7:/usr/bin:$(PATH)
export PATH
SBOX_REDIRECT_IGNORE=/usr/bin/perl
export SBOX_REDIRECT_IGNORE

We are working on enhancement to make optification is easier, i.e. direct installation of files in the /opt hierarchy.

If you also need a more recent cdbs, then use the package cdbs-dh7, which conflicts with the standard cdbs and does not work on autobuilder yet.

To replace several tools in scratchbox you can also use the following line as a template

SBOX_REDIRECT_IGNORE:=$(shell echo /usr/bin/{perl,dh_*} | sed "s/ /:/g")

CLI icon

For your convenience I have uuencoded Tim Samoff's CLI icon which is supposed to be added to the debian/control file of CLI apps. You can download it here.

My custom kernel which contains probably everything one could need on the N900:

This custom kernel contains additional modules for IPv6, packet filtering,
NAT, tunneling, kernel configuration, Wifi mesh networking,
ext4, XFS, reiserfs, NTFS reading, NILFS2, ISO9660, UDF, CIFS, automounter,
UNIONFS, device mapper and dmloop, cryptography, cryptoloop,
EFI partitions, UTF8 codepages, mouse+joystick input,
USB/IP and generic USB device drivers.
It shows a boot logo.

Just install the package "kernel-flasher-maemo" from extras-devel/non-free (section System) and reboot. Reverting to the original kernel is simple: "apt-get install --reinstall kernel kernel-flasher" or reflash only the original kernel image. see TMO page for more details.

GNU tools

the crippled busybox is installed on the N900. command line users prefer the real GNU tools. these are the optified packages for the device. Most of them do not take use more RAM than busybox (a few KBs)! coreutils-gnu diffutils-gnu findutils-gnu grep-gnu sed-gnu tar-gnu

talk page

R (statistics)

bug: installation fails with ucfr missing solution: wait or edit r-base-core.postinst and comment line 44 out

bug: linking against BLAS and LAPACK currently hardcodes the links found in the -dev package.

some discussion

bonnie++ (filesystem benchmarks)

see post and ff

lzma and its successor xz-utils

an extremely efficient compressor. it is much faster than bzip2 for decompression and yields about 30% smaller files.

bug: keyboard doesn't work. bug: window close button is not visible

experimental packages

some experimental ports which I have not yet uploaded to extras-devel can be found in my repository

deb http://n900.tannerlab.com/ fremantle free incompatible

currently: python2.6, perl5.10, GNU compiler collection 4.4.3, autoconf 2.64, automake1.10


Ideas/plans:

Moebian: Maemo/MeeGo on Debian

Wiki and discussion

Brainstorm: Repartitioning

brainstorm discussion repartitioning thread

brainstorm discussion

alternative USB host solution

USB/IP

Ideally addon software should be installed only in /opt without any symlinks in / (NAND) in accordance with FHS. /usr/local should be moved and symlinked to /opt/local and is reserved for own programs not maintained by dpkg.

A package may either install its files directly (for small packages) in the /opt/maemo hierarchy (bin,etc,lib,man,share) or in a separate directory /opt/<package> with its own hierarchy (bin,etc,lib,man,share). For the latter solution packages should symlink all non-private files to /opt/maemo/{bin,etc,lib,man,share} and the search paths of Maemo need to be adjusted in /etc/profile and /etc/osso-af-init/af-defines.sh:

  • PATH=$PATH:/opt/maemo/bin (and sbin for root)
  • ld.so.conf: add /opt/maemo/lib
  • locales: LOCPATH=LOCPATH=/usr/share/locale:/opt/maemo/share/locale
  • MANPATH=/opt/maemo/share/man
  • pkgconfig: /usr/share/pkgconfig:/opt/maemo/share/pkgconfig
  • info in info?: /usr/share/info:/opt/maemo/share/info
  • apps in hildon: Bug about Application Menu /usr/share/applications:/opt/maemo/share/applications
  • icons in hildon ?: /usr/share/icons:/opt/maemo/share/icons

this list may be incomplete - please help to complete it

As NAND is much faster than eMMC a cache manager could mantain a list of very often used binaries and libraries in /opt and automatically copy them and symlink them to a fixed size cache in NAND.

TMPDIR=/var/tmp should be moved to /opt/tmp or /var/opt should symlink to /opt/var and contain a larger tmp directory.

A package for Maemo (tested on N800) that allows a package to set environment variables like XDG_DATA_DIRS is available: opt-support. I propose packages depend on opt-support and in their postinst add their variables to the file "/etc/profile.env". -- dannym

chroot instead of /opt

I have described my currently preferred solution as #5


Tips and tricks:

fresh builds

latest packages

autobuilder current builds

how to swap FAT and ext3 parition how to implement USB mass storage with a loopback file

Setting up a repository mirror on your server

reprepro configuration

Safely free some space on rootfs

This script shows you how much space is freed. It can also detect whether some directories have already been moved. WARNING: Although this script works for most users, you should always perform a backup before running it. Do not use this script if you have already used some other methods or scripts from Free_up_rootfs_space! In this case reflashing is recommended.

  1. install the rootsh package from extras
  2. download the script to your MyDocs (or upload it via SSH)
  3. in Terminal run
sudo gainroot
sh /home/user/MyDocs/moveroot.sh

It should have freed about 95MB on your rootfs. Upgrading the firmware OTA after using the script is supposed to work. If you reflash the firmware the script will automatically remove the files from the old firmware when you run it again.

This untested script reverts the modifications and moves as many as possible files back to rootfs. Make sure that you have enough space on rootfs for that. Otherwise it will abort the operation. Instructions are the same as for moveroot.sh, except that you call unmoveroot.sh.

On-device flashing of a custom kernel image

This how to flash a kernel on-device (without USB/flasher 3.5):

  1. you have a kernel image /path/zImage (with it's modules installed)
  2. install the package "sdk-fiasco-gen" from SDK
  3. become root: "sudo gainroot"
  4. make a "fiasco" :)
fiasco-gen -o /path/zImage.fiasco -g -k /path/zImage
  1. flash it
/sbin/fiasco-image-update /path/zImage.fiasco 

Reflashing & Restore

this is a slightly modified version of the script I use to restore my N900 after a reflash. My reflashing procedure is:

  1. store all settings with Backup on my SD card
  2. reflash with standard http://wiki.maemo.org/Updating_the_firmware, i.e.
sudo flasher-3.5 -F <current firmware image>.bin -f -R
  1. restore old backup except programs
  2. install rootsh from System
  3. in Terminal:
sudo sh /home/backup/restore.sh

with this script (for PR<1.2 or this script (PR1.2) in /home/backup (feedback and patches are welcome). It expects that you made a backup of /root and your selected modified files (e.g. /etc/ssh) in /home/backup. The file "pkgs" should contain a list (line by line) of the package names you want to install.