You are not logged in.

#1 2020-05-24 16:48:19

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

OLPC XO-1

DSCN0877.jpg
DSCN0878.jpg

Easiest ist to pacstrap a i486 version onto an SD card (so you don't have
to fiddle with the NAND on the device, which is way small anyway).

Prepare an SD card on an Archlinux host system (be it Archlinux 64-bit or Archlinux32).
Make two partitions, one normal ext2 where you pacstrap Archlinux32.
Then a FAT16 partition where you copy /boot/vmlinuz-linux-olpc-xo1 from
the second partition as 'vmlinuz' and /boot/initramfs-linux-olpc-xo1.img
as 'ramdisk.img' as well as the bootloader file 'olpc.fth'.

fdisk /dev/mmcblk0
# 512MB FAT16, active
# rest ext2
mkdosfs /dev/mmcblk0p1
mkfs.ext4 -O ^has_journal -O ^64bit /dev/mmcblk0p2
tune2fs -L ROOT /dev/mmcblk0p2
mkdir boot
mkdir root
mount /dev/mmcblk0p1 boot
mount /dev/mmcblk0p2 root

Prepare the host to be able to pacstrap an Archlinux32 i486 installation onto the SD card:

# get the Archlinux32 keys
wget http://mirror.archlinux32.org/i486/core … kg.tar.zst
pacman -U archlinux32-keyring-20201202-1.0-any.pkg.tar.zst

# generate a /etc/pacman.d/mirrorlist32 with https://www.archlinux32.org/mirrorlist/
wget -O /etc/pacman.d/mirrorlist32 'https://www.archlinux32.org/mirrorlist/ … _version=6'

# set Architecture=i486 in /etc/pacman.conf
# replace /etc/pacman.d/mirrorlist with /etc/pacman.d/mirrorlist32 in /etc/pacman.conf
# install the special kernel with olpc modules enabled

Pacstrap now to the mounted 'root' partition.

You need the linux-olpc-xo1 package for the special kernel. Also install
linux-firmware for the usb8xxx module (for Wifi).

pacstrap root base linux-olpc-xo1 linux-firmware

Set Architecture=i486 in root/etc/pacman.conf

Copy the Archlinux32 mirror list from the host into the chrooted environment:

cp /etc/pacman.d/mirrorlist32 root/etc/pacman.d/mirrorlist

Now comes the nice thing about those machines. Use  "The Forth" and
add a startup script on the FAT16 partition called 'olpc.fth' which contains:

cat > boot/olpc.fth <<EOF
\ OLPC boot script
visible
" last:\ramdisk.img" expand$ to ramdisk
" rw root=LABEL=ROOT loglevel=9 fbcon=font:SUN12x22 console=tty0 iommu=off" expand$ to boot-file
" last:\vmlinuz" expand$ to boot-device
unfreeze
boot
EOF

Install the kernel and the ramdisk to the FAT16 partition:

cp root/boot/vmlinuz-linux-olpc-xo1 boot/vmlinuz
cp root/boot/initramfs-linux-olpc-xo1.img boot/ramdisk.img

You can enter the chroot to do final installation stuff as for any Archlinux installation:

linux32 arch-chroot root

Remember to undo the mirrorlist and the Architecture of your hosts '/etc/pacman.conf'.

If you boot the XO, press the (X) button and then start the special boot file
from the SD card with:

boot sd:\olpc.fth

