Author Topic: Linux From Scratch on the Zaurus  (Read 10847 times)

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Linux From Scratch on the Zaurus
« on: March 17, 2022, 02:16:18 am »
Hi greguu,

I just wanted to thank you for all of your hard work with this. I have dug my old Zaurus SL-C3100 out of the cobwebs to use as a handy dandy learning platform for linux and programming. Not a powerful beast by todays standards but I think that will make it even more fun!!

I am very interested in Linux From Scratch (LFS) and thought your voidz project may be a good starting point to achieve a bespoke LFS system on the Zaurus.

Fingers crossed.

All the best.

Cheers

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #1 on: March 17, 2022, 04:08:18 am »
Hi and welcome!

I have moved your post in a new topic, since this discussion is about a new distro. I have never heard of LFS before, it looks like a great way to learn about the internals of Linux. Voidz is currently the fastest Zaurus distro using recent 5.x kernels, and it also has the lowest memory footprint. I wonder if further optimizations will be possible; I would love to have a fast X environment running on it, but I'm afraid it would be too demanding for our devices.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #2 on: March 17, 2022, 06:30:13 am »
Hi Varti

Thanks for updating the post to a new topic. Bit of a troglodyte when it comes to this sort of thing.

I am probably being over ambitious but I do like a challenge. My inspiration comes from looking at other OS's like MorphOS or OpenBSD running on an old iBook G4 (2005) for example. Runs better than Mac OS X Tiger!! Go figure.

I agree that a modern X environment may be a hard ask for the little bugger but maybe there is some other magical graphical UI out there in the digital fairy land that will fit like a glove.

I'll let you know how I get on.

Cheers

illbay

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #3 on: March 19, 2022, 11:05:43 pm »
Have installed voidz build-8 from https://github.com/greguu/voidz-packages/releases on SL-C3100 without issue.

GREAT!!

I have posted over here https://www.oesf.org/forum/index.php?topic=34937.msg298456#msg298456 regarding the missing repo which is mentioned in the install instructions.

I understand that voidz on the old Z is probably considered a long forgotten thing so this is not a surprise.

I was hoping I could just start building the packages that I need and this is where I am now. Stuck.

Voidz build-8 does not have some essential software like git or gcc for example.

I cloned the voidz-packages on another machine and then transferred to the zaurus hoping that would allow me to either binary-bootstrap or if need be bootstrap. No go, no git.

I have also installed void linux proper x86_64 in a vm and then tried doing the Build a RootFS instructions. I have a chroot problem or I am doing this completely wrong.

All I am trying to achieve is the ability to build some basic software on the zaurus under voidz. I think if the repo was active I would probably not be having these issues because the binaries that I need are probably available in there.

If someone could point me to the correct way to build binaries either on the zaurus itself under voidz without access to any repo or cross compile using the voidz-packages.git repo that would be much appreciated.

Am I having fun yet? Sort of.

I guess this is what it is all about.

Off to try something else.

Cheers

illbay

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #4 on: March 20, 2022, 06:40:53 am »
Build8 indeed doesn't have neither gcc nor git, but you can find them in the older build7 repository (gcc-8.2.0_2.armv5tel-musl.xbps and git-2.18.0_1.armv5tel-musl.xbps). However I'd not recommend compiling on the Zaurus itself, because of speed and memory constraints. All the packages for Voidz have been compiled using a crosscompiler, there should be somewhere some instructions on how to do this, either on the github page or here. I have also sent an email to greguu to notify him about this thread.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #5 on: March 20, 2022, 07:27:26 am »
Thanks again Varti.

I see that the repos still exist but maybe just have an SSL Certificate issue.

Being able to get binaries from the repo will be great.

In the meantime I was able to work out how to cross compile binaries on an x86_64 install of void linux installed on a virtual machine.

It turns out that the instructions at https://github.com/greguu/voidz-packages under Build a RootFS! was what worked. I must have suffered from a temporary brain fart when I tried before.  ;)

For any one interested, what I am going to do is probably mad but I am trying to set up voidz linux on my SL-C3100 so I can follow the instructions at Linux From Scratch here https://www.linuxfromscratch.org/lfs/view/stable/

This is more of a learning experience for me as well as an investigation in to why software these days requires so much resources to do basic things.

I love the design and utility of the Zaurus and hate to see it sitting idle.

My reason for even trying to build an entire OS on the Zaurus is this https://www.openbsd.org/zaurus.html

Quote
After the OpenBSD/cats was completed in order to benefit from a good ARM development platform, work on the Zaurus hardware started in 2004. Since the Zaurus was a fully capable machine, we didn't cross compile. All builds of Zaurus were done on the Zaurus directly.

I am obviously not the first to do this but like I said this is really a learning and investigation experience for myself.

I will post updates here if you are interested in following along and laughing.  :)

Cheers

illbay


Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #6 on: March 21, 2022, 04:44:58 am »
Thanks again Varti.

I see that the repos still exist but maybe just have an SSL Certificate issue.

Being able to get binaries from the repo will be great.

In the meantime I was able to work out how to cross compile binaries on an x86_64 install of void linux installed on a virtual machine.

It turns out that the instructions at https://github.com/greguu/voidz-packages under Build a RootFS! was what worked. I must have suffered from a temporary brain fart when I tried before.  ;)
The procedure seems to be quite straightforward. The most recent rootFS (build8) is already 3 years old, we really need an updated one, I'd be curious to know if a recent FS would fix the certification issues. Would you like to try to make a new voidz release yourself? Otherwise I could try it myself, I already have Void Linux on my laptop as my main (and only) OS.

