maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Debian "squeeze" Image easy installer (https://talk.maemo.org/showthread.php?t=100672)

DennisHeine 2019-02-20 01:10

Debian "squeeze" Image easy installer
 
Hello,
here is an easy installer which installs a bootstraped Debian "squeeze" Image on the internal flash (which will wipe MyDocs!)

https://github.com/DennisHeine/DebianOnN900

to set your wifi access data, edit /etc/wpa_supplicant/wpa_supplicant.cfg from within maemo (simply mount /dev/mmcbll0p1 somewhere)

root password is changeit

Flaws:
screen callibration is missing (you have to run set.sh manually from a terminal)
no phone is installed
no network manager is installed
fn-key not mapped yet
windowmanager is not autostarting

I'm currently working on an updated version to get those fixed.

Hope you like it,

Dennis

sulu 2019-02-20 06:53

Re: Debian "squeeze" Image easy installer
 
Support for Squeeze ended 3 years ago (5 if you consider, that LTS does not cover anything beyond x86). Is there a reason why you don't use a more recent release?
If you still want to chroot into the system from Maemo, then you should be able to use Jessie after patching glibc. [1] I can provide you patched packages.
If you don't care for chroot, I'd suggest to go straight to to Buster.

You may also want to consider contacting @wicket, who ran a pretty similar project called DebiaN900, but abandoned it in favor of the Maemo Leste project, which you should have a look at.

btw: The N900 supports armhf, it's just Nokia's stock kernel for Fremantle that doesn't - "kernel power" does.


[1] https://talk.maemo.org/showpost.php?...postcount=3138

DennisHeine 2019-02-20 14:24

Re: Debian "squeeze" Image easy installer
 
maybe i'm going to do that next, but i will have to finish this one first. it's a pain to get the omap and modules and all that stuff together ^^
the reason i'm using squeeze is that it uses the same kernel version as the maemo kernel, so it is possible to simply copy the kernel modules.

sulu 2019-02-20 14:43

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554195)
maybe i'm going to do that next, but i will have to finish this one first. it's a pain to get the omap and modules and all that stuff together ^^

So I've heard, which is why I always steered clear of this topic. ;)

Quote:

Originally Posted by DennisHeine (Post 1554195)
the reason i'm using squeeze is that it uses the same kernel version as the maemo kernel, so it is possible to simply copy the kernel modules.

I suspected something like this, but Fremantle uses Kernel 2.6.28 while Squeeze uses 2.6.32. So I'd expect it to be easy to recompile the modules, but I'd be surprised if the resulting modules were actually binary compatible.

Wheezy should still be fully functional on 2.6.32 (and probably 2.6.28 - at least it works in a chroot).
Jessie is a slightly different story. It still boots on 2.6.32 (but by default not on 2.6.28, hence the glibc patch), but Systemd requires a newer kernel, so some things won't work.
Stretch won't work on 2.6.32 anymore, or at least the amount of patching glibc would require is far beyond my skills and would likely mean to fork it.

DennisHeine 2019-02-21 02:40

Re: Debian "squeeze" Image easy installer
 
Another problem is that most tutorials out there are not working, because they require quemu-arm-static which would have to be compiled manually. at least, there is no armel build for it in any repository thats compatible with the provided libc.

the only tutorial i have found is:

https://wiki.debian.org/MaemoAndSqueeze
in combination with
https://n900.elektranox.org/installation.html
(i had to heavily tweak the tutorials and to combine them to get everything working)

