You are not logged in.

#76 2011-01-12 16:07:00

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch on ARM?

I think ARM is the future of computing in general... and it's funny, cause now that ARM is getting attention like it is, MIPS and RISC seem to be getting more attention to (I guess they would be natural competition for ARM?)  It's interesting, cause ARM is probably one of the best examples of open source hardware... cause the info to build your own is out there, granted the tools are financially out of reach for the average consumer. And each device on the market now has their own version of ARM with a custom SoC config (meaning Arch on OpenMoko would require some kernel and driver changes if it were to ever work on DroidX, or even OpenPandora).  A blessing and a curse is openness and diversity... but I digress. big_smile


Help grow the dev population... have your tech trained and certified!

Offline

#77 2011-01-12 16:22:41

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch on ARM?

This may provide a bit of insight for getting Arch on ARM that hasn't yet been covered... figured I'd drop the link since I ran across it.

http://www.ibm.com/developerworks/linux … eboard-xm/

Last edited by CPUnltd (2011-01-12 16:23:36)


Help grow the dev population... have your tech trained and certified!

Offline

#78 2011-01-17 13:56:54

M_ller
Member
Registered: 2010-04-17
Posts: 80
Website

Re: Arch on ARM?

I'd still be very interested in getting ArchLinux on my N900, which is using ARM. Anyone succeeded yet?

Offline

#79 2011-01-17 14:33:21

Esmil
Member
Registered: 2006-12-10
Posts: 9

Re: Arch on ARM?

M_ller: The N900 has an OMAP3 chip similar to the beagle board, so you should be able to run my port. I'd suggest, though, that you just unpack the rootfs to a directory chroot into it if you still want to be able to user your phone for calling and such wink

Offline

#80 2011-01-17 16:05:48

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch on ARM?

I've only heard of someone being able to chroot into it as of yet... so no gui or standard arch functionality... but at least it's a start for being able to run it on the N900


Help grow the dev population... have your tech trained and certified!

Offline

#81 2011-01-17 16:18:02

M_ller
Member
Registered: 2010-04-17
Posts: 80
Website

Re: Arch on ARM?

Esmil wrote:

M_ller: The N900 has an OMAP3 chip similar to the beagle board, so you should be able to run my port. I'd suggest, though, that you just unpack the rootfs to a directory chroot into it if you still want to be able to user your phone for calling and such wink

I have never really understood how CHROOT works, could you give me quick info what it does and is?

Offline

#82 2011-01-18 11:15:51

Esmil
Member
Registered: 2006-12-10
Posts: 9

Re: Arch on ARM?

Here are the steps you need to do, which I can think of right now:

1) Gain shell access as root. On the N900 this shouldn't be too hard. I think you can just

sudo su -

or something similar. It even has an ssh daemon so you can log in to your phone from your computer. This way you don't have to type everything on the small thumb keyboard. Just

ssh root@<ip of your phone>

when you're on the same local network, or log in as some other user and gain root.

2) Download my (badly named) archlinux root filesystem from http://esmil.dk/archlinux/arch-on-panda … 02.tar.bz2 and transfer it your phone. You might even be able to use wget or curl on your phone to download it directly there.

3) Figure out some place on the phone which has enough space and create a directory there. Let's call this place /mnt/arch. Around 1Gb should be enough. If you use a removable memory card make sure it is not formatted with fat (windows/dos filesystem). It needs to be formatted with ext2/3/4 or some other filesystem which understands permissions, symlinks, devices, pipes etc.

4) Unpack the root filesystem there. Eg.

cd /mnt/arch
tar xjpvf /path/to/arch-on-panda-rootfs-20110102.tar.bz2

This step needs to be done as root since the tarball contains files and devices which needs to be owned by root.

5) Copy /etc/resolv.conf to the archlinux root. Eg.

cp /etc/resolv.conf /mnt/arch/etc

You need this to access the internet easily when you're chroot'ed.

6) Enter the chroot. Just type

chroot /mnt/arch /bin/bash -l

This means "pretend /mnt/arch is / for a moment, and then run /bin/bash -l (which is really /mnt/arch/bin/bash -l)". In other words run /mnt/arch/bin/bash as a login shell, but fool it into thinking that whatever is under /mnt/arch is actually the root filesystem. Hopefully this should give you a new shell prompt and you're now inside an archlinux system on your phone. Remember you can only access stuff under /mnt/arch, you'll need to type 'exit' or press Ctrl-D to kill the shell and exit the chroot.

7) Update the system with

pacman -Syu

and install packages like any other archlinux system. You can even install base-devel and start compiling your own packages if you can't find them in the repos.

8) ...

9) Profit!!!

Good luck.
/Esmil

Last edited by Esmil (2011-01-18 11:23:54)

Offline

#83 2011-01-18 14:11:45

M_ller
Member
Registered: 2010-04-17
Posts: 80
Website

Re: Arch on ARM?

Esmil wrote:

Here are the steps you need to do, which I can think of right now:

1) Gain shell access as root. On the N900 this shouldn't be too hard. I think you can just

sudo su -

or something similar. It even has an ssh daemon so you can log in to your phone from your computer. This way you don't have to type everything on the small thumb keyboard. Just

ssh root@<ip of your phone>

when you're on the same local network, or log in as some other user and gain root.

2) Download my (badly named) archlinux root filesystem from http://esmil.dk/archlinux/arch-on-panda … 02.tar.bz2 and transfer it your phone. You might even be able to use wget or curl on your phone to download it directly there.