Notes:
- No graphics/X yet and just i486 packages.
- Wifi works fine with no encryption or
  with WEP with the wlan0 device (didn't test the mesh0 device yet).

Offline

#2 2021-01-09 00:13:44

aperezbios
Member
Registered: 2021-01-09
Posts: 6

Re: OLPC XO-1

Very nice, is this available as a downloadable image anywhere? If not, would you be willing to share it with me privately?

Offline

#3 2021-01-09 18:37:34

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

No downloadable image for now, but I'll redo the installation (as my current SD card in it apparently died) and post a more detailed walkthough above for now..
..I can share the file later, if you want from my mirror.. I'll post the link.. (but let me test a little bit more first).

Offline

#4 2021-01-09 21:32:00

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

and the next sd card blew up:

[45822.362180] blk_update_request: I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[45822.369858] blk_update_request: I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[45822.370663] blk_update_request: I/O error, dev mmcblk0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0

I don't know, I want my Winchester drive back, it was more reliable.. ;-)

Offline

#5 2021-01-09 22:29:04

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

I put an image here: http://archlinux32.andreasbaumann.cc/ot … xo1.img.gz

The root password is 'xx'.

Offline

#6 2021-01-10 20:38:00

aperezbios
Member
Registered: 2021-01-09
Posts: 6

Re: OLPC XO-1

abaumann wrote:

I put an image here: http://archlinux32.andreasbaumann.cc/ot … xo1.img.gz

The root password is 'xx'.

Cool, thanks. I downloaded it (at ~300 kbytes/second) and placed it on a much faster host. I'm able to download it at ~8 megabytes/second, from http://www.xo1.club/olpc-xo1-arch32-textonly.img.gz

Compressed, it's 796 megabytes, and the MD5 CRC is de7b4e089785f09aec1b49612452bc28.

Decompressed, it's about 2517 megabytes.

Last edited by aperezbios (2021-01-11 03:47:22)

Offline

#7 2021-01-10 20:44:57

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

thanks. my mirror is indeed somewhat slow. :-)

Offline

#8 2021-01-14 19:56:35

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

Of course kernel 5.10.5 has some regressions in usb8xxx and the kernel module crashes. kernel 5.911 works with Wifi just find..

Offline

#9 2021-01-14 20:16:14

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

Also this announcement doesn't make me all that optimisic about 486ish CPUs:

https://www.phoronix.com/scan.php?page= … p-Old-CPUs

Offline

#10 2021-01-14 21:16:36

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: OLPC XO-1

Yes, although it seemed to have dropped off all lists in the followup email: https://lwn.net/ml/linux-kernel/CAK8P3a … gmail.com/

I'm not sure what this means to be honest.

Edit:
I don't recognise any of our users as being repliers: https://lore.kernel.org/lkml/CAK8P3a2VW … gmail.com/.  But there are probably debian users using 486 still, and maybe some embedded roles for variants of this CPU running slackware or god knows what text mode linux.  I don't know the name of those users, and I'm not about to read every one of those emails using my web browser.

Edit2: Of course embedded users are likely to be on some old LTS kernel if not some random old kernel they're on and they're very unlikely to update.  Unless they are connecting to some newer peripherals they probably won't need a newer kernel, and probably have tighter control over their connected peripherals and aren't buying the latest tat off amazon and expecting it to work when I plug it in like I do sometimes.

Last edited by levi (2021-01-14 21:33:46)


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#11 2021-01-15 20:52:43

aperezbios
Member
Registered: 2021-01-09
Posts: 6

Re: OLPC XO-1

abaumann wrote:

Also this announcement doesn't make me all that optimisic about 486ish CPUs:

https://www.phoronix.com/scan.php?page= … p-Old-CPUs

It's day will come, but today is not that day. Even if it were to happen tomorrow, we'll always have LTS 5.10 kernel. I'd guess it's at least two years out.

Offline

#12 2021-01-15 21:20:48

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: OLPC XO-1

Depends on how long you plan to keep using it.  5.10 is unlikely to receive security updates past 2023.  The longest support at time of writing is for 5.4 which is planned to take you to 2025 and you can try that out today if you install the linux-lts package.

Of course you don't need updates if you machine is only on a local network running as a print server or something.  In fact these days I think the only risks boil down to random binary software downloaded off the internet, and running a web browser, provided you're behind a half decent router.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#13 2021-01-18 05:18:07

aperezbios
Member
Registered: 2021-01-09
Posts: 6

Re: OLPC XO-1

abaumann wrote:

and the next sd card blew up:

[45822.362180] blk_update_request: I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[45822.369858] blk_update_request: I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[45822.370663] blk_update_request: I/O error, dev mmcblk0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0

Out of curiosity, what's the vendor/make/model of the SD card(s) you're using, that have failed?

Offline

#14 2021-01-18 10:59:57

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

Sandisk Ultra 10, IIRC, but it was under heavy use before in a Raspberry Pi serving databases and a email server, so the card is not to blame here, I think.

Offline

#15 2021-03-18 09:52:47

xoalex
Member
Registered: 2021-03-18
Posts: 2

