| Prev |   5     6   7   8     9   | Next | Last
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Arch Linux ARM on N900 (https://talk.maemo.org/showthread.php?t=81892)

Skry 2013-03-19 18:59

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1330132)
What I had in mind was something akin to using the emmc to host the rootfs, including the kernel, and keeping u-boot where it is now, in a setup very similar to the one you have provided, but using the internal mmc instead.

Yeah, that should be as simple as pointing uboot and kernel to emmc device.

Quote:

Originally Posted by caveman (Post 1330132)
That would only require the porting of pali's u-boot to arch, so we could add/upgrade kernels by updating the bootmenu. u-boot alone would sit inside the nand.

I suppose I could/should do this.

Quote:

Originally Posted by caveman (Post 1330132)
trivial fix and it did the trick :-D thanks!

You're welcome, these things are easy to forget ;)

Skry 2013-03-19 19:44

Re: Arch Linux ARM on N900
 
I updated fbdev-sgx, now "works" with Xorg 1.14, though it's quite unstable for some reason. Revert back to 1.13 and previous fbdev-sgx if it does not work good enough for you, or hold yer packages.

EDIT: might have been my dwm build, recompiled it after X upgrade and I've seen no crashes since. Who knows, so feedback is welcome, again.

Skry 2013-03-19 21:49

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1330060)
I am experimenting with the X environment for touch-friendlier browsing mostly.

Almost forgot, I don't know what it is that you use as a browser, I use mainly links in terminal and Chromium when I happen to need more graphical experience. Obviously, we're fine scrolling with keyboard with text browsers, so.. There's this extension for Chromium called chromeTouch. It has its flaws and many seem to have trouble with it, but I've been quite pleased. It certainly makes browsing more enjoyable, especially now that we have F11 key readily available to easily toggle fullscreen.

If someone else has usability tricks like this one, go ahead and let us know :)

caveman 2013-03-19 22:15

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1330178)
If someone else has usability tricks like this one, go ahead and let us know :)

From this post:
Quote:

4. chromium: install quick scrolling plugin (http://elektranox.org/n900/installat...iguration.html)

5. firefox: install grab and drag plugin (http://elektranox.org/n900/installat...iguration.html)
And for midori:
Code:

export MIDORI_TOUCHSCREEN=1
And as a sidenote, I reconfigured e17 shortcuts to toggle fullscreen, minimize and switch windows only.

Estel 2013-03-20 09:03

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1330105)
Next kernel build will probably not fit on the nand. It was fun to strip the kernel to a quite minimal state, but in the end I don't see any sense actually flashing the kernel, especially since I doubt it fits in there if you combine it with u-boot. Besides, you would need to remember to flash new kernel after every single kernel update you get, and if you would forget that, chances are you wont be booting anymore.

If you do not need Maemo, the best use for nand would be some sort of minimal recovery system, maybe swap. Otherwise it's quite useless.

While observing as kernel gets fatter, remember, that it always sits in RAM, so every megabyte used for it, is less on our RAM-challenged device. Maybe it's not very much of a save, but always something.

For same reason (kernel sitting in RAM no matter what), it's absolutely pointless to flash kernel or attach it to u-boot - sole u-boot flashed is enough, results are the same, you boot kernels from eMMC or SD, but they got sucked into RAM (just like attached kernel). Also, this way, you need to flash only, when new u-boot comes out, not with every kernel.

You're probably well aware of all this, but I think it may be useful info for other readers, too :)

/Estel

caveman 2013-03-20 11:24

Re: Arch Linux ARM on N900
 
1 Attachment(s)
Quote:

Originally Posted by Skry (Post 1330153)
I updated fbdev-sgx, now "works" with Xorg 1.14, though it's quite unstable for some reason. Revert back to 1.13 and previous fbdev-sgx if it does not work good enough for you, or hold yer packages.

EDIT: might have been my dwm build, recompiled it after X upgrade and I've seen no crashes since. Who knows, so feedback is welcome, again.

I upgraded last night. Not sure if related or not, but just had X crashing and then locking in sequence. X logs of the crash attached.

Skry 2013-03-20 16:30

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Estel (Post 1330242)
While observing as kernel gets fatter, remember, that it always sits in RAM, so every megabyte used for it, is less on our RAM-challenged device.

RAM usage is pretty much the same be the essential bits built into kernel or as modules which are (usually) loaded anyway. With systemd, booting seems to be a tad faster with modular kernel. I'm not fattening the kernel, it'll always be around 2MB. If there is something that needs to be built in, let's say, for the sake of functionality and simplicity, I'm not afraid to "waste" 25 kilobytes doing so.

If we are talking about fattening something on a resource limited device, instead of worrying on kernel size, I would suggest everyone to do a reality check regarding their userspace, or perhaps even the habits and methods of doing their regular tasks. For me, the full memory usage is 28MB, with a clean desktop. I consider it to be somewhat bloated. :)

