maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N800 (https://talk.maemo.org/forumdisplay.php?f=25)
-   -   Using a chroot shell to run non-Maemo text mode apps (https://talk.maemo.org/showthread.php?t=17653)

gjarboni 2008-03-08 09:49

Using a chroot shell to run non-Maemo text mode apps
 
I work in networking and my N800 (running OS2008) would be a lot more useful to me were I able to run any text mode app that's part of the Debian armel port. I've tried doing that by hacking at the package system to convince it that packages don't have dependencies they actually have (like a version of libc > 2.5, for example). This would usually end up with a N800 that wouldn't function well or wouldn't boot at all.

Then I came up with another idea. Find a more standardized armel install and create a chroot environment on a flash card. From this environment I can run "apt-get install <any package> without breaking any software on the N800. Some apps that aren't ported to OS2008 (btscanner, for example) run fine in such an environment[1].

I'm wondering if anyone else would be interested in having a similar set up. Just for the record, I'm not interested in replacing Maemo, I just want to be able to run apps, that I can't run currently[2]. You'd need a SD card formated ext2 or ext3 that has at least 500Mbytes of free space. It would probably be easiest to format the card and unpack the file on another computer running linux, but everything can be done on the N800. There are various articles that explain how to do that and I can provide pointers. The only other thing is the gzipped environment is 90Mbytes. Any ideas where I could post it?

Thanks for reading,

Jason M. (gjarboni)

[1] Trying to control btscanner using a bluetooth keyboard didn't work. I don't know if that would work using the version of btscanner that runs on OS2007.

[2] Apps like, nmap, tftpd, telnet, ftp, etherwake, vpnc. Some of these are available for OS2007 or OS2006, but it's hard to find all of them. With an armel chroot environment you can pull all of them from the debian armel repository using the apt-get install command.

yabbas 2008-03-08 17:03

Re: Using a chroot shell to run non-Maemo text mode apps
 
It's a nice idea.

Without knowing anything about packages ... Can't we just hack away at the dependancies instead? Have 2 versions of libc installed for example?

gjarboni 2008-03-09 03:58

Re: Using a chroot shell to run non-Maemo text mode apps
 
The libraries have to be stored /lib or /usr/lib and are loaded by name. For example applications are linked against libc.so.6. In maemo that is a symlink to libc-2.5.so. So every app needs to use libc-2.5.so. The chroot environment gets around this limitation.

dormant 2008-03-09 19:02

Re: Using a chroot shell to run non-Maemo text mode apps
 
I think I might be interested.

Would this allow me to install gphoto2? There is a package for the Linksys NSLU2, which I think is ARMEL.

gjarboni 2008-03-15 03:40

Re: Using a chroot shell to run non-Maemo text mode apps
 
gphoto2 seems to install, but one library doesnŽt get configured (output below). IŽd try to test it, but I think I need a special adapter to make the USB port on my n800 a host port.

Jason M.

P.S. Ignore the perl errors. They happen with every package installation.

root@Nokia-N800-50-2:/tftpboot# apt-get install gphoto2
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
libcdk5 libdbus-1-3 libexif12 libgphoto2-2 libgphoto2-port0 libhal1 libltdl3
Suggested packages:
gtkam gthumb
Recommended packages:
dbus
The following NEW packages will be installed:
gphoto2 libcdk5 libdbus-1-3 libexif12 libgphoto2-2 libgphoto2-port0 libhal1
libltdl3
0 upgraded, 8 newly installed, 0 to remove and 115 not upgraded.
Need to get 2673kB of archives.
After unpacking 7860kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libcdk5 libdbus-1-3 libexif12 libhal1 libltdl3 libgphoto2-port0 libgphoto2-2
gphoto2
Install these packages without verification [y/N]? y
Get:1 http://www.gtlib.gatech.edu sid/main libcdk5 5.0.20060507-1 [111kB]
Get:2 http://www.gtlib.gatech.edu sid/main libdbus-1-3 1.1.2-1 [132kB]
Get:3 http://www.gtlib.gatech.edu sid/main libexif12 0.6.16-2.1 [236kB]
Get:4 http://www.gtlib.gatech.edu sid/main libhal1 0.5.10-5 [394kB]
Get:5 http://www.gtlib.gatech.edu sid/main libltdl3 1.5.26-1 [178kB]
Get:6 http://www.gtlib.gatech.edu sid/main libgphoto2-port0 2.4.0-8 [129kB]
Get:7 http://www.gtlib.gatech.edu sid/main libgphoto2-2 2.4.0-8 [1296kB]
Get:8 http://www.gtlib.gatech.edu sid/main gphoto2 2.4.0-1 [197kB]
Fetched 2673kB in 10s (265kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_MESSAGES = "en_US",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously deselected package libcdk5.
(Reading database ... 10999 files and directories currently installed.)
Unpacking libcdk5 (from .../libcdk5_5.0.20060507-1_armel.deb) ...
Selecting previously deselected package libdbus-1-3.
Unpacking libdbus-1-3 (from .../libdbus-1-3_1.1.2-1_armel.deb) ...
Selecting previously deselected package libexif12.
Unpacking libexif12 (from .../libexif12_0.6.16-2.1_armel.deb) ...
Selecting previously deselected package libhal1.
Unpacking libhal1 (from .../libhal1_0.5.10-5_armel.deb) ...
Selecting previously deselected package libltdl3.
Unpacking libltdl3 (from .../libltdl3_1.5.26-1_armel.deb) ...
Selecting previously deselected package libgphoto2-port0.
Unpacking libgphoto2-port0 (from .../libgphoto2-port0_2.4.0-8_armel.deb) ...
Selecting previously deselected package libgphoto2-2.
Unpacking libgphoto2-2 (from .../libgphoto2-2_2.4.0-8_armel.deb) ...
Selecting previously deselected package gphoto2.
Unpacking gphoto2 (from .../gphoto2_2.4.0-1_armel.deb) ...

Setting up libcdk5 (5.0.20060507-1) ...

Setting up libdbus-1-3 (1.1.2-1) ...

Setting up libexif12 (0.6.16-2.1) ...

Setting up libhal1 (0.5.10-5) ...

Setting up libltdl3 (1.5.26-1) ...

Setting up libgphoto2-port0 (2.4.0-8) ...

Setting up libgphoto2-2 (2.4.0-8) ...
* udev requires a mounted sysfs, not started.
failed!
invoke-rc.d: initscript udev, action "reload" failed.

Setting up gphoto2 (2.4.0-1) ...

gjarboni 2008-03-16 04:49

Re: Using a chroot shell to run non-Maemo text mode apps
 
Actually, I spent some time trying to get this to work in the chroot shell with no success. Even if I fix the install error for libgphoto2-2, gphoto2 still won't autodetect my camera. Gphoto2 works fine on my eee with my camera and I can use a USB Ethernet dongle on my N800, so I'm pretty confident the problem is in software.

dormant 2008-03-17 20:09

Re: Using a chroot shell to run non-Maemo text mode apps
 
Hello, I was going to join in with some testing, but my n800 has just gone into "Not Charging" mode.

I had a few problems with gphoto2 not detecting the camera on my laptop, especially for Canon cameras.

Excuse my dumbness, but which repo do I need to add in order to fetch gphoto2 with apt-get?

terrencegf 2008-03-17 22:28

Re: Using a chroot shell to run non-Maemo text mode apps
 
Quote:

Originally Posted by dormant (Post 156490)
Excuse my dumbness, but which repo do I need to add in order to fetch gphoto2 with apt-get?

In general, you can check the list of Debian mirrors and search for a server that has armel listed. You may want to stick with http as well (although I'm not sure about this). I have found that "lenny / testing" meshes well with OS2008. For example, you could add the following repository within Application Manager:
Code:

Catalog name: Debian armel
Web address: http://ftp.us.debian.org/debian/
Distribution: testing
Components: main contrib non-free

Then let Application Manager update its application list and QUIT the Application Manager. Then in an xterm, you can install various applications (as root) with apt-get. I was able to install etherwake and kanjipad this way, but trying to install gphoto2 required upgrading libc6 which I am not willing to do. As always YMMV.

dormant 2008-03-18 17:00

Re: Using a chroot shell to run non-Maemo text mode apps
 
Thanks.

I have a lot of "unmet dependencies" as I'm starting from a relatively clean OS2008 setup.

But I guess I just install everything it tells me to.

dormant 2008-03-18 17:05

Re: Using a chroot shell to run non-Maemo text mode apps
 
I'm scared now. To meet all the dependencies, I need to install
  • gphoto2
  • libgphoto2-2
  • adduser
  • passwd
  • debianutils
  • login

I got the message:
Quote:

WARNING: The following packages will be removed.
This should NOT be done unless you know exactly what you are doing!
busybox sysvinit
Is this OK?

I am doing this in sudo gainroot mode. I assumed that was the same as "chroot shell", but is it?


All times are GMT. The time now is 08:17.

vBulletin® Version 3.8.8