about binary compatibility of the modules: they don't really care, because you can use the 2.6.28 kernel for squeeze
some guy kindly provided it at
http://atrey.karlin.mff.cuni.cz/~pal...12.04-1.tar.gz
(so saying "it uses the same kernel" wasn't really correct - the build is using the same kernel.)

afaik, the main problem for building a new kernel is that the blockdevice support, and fbcon have to compiled into the build. also, current patched kernels for the N900 are broken (necessary drivers are missing), so it will be necessary to find a working build. but that is something for the future, when the final squeeze image is finished. most stuff is fixed allready, the dpi etc have been changed for the small display and some other stuff. currently, i'm trying to find a working phone software which is compatible with ofono.

they do provide N900-patched kernel sources:
https://elinux.org/N900
at
https://github.com/pali/linux-n900

the last two versions of the 4.x kernel i tried failed with a missing rx51_defconfig build target, so i'm going to try the latest 3.x next.
(edit: just checked the repository. the v3.12-rc1 seems to support it.)

also, something seems to be draining the battery. i'm charging my phone with 2A, and it's still going off after a while being drained.

there are really dozens of problems to get a working phone up, which is usable in daily life.

wicket 2019-02-21 03:30

Re: Debian "squeeze" Image easy installer
 
Hi Dennis,

As sulu mentioned, I worked on a similar project. Instead of providing an installable image, I wrote a couple of scripts to facilitate building your own kernel and Debian distribution with various tweaks. I haven't used it for some time and it's unmaintained, it should mostly work but it's possible some dependencies have changed and that may mean that some stuff is broken. If you're still interested, you can find it here:

https://github.com/dderby/debian900/

There is a also a link to the related thread with more information in my signature.

Having said that, I recommend you check out Maemo Leste, which is the main reason I orphaned my project. Its basically modern Debian/Devuan with mainline Linux (currently 4.15.7 with patches for PowerVR) and Hildon. It's still in pre-alpha but it's actively developed and the first alpha release is expected in the next few weeks. The only "gotcha" is that if you want to run Xfce or something other than Hildon, you can't, at least not out-of-the-box. I have managed to run other desktop environments/window managers with a few hacks but this process could be made easier. I was looking at this months ago but then lack free time meant it never got done. Hopefully I'll be able to submit some patches for this in the near future.

DennisHeine 2019-02-21 07:56

Re: Debian "squeeze" Image easy installer
 
Hi wicket,
thanks a lot, maybe it can help me building a newer debian release. i'm giving up the old one now, it's pointless unless i can get ofono to work. creation of the /cmt device seems to fail, or something else like that. i found a softphone with ofono support which was running after fixing python2.6 and compiling gnutk, but is useless without a running ofono...

thanks again, by now you helped me with the power button problem: sed -i 's/\(action=\).*$/\1'$POWER_BUTTON_ACTION'/'
$MOUNTPOINT/etc/acpi/events/powerbtn-acpi-support
that keyboard patch could become handy too, currently i'm mapping keys using autokey.

the only problem is that i don't want to use qemu-arm-static.

EDIT: *holdstheguntohishead* speech support patch is for kernel 4.x

sulu 2019-02-21 09:10

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554227)
i'm giving up the old one now, it's pointless unless i can get ofono to work.

Am I correct in assuming, that your primary goal is to get GSM telephony working under Debian?

DennisHeine 2019-02-21 09:40

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by sulu (Post 1554230)
Am I correct in assuming, that your primary goal is to get GSM telephony working under Debian?

exactly. getting GSM telephony and the modem working using the N900.
it will require some effort, because the latest kernel that is available hasn't got a patch required to enable speech support. maybe i can patch it in manually, but i dont know how much of an effort it is yet.

sulu 2019-02-21 10:10

Re: Debian "squeeze" Image easy installer
 
Out of selfish motives I recommend you to join the Leste team, because afaik so far GSM is not a primary goal and besides power consumption GSM is my main reason for sticking with Fremantle.

DennisHeine 2019-02-21 10:20

Re: Debian "squeeze" Image easy installer
 
I really want to get a standart debian working on this phone :)

wicket 2019-02-21 17:26

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554237)
I really want to get a standart debian working on this phone :)

Maemo Leste is pretty close to Debian already. Patches are upstreamed to the various projects it depends on. Unfortunately in the case of Debian, my experience is that they are not really interested in contributions from outsiders. Here's an example of a patch I submitted, completely ignored:

https://bugs.debian.org/cgi-bin/bugr...cgi?bug=893814

As for GSM, Maemo Leste already has SMS and 2G/3G data working with ofono although I don't believe they have been integrated into the UI yet. Phone calls have been reported to work but are currently of poor quality. See here for more info:

https://github.com/maemo-leste/bugtracker/issues/77
https://github.com/maemo-leste/bugtracker/issues/76

You may want to check out unicsy_demo, which has recently been packaged and is available in Leste:

https://github.com/pavelmachek/unicsy_demo

If you really are serious about getting this working and you believe you can help, I second sulu's suggestion and recommend that work together with the Maemo Leste team. If pure Debian is what you are after, it will be easy enough get telephony running on Debian once it's running on Leste.

wicket 2019-02-21 20:29

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554237)
I really want to get a standart debian working on this phone :)

I should also mention that there are standard Devuan images for the N900 and other phones (N950, N9, Droid 4) which do not use any of the Maemo Leste bits:

