lunedì 27 febbraio 2017

Debian in tasca : Nokia N810 e N900

Il Nokia 900 e' stato per tanto tempo un irraggiungibile terminale (piu' che altro per il prezzo) che mi ha interessato per la programmazione diretta in Qt

Anche ai nostri giorni su Ebay si trovano dei Nokia N900 a prezzo di circa 350 euro,,,frugando ed aspettando ho comunque avuto modo di mettere le mani su un paio di Nokia N810 e N900 ad una cirnquantina di euro


Sono entrambi dispositivi risalenti agli anni 2008 e 2009 ma si differenziano sostanzialmente, Il Nokia N810 e' praticamente un tablet ante litteram (solo connessione WiFi) mentre il Nokia N900 e' un vero e proprio smartphone (giusto per la cronaca nel 2009 era venduto a circa 500 dollari ed era a pari prezzo con i primi IPhone)


Scatola completa nel Nokia N900


Accessori N810

Il Nokia 810 ed il Nokia 900 erano basati su un sistema operativo Linux fortemente derivato da Debian con un kernel della serie 2.6 Linux Nokia-N810-43-7 2.6.21-omap1 Oct 14 2008 armv61 (piu' in dettaglio N810 monta Diablo mentre N900 monta Fremantle)

Si puo' usare questi dispositivi al giorno d'oggi....con un po' di pazienza si'.
Per prima cosa si devono aggiornare i repository perche' quelli originali di Nokia sono morti da tempo. Per fare cio' si deve prima installare rootsh per acquisire i privilegi di root (apt-get install rootsh)
si digita poi

sudo gainroot

e si edita il file in /etc/apt/sources.list.d/hildon-application-manager.list

visto che usare vi con la tastiera del telefono e' un dramma si fa prima a cancellare il file e poi a digitare

per N810
echo "deb http://repository.maemo.org/extras/ diablo free non-free" > hildon-application-manager.list

Per N900
echo "deb http://repository.maemo.org/extras/ fremantle free non-free" > hildon-application-manager.list

apt-get update ed ecco che si puo' configurare il dispositivo...ovviamente e' software datato..tanto per dare un'idea viene installato Python 2.5

Ma si puo' sviluppare al giorno d'oggi applicazioni per Nokia N900??

La via Linux (quella difficile)

E' possibile scaricare una immagine Ubuntu 9.04 dell'SDK ma una volta aperta ci si accorge che non c'e' software preinstallato ma solo degli script (che ovviamente non funzionano piu')

per prima cosa si deve aggiornare la sources.list per aggiornare i pacchetti. Essendo una distribuzione dismessa i pacchetti sono messi in http://old-releases.ubuntu.com/ubuntu/dists/

-------------------------------------------------
#deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - releases i386 (20090420.1)]/
jaunty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final releases of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ jaunty universe
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty universe
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main releases, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://old-releases.ubuntu.com/ubuntu/ jaunty-backports main
restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty-backports main
restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://old-releases.ubuntu.com/ubuntu jaunty-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu jaunty-security main restricted
deb http://old-releases.ubuntu.com/ubuntu jaunty-security universe
deb-src http://old-releases.ubuntu.com/ubuntu jaunty-security universe
deb http://old-releases.ubuntu.com/ubuntu jaunty-security multiverse
deb-src http://old-releases.ubuntu.com/ubuntu jaunty-security multiverse

deb http://scratchbox.org/debian/ stable main

deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free

deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free
-------------------------------------------------

poi si installano i seguenti pacchetti

sudo apt-get install scratchbox-core scratchbox-devkit-apt-https scratchbox-devkit-autotools-legacy scratchbox-devkit-debian-squeeze scratchbox-devkit-doctools scratchbox-devkit-git scratchbox-devkit-perl scratchbox-devkit-python-legacy scratchbox-devkit-qemu scratchbox-devkit-svn scratchbox-libs scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486 scratchbox-toolchain-host-gcc


si scarica il file, lo si rende eseguibile e lo si esegue


c'e' un piccolo problema quando si deve accettare l'EULA di Nokia perche' non e' disponibile. Basta saltare..

a questo punto se tutto e' andato bene si puo' aprire la shell di scratchbox e si digitando i comandi


sb-conf select FREMANTLE_ARMEL

si edita il file /etc/apt/sources.list (non e' quello generale gia' modificato) aggiungendo la riga


deb http://repository.maemo.org/ fremantle/4bc37c7c77ebe90177c050b805a8dc79 nokia-binaries




si salva e si digita

apt-get update
fakeroot apt-get install nokia-binaries nokia-apps

si deve ripetere la procedura con 
sb-conf select FREMANTLE_X84
andando di nuovo a modificare il fi
le sources.list ed installando i pacchetti

quasi finito. Si esce da scratchhox (exit) e si apre una shell e digita

Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac &

mentre su un'altra shell si riapre scratchbox e si digita
export DISPLAY=:2
>af-sb-init.sh start

Si ha alla fine la finestra dell'emulatore funzionate


La via Windows (la via facile)
Si puo' utilizzare il pacchetto Nokia_Qt_SDK_Win_offline_v1_0_en per ottenere l'ambiente di sviluppo Qt e l'emulatore per Nokia N900 (piu' Symbian) senza sforzo

Lo sviluppo e' molto simile a quello di una normale applicazione Qt salvo per il target che deve essere selezionato come Mobile Qt Application




L'emulatore e' incluso nel pacchetto e si attiva automaticamente





il progetto compilato si mostra come un classico pacchetto Debian da installare sul dispositivo


Per i dettagli su come trasportare il pacchetto deb sul dispositivo reale si rimanda a questo link

Nessun commento:

Posta un commento

Sigaretta Elettronica

Avevo visto qualche tempo fa un documentario sulla RAI Svizzera sul carico inquinante delle sigarette elettroniche monouso Ne ho trovata una...