maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Ubuntu (https://talk.maemo.org/forumdisplay.php?f=55)
-   -   Ubuntu 12.04 on N900 with U-Boot (https://talk.maemo.org/showthread.php?t=82819)

int_ua 2012-03-05 18:56

Ubuntu 12.04 on N900 with U-Boot
 
1 Attachment(s)
Notice:
Currently I switched to Arch as main alternative OS for N900 and encourage everyone to do this.

Old message

So, we've got 12.04 booting.
Thanks to PanzerSajt, Estel, Pali, freemangordon, Skry, Aravinda, NIN101, MohammadAG, skykooler, apachelogger, mpoirier, 白い熊 and others :)

12.10 thread: http://talk.maemo.org/showthread.php?t=87002

Hardware support
Check what's working and what's not in the wiki (needs updating by users): https://wiki.ubuntu.com/ARM/n900#Hardware_support

Brief instruction
  • Get
    • Linux PC (instructions are for Ubuntu, but other distros might work as well)
    • N900 with U-Boot
    • 4Gb+ microSD card
    (optional) Make backups of all your data.
  • Insert microSD card (it will be completely erased) into your N900 (or cardreader).
    (optional) Launch X-Terminal on your N900 and execute " cd ~/MyDocs ".
  • Connect N900 (or cardreader) to PC in Storage Mode.
    (optional) copy /lib/firmware/ folder from your N900 to your PC.
  • Execute this code on the PC:
    Code:

    sudo apt-get install bzr
    bzr branch lp:ubuntu-n900
    cd ubuntu-n900
    sudo bash install.sh

    To update to the latest revision use
    Code:

    cd ubuntu-n900
    bzr pull

You can return to any revision using
Code:

bzr uncommit --revision 50
Kernel
Foreword by freemangordon:
Quote:

The kernel you use MUST have kernel-power or kernel-cssu thumb patches forward-ported, otherwise system instability is imminent.
The patch in question: https://gitorious.org/community-ssu/...ad2e7588408129
One can check if kernel has the needed patches by checking if there is "errata_430973" node in /sys/kernel :
Code:

ls /sys/kernel/errata_430973
And one can check if binaries are thumb-compiled by using
Code:

readelf -a $random_sys_binary
This is the result for sqlite3 in cssu-thumb http://pastebin.com/E1Ke2cyD
Quote:

Tag_THUMB_ISA_use: Thumb-2

A custom kernel compiled by unknown.obvious (meego n900 adaptation + dto=14 patch + ARM errata 430973) is the only one working good with Ubuntu yet:
Debs: http://talk.maemo.org/showpost.php?p...&postcount=253
Source: http://code.google.com/p/n900/source...ce-2.6.37-n900
To install it easily update to revision >= 106 and unpack the downloaded archive in the ubuntu-n900 directory. The script will look for
Code:

custom_kernel/linux-image-*.deb
custom_kernel/linux-headers-*.deb

if you select a custom kernel option. Warning: stock kernels don't even boot.

How to boot
uboot-pr13 will try to boot from your microSD card automatically (use run noloboot to start Maemo).
There is an ubuntu.item for the Bootmenu (rev 84+) generated in the root filesystem, but it's not yet confirmed to work, we are waiting for someone to test/fix it.

Code
You can check the code here:
https://code.launchpad.net/ubuntu-n900

Your help
Feel free to fix anything and edit wiki (it needs you even if you didn't fix anything ;) ):
https://wiki.ubuntu.com/ARM/n900
Please post even if you succeed. Template is generated by the script in the end. Most of the selected options are stored in options subdirectory. You can check script revision with
Code:

bzr revno
If you want to make a patch, please make it against the unstable branch and run it first only in the empty virtual machine.
Code:

bzr branch lp:~xintx-ua/ubuntu-n900/unstable
https://code.launchpad.net/~xintx-ua...-n900/unstable


webchat.freenode.net/?channels=#maemo-alternatives

Briefly about troubleshooting
Unmount order: /mnt/dev/pts /mnt/dev /mnt/* /mnt
Try stopping all daemons that may have started in chroot before. Use # lsof | grep /mnt on the host machine to find out these daemons.

How to debug (thanks to caveman for the instruction):
1. in your terminal, run 'script' (see its man page for details)
2. run the install script with full debug: 'sudo bash -x install.sh'
3. when the script ends, type 'exit'
4. post the contents of the typescript file so we can take a look at the output


Video: http://www.youtube.com/watch?v=tRUlJ2GXI04

int_ua 2012-03-05 19:21

Re: Ubuntu 12.04 on N900 with U-Boot
 
TODO (with revision number = done, but untested):
  • (rev 132) --reuse-options option
  • (rev 84) Bootmenu item generation
  • other SSD optimizations?
  • add README file (another good PanzerSajt's suggestion)
  • <_PanzerSajt> 3: make a main script with a basic menu (with dialog) from the user can select what he wants to do
  • <szopeen> some cleanup (process killing) on errors would be a nice addition
  • add an option to purge unneeded packages?
  • find out what is writing new partition table on the first boot (jasper?) and rewrites /etc/default/keyboard
  • concurrent partitioning and downloading
  • review custom fstab (get rid of it?)
  • recheck all workarouds and get rid of unneeded ones

Workarounds not included in the script:
* PanzerSajt's accesories branch: https://launchpad.net/ubuntu-n900-accessories
* caveman's post with fixes: http://talk.maemo.org/showpost.php?p...&postcount=296
* fix wlan numbering: http://talk.maemo.org/showpost.php?p...&postcount=202
* all images are blank:
Code:

sudo apt-get install --reinstall libgdk-pixbuf2.0-0
* onboard shows black:https://answers.launchpad.net/onboard/+question/195106
Code:

sudo apt-get install python-gi-cairo
* enable swap on the internel mmc:
Code:

echo "/dev/mmcblk1p3 swap swap defaults 0 0" >> /etc/fstab
* right click: http://www.staff.amu.edu.pl/~kalmar/blog/?p=247 or http://forums.webosnation.com/3173082-post471.html
* install an armel package:
Code:

dpkg --foreign-architecture armel -i package.deb
* remove armel package:
Code:

dpkg -P package:armel
* QEMU segfault? Upgrade.

DONE:
  • (rev 44) get rid of /SWAP.swap
  • (rev 45) move /tmp to tmpfs
  • (rev 46) add other kernel boot parameters for selection
  • (rev 47) add "setenv atagaddr ${init_atagaddr}" to boot.scr
  • (rev 49) Fixed swap partition number
  • (rev 50) try moving all options to the start of install.sh (it will also store all selected options on the PC for reports)
  • (rev 53) rc.local fix and keyboard workaround
  • (rev 57) Moved root to the third partition to fill microSD completely
  • (rev 55+) Nemo kernel support
  • (rev 72+) Kernel switching script
  • (rev 80) The first revision to install the released 12.04 properly.
  • (rev 100) Writing the root filesystem to a file or partition.
  • (rev 102) Showing report template in the end.
  • (rev 125) Old-stable.
  • (rev 132) The latest stable. But contains two major bugs at least. Better help with the unstable.


Feel free to propose anything or make a patch/help with it.

immi.shk 2012-03-05 19:37

Re: Ubuntu 12.04 on N900 with U-Boot
 
Screenshots please... And a bit of details... ?

int_ua 2012-03-05 19:48

Re: Ubuntu 12.04 on N900 with U-Boot
 
Quote:

Originally Posted by immi.shk (Post 1174806)
Screenshots please... And a bit of details... ?

I've just edited first post and added link to hardware support section of wiki.
Do you know any CLI screenshot tool?

freemangordon 2012-03-05 20:15

Re: Ubuntu 12.04 on N900 with U-Boot
 
which uboot, pr13 or Pali's?

int_ua 2012-03-05 20:50

Re: Ubuntu 12.04 on N900 with U-Boot
 
Quote:

Originally Posted by immi.shk (Post 1174806)
Screenshots please... And a bit of details... ?

Attaching to the first post.
Quote:

Originally Posted by freemangordon (Post 1174830)
which uboot, pr13 or Pali's?

They both should work. I have pr13 and AFAIK PanzerSajt has Palis'. And we have basically same behaviour.

P.S. I will not have lot of spare time tomorrow (2012-03-06), sorry everyone. I hope you undestand that 12.04 is development branch with non-standard kernel in the middle of transition to a new architecture and 256 Mb of RAM isn't very much.

P.P.S. Don't select fso- package, it may break dpkg. YMMV.

pali 2012-03-05 20:57

Re: Ubuntu 12.04 on N900 with U-Boot
 
Quote:

Originally Posted by int_ua (Post 1174852)
They both should work. I have pr13 and AFAIK PanzerSajt has Palis'. And we have basically same behaviour.

So there is no problem with my (last) U-Boot with SD card and eMMC? If yes, then it sounds good :)

qwazix 2012-03-05 22:17

Re: Ubuntu 12.04 on N900 with U-Boot
 
It says it can't find qemu-user-static. In which repo is it?

EDIT: my bad. Didn't get that I have to run the commands on the pc. Please make it a bit more clear, that point.

int_ua 2012-03-05 22:36

Re: Ubuntu 12.04 on N900 with U-Boot
 
Quote:

Originally Posted by pali (Post 1174855)
So there is no problem with my (last) U-Boot with SD card and eMMC? If yes, then it sounds good :)

Actually there is a problem: we can't boot any other kernel from Ubuntu. It just stays blank after "Starting kernel ...". But i didn't try your version yet (I critically need my phone working until May).

freemangordon 2012-03-05 22:43

Re: Ubuntu 12.04 on N900 with U-Boot
 
Code:

qemu: uncaught target signal 11 (Segmentation fault) - core dumped
install.sh: line 168:  3546 Segmentation fault      chroot $MOUNTPOINT_TARGET /tmp/install-chroot-part.sh
cp: cannot stat `/mnt/boot.scr': No such file or directory

?


All times are GMT. The time now is 06:35.

vBulletin® Version 3.8.8