Quote:

Originally Posted by Estel (Post 1330242)
it's absolutely pointless to flash kernel

U-Boot only is the way I see "optimal" too. Anyway, it's all about the choice, if someone wants to do that, then he should have the option to do so. This option, as an idea, made me trim the kernel to a very small size, which alone is a good thing. Now, it may be that it will grow over the limit, but at least it gives a starting point, for anyone who would want to flash it, which requires very little change to make it fit. In addition, the chances are,that if you are the sort of user who wants to flash it for whatever the cause is, you would probably need/want to build your own kernel anyways.

Quote:

Originally Posted by caveman
I upgraded last night. Not sure if related or not, but just had X crashing and then locking in sequence. X logs of the crash attached.

If it's constant, try with a plain fbdev driver, to see if it changes anything. I don't get that much crashes, but catting big logs in fullscreen urxvt almost always causes X to hang, which is started after upgrade. So, there probably is something not quite right, no idea what though. I'm pretty much ready to drop this SGX ****, since I don't personally need it for anything and it's been the main cause of problems for so long, remain as such in the future too.

caveman 2013-03-21 12:07

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1330060)
* flashing the kernel to the device and installing on the internal mmc

I have just tried some of that. Here are the steps:
* backup MyDocs
* umount MyDocs partition (p1)
* resize partition to smaller size (p1)
* create new extended linux partition (p5)
* format resized MyDocs partition to vfat (p1)
* restore backup to MyDocs partition
* format new linux partition (p5)
* move arch rootfs to new linux partition
* fix u-boot configuration

I tried that inside arch, and that was my mistake, since I could not update u-boot configuration (that was dumb, I know). On reboot u-boot loaded but without my custom entries, since I messed with MyDocs, and I could not load maemo either. I had to reflash the kernel and reinstall u-boot. So do not try that from inside arch; do it inside maemo and update the bootmenu before rebooting :-)

Now I have arch loading from the eMMC.

Estel 2013-03-21 21:54

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1330484)
On reboot u-boot loaded but without my custom entries, since I messed with MyDocs, and I could not load maemo either. I had to reflash the kernel and reinstall u-boot.

[OT]Or just insert SD with proper configuration, enter u-boot console, and make it read it from there ;) Anyway, flashing kernel-only seems simillar re time required, so my remark doesn't matter much[OT]

/Estel

Skry 2013-03-22 00:21

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1330484)
since I could not update u-boot configuration

I grabbed Palis U-Boot scripts, made a few small changes to -update-bootmenu. Tested by adding kernel-power to menu from Arch, works. I'll upload package tomorrow.

Skry 2013-03-23 00:57

Re: Arch Linux ARM on N900
 
Ok, uboot-n900-tools in the repo. Changed behavior presented in here for the interested. For the uninterested:

Add to fstab, adjust if necessary:
Code:

ubi0:rootfs /mnt/maemo ubifs defaults,noatime,bulk_read,no_chk_data_crc 0 0
/dev/mmcblk1p2 /mnt/maemo/home ext3 defaults,noatime 0 0
/dev/mmcblk1p1 /mnt/maemo/home/user/MyDocs vfat defaults,noatime,uid=1000,gid=100,umask=022 0 0

As root, emmc and nand partitions unmounted:
Code:

echo "options ubi mtd=rootfs" > /etc/modprobe.d/ubi.conf
echo "softdep ubi pre: omap2" >> /etc/modprobe.d/ubi.conf
mkdir /mnt/maemo
mount -a
ln -s /mnt/maemo/etc/bootmenu.d /etc/bootmenu.d
ln -s /mnt/maemo/etc/default/bootmenu.item /etc/default/bootmenu.item

I tried to reproduce all the stupid user errors I've heard happening with u-boot, so far it's been working fine and safe, for me. I'm dead tired, so don't copypaste, I didn't :P

EDIT:
Oh well, setting up everything in fstab drops to emergency mode, module dependencies have to be defined manually, I'll get back to this asap.

EDIT2:
Corrected and updated, update your fstab and do trough the steps again. Let me know if some issues arise.

AhmadMhd 2013-03-24 15:46

Re: Arch Linux ARM on N900
 
Hello everyone

@Skry
Thanks for the hard work

It's really amazing to have arch linux on N900

@Skry
have a question please :)
I did the following
1- formated mmcblk0p5 (logical) to ext4
2- untar then sync your unofficial image to the above partition.
3- installed U-boot (the version that supports booting kernel 3.x)
4- added boot menu item in /etc/bootmenu.d/30-Arch.item

Code:

ITEM_NAME="Arch Linux ARM"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk0p5 rootwait init=/bin /systemd omapfb.vram=0:3M,1:3M,2:3M quiet"

5- then u-boot-update* :)

