http://openmoko.org/api.php?action=feedcontributions&user=Gernot&feedformat=atomOpenmoko - User contributions [en]2024-03-28T21:46:36ZUser contributionsMediaWiki 1.19.24http://openmoko.org/wiki/Userspace_root_imageUserspace root image2008-10-26T09:03:56Z<p>Gernot: /* Creating a root filesystem from scratch */</p>
<hr />
<div>{{Languages|Userspace_root_image}}<br />
<br />
== Creating a root filesystem from scratch ==<br />
<br />
To create a root file system image for storage in NAND flash, we use the mkfs.jffs2 program contained in the Debian package ''mtd-tools''.<br />
<br />
<pre><br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x4000 -n -d/tmp/jffsroot/ # for GTA01?<br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x20000 -n -d/tmp/jffsroot/ # for GTA02<br />
</pre><br />
<br />
are typical commands. It creates a FS image for our erase block size of 16k (128k for GTA02), padded to 0x700000 bytes in length from the files contained in the ''/tmp/jffsroot'' directory and stores the FS image in ''rootfs.jffs2''.<br />
<br />
== Using pre-created rootfs image ==<br />
<br />
=== Prebuilt ===<br />
<br />
See [[Downloads]] and update the list if you have more information.<br />
<br />
=== OpenEmbedded ===<br />
<br />
OpenEmbedded will itself create a jffs2 image at the end of the build process.<br />
<br />
Once the build server is running, it will create root filesystem images for us.<br />
<br />
=== demo JFFS2 root image ===<br />
<br />
Check the [[Flashing the Neo FreeRunner]] page for pre-built root images. Please note that this image may take long to boot the first time, since this boot finishes the installation process.<br />
<br />
=== Mounting the JFFS2 image on a loop back device (Block Memory MTD Emulation) ===<br />
==== Configure the kernel for support ====<br />
For a 2.6.25 kernel:<br />
*Device Drivers<br />
**Block Devices<br />
***Loopback device support<br />
**Memory Technology Device (MTD) support<br />
***Caching block device access to MTD device (mtdblock module, required for block2mtd)<br />
***Self-contained MTD device drivers<br />
****MTD using block device (block2mtd)<br />
*File systems<br />
**Miscellaneous filesystems<br />
***Journalling Flash File System v2 (JFFS2) support<br />
****Advanced compression for JFFS2<br />
*****JFFS2 ZLIB compression support<br />
*****JFFS2 RTIME compressoin support<br />
<br />
==== Mount on loopback device ====<br />
<br />
losetup is an application to manage loop devices, if you have the "losetup -f" option (for instance debian etch does not has such option) you can use the following commands:<br />
<br />
<pre><br />
export loop=$(losetup -f)<br />
losetup $loop <rootfs.jffs2><br />
modprobe block2mtd block2mtd=$loop,131072<br />
modprobe jffs2<br />
modprobe mtdblock<br />
mkdir <mountpoint><br />
mount -t jffs2 -o ro /dev/mtdblock0 <mountpoint><br />
</pre><br />
"losetup -f" just returns the first unused loop device, if your system do not comes with "losetup -f" just chose the first /dev/loop* device that is unused and change the first line with:<br />
<br />
export loop=/dev/loop0<br />
<br />
if loop0 is unused<br />
<br />
Here is a simple script to do the above automatically, complete with sanity checking: [[Media:Mntjffs.sh|JFFS2-Mount-Script]]<br />
<br />
Download it, make it executable and run it:<br />
<br />
# chmod +x Mntjffs.sh<br />
# ./Mntjffs.sh <image.jffs2> </mountpoint><br />
<br />
Make sure you run the script as root, because it needs to modprobe<br />
<br />
$ ./Mntjffs.sh -h | --help<br />
<br />
gives you a short summary of usage.<br />
<br />
<br />
Based on this [http://www.internettablettalk.com/forums/showthread.php?p=192475#post192475 script by fanoush].<br />
<br />
The following is an alternate way of doing the above.<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
=== Mounting the JFFS2 image on a loopback device (Kernel Memory MTD Emulation) ===<br />
<br />
As mounting the JFFS2 image from /dev/loop0 device is not supported, use the mtdram device as described in http://www.handhelds.org/hypermail/familiar/62/6232.html<br />
<br />
(On Fedora the first module to load is mtd, not mtdcore and you need to set e.g. vmalloc=256m as a kernel boot parameter for this to work.)<br />
<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
<br />
Using ''total_size=59024'' will set the filesystem size to the available space on /dev/mtd4 of the GTA1 device. So when you copy the image back it will be about 58 MB. You can set this to smaller values though.<br />
<br />
<br />
Be careful to really use the mtd-ram-disk (maybe there is a real Flash-device somewhere in your development system)<br />
<br />
So check for that looking into /proc/mtd:<br />
cat /proc/mtd<br />
# dev: size erasesize name<br />
# mtd0: 039a4000 00020000 "mtdram test device"<br />
<br />
Then write the image to that device and mount it:<br />
<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
The image is an Little Endian jffs2 image. To mount it on Big Endian architectures (like PowerPC) it'll have to be converted:<br />
<br />
jffs2dump -l -c -e <rootfs.jffs2.be> <rootfs.jffs2> # only needed on non little endian archs<br />
<br />
==== create the new image ====<br />
To get the changed image back there are two ways. The obvious one is to unmount it and copy the data back from the MTD block device (the image will be 58 MB):<br />
<br />
umount /dev/mtdblock0<br />
dd if=/dev/mtdblock0 of=<rootfs.jffs2><br />
<br />
You can also create a new image using the mounted file system and the method described [[Userspace_root_image#Creating_a_root_filesystem_from_scratch | above]] (the image will have the size of its data):<br />
<br />
mkfs.jffs2 --pad=0x700000 -o new_rootfs.jffs2 -e 0x4000 -n -d <mountpoint><br />
<br />
== Flashing a root filesystem into NAND ==<br />
<br />
See [[U-boot#Writing_rootfs_to_NAND]]<br />
<br />
== Converting a GTA02 image for GTA01 ==<br />
<br />
The techniques on this page may be used to convert a GTA02 (FreeRunner) image for use on a GTA01, provided that it is small enough to fit into the GTA01's flash.<br />
<br />
The steps I used are shown below (corrections welcome). Please read all of this page before executing these commands, in particular the warning to make sure that /dev/mtd0 does not map to a real flash device on your system.<br />
<br />
<pre><br />
modprobe jffs2<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
modprobe mtdram erase_size=128 total_size=262144<br />
dd if=gta02_image.jffs2 of=/dev/mtd0<br />
mount -t jffs2 -o ro /dev/mtdblock0 /mnt<br />
mkfs.jffs2 --little-endian -e 16 -x lzo --pad -n -r /mnt -o for_gta01.jffs2<br />
</pre><br />
<br />
To clean up when you're done:<br />
<pre><br />
umount /mnt<br />
rmmod mtdram<br />
</pre><br />
<br />
[[Category:System Developers]]</div>Gernothttp://openmoko.org/wiki/Userspace_root_imageUserspace root image2008-10-26T09:02:19Z<p>Gernot: /* Creating a root filesystem from scratch */</p>
<hr />
<div>{{Languages|Userspace_root_image}}<br />
<br />
== Creating a root filesystem from scratch ==<br />
<br />
To create a root file system image for storage in NAND flash, we use the mkfs.jffs2 program contained in the Debian package ''mtd-tools''.<br />
<br />
<pre><br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x4000 -n -d/tmp/jffsroot/ # for GTA01?<br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x20000 -n -d/tmp/jffsroot/ # for GTA02<br />
</pre><br />
<br />
are typical commands. It creates a FS image for our erase block size of 16k, padded to 0x700000 bytes in length from the files contained in the ''/tmp/jffsroot'' directory and stores the FS image in ''rootfs.jffs2''.<br />
<br />
== Using pre-created rootfs image ==<br />
<br />
=== Prebuilt ===<br />
<br />
See [[Downloads]] and update the list if you have more information.<br />
<br />
=== OpenEmbedded ===<br />
<br />
OpenEmbedded will itself create a jffs2 image at the end of the build process.<br />
<br />
Once the build server is running, it will create root filesystem images for us.<br />
<br />
=== demo JFFS2 root image ===<br />
<br />
Check the [[Flashing the Neo FreeRunner]] page for pre-built root images. Please note that this image may take long to boot the first time, since this boot finishes the installation process.<br />
<br />
=== Mounting the JFFS2 image on a loop back device (Block Memory MTD Emulation) ===<br />
==== Configure the kernel for support ====<br />
For a 2.6.25 kernel:<br />
*Device Drivers<br />
**Block Devices<br />
***Loopback device support<br />
**Memory Technology Device (MTD) support<br />
***Caching block device access to MTD device (mtdblock module, required for block2mtd)<br />
***Self-contained MTD device drivers<br />
****MTD using block device (block2mtd)<br />
*File systems<br />
**Miscellaneous filesystems<br />
***Journalling Flash File System v2 (JFFS2) support<br />
****Advanced compression for JFFS2<br />
*****JFFS2 ZLIB compression support<br />
*****JFFS2 RTIME compressoin support<br />
<br />
==== Mount on loopback device ====<br />
<br />
losetup is an application to manage loop devices, if you have the "losetup -f" option (for instance debian etch does not has such option) you can use the following commands:<br />
<br />
<pre><br />
export loop=$(losetup -f)<br />
losetup $loop <rootfs.jffs2><br />
modprobe block2mtd block2mtd=$loop,131072<br />
modprobe jffs2<br />
modprobe mtdblock<br />
mkdir <mountpoint><br />
mount -t jffs2 -o ro /dev/mtdblock0 <mountpoint><br />
</pre><br />
"losetup -f" just returns the first unused loop device, if your system do not comes with "losetup -f" just chose the first /dev/loop* device that is unused and change the first line with:<br />
<br />
export loop=/dev/loop0<br />
<br />
if loop0 is unused<br />
<br />
Here is a simple script to do the above automatically, complete with sanity checking: [[Media:Mntjffs.sh|JFFS2-Mount-Script]]<br />
<br />
Download it, make it executable and run it:<br />
<br />
# chmod +x Mntjffs.sh<br />
# ./Mntjffs.sh <image.jffs2> </mountpoint><br />
<br />
Make sure you run the script as root, because it needs to modprobe<br />
<br />
$ ./Mntjffs.sh -h | --help<br />
<br />
gives you a short summary of usage.<br />
<br />
<br />
Based on this [http://www.internettablettalk.com/forums/showthread.php?p=192475#post192475 script by fanoush].<br />
<br />
The following is an alternate way of doing the above.<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
=== Mounting the JFFS2 image on a loopback device (Kernel Memory MTD Emulation) ===<br />
<br />
As mounting the JFFS2 image from /dev/loop0 device is not supported, use the mtdram device as described in http://www.handhelds.org/hypermail/familiar/62/6232.html<br />
<br />
(On Fedora the first module to load is mtd, not mtdcore and you need to set e.g. vmalloc=256m as a kernel boot parameter for this to work.)<br />
<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
<br />
Using ''total_size=59024'' will set the filesystem size to the available space on /dev/mtd4 of the GTA1 device. So when you copy the image back it will be about 58 MB. You can set this to smaller values though.<br />
<br />
<br />
Be careful to really use the mtd-ram-disk (maybe there is a real Flash-device somewhere in your development system)<br />
<br />
So check for that looking into /proc/mtd:<br />
cat /proc/mtd<br />
# dev: size erasesize name<br />
# mtd0: 039a4000 00020000 "mtdram test device"<br />
<br />
Then write the image to that device and mount it:<br />
<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
The image is an Little Endian jffs2 image. To mount it on Big Endian architectures (like PowerPC) it'll have to be converted:<br />
<br />
jffs2dump -l -c -e <rootfs.jffs2.be> <rootfs.jffs2> # only needed on non little endian archs<br />
<br />
==== create the new image ====<br />
To get the changed image back there are two ways. The obvious one is to unmount it and copy the data back from the MTD block device (the image will be 58 MB):<br />
<br />
umount /dev/mtdblock0<br />
dd if=/dev/mtdblock0 of=<rootfs.jffs2><br />
<br />
You can also create a new image using the mounted file system and the method described [[Userspace_root_image#Creating_a_root_filesystem_from_scratch | above]] (the image will have the size of its data):<br />
<br />
mkfs.jffs2 --pad=0x700000 -o new_rootfs.jffs2 -e 0x4000 -n -d <mountpoint><br />
<br />
== Flashing a root filesystem into NAND ==<br />
<br />
See [[U-boot#Writing_rootfs_to_NAND]]<br />
<br />
== Converting a GTA02 image for GTA01 ==<br />
<br />
The techniques on this page may be used to convert a GTA02 (FreeRunner) image for use on a GTA01, provided that it is small enough to fit into the GTA01's flash.<br />
<br />
The steps I used are shown below (corrections welcome). Please read all of this page before executing these commands, in particular the warning to make sure that /dev/mtd0 does not map to a real flash device on your system.<br />
<br />
<pre><br />
modprobe jffs2<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
modprobe mtdram erase_size=128 total_size=262144<br />
dd if=gta02_image.jffs2 of=/dev/mtd0<br />
mount -t jffs2 -o ro /dev/mtdblock0 /mnt<br />
mkfs.jffs2 --little-endian -e 16 -x lzo --pad -n -r /mnt -o for_gta01.jffs2<br />
</pre><br />
<br />
To clean up when you're done:<br />
<pre><br />
umount /mnt<br />
rmmod mtdram<br />
</pre><br />
<br />
[[Category:System Developers]]</div>Gernothttp://openmoko.org/wiki/Userspace_root_imageUserspace root image2008-10-26T09:01:31Z<p>Gernot: /* Creating a root filesystem from scratch */</p>
<hr />
<div>{{Languages|Userspace_root_image}}<br />
<br />
== Creating a root filesystem from scratch ==<br />
<br />
To create a root file system image for storage in NAND flash, we use the mkfs.jffs2 program contained in the Debian package ''mtd-tools''.<br />
<br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x4000 -n -d/tmp/jffsroot/ # for GTA01?<br />
mkfs.jffs2 --pad=0x700000 -o rootfs.jffs2 -e 0x20000 -n -d/tmp/jffsroot/ # for GTA02<br />
<br />
are typical commands. It creates a FS image for our erase block size of 16k, padded to 0x700000 bytes in length from the files contained in the ''/tmp/jffsroot'' directory and stores the FS image in ''rootfs.jffs2''.<br />
<br />
== Using pre-created rootfs image ==<br />
<br />
=== Prebuilt ===<br />
<br />
See [[Downloads]] and update the list if you have more information.<br />
<br />
=== OpenEmbedded ===<br />
<br />
OpenEmbedded will itself create a jffs2 image at the end of the build process.<br />
<br />
Once the build server is running, it will create root filesystem images for us.<br />
<br />
=== demo JFFS2 root image ===<br />
<br />
Check the [[Flashing the Neo FreeRunner]] page for pre-built root images. Please note that this image may take long to boot the first time, since this boot finishes the installation process.<br />
<br />
=== Mounting the JFFS2 image on a loop back device (Block Memory MTD Emulation) ===<br />
==== Configure the kernel for support ====<br />
For a 2.6.25 kernel:<br />
*Device Drivers<br />
**Block Devices<br />
***Loopback device support<br />
**Memory Technology Device (MTD) support<br />
***Caching block device access to MTD device (mtdblock module, required for block2mtd)<br />
***Self-contained MTD device drivers<br />
****MTD using block device (block2mtd)<br />
*File systems<br />
**Miscellaneous filesystems<br />
***Journalling Flash File System v2 (JFFS2) support<br />
****Advanced compression for JFFS2<br />
*****JFFS2 ZLIB compression support<br />
*****JFFS2 RTIME compressoin support<br />
<br />
==== Mount on loopback device ====<br />
<br />
losetup is an application to manage loop devices, if you have the "losetup -f" option (for instance debian etch does not has such option) you can use the following commands:<br />
<br />
<pre><br />
export loop=$(losetup -f)<br />
losetup $loop <rootfs.jffs2><br />
modprobe block2mtd block2mtd=$loop,131072<br />
modprobe jffs2<br />
modprobe mtdblock<br />
mkdir <mountpoint><br />
mount -t jffs2 -o ro /dev/mtdblock0 <mountpoint><br />
</pre><br />
"losetup -f" just returns the first unused loop device, if your system do not comes with "losetup -f" just chose the first /dev/loop* device that is unused and change the first line with:<br />
<br />
export loop=/dev/loop0<br />
<br />
if loop0 is unused<br />
<br />
Here is a simple script to do the above automatically, complete with sanity checking: [[Media:Mntjffs.sh|JFFS2-Mount-Script]]<br />
<br />
Download it, make it executable and run it:<br />
<br />
# chmod +x Mntjffs.sh<br />
# ./Mntjffs.sh <image.jffs2> </mountpoint><br />
<br />
Make sure you run the script as root, because it needs to modprobe<br />
<br />
$ ./Mntjffs.sh -h | --help<br />
<br />
gives you a short summary of usage.<br />
<br />
<br />
Based on this [http://www.internettablettalk.com/forums/showthread.php?p=192475#post192475 script by fanoush].<br />
<br />
The following is an alternate way of doing the above.<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
=== Mounting the JFFS2 image on a loopback device (Kernel Memory MTD Emulation) ===<br />
<br />
As mounting the JFFS2 image from /dev/loop0 device is not supported, use the mtdram device as described in http://www.handhelds.org/hypermail/familiar/62/6232.html<br />
<br />
(On Fedora the first module to load is mtd, not mtdcore and you need to set e.g. vmalloc=256m as a kernel boot parameter for this to work.)<br />
<br />
modprobe mtdcore<br />
modprobe jffs2<br />
modprobe mtdram total_size=59024 # default is 4 MByte - set to max. available size<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
<br />
Using ''total_size=59024'' will set the filesystem size to the available space on /dev/mtd4 of the GTA1 device. So when you copy the image back it will be about 58 MB. You can set this to smaller values though.<br />
<br />
<br />
Be careful to really use the mtd-ram-disk (maybe there is a real Flash-device somewhere in your development system)<br />
<br />
So check for that looking into /proc/mtd:<br />
cat /proc/mtd<br />
# dev: size erasesize name<br />
# mtd0: 039a4000 00020000 "mtdram test device"<br />
<br />
Then write the image to that device and mount it:<br />
<br />
dd if=<rootfs.jffs2> of=/dev/mtd0<br />
mount -t jffs2 /dev/mtdblock0 <mountpoint><br />
<br />
The image is an Little Endian jffs2 image. To mount it on Big Endian architectures (like PowerPC) it'll have to be converted:<br />
<br />
jffs2dump -l -c -e <rootfs.jffs2.be> <rootfs.jffs2> # only needed on non little endian archs<br />
<br />
==== create the new image ====<br />
To get the changed image back there are two ways. The obvious one is to unmount it and copy the data back from the MTD block device (the image will be 58 MB):<br />
<br />
umount /dev/mtdblock0<br />
dd if=/dev/mtdblock0 of=<rootfs.jffs2><br />
<br />
You can also create a new image using the mounted file system and the method described [[Userspace_root_image#Creating_a_root_filesystem_from_scratch | above]] (the image will have the size of its data):<br />
<br />
mkfs.jffs2 --pad=0x700000 -o new_rootfs.jffs2 -e 0x4000 -n -d <mountpoint><br />
<br />
== Flashing a root filesystem into NAND ==<br />
<br />
See [[U-boot#Writing_rootfs_to_NAND]]<br />
<br />
== Converting a GTA02 image for GTA01 ==<br />
<br />
The techniques on this page may be used to convert a GTA02 (FreeRunner) image for use on a GTA01, provided that it is small enough to fit into the GTA01's flash.<br />
<br />
The steps I used are shown below (corrections welcome). Please read all of this page before executing these commands, in particular the warning to make sure that /dev/mtd0 does not map to a real flash device on your system.<br />
<br />
<pre><br />
modprobe jffs2<br />
modprobe mtdchar<br />
modprobe mtdblock<br />
modprobe mtdram erase_size=128 total_size=262144<br />
dd if=gta02_image.jffs2 of=/dev/mtd0<br />
mount -t jffs2 -o ro /dev/mtdblock0 /mnt<br />
mkfs.jffs2 --little-endian -e 16 -x lzo --pad -n -r /mnt -o for_gta01.jffs2<br />
</pre><br />
<br />
To clean up when you're done:<br />
<pre><br />
umount /mnt<br />
rmmod mtdram<br />
</pre><br />
<br />
[[Category:System Developers]]</div>Gernothttp://openmoko.org/wiki/IpkgIpkg2007-12-30T22:15:34Z<p>Gernot: /* Ext2 Formatted Memory Card */</p>
<hr />
<div>The practical way to install software on OpenMoko is with the [http://handhelds.org/moin/moin.cgi/Ipkg Ipkg package manager], possibly via the graphical [[Application Manager]]. Naturally, you need to have obtained an OpenMoko system by other means initially.<br />
<br />
For the latest ipk package files from buildhost put the following lines in your /etc/ipkg/base-feed.conf:<br />
src/gz all http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/ipk/all/<br />
src/gz armv4t http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/ipk/armv4t/<br />
src/gz fic-gta01 http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/ipk/fic-gta01/<br />
<br />
In the shell, "ipkg update" will update the list of available packages, "ipkg upgrade" will download and install all packages that have a newer version available and "ipkg install new-app" will download and install "new-app".<br />
<br />
Have a look at [[Repositories]] to get addresses of alternative software repositories, e.g. ScaredyCat's ipkg repository.<br />
<br />
== History ==<br />
<br />
Ipkg re-implements for embedded systems the functionality of Debian tools dpkg, apt, and apt-get. For example, it uses much less disk space for the package metadata.<br />
<br />
== Ipkg Breaks Kernels ==<br />
<br />
Unfortunately, ipkg has a bug; it tries to install kernels (and does actually install the kernel modules), but the kernel is on a separate partition that isn't normally mounted. So when you do "ipkg upgrade" and kernel packages get installed, your system breaks (the modules no longer match the kernel). For example, sound no longer worked for me.<br />
<br />
To fix this, you have to find a kernel image somewhere else (I don't know how to tell you how to find that -- on IRC, mentax suggested installing http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/uImage-2.6.22.5-moko11+svnr2937-r2-fic-gta01.bin<br />
(but that advice is probably obsolete by the time you read it.) Once you have a kernel partition image that matches the modules installed by ipkg, you can install the kernel by powering off the phone and following the advice in [[Flashing_openmoko]].<br />
<br />
It seems to me that ipkg should be able to flash the kernel partition -- but nobody's made it do so, yet.<br />
<br />
== Installing Packages to the Memory Card ==<br />
<br />
You can use ipkg to install packages to a folder on the memory card. To do this you'll need the following:<br />
<br />
=== Ext2 Formatted Memory Card ===<br />
<br />
By default, the memory card comes formated with VFAT (Windows Format). You need to re-format the card with EXT2. You will not be able to view the files on the card using a windows system after this.<br />
<br />
To check if your card is using vfat or ext, run the 'mount' command, and look for: /dev/mmcblk0p1 on /media/card.<br />
<br />
On the NEO, run the following:<br />
''' This will erase everything on your memory card '''<br />
<br />
umount /media/card<br />
fdisk /dev/mmcblk0<br />
t <br />
83<br />
w<br />
mke2fs /dev/mmcblk0p1<br />
mount /media/card<br />
<br />
=== Entry in ipkg.conf File ===<br />
<br />
In your /etc/ipkg.conf file, after "dest root /" add a new line:<br />
dest card /media/card/ipkg<br />
<br />
Create /media/card/ipkg folder<br />
mkdir /media/card/ipkg<br />
<br />
=== Installing Packages on the Card ===<br />
<br />
When installing a package, use the -d option to have in installed on the card:<br />
ipkg install -d card python-core<br />
<br />
This will put all files (binaries and libraries) on the card, under the folder specified in the ipkg.conf file.<br />
<br />
=== Linking/Using Packages on the Card ===<br />
<br />
Your system will not be able to see the packages that you just added to your card. There are two ways to remedy this. <br />
The better solution is to use ipkg-link from the 'ipkg-utils' package, but 'better' is always subjective - YMMV.<br />
<br />
==== 1: Ipkg Utils and ipkg-link ====<br />
<br />
Ipkg-utils is a package that provides some additional functionality for ipkg. A very useful tool is ipkg-link, which creates symbolic lynks for packages installed in non-root locations (such as a card) back to the root file system.<br />
<br />
To get ipkg-utils, run:<br />
ipkg install ipkg-utils<br />
<br />
To create symbolic links to your root system for a specific package, run: ipkg-link add <package>. For example, for python-core use:<br />
ipkg-link add python-core<br />
<br />
To create symbolic links for all packages installed in a location, run:<br />
ipkg-link mount /media/card/ipkg<br />
<br />
The ''ipkg-link remove'' and ''ipkg-link unmount'' commands remove the symlinks for a package or all packages.<br />
<br />
There is a list of the options for the ipkg command under "How do I use it?" [http://handhelds.org/moin/moin.cgi/Ipkg here.]<br />
<br />
==== 2: Adding the card PATH and LIB directories to your path ====<br />
Another way to add bin and lib files to your system is by modifying your environment variables in /etc/profile as follows:<br />
<br />
On the line that defines the PATH variable, add:<br />
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/media/card/ipkg/usr/bin<br />
<br />
Then, before the 'export' line add:<br />
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/media/card/ipkg/usr/lib<br />
<br />
Then modify the 'export' line and add LD_LIBRARY_PATH to the end.<br />
<br />
This will let the system see the binary and library files, but it will not see other resources, such as images, configuration files, desktop files, etc. For this reason, ipkg-link is preferred.<br />
<br />
[[Category:OpenMoko]]<br />
[[Category:Implemented]]</div>Gernot