https://files.devuan.org/devuan_ascii/embedded/

Those will be even closer to standard Debian and you will be able to install Xfce, etc. easily without the issues I mentioned in my other post.

DennisHeine 2019-02-22 01:25

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by wicket (Post 1554261)
I should also mention that there are standard Devuan images for the N900 and other phones (N950, N9, Droid 4) which do not use any of the Maemo Leste bits:

https://files.devuan.org/devuan_ascii/embedded/

Those will be even closer to standard Debian and you will be able to install Xfce, etc. easily without the issues I mentioned in my other post.

hey, this sounds cool. does it use or allow debian repositorys?

wicket 2019-02-22 02:27

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554266)
hey, this sounds cool. does it use or allow debian repositorys?

Devuan is a fork of Debian, optimised for use without systemd. It has its own repositories which are virtually identical to Debian's, with the exception that some packages have been fixed to work without systemd, whilst a small number of troublesome packages have been blacklisted.

If you've really got a dying need to run systemd, there's nothing stopping you from adding Debian repositories, but I would recommend against it.

Those Devuan images were cut for the stable release so they are quite old now. If you run Maemo Leste, you'll get Devuan, plus a newer kernel which is regularly updated and contains a number of fixes for the N900 that would be missing from the Devuan stable kernel.

I guess what I'm trying to say is that the only reason for running standard Devuan over Maemo Leste would be if you want to run an alternate WM/DE instead of Hildon. You're really tempting me to get off my arse and work on those patches that will fix this. ;)

DennisHeine 2019-02-22 04:14

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by wicket (Post 1554267)
Devuan is a fork of Debian, optimised for use without systemd. It has its on repositories which are virtually identical to Debian's, with the exception that some packages have been fixed to work without systemd, whilst a small number of troublesome packages have been blacklisted.

If you've really got a dying need to run systemd, there's nothing stopping you from adding Debian repositories, but I would recommend against it.

Those Devuan images were cut for the stable release so they are quite old now. If you run Maemo Leste, you'll get Devuan, plus a newer kernel which is regularly updated and contains a number of fixes for the N900 that would be missing from the Devuan stable kernel.

I guess what I'm trying to say is that the only reason for running standard Devuan over Maemo Leste would be if you want to run an alternate WM/DE instead of Hildon. You're really tempting me to get off my arse and work on those patches that will fix this. ;)