But when I try to boot to Arch I get "Kernel Panic"
What am I doing wrong ?

actually I don't know how to deal with U-boot
I didn't understand the part about U-boot
and where do I have to put the "uImage" and how to boot correctly
Please guide me, what should I do to successfully boot Arch

Thanks :)

EDIT: forgot to say that I've manged to chroot to /dev/mmcblk0p5 successfully

Skry 2013-03-24 17:40

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1331385)
Thanks for the hard work

It's really amazing to have arch linux on N900

You're welcome, it is amazing indeed. :)

Quote:

Originally Posted by AhmadMhd (Post 1331385)
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_CMDLINE="root=/dev/mmcblk0p5 rootwait init=/bin /systemd omapfb.vram=0:3M,1:3M,2:3M quiet"[/CODE]

Change
Code:

${EXT_CARD}p1 -> ${EXT_CARD}p5
and
Code:

init=/bin /systemd -> init=/bin/systemd
and it should boot.

You don't need to copy uImage anywhere if you configure uboot to look under /boot for it, like you've already done. Good luck.

AhmadMhd 2013-03-25 04:45

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1331408)

Change
Code:

${EXT_CARD}p1 -> ${EXT_CARD}p5
and
Code:

init=/bin /systemd -> init=/bin/systemd
and it should boot.

You don't need to copy uImage anywhere if you configure uboot to look under /boot for it, like you've already done. Good luck.

I changed to ${EXT_CARD}p5 :)
but init=/bin/systemd was right, (writing mistake :) )


I did the fixes you told me to do, But when you boot to Arch
U-boot says
Code:

mmc0 is current device
** Bad partition 5 **

after this when I run
Code:

run emmcboot
I have a Kernel Panic
Code:

Kernel Panic - not syncing: VFS: Unable to mount rootfs on unknown-block(179,5)
(this is one of the lines)

btw : I tried multiple versions of u-boot with no luck
current version is "2012.04-2"
Also tried version "2012.10-rc3-1"

NOTE: when Kernel Panic happens, N900 can't be powered off using power button, you have to remove the battery which is bad :(
and also chroot worked fine, I tried doing pacman -Suy and it worked

I think I'm missing some part of U-boot boot, but I don't know what is it :(

Thanks in advance. :)

AhmadMhd 2013-03-25 04:48

Re: Arch Linux ARM on N900
 
@Skry

I changed to ${EXT_CARD}p5 :)
but init=/bin/systemd was right, (writing mistake :) )


I did the fixes you told me to do, But when you boot to Arch
U-boot says
Code:

mmc0 is current device
** Bad partition 5 **

after this when I run
Code:

run emmcboot
I have a Kernel Panic
Code:

Kernel Panic - not syncing: VFS: Unable to mount rootfs on unknown-block(179,5)
(this is one of the lines)

btw : I tried multiple versions of u-boot with no luck
current version is "2012.04-2"
Also tried version "2012.10-rc3-1"

NOTE: when Kernel Panic happens, N900 can't be powered off using power button, you have to remove the battery which is bad :(
and also chroot worked fine, I tried doing pacman -Suy and it worked

I think I'm missing some part of U-boot boot, but I don't know what is it :(

output of fdisk -l
Code:

Disk /dev/mmcblk1: 998 MB, 998244352 bytes
93 heads, 35 sectors/track, 598 cylinders
Units = cylinders of 3255 * 512 = 1666560 bytes

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk1p1  *          1        599      973824  b Win95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
    phys=(0, 32, 33) logical=(0, 58, 19)
Partition 1 has different physical/logical endings:
    phys=(121, 92, 35) logical=(598, 91, 21)

Disk /dev/mmcblk0: 32.0 GB, 32015122432 bytes
4 heads, 16 sectors/track, 977024 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk0p1              1      405884    12988280  b Win95 FAT32
/dev/mmcblk0p2          688258      950401    8388608  83 Linux
/dev/mmcblk0p3          950402      974977      786432  82 Linux swap
/dev/mmcblk0p4          405885      688257    9035936  5 Extended
/dev/mmcblk0p5  *      405885      593384    5999992  83 Linux
/dev/mmcblk0p6          593385      688257    3035928  83 Linux

Partition table entries are not in disk order

EDIT:Also removed boot flag from mmcblk0p5, also didn't work :(
Also replacing ${EXT_CARD}p5 with ${INT_CARD}p5 didn't help

Thanks in advance. :)

Skry 2013-03-25 16:21

Re: Arch Linux ARM on N900
 
@AhmadMhd

Uh, since I usually refer to how devices are named in reality, I understood you had everything on uSD-card, sorry. You see, Maemo swaps mmc device numbering around, so, change to ${INT_CARD}p5 and root=/dev/mmcblk1p5

jd4200 2013-03-25 18:08

Re: Arch Linux ARM on N900
 
