<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Marcin Juszkiewicz - packages</title><link href="https://marcin.juszkiewicz.com.pl/" rel="alternate"/><link href="https://marcin.juszkiewicz.com.pl/tag/packages/feed/" rel="self"/><id>https://marcin.juszkiewicz.com.pl/</id><updated>2009-07-02T14:08:00+02:00</updated><entry><title>Embedded package managers sucks</title><link href="https://marcin.juszkiewicz.com.pl/2009/07/02/embedded-package-managers-sucks/" rel="alternate"/><published>2009-07-02T14:08:00+02:00</published><updated>2009-07-02T14:08:00+02:00</updated><author><name>Marcin Juszkiewicz</name></author><id>tag:marcin.juszkiewicz.com.pl,2009-07-02:/2009/07/02/embedded-package-managers-sucks/</id><summary type="html">&lt;p&gt;Years ago someone wrote &lt;span class="caps"&gt;IPKG&lt;/span&gt; in pure shell. It can be still found in some distributions. Then it was rewritten into C and this version we used in OpenEmbedded derived systems. It had some bugs, we patched some of them, from time to time there was even upstream development done …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Years ago someone wrote &lt;span class="caps"&gt;IPKG&lt;/span&gt; in pure shell. It can be still found in some distributions. Then it was rewritten into C and this version we used in OpenEmbedded derived systems. It had some bugs, we patched some of them, from time to time there was even upstream development done for&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;Then Openmoko arrived and forked &lt;span class="caps"&gt;IPKG&lt;/span&gt; &amp;#8212; new project got &lt;span class="caps"&gt;OPKG&lt;/span&gt; name. It was written by OpenedHand and Openmoko developers. Their main goals&amp;nbsp;were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;callbacks for &lt;span class="caps"&gt;GUI&lt;/span&gt; package&amp;nbsp;managers&lt;/li&gt;
&lt;li&gt;&lt;span class="caps"&gt;GPG&lt;/span&gt; signed&amp;nbsp;repositories&lt;/li&gt;
&lt;li&gt;fixing&amp;nbsp;bugs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many things got changed, &lt;span class="caps"&gt;OE&lt;/span&gt; patches got merged, new bugs was added. Those who use &lt;span class="caps"&gt;CLI&lt;/span&gt; version of opkg (so far the only usable client) lost some functionalities &amp;#8212; for example there is no progress bar when packages are&amp;nbsp;fetched.&lt;/p&gt;
&lt;p&gt;For last few months &lt;span class="caps"&gt;OPKG&lt;/span&gt; is in unmaintained mode again and I think that this is some kind of curse on embedded market package&amp;nbsp;managers.&lt;/p&gt;
&lt;p&gt;Some time ago I discovered that when many (&amp;gt;50) packages needs to be upgraded then opkg segfaults during process and this is not a matter of going out of &lt;span class="caps"&gt;RAM&lt;/span&gt; as I have ~&lt;span class="caps"&gt;400MB&lt;/span&gt; free. Today it did not gave value of &lt;span class="caps"&gt;PATH&lt;/span&gt; for post install scripts&amp;#8230; I wonder what else can be found&amp;nbsp;;(&lt;/p&gt;
&lt;p&gt;What are other options? So far I know two &amp;#8212; dpkg + apt or rpm + yum. First one costs few megabytes of space, second one require also Python so it is not acceptable for most of our targets. Both also require rebuilding of everything&amp;nbsp;:(&lt;/p&gt;</content><category term="bugs"/><category term="openembedded"/><category term="openmoko"/><category term="packages"/><category term="rpm"/></entry><entry><title>How to install additional software into your OE generated rootfs</title><link href="https://marcin.juszkiewicz.com.pl/2009/01/22/how-to-install-additional-software-into-your-oe-generated-rootfs/" rel="alternate"/><published>2009-01-22T19:18:00+01:00</published><updated>2009-01-22T19:18:00+01:00</updated><author><name>Marcin Juszkiewicz</name></author><id>tag:marcin.juszkiewicz.com.pl,2009-01-22:/2009/01/22/how-to-install-additional-software-into-your-oe-generated-rootfs/</id><summary type="html">&lt;p&gt;There are few methods of adding software into rootfs. You can copy binaries but you can also go better way by using packages. I know that this can be strange experience for some people (which are used to systems which generates only binaries) but in OpenEmbedded world effect of software …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There are few methods of adding software into rootfs. You can copy binaries but you can also go better way by using packages. I know that this can be strange experience for some people (which are used to systems which generates only binaries) but in OpenEmbedded world effect of software build is set of packages which can be used to generate final rootfs&amp;nbsp;image.&lt;/p&gt;
&lt;p&gt;First thing to check is which package contains needed binary. It is easier if package name has binary name (like &amp;#8216;alsa-utils-aplay&amp;#8217; which contains &amp;#8216;aplay&amp;#8217; command) but it is not always so easy. Hopefully OpenEmbedded generates &amp;#8216;Packages.filelist&amp;#8217; file in &amp;#8216;tmp/deploy/glibc/ipk/&amp;#8217; subdirectories. If they are empty (common situation) they need to be&amp;nbsp;recreated.&lt;/p&gt;
&lt;p&gt;To generate them user needs to remove &amp;#8216;Packages*&amp;#8217; files from all directories and&amp;nbsp;call &lt;code&gt;bitbake package-index&lt;/code&gt; command. When command finishes &amp;#8216;Packages.filelist&amp;#8217; files should contain all informations &amp;#8212; for example &amp;#8216;update-inetd&amp;#8217; command line looks like&amp;nbsp;this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;update-inetd netbase:armv6:./usr/sbin/update-inetd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The format is&amp;nbsp;simple:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BINARY-NAME PACKAGE:ARCH:PATH-TO-BINARY
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So when package name is known we need to transfer package into device. This part depends on device so I will not elaborate on&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;Installing package is&amp;nbsp;simple: &lt;code&gt;opkg install package.ipk&lt;/code&gt;. But copying single packages can result in frustration called &amp;#8216;dependency hell&amp;#8217; (package require another package which require another etc). To check which packages will be required the easiest way&amp;nbsp;is &lt;code&gt;dpkg-deb -I package.ipk&lt;/code&gt; (as &lt;span class="caps"&gt;IPK&lt;/span&gt; packages are compatible with&amp;nbsp;DEBs).&lt;/p&gt;
&lt;p&gt;Better way is to use repositories of packages &amp;#8212; command simplify&amp;nbsp;to &lt;code&gt;opkg update;opkg install package&lt;/code&gt; (users of desktop Linux distributions can compare it&amp;nbsp;with &lt;code&gt;apt-get&lt;/code&gt; or &lt;code&gt;yum&lt;/code&gt;). If you built Ångström distribution then your rootfs already contains all informations needed to use packages from repositories. For other distros user needs to define them by&amp;nbsp;hand.&lt;/p&gt;
&lt;p&gt;Repository informations are stored in &amp;#8216;/etc/opkg/*-feed.conf&amp;#8217; files. Format is&amp;nbsp;simple:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/gz NAME URL
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/gz base http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/base
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Instead of &amp;#8216;src/gz&amp;#8217; also &amp;#8216;src&amp;#8217; can be used &amp;#8212; it will fetch uncompressed &amp;#8216;Packages&amp;#8217; file instead of gzipped&amp;nbsp;one.&lt;/p&gt;
&lt;p&gt;When repositories are defined installing software is&amp;nbsp;easy: &lt;code&gt;opkg update;opkg install package&lt;/code&gt; will fetch package and all it&amp;#8217;s dependencies and then will install them into&amp;nbsp;rootfs.&lt;/p&gt;
&lt;p&gt;I hope that this will simplify that task for some&amp;nbsp;people.&lt;/p&gt;</content><category term="linux"/><category term="openembedded"/><category term="packages"/></entry></feed>