main reason for me to want standard debian is to get the latest firefox/chrome browser for whatsapp web, and to get docker running on the n900 (just don't ask ^^) - also i want gnome3, which isn't available in squeeze.

kernel 4.9 is currently compiling, but it takes a hell of time to complete on the n900.

the gsm phone shouldnt be much of a problem, the curernt kernel contains a n900 modem/gsm driver (maybe it has to get patched for voice data, but it seems possible.), which is another reason for me wanting to get a clean install.
i've found a python phone that uses ofono after hours of searching which runs with fixed python repositories and manually compiled pygtk, as long as the modem driver is running.

maybe i can contribute it to the Devuan team. do you know which kernel they are using? (n900 modem support has been added to 3.16 afaik). it could become hard to get it into devuan, because as said before it needs a patched kernel for voice support (mainline kernel only has got ssi, whereas voice requires hsi). i don't know if the project maintainer will give his ok to this.

edit: yeah, my phone drained again... damn bs, it has to be restarted every half an hour, and kernel compilations takes hours, up to days.
in my next live, i'll start a carreer as a politican. that's much less of an hassle.

wicket 2019-02-22 06:37

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554269)
main reason for me to want standard debian is to get the latest firefox/chrome browser for whatsapp web, and to get docker running on the n900 (just don't ask ^^) - also i want gnome3, which isn't available in squeeze.

You do realise that both the latest Firefox and Chrome require way more memory than the N900 has?

I don't think you've understood me yet, Maemo Leste is built on top of Devuan, that means it includes the entire Devuan software library which is almost identical to Debian. The same Firefox, Chrome, Docker and GNOME 3 packages are available in Leste. The kernel is currently missing all of the config options required for full container support. I recently built a kernel based on the Leste kernel with these options enabled. You can find the config here:

https://github.com/dderby/n9xx-linux...rx51_defconfig

This should make its way into the Leste kernel at some point. The plan is to support Anbox containers, so that might be a better way for you to run WhatsApp, if it doesn't run out of memory that is.

Quote:

Originally Posted by DennisHeine (Post 1554269)
kernel 4.9 is currently compiling, but it takes a hell of time to complete on the n900.

You're building it on the device? :eek: Good luck with finishing that sometime this year! :D

Quote:

Originally Posted by DennisHeine (Post 1554269)
the gsm phone shouldnt be much of a problem, the curernt kernel contains a n900 modem/gsm driver (maybe it has to get patched for voice data, but it seems possible.), which is another reason for me wanting to get a clean install.
i've found a python phone that uses ofono after hours of searching which runs with fixed python repositories and manually compiled pygtk, as long as the modem driver is running.

You'll need libcmtspeech to get audio. Not available in Debian or Devuan but I believe it has now been packaged for Leste.

Quote:

Originally Posted by DennisHeine (Post 1554269)
maybe i can contribute it to the Devuan team. do you know which kernel they are using? (n900 modem support has been added to 3.16 afaik). it could become hard to get it into devuan, because as said before it needs a patched kernel for voice support (mainline kernel only has got ssi, whereas voice requires hsi). i don't know if the project maintainer will give his ok to this.

I can't remember which kernel was used when the stable release was cut, it's definitely newer than 3.16 but it's still older than the Leste kernel. Stable means stable, you won't be able to get a new kernel into the stable release. The Maemo Leste image builder is built on top of the Devuan arm-sdk. The Devuan arm-sdk maintainer is also involved in Maemo Leste and was the one who created the Leste image builder. When the next Devuan release is cut, it will most likely use the latest kernel that has already been tested in Leste.

Quote:

Originally Posted by DennisHeine (Post 1554269)
edit: yeah, my phone drained again... damn bs, it has to be restarted every half an hour, and kernel compilations takes hours, up to days.
in my next live, i'll start a carreer as a politican. that's much less of an hassle.

Why bother? Forget about Devuan and just use Leste which comes with Linux 4.15.7 plus PVR patches!

sulu 2019-02-22 09:24

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by wicket (Post 1554270)
You do realise that both the latest Firefox and Chrome require way more memory than the N900 has?

Quoted for truth.

@Dennis:
Just try firefox-esr under Easy Debian Jessie and you'll see, that it's unbearably slow (if it starts at all, that is).
Tbh I haven't tried Firefox/Iceweasel under ED since Wheezy, but even then it was nigh unusable.
The "Quantum update" was mainly about parallelizing things, which is great on a modern x86 PC with umpteen cores, but useless on a single-core Cortex A8.
On my EEE 901 netbook I see basically no speed improvement, because all the puny Atom N270 has to offer in terms of parallelizing is hyperthreading of a single core. What I see is, that now both threads are running at 100% for a minute instead of one, until the GUI is loaded.

Quote:

Originally Posted by wicket (Post 1554270)
You're building it on the device? :eek: Good luck with finishing that sometime this year! :D

I'm surprised the N900's watchdog doesn't keep rebooting the system every five minutes (RD mode on?).
When I started toying around with Easy Debian I pretty soon decided that I wouldn't compile on the N900. But I also was too lazy to properly learn how to cross-compile. Qemu was unbearably slow (even on my i7-2700k it was slower than on the N900), so I decided to buy a Cubieboard 2.

Edit:
Wait a second, I believe this actually IS the watchdog:
Quote:

Originally Posted by DennisHeine (Post 1554269)
edit: yeah, my phone drained again... damn bs, it has to be restarted every half an hour,


Spinal 2019-02-22 10:02

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554269)
kernel 4.9 is currently compiling, but it takes a hell of time to complete on the n900.

It takes about 10 minutes to build kernel for N900 on my Debian PC.

Here are some commands that you may be interested in. I use them to build my own kernel for Maemo Leste:

Code:

# Install build deps:
sudo apt-get -y install build-essential crossbuild-essential-armhf u-boot-tools
# Build options:
kerneldir=~/tmp/linux  # where kernel sources located
targetdir=~/tmp/kernel  # where to install kernel and modules
MAKEOPTS="-j4"          # number of CPU cores you have
compiler=/usr/bin/arm-linux-gnueabi-
arch=arm
# Configure kernel:
cd $kerneldir/ &&
make mrproper &&
make ARCH=$arch CROSS_COMPILE=$compiler menuconfig
# Build kernel:
make $MAKEOPTS ARCH=$arch CROSS_COMPILE=$compiler zImage modules omap3-n900.dtb
# Install:
cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > zImage &&
make $MAKEOPTS ARCH=$arch CROSS_COMPILE=$compiler INSTALL_MOD_PATH=$targetdir INSTALL_MOD_STRIP=1 modules_install &&
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n zImage -d zImage uImage &&
mkdir -p $targetdir/boot && cp -v zImage uImage $targetdir/boot/ &&
echo OK || echo FAIL