I'm quite interested in trying this, especially seeing as you, Skry, and many others have put in a lot of effort, thanks a lot, since the last time I looked at this project a long time back.

I've got a few questions that hopefully some one can answer in order to clear my confusion up, sorry if I they've been answered elsewhere but I've not been able to find them:

What is the difference between the official rootfs, and the one provided by Skry? Is the unofficial just fine tuned towards the N900?

Once setup, am I free to 'pacman -Syu' once in a while, or are there any packages I must hold off from updating (the kernel especially)?

I've got a lot of free hosting space & bandwidth on my dedi., & free domains if you fancy centralising this and moving away from dropbox/other file hosters.

AhmadMhd 2013-03-25 18:36

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1331723)
@AhmadMhd

Uh, since I usually refer to how devices are named in reality, I understood you had everything on uSD-card, sorry. You see, Maemo swaps mmc device numbering around, so, change to ${INT_CARD}p5 and root=/dev/mmcblk1p5

Great
I get U-boot console this time
but when I run

Code:

run emmcboot
It works :D


Thank you very much @Skry
Now there is one more Arch user on N900 :-]

I'll try to contribute to this project :)
keep up the great work.

Skry 2013-03-25 21:34

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by jd4200 (Post 1331755)
I'm quite interested in trying this, especially seeing as you, Skry, and many others have put in a lot of effort, thanks a lot, since the last time I looked at this project a long time back.

Yeah, I've spent countless nights with this one, you're welcome. Hopefully you decide to give it a go.

Quote:

Originally Posted by jd4200 (Post 1331755)
What is the difference between the official rootfs, and the one provided by Skry? Is the unofficial just fine tuned towards the N900?

Mine has kernel for N900 and my integration packages included. I also included dialog to make use of the wifi-menu, so one can just simply extract it and boot. No need to play around in chroot unless one wants to.

Quote:

Originally Posted by jd4200 (Post 1331755)
Once setup, am I free to 'pacman -Syu' once in a while, or are there any packages I must hold off from updating (the kernel especially)?

You're perfectly free to -Syu all you like, no need to hold anything back. Also, everything is optional and split, so you can pick what you want, grab everything or simply do things your way.

Repositories are also split, currently to base which includes only the few essential packages, and to extra where majority of the integration, special tools and modified packages are. There is going to be two more, testing and neon. So, there is no forced dependencies to anything, and no right or wrong way to setup your system, the choice is all yours.

Quote:

Originally Posted by jd4200 (Post 1331755)
I've got a lot of free hosting space & bandwidth on my dedi., & free domains if you fancy centralising this and moving away from dropbox/other file hosters.

I certainly do fancy doing just that. I've put a lot of personal time into this but unfortunately money is something I can't invest. PM me or query me at IRC and we can discuss this further.


Quote:

Originally Posted by AhmadMhd (Post 1331760)
Thank you very much @Skry
Now there is one more Arch user on N900 :-]

I'll try to contribute to this project :)
keep up the greate work.

Great! Welcome :)

ArchiMark 2013-03-25 22:24

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1331760)
Greate
I had the same Error :)
but this time when I run

Code:

run emmcboot
It works :D


Thank you very much @Skry
Now there is one more Arch user on N900 :-]

I'll try to contribute to this project :)
keep up the greate work.

Can you please clarify, is Arch installed all on your microSD card or ?

From your partition info, it seems like it is on your card....but from some comments read, I'm not sure...

Hope to get Arch installed on my 900 soon.....

Thanks.

jd4200 2013-03-25 23:13

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1331813)
Yeah, I've spent countless nights with this one, you're welcome. Hopefully you decide to give it a go.
......

Great thanks for the info., I've been using Arch on my systems for years, can't wait to have it in my pocket.

PM sent.

caveman 2013-03-26 12:13

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1330980)
Ok, uboot-n900-tools in the repo

I just had a chance to try this. I configured the default mountpoints in
Code:

/etc/default/u-boot-update-bootmenu
as follows:
Code:

BOOTMENU_FAT_DIR="/media/sd-mmcblk1p1"
BOOTMENU_CFG_DIR="/etc/bootmenu.d"
BOOTMENU_BOOT_DIR="/boot"
BOOTMENU_MAEMOBOOT_DIR="/maemo/boot"
BOOTMENU_OPTBOOT_DIR="/media/sd-mmcblk1p2"
BOOTMENU_TMP="/tmp"

and updated the u-boot bootmenu. No errors :-) Well done, Skry!

Skry 2013-03-26 16:05

Re: Arch Linux ARM on N900
 
We now have hosting, thanks to jd4200!

AhmadMhd 2013-03-27 19:22

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by ArchiMark (Post 1331823)
Can you please clarify, is Arch installed all on your microSD card or ?

From your partition info, it seems like it is on your card....but from some comments read, I'm not sure...

