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

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 419
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #15 on: April 09, 2022, 05:05:58 am »
The voidz rootfs depends on busybox-zaurus to boot etc, you can not remove busybox-zaurus without breaking voidz.
However, you can replace some of the tools provided via busybox, with their "full version" by building and then installing the corresponding package.
This will have to be on top of the standard rootfs, eg on top of busybox-zaurus.
See the commit for busybox-zaurus to see what it covers : https://github.com/greguu/voidz-packages/commit/7d03a16c9955d9c67711bee8f14fc70d74936717
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)

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 419
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #16 on: April 09, 2022, 05:54:51 am »
by the way, from what I found :

"ARMv5 users can look to Debian and derivatives for continuing support for their devices."
https://archlinuxarm.org/forum/viewtopic.php?f=3&t=15721

 It may be worth to setup a Debian armv5 rootfs instead, the voidz 5 kernel would be fine I guess.
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: 15
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #17 on: April 10, 2022, 06:39:04 pm »
Thanks greguu

I have been able to get around the busybox thing and then hit another problem with a bug in the armv5 version of perl that was installed on voidz so had to recompile a newer version of that.

Many cycles later and lots of hacking I decided to give the full version of LFS a miss as it clearly does not take into account the arm architecture.

I haven't given up though, found another version of LFS called CLFS (https://clfs.org/view/clfs-embedded/arm/) which looks like it might work on the zaurus. In the process of compiling GCC. I think this is day 3, hahaha....

In my travels I came across something interesting called the Yocto Project. Has anyone had any experience with this specifically for the Zaurus?

I see a contribution from a Richard Purdie for the zaurus called zaurusd (https://git.yoctoproject.org/zaurusd/) which looks promising.

From what I understand, if the Yocto Project can handle armv5te then you should be able to cross compile a complete custom linux distribution at will. In the process of getting my head around how it all works.

Cheers

illbay

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 419
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #18 on: April 12, 2022, 03:53:46 am »
Thanks greguu

I have been able to get around the busybox thing and then hit another problem with a bug in the armv5 version of perl that was installed on voidz so had to recompile a newer version of that.

Many cycles later and lots of hacking I decided to give the full version of LFS a miss as it clearly does not take into account the arm architecture.

I haven't given up though, found another version of LFS called CLFS (https://clfs.org/view/clfs-embedded/arm/) which looks like it might work on the zaurus. In the process of compiling GCC. I think this is day 3, hahaha....

In my travels I came across something interesting called the Yocto Project. Has anyone had any experience with this specifically for the Zaurus?

I see a contribution from a Richard Purdie for the zaurus called zaurusd (https://git.yoctoproject.org/zaurusd/) which looks promising.

From what I understand, if the Yocto Project can handle armv5te then you should be able to cross compile a complete custom linux distribution at will. In the process of getting my head around how it all works.

Cheers

illbay

Hi illbay,

yes, Yocto, formerly OE had even Zaurus support, but I am not sure how well it is maintained today in regards to armv5tel.

From personal experience, if you like to built from scratch and if you are really keen, you could try gentoo.
They still maintain a stage3-armv5tel-openrc rootfs it seems. Check their servers.

You can use the Void Linux kernel and kexecboot kernel to boot the rootfs, I am sure.
But you will need a large CF card or drive to hold all the src and dl data for the compilation stage.
There are posts here on OESF on how to swap the internal drive.
Once you got a large drive, 8GB or more, then install the gentoo rootfs.

Then bootstrap from the stage3, but make sure you have a ethernet connection (CF recommended) and
setup ccache and distcc alongside another x86-64 host ideally running a recent gentoo or arch.
This is should be all documented on the excellent gentoo manuals and wiki.

The Zaurus can be configured to just do the preprocessing and the x86-64 will do the actual gcc compilation work.
This will be still much slower than pure cross-compiling, but it will work.
You will learn also a lot on the way on how to set up your linux / gnu system.

Cheers,
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)

miskinis

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • http://
Re: Linux From Scratch on the Zaurus
« Reply #19 on: April 12, 2022, 08:52:57 am »
Hello!

I have just started using this forum again, after many years, and starting to "catch up" on things.

It is nice to heard that someone is working on a new Zaurus distro, and I also share the feelings behind some of the statements regarding the "fun" that someone posted about, speaking about their use of a C-1000 for LINUX, after "dusting off the cobwebs".

I somewhat recently acquired a C-750, but I used to primarily use an SL-6000.

I do not see any reason why an X environment, which is "speedy" can not be achieved, but of course that term is subjective.  In the past, I used PDAXROM, PDAXQTROM, and even tried a myriad of X servers on the Zaurus.  At one point I ran a full JAVA 2 on an SL-5500 before acquiring an SL-6000, and it was quite slow concerning Java 2 (also known as "swing"), but it did function, and at the time, I believe I was using the OpenZaurus OS.

Anyway, for the next week or so, I hope to catch up, to check out "void LINUX", and possibly what has been done in the LFS domain as well.  I am finding that many of the websites, and files are no longer available, so for the time-being I am "stuck" with the Cacko installed on the C-750. :)

Best Wishes, John
_John Miskinis_

illbay

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #20 on: April 14, 2022, 06:10:14 pm »
Thanks again greguu.