DennisHeine 2019-02-23 15:27

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by wicket (Post 1554270)
You do realise that both the latest Firefox and Chrome require way more memory than the N900 has?

I don't think you've understood me yet, Maemo Leste is built on top of Devuan, that means it includes the entire Devuan software library which is almost identical to Debian. The same Firefox, Chrome, Docker and GNOME 3 packages are available in Leste. The kernel is currently missing all of the config options required for full container support. I recently built a kernel based on the Leste kernel with these options enabled. You can find the config here:

https://github.com/dderby/n9xx-linux...rx51_defconfig

This should make its way into the Leste kernel at some point. The plan is to support Anbox containers, so that might be a better way for you to run WhatsApp, if it doesn't run out of memory that is.

awesome, thanks alot!

Quote:

You're building it on the device? :eek: Good luck with finishing that sometime this year! :D
it's really hard :D but my scratchbox is broken for some time, and before messing up my system, i decided to use the phone :D
the worst problem is, that it goes off every hour, even though it's being charged.


Quote:

You'll need libcmtspeech to get audio. Not available in Debian or Devuan but I believe it has now been packaged for Leste.
nice

Quote:

I can't remember which kernel was used when the stable release was cut, it's definitely newer than 3.16 but it's still older than the Leste kernel. Stable means stable, you won't be able to get a new kernel into the stable release. The Maemo Leste image builder is built on top of the Devuan arm-sdk. The Devuan arm-sdk maintainer is also involved in Maemo Leste and was the one who created the Leste image builder. When the next Devuan release is cut, it will most likely use the latest kernel that has already been tested in Leste.


Why bother? Forget about Devuan and just use Leste which comes with Linux 4.15.7 plus PVR patches!
all right :) thanks for that clear and detailed answer. it gave a good overview.

DennisHeine 2019-02-23 15:29

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by sulu (Post 1554271)
Quoted for truth.

@Dennis:
Just try firefox-esr under Easy Debian Jessie and you'll see, that it's unbearably slow (if it starts at all, that is).
Tbh I haven't tried Firefox/Iceweasel under ED since Wheezy, but even then it was nigh unusable.

maybe, but atm, it's the only possibility to use whatsapp.
the watchdog is kept alive by the watchdog daemon which pings the watchdog every 5 seconds.

Maemish 2019-02-24 23:01

Re: Debian "squeeze" Image easy installer
 
1 Attachment(s)
Just to show it is possible. With chromium 57 using jessie through easy debbie. First message sent. But not working with speed or ways you would accept. Still trying to get it work faster but on my thread about chromium 57 I have described my problems with the browser.

Maemish 2019-02-25 05:44

Re: Debian "squeeze" Image easy installer
 
1 Attachment(s)
When you can't through you go around. I don't know how to get the keyboard working but I know how to google workaround: on chromium 57 you can install input tools extension. So platform is from facebook and keyboard is owned by google. Not to type the most secret stuff. But with input tools you can change easy with whatever language characters. Just typed a message on the fly. Debbie stays open behind and not giving headache to use whatsapp.

sulu 2019-02-25 08:07

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by sulu (Post 1554271)
Just try firefox-esr under Easy Debian Jessie and you'll see, that it's unbearably slow (if it starts at all, that is).

I tried that now.
firefox-esr is available for Jessie in version 60.5.1esr-1~deb9u1. It installs fine under ED. The first start of the browser takes almost 10 minutes until the CPU (900MHz) goes idle again. Each subsequent start takes half that time.

The first thing I usually do after a fresh firefox installation is to get some privacy add-ons to keep the adware and spyware at bay that has spread amongst the web like a cancer.
When trying to load the add-on page, firefox runs out of memory and crashes.

sicelo 2021-04-21 14:14

Re: Debian "squeeze" Image easy installer
 
Quote:

Originally Posted by DennisHeine (Post 1554269)
i've found a python phone that uses ofono after hours of searching which runs with fixed python repositories and manually compiled pygtk, as long as the modem driver is running.

@DennisHeine are you still around? Mind sharing this python phone perhaps?

I am also interested in Debian on the N900, in addition to Leste


All times are GMT. The time now is 01:14.

vBulletin® Version 3.8.8