Hope to get Arch installed on my 900 soon.....

Thanks.

Wlecome dude

so you need to install Arch on emmc

1- Partitioning

First things first , you have to know how to partition your emmc
The easiest way is to use BackupMenu

- Install BackupMenu from the repos :)

when done

- Open N900 keyboard, reboot then enter BackupMenu

- Chose Mass storage mode (press d)
Now you have direct access to partitions in the emmc :)

- Use gparted (easy) or cfdisk

you should keep the 1st partition as fat32 cuz it has u-boot config on it (bootimg.img.d and .src)
unless you change the config dir ( which I want to learn how ^_^ )
and be careful
<< consider making backup, use BackupMenu >>

- I recommend using Extended partition type ( since MBR only allow for 4 primary partitions in the same device )

extended partitions starts numbering from 5
mmcblk0p5 (first partition in Extended )
mmcblk0p6 (second partition)
and so on..

(Skip making swap partition now , you can do it later)

2- Format your partition
after partitioning you should format the partition to ext2/3/4

If formating from PC (recommended)
Code:

mkfs.ext4 /dev/sdb5
else from N900
Code:

mkfs.ext4 /dev/mmcblk0p5
3- Mount the partition

if you are mounting from your PC (recommended)
Code:

mount -t ext4 /dev/sd?? /mnt/arch
(if you don't know what "sd??" mean just ask :] )
/dev/sdb5 ( in my case :) )

OR from your N900

Code:

mount -t ext4 /dev/mmcblk0p5 /mnt/arch
4- Extract FileSystem (also sync)

Code:

cd /mnt/arch

tar xzvf Arch-Skry-Unofficial-Img.tar.gz; sync

This may take some time ( faster if you do it from PC )


5- Install and configure U-boot

Install u-boot version (that spports booting 3.x kernels)
add boot entry in /etc/bootmenu.d/Arch.item

example
Code:

ITEM_NAME="Arch Linux ARM"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${INT_CARD}p5"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait init=/bin /systemd omapfb.vram=0:3M,1:3M,2:3M quiet"

This should work if you untar the image FileSystem on /dev/mmcblk0p5
run
Code:

u-boot-update-bootmenu

reboot

- Chose Arch from the menu

- Then run in U-boot console

Code:

run emmcboot
Done.

------------------------------------------------------------------------
For testing.

I wrote a simple script to chroot to this arch from maemo.

arch-chroot.sh
------------------------------------------------------------------------
Code:

echo "==> Mounting FS"
mount /dev/mmcblk0p5 /mnt/arch

echo "==> Mounting proc, sys, dev/pts/, dev/ "
cd /mnt/arch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/

echo "==>Chroot to Arch"
chroot /mnt/arch /bin/bash
echo "Done!"

When done from Arch chroot, run
Code:

exit

close-arch.sh
------------------------------------------------------------------------
Code:

cd /mnt/arch
echo "==> Umounting proc, sys, dev/pts/, dev/ "
umount proc/
umount sys/
umount dev/pts/
umount dev/

echo "==>Closing Arch chroot"
cd && sleep 5
umount /mnt/arch ||  umount /dev/mmcblk0p5
echo "Done!"


Have Fun :D

AhmadMhd 2013-03-27 19:27

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1331986)
We now have hosting, thanks to jd4200!

Great :D

I think I can help

If the packages has a small size.
I can provide a mirror using my free webspace. (for direct links)
which you can access and modify using ssh :)

ArchiMark 2013-03-27 19:30

Re: Arch Linux ARM on N900
 
THANK YOU for your incredibly helpful post!

I think a lot more people will try installing Arch as a result of it.

Most grateful to you...

Will give it a go later today...

:)

AhmadMhd 2013-03-27 20:08

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by ArchiMark (Post 1332341)
THANK YOU for your incredibly helpful post!

I think a lot more people will try installing Arch as a result of it.

Most grateful to you...

Will give it a go later today...

:)

@ArchiMark
You are very welcome. :)

Many thanks to @Skry ;)

Skry 2013-03-27 22:25

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1332336)
Code:

u-boot-update-bootmenu

reboot

- Chose Arch from the menu

- Then run in U-boot console

Code:

run emmcboot

There is something wrong if you need to do it like this, simply choosing a menu item should start the kernel.

jd4200 2013-03-27 22:37

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by Skry (Post 1332374)
There is something wrong if you need to do it like this, simply choosing a menu item should start the kernel.

It was the same issue I was having. No matter how much debugging or re-flashes of the kernel, re-installtion of uboot, or using SD card/emmc could fix it.

I've eventually got it to work by doing a complete emmc/kernel flash, and reinstalled u-boot.
I can't see how, but older versions of u-boot-* must be lingering around on the device no matter how much it is removed.

