<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=66.25.130.174</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=66.25.130.174"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/66.25.130.174"/>
	<updated>2026-04-22T03:31:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Opt_Problem&amp;diff=30829</id>
		<title>Opt Problem</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Opt_Problem&amp;diff=30829"/>
		<updated>2010-01-12T02:19:42Z</updated>

		<summary type="html">&lt;p&gt;66.25.130.174: /* Some goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= The /opt Problem =&lt;br /&gt;
&lt;br /&gt;
There is not enough space on root to fit all applications, therefore additional partition has to be used. But just how?&lt;br /&gt;
&lt;br /&gt;
There is a section in the Maemo 5 Developer Guide explaining the basics:&lt;br /&gt;
http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Packaging%2C_Deploying_and_Distributing/Installing_under_opt_and_MyDocs&lt;br /&gt;
&lt;br /&gt;
= Current situation =&lt;br /&gt;
&lt;br /&gt;
* 256MB OneNAND chip: bootloader, kernel, root (ubifs - with compression)&lt;br /&gt;
* 32GB eMMC: /home ~2GB (ext3), /home/user/MyDocs ~29GB (vfat), swap 0.7GB&lt;br /&gt;
* symlink: /opt/ -&amp;gt; /home/opt/&lt;br /&gt;
* OneNAND is probably &amp;quot;much&amp;quot; faster than the eMMC (hard numbers? read? write? small blobs? big blobs?)&lt;br /&gt;
* OneNAND performance figures: Sustained read performance: 108MB/s. Sustained write performance: up to 17MB/s. See [http://www.samsung.com/global/business/semiconductor/products/fusionmemory/downloads/onenand_brochure_200609.pdf Samsung OneNAND specs].&lt;br /&gt;
* eMMC performance figures: read performance 37MB/s. Write performance 20MB/s. Write speed of 17MB/s has been achieved in this test at [http://symbianbriefs.blogspot.com/2010/01/n900-review-part-10-transferring-data.html symbianbriefs.blogspot.com]. My own read tests however show ~11MB/s (370MB file).&lt;br /&gt;
* Decisions were taken in a &amp;quot;what shall we do about /opt?&amp;quot; BOF at the [[Maemo Summit 2009]]. Minutes: http://lists.maemo.org/pipermail/maemo-developers/2009-October/021289.html&lt;br /&gt;
&lt;br /&gt;
= Some goals =&lt;br /&gt;
&lt;br /&gt;
* Firmware should be flashable.&lt;br /&gt;
* Should not break applications.&lt;br /&gt;
* One should be able to install more than 256mb worth of software.&lt;br /&gt;
* Standards compliance, less need to make uncompatible quirks.&lt;br /&gt;
* A fix should be doable after shipping (before shipping, probably not?)&lt;br /&gt;
&lt;br /&gt;
== Current problems / developer and packaging issues ==&lt;br /&gt;
&lt;br /&gt;
This should be a list of current problems developers are experiencing related to optification:&lt;br /&gt;
&lt;br /&gt;
* [http://lists.maemo.org/pipermail/maemo-developers/2009-October/021419.html Optification breaks package on upgrade from non-optified older version]&lt;br /&gt;
&lt;br /&gt;
* Symlinks take up space in the rootfs. This may become an issue if there are lots of them.&lt;br /&gt;
&lt;br /&gt;
* [[/Non-Optified_packages|List of non-optified packages and applications]] - Please feel free to add every piece of software which is using too much space in rootfs&lt;br /&gt;
&lt;br /&gt;
= Possible solutions, even the bad ones =&lt;br /&gt;
&lt;br /&gt;
==== Applications are made relocatable and installed to /opt ====&lt;br /&gt;
* Relocatable applications can move everywhere without breaking.&lt;br /&gt;
* No symlinks get scattered over the rootfs (symlinks take up space, too).&lt;br /&gt;
* Not all applications can easily be made relocatable.&lt;br /&gt;
* Requires more work by the programmer.&lt;br /&gt;
* May not be feasible for ports from an upstream source.&lt;br /&gt;
* Putting a startup script into /usr/bin setting up environment variables such as LD_LIBRARY_PATH can help.&lt;br /&gt;
* autotools-based packages can use --prefix=/opt/&amp;lt;packagename&amp;gt;.&lt;br /&gt;
* Python apps can make use of the [http://docs.python.org/reference/datamodel.html#index-821 __file__] module-scope variable to determine where they are installed (e.g. installdir = os.path.dirname(__file__)).&lt;br /&gt;
* Could be taken into account as an alternative to maemo-optify wherever feasible.&lt;br /&gt;
&lt;br /&gt;
==== Have a 2-5gb partition on the emmc for addon packages mounted to /usr/local or /opt ====&lt;br /&gt;
* Most apps by default usually go there&lt;br /&gt;
* for /opt store according to the FHS standard /opt/&amp;lt;package&amp;gt; and symlink to /opt/{bin,lib,share,...} actually the standard is /opt/&amp;lt;vendor&amp;gt;/whatever In this case using /opt/maemo directly would work.&lt;br /&gt;
* Having ld.so.conf and PATH set properly avoids all the symlink madness&lt;br /&gt;
* Don&#039;t do symlinks for /usr/local|/opt - make it a real partition&lt;br /&gt;
* Explain to people why they don&#039;t have full 32GB of storage - or use LVM on the eMMC to dynamicaly change the size as things get installed through some dpkg hooks or such - we do know how much it will take ahead of time so if there isn&#039;t enough storage do a resize(VFAT should be resizable with something like gparted maybe?) ext3/2 are both online resizeable (growth only!)&lt;br /&gt;
* Requires a bit more work when packaging - make some defaults pre-set in SDK&lt;br /&gt;
* All apps should use a normal usr layout underneath any path. Example: /opt/maemo/{bin,sbin,lib, etc...} same if it would be in /usr/local - works like GNU stow&lt;br /&gt;
&lt;br /&gt;
==== store addon packages completely in /home/opt hierarchy ====&lt;br /&gt;
* like previous solution but on the standard /home partition&lt;br /&gt;
* very clean solution if speed advantage of OneNAND over eMMC turns out to be a myth&lt;br /&gt;
* /etc and /var could be copied there as well and mounted to root using bind. This way OneNAND would only be changed be reflashes and if /home is not mounted (e.g., by a keypress during boot) a fallback  system could boot from unmodified OneNAND.&lt;br /&gt;
* if OneNAND is significantly faster, mark some often used shared libraries as candidates for a /usr/lib/cache directory in which they are copied during installation until a certain cache limit is reached.&lt;br /&gt;
&lt;br /&gt;
==== During packaging move all files &amp;gt;500kb to /opt and symlink to root ====&lt;br /&gt;
* Optify is basically this.&lt;br /&gt;
* Install is not slowed down, work is done when packaging.&lt;br /&gt;
* Some packages break when replaced with symlinks. How to prevent - hack on hack?&lt;br /&gt;
* A buildbot could force this to debian/rules automatically.&lt;br /&gt;
&lt;br /&gt;
==== Use aufs/unionfs to overlay OneNAND root with eMMC filesystem. ====&lt;br /&gt;
* This could be partial overlay, for example only /lib and /usr. &lt;br /&gt;
* Could keep essential libraries on OneNAND so they would work faster.&lt;br /&gt;
* Has anyone measured the speed penalty for aufs/unionfs usage?&lt;br /&gt;
* Is it faster or slower that moving root to eMMC?&lt;br /&gt;
* Might be difficult to have new programs to benefit from faster OneNAND.&lt;br /&gt;
&lt;br /&gt;
==== Hack with --datadir, --libdir etc. through debian/rules ====&lt;br /&gt;
* Could be forced by a buildbot.&lt;br /&gt;
* Should move most of the big lumps on larger media if there are some.&lt;br /&gt;
* Works at least with packages with configure.&lt;br /&gt;
* Requires at least additional $LIBDIR setup?&lt;br /&gt;
* Programs which have hardcoded paths (ugly code) break.&lt;br /&gt;
* Could additionally symlink files from opt to root.&lt;br /&gt;
&lt;br /&gt;
==== Require that applications have --prefix /opt ====&lt;br /&gt;
* Could be forced by a buildbot.&lt;br /&gt;
* Should not break anything.&lt;br /&gt;
* Programs would not benefit from faster OneNAND.&lt;br /&gt;
* Requires at least additional $PATH setup?&lt;br /&gt;
* Programs which have hardcoded paths (ugly code) break.&lt;br /&gt;
* Could additionally symlink files from opt to root.&lt;br /&gt;
* Just reminds me of 770&#039;s /var/lib/install..&lt;br /&gt;
* Against standard&lt;br /&gt;
&lt;br /&gt;
==== Move root from OneNAND to eMMC and combine with /home to create a new root ====&lt;br /&gt;
* How much faster OneNAND is? Numbers?&lt;br /&gt;
* Can flasher flash on eMMC?&lt;br /&gt;
* Leave only the bootable and rescue stuff in the rootfs&lt;br /&gt;
* Maybe use it uncompressed for speed and add a /fast/usr folder to OneNAND to store some system files that would benefit from the speed (example: move /usr/something to /fast/usr and symlink it or just place /fast/usr in the path)&lt;br /&gt;
&lt;br /&gt;
==== Use mount -o bind (or -o rbind) ====&lt;br /&gt;
* Method: Do not use NAND for any additional data. Boot into standard image. Any additional changes made are only available after -o bind or -o rbind which are defined in /etc/fstab . Setup provides potential fail-over; if -o bind or -o rbind fails user gets into &#039;rescue shell&#039; providing 1) recovery method 2) quick install to vanilla firmware without 3rd party utilities, networking, or computer (think: no network available, expensive roaming, no computer with fwflasher or Nokia Software Downloader available, ...)&lt;br /&gt;
&lt;br /&gt;
==== Turn the problem around, pivot the root with /opt ====&lt;br /&gt;
* After pivot /opt would be root and old root would be /opt. Symlink the old root contents to new root would make those available.&lt;br /&gt;
* Can the base system dependencies handle this?&lt;br /&gt;
* Can Nokia created software handle this? &lt;br /&gt;
* Could this work? If so, then all additional packages would install directly on eMMC.&lt;br /&gt;
&lt;br /&gt;
==== After install move all files &amp;gt;500kb to /opt and symlink to root ====&lt;br /&gt;
* Could be done at background after install or with post-install hook.&lt;br /&gt;
* There might not be enough space on / even for install.&lt;br /&gt;
* Install is already slow, could make it even slower.&lt;br /&gt;
* Some packages break when replaced with symlinks. How to prevent - hack on hack?&lt;br /&gt;
* Uninstall might be messy, some post-remove magic needed.&lt;br /&gt;
&lt;br /&gt;
==== Chroot install in /opt, symlink to where it belongs ====&lt;br /&gt;
* A Bit like stow.&lt;br /&gt;
* Maybe somebody can see something good in this?&lt;br /&gt;
* Difficult hack.. would need all the tools etc to be visible in the chroot.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>66.25.130.174</name></author>
	</entry>
</feed>