Re: OLPC XO-1

Hello everyone!

It's my first post here. I just stumbled upon this thread while looking for how to install Arch32 on my XO-1.

I just wanted to add that supplying net.ifnames=0 kernel parameter in olpc.fth helps with mesh and main wlan interface not get mixed up (see also https://blog.b-ark.ca/2020/06/12/debian … olpc.html)

Btw. I also figured that if you place olpc.fth in boot/olpc.fth the OFW seems to recognize it automatically.

Is there a reason why you went with 486 arch and not i686? IIRC Geode LX should be 686 compatible, except for NOPL instruction, which was never a standard 686.

Offline

#16 2021-03-18 14:58:33

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: OLPC XO-1

As I read it, the Geode LX has MMX but no SSE, in it's place it has 3d-Now.  You need the first spin of SSE at least to use i686 packages, and you need at least the second spin to run pentium4 packages.

Thanks for your installation tips though.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#17 2021-03-18 21:16:41

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

@xoalex: the terms i486 and i686 are referring to our definiton of supported architectures, see
https://www.archlinux32.org/architecture/

Offline

#18 2021-03-18 22:11:15

xoalex
Member
Registered: 2021-03-18
Posts: 2

Re: OLPC XO-1

I see that some i686 packages are more uptodate than i486? I am new to Archlinux - I was wondering if there is an easy way to "rebuild" an i686 package to i486. I have time, so it can also happen on XO-1 smile

Offline

#19 2021-03-18 22:22:31

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: OLPC XO-1

Yes, I linked to that same page in my post.  While the Geode LX might appear to all comers as an i686, our i686 package set depends on more than that which was in the very first i686 processor, the Pentium Pro, since that predated even the additon of MMX.  Our i686 in the intel world means PentiumIII or later or in AMD-speak it's Athlon-XP (2001) or later.

Edit: There's no easy way to convert a i686 package into an i486 one.  There have been applications on the model of box86 (which converts x86 instructions into ARM ones for running on handheld consoles and the likes), but that's a fair chunk of work in making something like that, and so far nobody's written a tool to decompose SSE instructions in to MMX or plain i486 instructions.  Since we have the source code, it's simpler to recompile that for the i486 target, and that will also usually outperform a translated on-the-fly solution as well.

Last edited by levi (2021-03-18 22:27:57)


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#20 2021-04-22 17:49:17

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

Some work on the i486 branch makes the OLPC happy:

OLPC-XO-1-Xorg.jpg

Offline

#21 2021-04-23 05:41:47

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 617

Re: OLPC XO-1

hey, nice done smile Congratulations!

Offline

#22 2021-08-13 23:13:44

aperezbios
Member
Registered: 2021-01-09
Posts: 6

Re: OLPC XO-1

That's fantastic! Would you be willing to post a sanitized image suitable for booting on an XO-1, from an SD card, like you did previously?

abaumann wrote:

Some work on the i486 branch makes the OLPC happy:

https://bbs.archlinux32.org/img/members … 1-Xorg.jpg

Offline

#23 2021-08-17 17:33:56

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

ah, the image contains personal data. I would have to reinstall. Installing on your own onto an SD card is not that hard, btw. :-)

Currently the wifi refuses completely to work and the newest kernel will break the AMD graphics, I'm sure, as it is very similar
to the Alix (see there)..

Offline

#24 2021-08-17 17:45:54

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: OLPC XO-1

How does wifi refuse to properly work?  Does it connect but getting an IP fails?  Or is it unreliable?  I'd assume the OLPC has an ethernet socket being the age that is is, so perhaps there's more success that way.

I guess the easy way to install this is to start with the 486 iso released earlier this month and boot that then follow the standard installation instructions?


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#25 2021-08-17 17:49:37

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: OLPC XO-1

Nah. A race in usb8xxx which gets worse and worse :-)

Now I'm down to 4 reboots and one working WIFI device, before it was 2:1 roughly..

(ISO): Yeah right. Though I didn't test the 486 on a USB stick on the OLPC.
And then there is the "Install directly onto a mounted SD" method..
Releasing images should be for something a little bit more stable IMHO..

Actually, the old image can be upgraded to the newest version, the only tricky thing is
the xorg.conf.

Offline

Board footer

Powered by FluxBB