AhmadMhd 2013-03-28 03:55

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by jd4200 (Post 1332376)
It was the same issue I was having. No matter how much debugging or re-flashes of the kernel, re-installtion of uboot, or using SD card/emmc could fix it.

I've eventually got it to work by doing a complete emmc/kernel flash, and reinstalled u-boot.
I can't see how, but older versions of u-boot-* must be lingering around on the device no matter how much it is removed.

@Skry
That may be true

cuz I've installed older version of u-boot before the new one.

but is there any way that I can save the u-boot configuration in a different partition than MyDocs (in /etc for example)

ArchiMark 2013-03-28 04:32

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1332336)
Wlecome dude

so you need to install Arch on emmc

1- Partitioning

First things first , you have to know how to partition your emmc
The easiest way is to use BackupMenu

- Install BackupMenu from the repos :)

when done

- Open N900 keyboard, reboot then enter BackupMenu

- Chose Mass storage mode (press d)
Now you have direct access to partitions in the emmc :)

- Use gparted (easy) or cfdisk

you should keep the 1st partition as fat32 cuz it has u-boot config on it (bootimg.img.d and .src)
unless you change the config dir ( which I want to learn how ^_^ )
and be careful
<< consider making backup, use BackupMenu >>

- I recommend using Extended partition type ( since MBR only allow for 4 primary partitions in the same device )

extended partitions starts numbering from 5
mmcblk0p5 (first partition in Extended )
mmcblk0p6 (second partition)
and so on..

I'm working on partitioning now....

My N900 looked like this in GParted when first connected:

- Nokia N900 - FAT - 29GB (3.84GB Used)

- DISK2S2 - FAT - 2.15GB

- Linux Swap - FAT - 805.3MB

Made some modifications in GParted and looks like this right now:

Partition File System Mount Point Label Size Used Flags

/dev/sda1 FAT Nokia N900 4.88GB 3.24GB lba

/dev/sda4 extended 22.12GB
/dev/sda5 ext3 22.08GB 527.58MB
unallocated unallocated 36MB

/dev/sda2 ext3 /media/sda2 2.00GB 350.30MB

/dev/sda3 linux-swap 768MB

unallocated unallocated 63.97MB


Any recommendations for changing the partitions shown above???


Quote:

(Skip making swap partition now , you can do it later)
As you can see already had one....should I change it?....


Quote:

2- Format your partition
after partitioning you should format the partition to ext2/3/4

If formating from PC (recommended)
Code:

mkfs.ext4 /dev/sdb5
else from N900
Code:

mkfs.ext4 /dev/mmcblk0p5

Is it OK to do this in GParted?.....

Quote:

3- Mount the partition

if you are mounting from your PC (recommended)
Code:

mount -t ext4 /dev/sd?? /mnt/arch
(if you don't know what "sd??" mean just ask :] )
/dev/sdb5 ( in my case :) )

OR from your N900

Code:

mount -t ext4 /dev/mmcblk0p5 /mnt/arch

So, what does 'sd' mean in this case??....

And I can do this from terminal on PC?

Quote:

4- Extract FileSystem (also sync)

Code:

cd /mnt/arch

tar xzvf Arch-Skry-Unofficial-Img.tar.gz; sync

This may take some time ( faster if you do it from PC )
So, you recommend downloading Arch file to PC and then 'tar' it over to N900?


Quote:

5- Install and configure U-boot

Install u-boot version (that spports booting 3.x kernels)
add boot entry in /etc/bootmenu.d/Arch.item

example
Code:

ITEM_NAME="Arch Linux ARM"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${INT_CARD}p5"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait init=/bin /systemd omapfb.vram=0:3M,1:3M,2:3M quiet"

This should work if you untar the image FileSystem on /dev/mmcblk0p5
run
Code:

u-boot-update-bootmenu

reboot


Hope it's OK that I already had installed U-Boot.... :)

Quote:

- Chose Arch from the menu

- Then run in U-boot console

Code:

run emmcboot
Done.

------------------------------------------------------------------------
For testing.

I wrote a simple script to chroot to this arch from maemo.

arch-chroot.sh
------------------------------------------------------------------------
Code:

echo "==> Mounting FS"
mount /dev/mmcblk0p5 /mnt/arch

echo "==> Mounting proc, sys, dev/pts/, dev/ "
cd /mnt/arch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/

echo "==>Chroot to Arch"
chroot /mnt/arch /bin/bash
echo "Done!"

When done from Arch chroot, run
Code:

exit

close-arch.sh
------------------------------------------------------------------------
Code:

cd /mnt/arch
echo "==> Umounting proc, sys, dev/pts/, dev/ "
umount proc/
umount sys/
umount dev/pts/
umount dev/

echo "==>Closing Arch chroot"
cd && sleep 5
umount /mnt/arch ||  umount /dev/mmcblk0p5
echo "Done!"


Have Fun :D
Thanks for your help!

