Active Topics

 


Reply
Thread Tools
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#11
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 

The Following 4 Users Say Thank You to HtheB For This Useful Post:
Posts: 738 | Thanked: 819 times | Joined on Jan 2012 @ Berlin
#12
NICE work How To + DL links please
 

The Following User Says Thank You to cvp For This Useful Post:
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#13
No tutorial yet?

(cant wait to test some maemo5 apps )
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#14
Tutorial Time

First things first.


1. The N900 rootfs is not redistributable, so the only thing I can do is write how to obtain it (if you have a N900).
2. You need a linux box for this procedure, either virtual or real. It is possible that those steps that require linux could be done on a N900 with kernel-power but this is not certain
3. These are early stages, I've got many problems to solve, hopefully with some help from the community this project can be made usable day to day
4. Requires open mode, I don't know if inception can be used alternatively


How to get fremantle image.

Create a working directory N900root

Go here http://tablets-dev.nokia.com/nokia_N900.php, enter your IMEI and download
RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin (latest global N900 firmware)
michaelmhk says that if you haven't got a N900 you can download the firmware from NaviFirm
Go here http://tablets-dev.nokia.com/maemo-d...-downloads.php and download maemo_flasher-3.5_2.5.2.2.tar.gz, or maemo_flasher-3.5_2.5.2.2_i386.deb if you have 32bit ubuntu/debian.

Install the flasher or extract the binary from the tar.gz in your working directory

Unpack the .bin file you just downloaded
Code:
flasher-3.5 -u -F RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin
if you installed or otherwise
Code:
./flasher-3.5 -u -F RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin
You'll end up with a bunch of files in the working directory

Using a root prompt (sudo su) execute the following commands to mount the rootfs file to your system. Some commands are there just for checking if you've done well (cat and ls commands should produce similar output). You may need to create /mnt/n900 directory
Code:
# modprobe mtdblock

# modprobe ubi

# modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 10000000 00020000 "NAND simulator partition 0"

# ls -la /dev/mtd*
brw-r--r-- 1 root root 31, 0 2009-12-01 18:50 /dev/mtd0
brw-rw---- 1 root disk 31, 0 2009-12-01 19:06 /dev/mtdblock0

# dd if=rootfs.jffs2 of=/dev/mtdblock0 bs=2048
74688+0 records in
74688+0 records out
152961024 bytes (153 MB) copied, 5.87334 s, 26.0 MB/s

# ubiattach /dev/ubi_ctrl -m 0
UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)

# ls -la /dev/ubi*
crw-rw---- 1 root root 252,  0 2009-12-01 19:06 /dev/ubi0
crw-rw---- 1 root root 252,  1 2009-12-01 19:06 /dev/ubi0_0
crw-rw---- 1 root root  10, 58 2009-12-01 19:05 /dev/ubi_ctrl
# mount -t ubifs ubi0_0 /mnt/n900/

# ls -la /mnt/n900 | head
total 4
drwxr-xr-x 22 root root 1504 2009-10-30 14:36 .
drwxr-xr-x  9 root root 4096 2009-10-25 20:02 ..
drwxr-xr-x  2 root root 3920 2009-10-30 14:31 bin
drwxr-xr-x  2 root root  232 2009-10-30 14:48 boot
drwxr-xr-x  2 root root  160 2009-10-30 14:28 cdrom
drwxr-xr-x  3 root root 3808 2009-10-30 14:37 dev
drwxr-xr-x  2 root root  160 2009-10-30 14:28 .dev
drwxr-xr-x 72 root root 7488 2009-10-30 14:48 etc
drwxr-xr-x  2 root root  160 2009-10-30 14:28 floppy

#
These instructions are courtesy of x86 from this post http://talk.maemo.org/showthread.php?p=403015

