Active Topics

 


Reply
Thread Tools
ArchiMark's Avatar
Posts: 414 | Thanked: 109 times | Joined on Mar 2007 @ Silicon Valley
#271
Originally Posted by AhmadMhd View Post
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???


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


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?.....

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?

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?


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....

- 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
Thanks for your help!
__________________
Mark
Silicon Valley Digerati

Nokia N900
Previous: Nokia N810 & N800
 
Posts: 13 | Thanked: 6 times | Joined on Oct 2012 @ Damascus, Syria
#272
Originally Posted by ArchiMark View Post
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.



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 )




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




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 ?

Originally Posted by ArchiMark View Post
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 )



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



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



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



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

The Following User Says Thank You to AhmadMhd For This Useful Post:
Posts: 191 | Thanked: 415 times | Joined on Jan 2012
#273
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
 

The Following User Says Thank You to caveman For This Useful Post:
ArchiMark's Avatar
Posts: 414 | Thanked: 109 times | Joined on Mar 2007 @ Silicon Valley
#274
Originally Posted by AhmadMhd View Post
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....





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....






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



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....



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....







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


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



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....





You are very welcome my friend.
Greatly appreciate all your detailed help...makes a big difference....thanks!
__________________
Mark
Silicon Valley Digerati

Nokia N900
Previous: Nokia N810 & N800
 

The Following User Says Thank You to ArchiMark For This Useful Post:
ArchiMark's Avatar
Posts: 414 | Thanked: 109 times | Joined on Mar 2007 @ Silicon Valley
#275
Originally Posted by caveman View Post
This is my current setup as a reference. There are 2 independent installations, at both SD and eMMC.
Why 2 independent installations?.....

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.....

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.....

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!
__________________
Mark
Silicon Valley Digerati

Nokia N900
Previous: Nokia N810 & N800
 
Posts: 191 | Thanked: 415 times | Joined on Jan 2012
#276
Originally Posted by ArchiMark View Post
Why 2 independent installations?.....
This is my testbed. I started with the SD, and then created a new install in the eMMC.

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.
 

The Following User Says Thank You to caveman For This Useful Post:
ArchiMark's Avatar
Posts: 414 | Thanked: 109 times | Joined on Mar 2007 @ Silicon Valley
#277
Originally Posted by caveman View Post
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....

__________________
Mark
Silicon Valley Digerati

Nokia N900
Previous: Nokia N810 & N800

Last edited by ArchiMark; 2013-03-29 at 00:31. Reason: Updated Info
 
Posts: 13 | Thanked: 6 times | Joined on Oct 2012 @ Damascus, Syria
#278
@ٍ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!
Attached Files
File Type: txt xorg.log.txt (7.0 KB, 92 views)
 
Posts: 204 | Thanked: 754 times | Joined on Jan 2012 @ Finland
#279
Originally Posted by AhmadMhd View Post
@ٍ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.

Last edited by Skry; 2013-03-29 at 09:24.
 

The Following 2 Users Say Thank You to Skry For This Useful Post:
Posts: 204 | Thanked: 754 times | Joined on Jan 2012 @ Finland
#280
@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.

Last edited by Skry; 2013-03-29 at 10:20.
 

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


 
Forum Jump


All times are GMT. The time now is 15:26.