AhmadMhd 2013-03-28 05:18

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by ArchiMark (Post 1332407)
I'm working on partitioning now....

Any recommendations for changing the partitions shown above???

I think this is good :)
In my opinion 22GB is big, unless you plan for something else.



Quote:

As you can see already had one....should I change it?
No, you don't have to
you can use current instead :)

OR as @Skry sayd
you can make swap in you SD ( for optimal performance )




Quote:

Is it OK to do this in GParted?.....
Why not ( I think it works )
But I like using mkfs.ext4




Quote:

So, what does 'sd' mean in this case??....
You can see in gparted the name of the device and partition
and I think n900 should be /dev/sdb
The partition where arch will be installed may be /dev/sdb5
This depends on your connected devices.
do you get it now ? :)

Quote:

Originally Posted by ArchiMark (Post 1332407)
Partition File System Mount Point Label Size Used Flags
/dev/sda1 FAT Nokia N900 4.88GB 3.24GB lba
/dev/sda4 extended 22.12GB
/dev/sda5 ext3 22.08GB 527.58MB
unallocated unallocated 36MB
/dev/sda2 ext3 /media/sda2 2.00GB 350.30MB
/dev/sda3 linux-swap 768MB
unallocated unallocated 63.97MB

I don't know why its /dev/sda here :(, it should be /dev/sdb
but be careful please ( you may damage your internal PC HDD )



Quote:

And I can do this from terminal on PC?
Sure ( thats what I recommend )



Quote:

So, you recommend downloading Arch file to PC and then 'tar' it over to N900?
Yeah, Faster and more efficient.



Quote:

Hope it's OK that I already had installed U-Boot.... :)
Good, but make sure you have the correct version at pali site



Quote:

Thanks for your help!
You are very welcome my friend. ;)

caveman 2013-03-28 12:06

Re: Arch Linux ARM on N900
 
This is my current setup as a reference. There are 2 independent installations, at both SD and eMMC.

eMMC partition table:
Code:

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk0p1              33      524320    16777216  c Win95 FAT32 (LBA)
/dev/mmcblk0p2          884866      950401    2097152  83 Linux
/dev/mmcblk0p3          950402      974977      786432  82 Linux swap
/dev/mmcblk0p4          524321      884865    11537440  5 Extended
/dev/mmcblk0p5          524353      884865    11536416  83 Linux

SD partition table:
Code:

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk1p1  *          1        2022    7761889  83 Linux

u-boot item files:
Code:

Nokia-N900:~# cat /etc/bootmenu.d/arch-*
Code:

ITEM_NAME="Arch Linux ARM @ EMMC"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${INT_CARD}p5"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait init=/bin/systemd omapfb.vram=0:3M,1:3M,2:3M verbose"

Code:

ITEM_NAME="Arch Linux ARM @ SD"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk0p1 rootwait init=/bin/systemd omapfb.vram=0:3M,1:3M,2:3M quiet"

Regarding swap, the best performance will be achieved by using the swap partition on a different disk than the system. Eg, if running from the SD, use swap on the eMMC, or the other way around.

Be careful when messing with things at this level, specially MyDocs partition, since u-boot keeps stuff there. I learned that the hard way ;)

ArchiMark 2013-03-28 13:07

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1332411)
I think this is good :)
In my opinion 22GB is big, unless you plan for something else.

Thanks....agree that 22GB is big....so, maybe I'll cut it in half and make another partition....





Quote:

No, you don't have to
you can use current instead :)

OR as @Skry sayd
you can make swap in you SD ( for optimal performance )
OK....






Quote:

Why not ( I think it works )
But I like using mkfs.ext4
I see.....



Quote:

You can see in gparted the name of the device and partition
and I think n900 should be /dev/sdb
The partition where arch will be installed may be /dev/sdb5
This depends on your connected devices.
do you get it now ? :)
Yes, think I get the idea....thanks....



Quote:

I don't know why its /dev/sda here :(, it should be /dev/sdb
but be careful please ( you may damage your internal PC HDD )
Hmmm....it could be this way due to fact that I'm actually using my little OpenPandora as my 'PC'.... :)

It just has a small NAND and then I have 2 SD cards in it. The SD cards are showing up in GParted as mmcblk0 and mmcblk1.

Only other drive listed in GParted is the Nokia....it does not list the internal NAND....

So, think I'm OK.......hopefully.... ;)







Quote:

Sure ( thats what I recommend )
Got it....


Quote:

Yeah, Faster and more efficient.
Got it....



Quote:

Good, but make sure you have the correct version at pali site
Thanks for the link....I did see that site....
However, I also read somewhere (Pali's U-Boot thread?...) that the version we want is in Extras-Testing now....so, got it and installed it from there....hope that's OK, if not, I'll need to reinstall....





Quote:

You are very welcome my friend. ;)
Greatly appreciate all your detailed help...makes a big difference....thanks!