Now you have a maemo rootfs mounted on /mnt/n900. Let's create an image of that node. This website has a very nice explanation of what's happening http://www.debuntu.org/how-to-create...rtition-s-file
We need to execute (change the working dir and the size to one of your liking, bigger than 800mb)
Code:
dd if=/dev/zero of=/path/to/N900root/rootfs.img bs=1M count=1024
mkfs.ext2 /path/to/N900root/rootfs.img
mkdir /tmp/maemoroot
mount -o loop /path/to/N900root/rootfs.img /tmp/maemoroot
Now we can copy all files from the one image to the other
Code:
cp /mnt/n900/* /tmp/maemoroot/
After this command finishes unmount the ext2 image
Code:
umount /tmp/maemoroot
and copy rootfs.img to your N9/50 mass storage (MyDocs)
Now we have to use qole's scripts to get the chroot up and running (http://talk.maemo.org/showthread.php?t=82114)

Download the scripts http://qole.org/files/harmattan/HarmChom.tgz as well as coderus' sudo http://talk.maemo.org/attachment.php...9&d=1332087322 and install sudo.

Code:
AEGIS_FIXED_ORIGIN=com.nokia.maemo dpkg -i sudo_1.6.8p12-4osso28\+0m6_armel.deb
You have to change user password by doing
Code:
passwd user
while root or edit your /etc/sudoers file to look like this

Code:
### Automatically added by update-sudoers start ###
Defaults env_check+="HOME DISPLAY"
Defaults env_keep+="HOME DISPLAY"
Defaults env_reset
user ALL = (ALL) NOPASSWD: ALL
developer ALL = (ALL) ALL
### Automatically added by update-sudoers end ###
Then open the tgz and copy the files in /src/bin except sudo to your device's /bin folder via ssh. Do not copy /etc/ folder, it will mess with your ssh configuration and it is not needed since you just installed sudo. Also do create a /.debian folder in the root of your device.

You should be ready to go, launch a user terminal and
Code:
sudo qchroot MyDocs/rootfs.img /.debian
Now you should be greeted by a maemo 5 busybox
Code:
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
You can install WordPress and run it
Code:
apt-get update
apt-get install wordpress
run-standalone.sh WordPress

Experiments

You can also install gnumeric and run it, but it misses the menu bar, and it doesn't run with a maemo5 theme. It segfaults if you try to run-standalone it.
If you do
Code:
/etc/rc1.d/K20hildon-desktop start #and maybe something else, I tried various rc files
run-standalone.sh gnumeric
it runs with maemo theme but still without a menu. We also need to get rid of harmattan's bottom toolbar.

I suppose we need a fully running hildon-desktop to see the menu, but we are missing xephyr. One solution is to use xephyr from another chroot running debian.

Another thought that if is true it would allow this project to take off is this:

What do we need to run hildon applications in harmattan? Of course drivers, firmware and other blobs are not needed, neither the stock fremantle applications. Hildon-desktop is open and most of the other libs. So theoretically we could create a stripped fremantle image that could be redistributable. Please anybody who can help with this task speak up.

Thanks to all testers for the corrections
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2012-06-21 at 13:54.
 

The Following 23 Users Say Thank You to qwazix For This Useful Post:
Posts: 1,335 | Thanked: 3,931 times | Joined on Jul 2010 @ Brittany, France
#15







[Edit]
4. Requires open mode, I don't know if inception can be used alternatively


Any way to backup all settings (and apps) from an incepted N9, then reflash it into open mode, and restore everything?

Last edited by Kabouik; 2012-06-20 at 18:56.
 

The Following 5 Users Say Thank You to Kabouik For This Useful Post:
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#16
Originally Posted by Kabouik View Post
Any way to backup all settings (and apps) from an incepted N9, then reflash it into open mode, and restore everything?
as far as i know, using inception method should be fine.
I'll test it now and show the results.

(ubiattach didn't work on my ubuntu 8.0 installing newest ubuntu now)
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 

The Following User Says Thank You to HtheB For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#17
Thanks! I played a little bit more with this trying to get hildon-desktop to run in Xephyr without success. I managed though to get applications to run in Xephyr, and I also managed to start most of the Maemo services, so maybe more applications can work now (although mypaint which previously segfaulted now does not find it's python dependencies, which is not a good sign)

I managed to start services using a script from scratchbox modified a little for use on-device, but it stops halfway, with some dbus errors about com.nokia.clockd

I am attaching the script for reference

EDIT: I forgot to document how I ran Xephyr.

I followed qole's instructions to run harmchom (debian chroot) and after chrooting to debian I ran
Code:
Xephyr :2 -br -screen 800x480x16 -fullscreen -dpi 96
This launches an empty Xephyr window. Then on fremantle chroot
Code:
export DISPLAY=:2
Attached Files
File Type: txt af-sb-init.txt (8.3 KB, 282 views)
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2012-06-20 at 20:52.
 

The Following User Says Thank You to qwazix For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#18
Originally Posted by qwazix View Post
I followed qole's instructions to run harmchom (debian chroot) and after chrooting to debian I ran
Code:
Xephyr :2 -br -screen 800x480x16 -fullscreen -dpi 96
This launches an empty Xephyr window. Then on fremantle chroot
Code:
export DISPLAY=:2
Have you tried other parameters' configurations noted in http://wiki.maemo.org/Documentation/...own_the_SDK_UI ?

About your com.nokia.clockd errors, quick search came up with: https://garage.maemo.org/pipermail/e...st/000864.html - although there are com.nokia.clockd related errors, hildon-desktop starts there (as far as i understand). By the way, see how they run it:
Code:
cd "/" && /bin/sh -c "DISPLAY=\"10.10.206.15:2\" af-sb-init.sh start"
- what happens if you run Xephyr on your desktop linux and try to connect from Fremantle chroot to it? I would check it myself, but I don't have neither N950, nor even N9
 

The Following 2 Users Say Thank You to misiak For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#19
Doesn't seem to work with other parameters either. When I tried on the desktop, it does the same thing as on the device, but as I could watch the Xephyr window while the system was starting, I realized that hildon-desktop flashed on-screen before dying. The message just before it dies reads as:

Code:
ERROR:PipDate.c:569:pip_date_to_string_format: assertion failed: (pip_date_is_valid((date))
Attempt to remove filter function 0xcca8 user data (nil), but no such filter has been added
Going to check what that error could mean
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 2 Users Say Thank You to qwazix For This Useful Post:
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#20
It asks me for a password when I try to run
sudo qchroot MyDocs/rootfs.img /.debian

rootme isn't working. what is the default password?

edit:
using opensh should also work

Edit 2:
Couldn't get it to run, output:
Code:
Mounting...
using image file: MyDocs/rootfs.img
fs type is img
Don't know img: Using ext2 file system
Using ext2 file system
/bin/qmount: line 203: modprobe: not found
mounting MyDocs/rootfs.img on loop
Mount failure! MyDocs/rootfs.img failed to mount on loop0 mount: mounting /dev/loop1on /.debian failed: No such file or directory
Cancelling chroot...
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.

Last edited by HtheB; 2012-06-20 at 22:11.
 

The Following 2 Users Say Thank You to HtheB For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:57.