Quote
I love the design and utility of the Zaurus and hate to see it sitting idle.
I couldn't agree more, too bad Sharp has not continued the line. I read that at Sharp they always saw them just as portable dictionaries, nothing more, and that they chose Linux only to differentiate them from other PDAs.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #7 on: March 21, 2022, 06:15:42 am »
Hi Varti

Quote
Would you like to try to make a new voidz release yourself?

That sounds like a great idea. I am currently having strange issues with setting up voidz build7 so it has all the required tools to start the LFS process.

Maybe a new build will help that and also maybe help others who would like to revive their Z's.

I am no expert but I have been taking a look at greguu's git repo including his commits to the original void-packages, etc. It will be a learning experience in itself going through those updates to understand what they are doing and why and see if they work for a new build.

Once I have something that works I will post under Zaurus Void Linux Support (https://www.oesf.org/forum/index.php?board=205.0)?

illbay

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #8 on: March 21, 2022, 09:08:23 am »
Thanks for taking time to look into this. I have received an answer from greguu, he's glad to hear that there's still interest on voidz! Please post any update on the general Voidz subforum. We can host here the rootfs at the same path where the others are stored.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #9 on: March 22, 2022, 05:45:25 am »
Greguu has answered me again with some more details: a new build would fix the certification issue, but we'd need to re-base the current xbps-src git and then patch again a voidz build together and compile it. This is not very complicated, most is already documented in the official docs, but it can take a while as many packages need fixing or patching. These changes which greguu made are all in the commits on his github as reference.

Instead of rebuilding, the certificate can be extracted from a current void package (ca-certificates) as well, or the SSL_NO_VERIFY_PEER workaround can be used as well.

A new kernel build and a new rootfs are planned, but it will take a while as the Zaurus Cxx00 has to be moved to Device Tree, this will need quite a lot of patches. He said that he'd welcome a new rootfs maintainer.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #10 on: March 23, 2022, 03:21:53 am »
So far I have started with a fresh clone of void-packages from the official git repo.

I then copied greguu's zaurus packages across into the new srcpkgs tree including linux4.19-zaurus and followed the instructions detailed by greguu to build a new rootfs.

Some of the patches did not work out of the box so I had to patch files manually, no biggy.

For the most part the build worked up until gettext-0.21_4 when building pkg zaurus-base.

Getting an error like:

Quote
configure.ac:25: error: AC_INIT should be called with package and version arguments

This appears to be a problem with M4, autom4te, aclocal and autoreconf. I have done a search and the problem appears to be very common but still haven't worked out a way to get past it yet.

As far as becoming a rootfs maintainer, this is probably out of my league at present. As I said I wanted to go through the LFS book to learn more about this stuff but haven't quite got there yet. I wouldn't like to let people down.

I am happy to continue with trying to build a new rootfs and document my learnings and help out any way I can.

I am not familiar with github or git but I will create a github account and document my findings there if that is of any help to greguu or anyone else interested.

I am very surprised how far the rootfs build process actually got without too much baby sitting. I wonder if it will just work once I get it to build. I would not have been able to get this far without greguu's patches and instructions so big thanks to him.

Cheers

illbay

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #11 on: March 24, 2022, 06:13:03 am »
Forwarding greguu's answer:

It could be just a simple issue on the Void host install, missing some dependencies or a toolchain configuration issue. What I noticed in the past, if you try to compile an old xbps-src tree on a fresh void installation, you will get issues as the library dependencies are not in sync. Compiling the old xbps-src tree from my voidz will only reliably work on an older Void install host. Void is a rolling distribution, so hard to go back in time, I do not recommend even trying.

On a new git clone from xbps-src you need to re-base, that can take a bit of time and patience as a lot would have changed in 3 years.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 433
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #12 on: March 25, 2022, 02:12:50 am »
Thanks Varti.

illbay, if you want to try to build void linux for armv5tel again, based on a fresh git clone of xbps-src, I am happy to assist, but I have limited resources at the moment. The 5.0 kernel should work fine with a new rootfs. Check the commits I did on my github. I basically used Busybox where possible to reduce memory footprint and had to tweak a few other apps to compile for armv5tel, but that was 3 years ago. It may be much more of a challenge today.

Varti, I guess there are some other armv5tel distributions out there that are still active ? I have not looked recently, but it may be worth investigating if we cloud jump ship from ALARM to another one, for pre-built binary packages. Status of OE is unclear, I have lost track of ant and others since the freenode debacle.

I may find more time later this year.

Cheers!
« Last Edit: March 25, 2022, 02:18:04 am by greguu »
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #13 on: March 25, 2022, 03:05:17 am »
Thanks Varti and greguu

What you say makes sense and also gives me some clues as to how to proceed.

This is not an important or urgent project, just something I fell into and would like to give a try. Peoples time is precious expecially in these strange days.

No fear, I will persevere and see how I go.

On a side note, I am not active at all on social media let alone forums but a big thank you to Varti who, from what I have seen, always makes people welcome and is super active and positive.

A pleasure to be here really.

Cheers

illbay

illbay

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #14 on: March 28, 2022, 06:16:15 pm »
I have decided to stick with build 7 of voidz because it looks like everything I need is available and the repo is up and running.

The only problem I am having is busybox. While busybox is great for this type of machine due to its low resource requirements, it appears that some of the commands it supplies are no good for building an OS. Missing switches, etc.

I am now in the process of removing busybox and replacing it with the full gnu packages. I did do this already and ended up with an unbootable machine. Something  to do with symlinks, init and runit I think. Being more careful and methodical this time around.

Hopefully I will be able to start the LFS process soon.

illbay