3) Figure out some place on the phone which has enough space and create a directory there. Let's call this place /mnt/arch. Around 1Gb should be enough. If you use a removable memory card make sure it is not formatted with fat (windows/dos filesystem). It needs to be formatted with ext2/3/4 or some other filesystem which understands permissions, symlinks, devices, pipes etc.

4) Unpack the root filesystem there. Eg.

cd /mnt/arch
tar xjpvf /path/to/arch-on-panda-rootfs-20110102.tar.bz2

This step needs to be done as root since the tarball contains files and devices which needs to be owned by root.

5) Copy /etc/resolv.conf to the archlinux root. Eg.

cp /etc/resolv.conf /mnt/arch/etc

You need this to access the internet easily when you're chroot'ed.

6) Enter the chroot. Just type

chroot /mnt/arch /bin/bash -l

This means "pretend /mnt/arch is / for a moment, and then run /bin/bash -l (which is really /mnt/arch/bin/bash -l)". In other words run /mnt/arch/bin/bash as a login shell, but fool it into thinking that whatever is under /mnt/arch is actually the root filesystem. Hopefully this should give you a new shell prompt and you're now inside an archlinux system on your phone. Remember you can only access stuff under /mnt/arch, you'll need to type 'exit' or press Ctrl-D to kill the shell and exit the chroot.

7) Update the system with

pacman -Syu

and install packages like any other archlinux system. You can even install base-devel and start compiling your own packages if you can't find them in the repos.

8) ...

9) Profit!!!

Good luck.
/Esmil

Det var da et heldigt tilfælde at du er dansk (dømt ud fra dit domæne). Jeg vil prøve det af så snart jeg kommer hjem til den stationære!

Oh well, that was a neat coincidence that you were danish (judging by the domain name). I wil ltry it out as soon as I get home!

EDIT: So here's the deal; whenever I use mkfs.ext3 /dev/mmcb1k1 to format my SD card to EXT3, it always ends up saying the card is unreadable. Any ideas?

Last edited by M_ller (2011-01-18 21:17:08)

Offline

#84 2011-01-18 22:05:37

Esmil
Member
Registered: 2006-12-10
Posts: 9

Re: Arch on ARM?

Ok, I just borrowed an N900 to see if my instructions actually works. They do, but here are my experiences so far:

1) The normal kernel for the N900 doesn't support thumb-binaries, and since my port is using thumb2 compiled binaries it won't run with that kernel. The solutions is to find the "power user" kernel under 'System' in the Application manager and install that.

2) I forgot to tell you that for many programs you'll need to mount /proc, /sys and /dev in the chroot. Just do as follows (and remember change /mnt/arch by the real path to the archlinux chroot):

mount --bind /dev /mnt/arch/dev
mount -t devpts none /mnt/arch/dev/pts
mount -t proc none /mnt/arch/proc
mount -t sysfs none /mnt/arch/sys

These commands needs to be run outside the chroot.

3) The default ssh daemon installed on the N900 isn't very stable when using colours and ncurses programs in the terminal. However, once you have the chrooted archlinux up and running you can just do pacman -S openssh and run openssh inside the archlinux chroot. You can edit /etc/ssh/sshd_config to change the port it is listening on, so it won't compete with Nokia's ssh daemon.

Last edited by Esmil (2011-01-18 22:16:15)

Offline

#85 2011-04-11 17:30:05

natostanco
Member
Registered: 2008-01-07
Posts: 125

Re: Arch on ARM?

Is it possible to use the filesystem posted by esmil to being able to use arch on android, like ubntu?
looking here:
http://nexusonehacks.net/nexus-one-hack … neandroid/

using that filesystem instead of the debian/ubuntu used there?

Offline

#86 2011-04-13 10:24:15

Esmil
Member
Registered: 2006-12-10
Posts: 9

Re: Arch on ARM?

Yes, if you can get root on your phone do

cat /proc/cpuinfo

This should say "Processor : ARMv7 .." and under "Features :" there should be "thumb" and "neon" flags. If this is true the hardware on your phone should be fine.

You probably won't be able to use the scripts of that guide, but by piecing together the android-specific parts of that guide and the general directions above you should be able to unpack the filesystem and chroot into it.

Good luck!
/Esmil

Offline

#87 2011-04-26 22:15:26

natostanco
Member
Registered: 2008-01-07
Posts: 125

Re: Arch on ARM?

yeah, it's working, chroot through adb shell, just copied the fs in an ext2 partition, copied the resolv.conf, mounted the partition with adb shell and chrooted. next step get the gui through vnc

Offline

#88 2011-04-26 22:54:17

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 470
Website

Re: Arch on ARM?


Help grow the dev population... have your tech trained and certified!

Offline

#89 2011-04-27 11:12:21

Esmil
Member
Registered: 2006-12-10
Posts: 9

Re: Arch on ARM?

natostanco wrote:

yeah, it's working, chroot through adb shell, just copied the fs in an ext2 partition, copied the resolv.conf, mounted the partition with adb shell and chrooted. next step get the gui through vnc

That's awesome! Hopefully I'll find the time to start updating packages soon.

Offline

#90 2011-04-29 11:12:35

natostanco
Member
Registered: 2008-01-07
Posts: 125

Re: Arch on ARM?

mmm the guide I posted requires tightvnc thats not in your repository :s

Offline

Board footer

Powered by FluxBB