I stumbled upon this website https://vminko.org/gentoo_manuals/zaurus_c1000when looking for something. I had a quick look but noticed the dates and assumed it was a long forgotten thing. But no, as you say ARMv5tel is alive and well here https://www.gentoo.org/downloads/ which is great!!

I don't know anything about ccache or distcc but will do soon. Anything to speed things up a bit would be great. As I said I am (still) compiling gcc-6.2.0 on my poor SL-C3100. It did break with an error and the time then was:

real    9121m54.611s
user    1436m24.087s
sys     287m7.737s

I fixed the error and set it going again. That was 2 days ago I think.

I understood that this would be a problem but things are getting a bit ridiculous.  :) gcc is a tough ask by any means so I shouldn't complain.

It is looking like armv5 is slowly disappearing from many projects support. Understandable I guess seeing it's age and what is available today. I still like the zaurus and its form factor though and intend to get some more life out of it if I can.

Hello again John. Yes X on the zaurus is ok with me. I have been taking a look at what is useable with the frame buffer directly. Early days. So much to learn. Any luck with the files on the website I mentioned above (same as other post)? If you scroll down you will find mirrors of some sites that the site owner has stored.

Cheers

illbay

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 419
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #21 on: April 15, 2022, 03:47:53 am »
...in general, running a full Xorg server on Zaurus today, will not be a pleasant experience.
The best performance you can get out of a Zaurus will be by using pure console mode and the odd application using DirectFB or fbdev.
For graphical browsing, you may try the fbdev or SDL backend option via netsurf browser.
You can get SDL apps use DirectFB or fbdev without Xorg, such as games like doom etc, links browser and other apps.
There are some threads exploring these options, somewhere buried in this form...

Personally, I may find some time to build a new voidz or gentoo rootfs and kernel, but rest assured, this will not yield in more usability per se, just more up to date packages.

It's great so see some recent interest in the platform again. If you like to contribute, please share your success and failures.
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)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1238
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #22 on: April 15, 2022, 04:32:59 am »
Anyway, for the next week or so, I hope to catch up, to check out "void LINUX", and possibly what has been done in the LFS domain as well.  I am finding that many of the websites, and files are no longer available, so for the time-being I am "stuck" with the Cacko installed on the C-750. :)
For the missing websites it is usually worth to check if there's a mirror of them on archive.org, I have found many lost sites and files there. If you agree, we could open a new thread with a list of the websites you need, and we keep the list updated with all the infos we'll find. I'll host all the recovered sites here, while Elsix is being rebuilt.

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: 15
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #23 on: April 15, 2022, 08:02:11 pm »
I am happy to report that my little Zaurus SL-C3100 just finished compiling gcc-6.2.0 - Static, including mpfr-3.1.4, gmp-6.1.1 and mpc-1.0.3 with the following settings:

gcc-6.2.0/configure \
  --prefix=${CLFS}/cross-tools \
  --build=${CLFS_HOST} \
  --host=${CLFS_HOST} \
  --target=${CLFS_TARGET} \
  --with-sysroot=${CLFS}/cross-tools/${CLFS_TARGET} \
  --disable-nls \
  --disable-shared \
  --without-headers \
  --with-newlib \
  --disable-decimal-float \
  --disable-libgomp \
  --disable-libmudflap \
  --disable-libssp \
  --disable-libatomic \
  --disable-libquadmath \
  --disable-threads \
  --enable-languages=c \
  --disable-multilib \
  --with-mpfr-include=$(pwd)/../gcc-6.2.0/mpfr/src \
  --with-mpfr-lib=$(pwd)/mpfr/src/.libs \
  --with-arch=${CLFS_ARM_ARCH} \
  --with-float=${CLFS_FLOAT} \
  --with-fpu=${CLFS_FPU}

Total times:

1st run (compile error in ubsan.c - line 1472 changed to xloc.file == (const char*)'\0')

real    9121m54.611s
user    1436m24.087s
sys     287m7.737s

2nd run

real    2009m22.416s
user    666m5.417s
sys     75m4.632s

TOTAL

real   185.52 hours (7 days, 17.52 hours)
user   35.03 hours
sys   6.03 hours


Not bad at all really!!  :o

illbay ;)

EDIT 6/6/22 - Oopsy on the total calculations for user and sys. Corrected above. Added the raw data for reference and confirmation.
« Last Edit: June 05, 2022, 09:53:42 pm by illbay »

miskinis

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • http://
Re: Linux From Scratch on the Zaurus
« Reply #24 on: April 16, 2022, 06:05:16 pm »
Wow... I am just skimming some posts now, but I will return. :)
_John Miskinis_

illbay

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Linux From Scratch on the Zaurus
« Reply #25 on: May 07, 2022, 08:09:44 pm »
Still here!!

Moving house, losing hair rapidly.

If I ever find all my stuff again I will continue where I left off.

Cheers

illbay

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 419
    • View Profile
    • http://github.com/greguu
Re: Linux From Scratch on the Zaurus
« Reply #26 on: May 20, 2022, 02:38:08 am »
Still here!!

Moving house, losing hair rapidly.

If I ever find all my stuff again I will continue where I left off.

Cheers

illbay

 ;D Same here, including the hair loss  8)
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)