ArchiMark 2013-03-28 13:38

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1332490)
This is my current setup as a reference. There are 2 independent installations, at both SD and eMMC.

Why 2 independent installations?.....

Quote:

eMMC partition table:
Code:

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk0p1              33      524320    16777216  c Win95 FAT32 (LBA)
/dev/mmcblk0p2          884866      950401    2097152  83 Linux
/dev/mmcblk0p3          950402      974977      786432  82 Linux swap
/dev/mmcblk0p4          524321      884865    11537440  5 Extended
/dev/mmcblk0p5          524353      884865    11536416  83 Linux

SD partition table:
Code:

        Device Boot      Start        End      Blocks  Id System
/dev/mmcblk1p1  *          1        2022    7761889  83 Linux

u-boot item files:
Code:

Nokia-N900:~# cat /etc/bootmenu.d/arch-*
Code:

ITEM_NAME="Arch Linux ARM @ EMMC"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${INT_CARD}p5"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait init=/bin/systemd omapfb.vram=0:3M,1:3M,2:3M verbose"

Code:

ITEM_NAME="Arch Linux ARM @ SD"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk0p1 rootwait init=/bin/systemd omapfb.vram=0:3M,1:3M,2:3M quiet"


Thanks for all this info.....

Quote:

Regarding swap, the best performance will be achieved by using the swap partition on a different disk than the system. Eg, if running from the SD, use swap on the eMMC, or the other way around.
Understand about swap location.....

But still a bit confused about what is SD vs eMMC.....

Quote:

Be careful when messing with things at this level, specially MyDocs partition, since u-boot keeps stuff there. I learned that the hard way ;)
Understand....and that is one reason why I'm asking questions here...trying to avoid making a big mess of n900....have been there before with n900 and other devices in the past.... ;)

Thanks!

caveman 2013-03-28 14:28

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by ArchiMark (Post 1332519)
Why 2 independent installations?.....

This is my testbed. I started with the SD, and then created a new install in the eMMC.

Quote:

But still a bit confused about what is SD vs eMMC.....
SD is the external memory card; eMMC is the internal 32Gb memory card.
This can be really confusing at times, since maemo uses reversed numbers from u-boot and ARCH.

ArchiMark 2013-03-28 14:54

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by caveman (Post 1332527)
This is my testbed. I started with the SD, and then created a new install in the eMMC.



SD is the external memory card; eMMC is the internal 32Gb memory card.
This can be really confusing at times, since maemo uses reversed numbers from u-boot and ARCH.

Thanks for your explanations....


Meanwhile, not sure if it's just that battery went dead or if I borked my n900, after GParted said it completed making new partition successfully, the n900 disappeared from GParted and then display went black on n900.....

Disconnected n900 from Pandora and now when I try to start up n900 nothing happens... ;-(

Assume it's reflash time, right?.....

Assuming I get n900 working again, I think it's probably best to try installing Arch on SD card first.....

Oh well....

UPDATE

Fully recharged battery and tried booting up n900 again...now it boots up normally!....

So, that's good news.....but think I'll still try to install to SD card first....


AhmadMhd 2013-03-28 23:23

Re: Arch Linux ARM on N900
 
1 Attachment(s)
@ٍSkry
how is it going :)

I tried the sgx driver but X couldn't start ( I've enabled the powervr.service with no luck ).

So I reverted back to unaccelerated driver
X starts BUT the touch coordinates on the screen are inverted ( tab on high area --> the cursor goes down )
Am I the only one having this issue :(

Thanks!

Skry 2013-03-29 09:19

Re: Arch Linux ARM on N900
 
Quote:

Originally Posted by AhmadMhd (Post 1332678)
@ٍSkry
how is it going :)

I tried the sgx driver but X couldn't start ( I've enabled the powervr.service with no luck ).

So I reverted back to unaccelerated driver
X starts BUT the touch coordinates on the screen are inverted ( tab on high area --> the cursor goes down )
Am I the only one having this issue :(

Thanks!

Not that good, life is rough.

Like I've said, I can't promise that SGX stuff would work. It should, but if it's not I probably can't help. I'll take a look at the log..

Touchscreen axes are inverted because you don't provide calibration data. There is package n900-configs that includes input device configuration file for Xorg, including calibration options amongst other things.

Skry 2013-03-29 10:17

Re: Arch Linux ARM on N900
 
@AhmadMhd

You are missing the omapfb.vram kernel boot argument, so you don't have any memory assigned for fb1 and fb2. So, add omapfb.vram=0:3M,1:3M,2:3M to boot arguments and try SGX again, should work, though it's unstable with Xorg 1.14 currently.


| Prev |   5     6   7   8     9   | Next | Last
All times are GMT. The time now is 00:38.

vBulletin® Version 3.8.8