Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Hollywood MAL AMIStore App Store

AuthorTopic: Bringing m68k GNU/Linux back from the brink  (Read 3177 times)

0 Members and 1 Guest are viewing this topic.

Offline johnklos

Bringing m68k GNU/Linux back from the brink
« on: March 14, 2010, 08:51:47 PM »
[this thread started in a discussion about rackmount A1200s]

Quote from: kolla;547475
Aha, I have a couple of colleagues who are involved with NetBSD, and they sometimes try to lure me over to their side.


NetBSD is pretty stable and well supported. I can honestly say that it's gotten faster on the same hardware over time.

Quote from: kolla;547475
My gentoo/m68k effort is quite a personal one. I needed a system that could help me build the software I wanted with the features I wanted. Binary distributions simply dont give me that flexibility, Gentoo with its USE-flags and package masking does - I have to build everything myself, but that's ok, Aranym is of great help. I also find the Gentoo developer team quite a helpfull bunch, many of them are also embedded developers and adding m68k as a platform in portage happened after just some chatting over IRC.


I build everything from source, too, on NetBSD. My Amiga 4000 is currently doing a bulk package build of pkgsrc for m68k. I don't use those binaries myself even though I make them, but they're made available for other NetBSD users.

I'd love to hear more about how you've gotten Aranym working with proper MMU support. I've tried a few times, and maybe it's time to try again.

Quote from: kolla;547475
I do follow Debian/m68k too, both mailing list and IRC, so that I have an idea on what's going on. I think the biggest problem with Debian and m68k is that Debian is too big and m68k too small, both as a community and in sheer compilation power. I think it would be better to treat m68k as an embedded platform and move over to Emdebian instead of going for a full fledged distro as squeeze. In my view, m68k systems have much more in common with the embedded platforms than they do with todays PCs for example.


I still have to wrap my head around the whole "archive" thing. In NetBSD, the whole OS exists in one source tree (well, X is another, but they go together easily) and pkgsrc is a separate tree with ten thousand or so software packages. Building the entire OS (which works on many POSIX OSes and regardless of architecture) is as simple as CVS'ing the NetBSD source tree, then running these in the source tree:

./build.sh -m amiga tools
./build.sh -m amiga distribution
./build.sh -m amiga kernel=GENERIC

Building the cross-compiling toolchain on a $200 USD quad core 2.3 GHz AMD system takes about six minutes (I used "-j 4", of course) and building the main distribution takes about an hour. You can also use the target "release" to build all of the tools (AmigaDOS tools to load the NetBSD install disk image to a swap partition and to boot NetBSD from AmigaDOS, for instance) and everything else, including the installation and generic kernels.

On a real Amiga (m68060), it takes about two to three days to do an entire distribution.

It's easy to understand, but I'm not sure if there's a real distinction between what constitutes the base OS and what makes up the rest of the Debian package system. If there were an easy distinction, I would think that once the toolchain bootstrapping issues were handled, it'd just be a matter of at most a week to compile the base OS so that other people could be on the same page. This is what I'm trying to understand now.

Quote from: kolla;547475
My big hope for 2010 is that we will finally get updated glibc (or eglibc) with NPTL. I'm still on old glibc-2.3.6, I know Debian somehow managed to get as far as 2.5, but I never got that compiled here.


The last exchange on debian-68k@lists.debian.org indicated that the newest glibc is already available and that TLS/NPTL are already available upstream.

Next I have to understand what comes from upstream directly from GNU and what comes from GNU but is patched as part of the Debian sources. I still don't understand the source hierarchy. I'm obviously quite the beginner when it comes to m68k GNU/Linux.
 

Offline kolla

Re: Bringing m68k GNU/Linux back from the brink
« Reply #1 on: March 14, 2010, 09:36:46 PM »
Quote from: johnklos;547581
I'd love to hear more about how you've gotten Aranym working with proper MMU support. I've tried a few times, and maybe it's time to try again.

Well, it is supported "out of the box" as far as I know - allthough, just today I found out that the 0.9.7 beta is more compatible than current 0.9.9 - so if you want to try things out I currently suggest 0.9.7 beta over 0.9.9. I will ask on the aranym ML about the issues I see (many program just exit with "memory exhausted" for no appearant reason)

Quote
I still have to wrap my head around the whole "archive" thing. In NetBSD, the whole OS exists in one source tree (well, X is another, but they go together easily) and pkgsrc is a separate tree with ten thousand or so software packages. Building the entire OS (which works on many POSIX OSes and regardless of architecture) is as simple as CVS'ing the NetBSD source tree, then running these in the source tree:

./build.sh -m amiga tools
./build.sh -m amiga distribution
./build.sh -m amiga kernel=GENERIC

Building the cross-compiling toolchain on a $200 USD quad core 2.3 GHz AMD system takes about six minutes (I used "-j 4", of course) and building the main distribution takes about an hour. You can also use the target "release" to build all of the tools (AmigaDOS tools to load the NetBSD install disk image to a swap partition and to boot NetBSD from AmigaDOS, for instance) and everything else, including the installation and generic kernels.

On a real Amiga (m68060), it takes about two to three days to do an entire distribution.

It's easy to understand, but I'm not sure if there's a real distinction between what constitutes the base OS and what makes up the rest of the Debian package system.

Exactly. On linux distros this distinction is quite blury, if at all present.

Quote
If there were an easy distinction, I would think that once the toolchain bootstrapping issues were handled, it'd just be a matter of at most a week to compile the base OS so that other people could be on the same page. This is what I'm trying to understand now.

The last exchange on debian-68k@lists.debian.org indicated that the newest glibc is already available and that TLS/NPTL are already available upstream.

I dont think so, I think this perhap true only for Coldfire at this point. But it is coming.

Quote
Next I have to understand what comes from upstream directly from GNU and what comes from GNU but is patched as part of the Debian sources. I still don't understand the source hierarchy. I'm obviously quite the beginner when it comes to m68k GNU/Linux.

I'm not much of help unfortunatly, not being a big fan of Debian myself, I just habe to follow it since that is where rest of linux/m68k is :)
« Last Edit: March 17, 2010, 03:33:30 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
 

Offline johnklos

Re: Bringing m68k GNU/Linux back from the brink
« Reply #2 on: March 15, 2010, 02:09:53 AM »
Quote from: kolla;547594
I'm not much of help unfortunatly, not being a big fan of Debian myself, I just habe to follow it since that is where rest of linux/m68k is :)


This brings up a place where I can learn something - what's the relationship between Gentoo and Debian with regards to m68k? How much does one take from the other? Is it that Debian's doing the best job of maintaining diffs for the Linux kernel on m68k? Are parts of the base OS taken from Debian for Gentoo? Or the toolchain?
 

Offline MrZammler

Re: Bringing m68k GNU/Linux back from the brink
« Reply #3 on: March 15, 2010, 07:52:08 AM »
Hey,

Nice to see more people involved in linux on Amiga. Just as a FYI, there is a wiki site called http://www.linuxonamiga.org ATM there's not much in there, but since information on the subject seems to be scarce on the Internet, anyone is welcome to update it with docs, help and guides. It could become a good starting point for those who want to tinker with UNIX stuff on their Amigas.
Anyway is the only way
 

Offline kolla

Re: Bringing m68k GNU/Linux back from the brink
« Reply #4 on: March 17, 2010, 03:44:06 AM »
Quote from: johnklos;547626
This brings up a place where I can learn something - what's the relationship between Gentoo and Debian with regards to m68k? How much does one take from the other? Is it that Debian's doing the best job of maintaining diffs for the Linux kernel on m68k? Are parts of the base OS taken from Debian for Gentoo? Or the toolchain?

I bootstrapped my Gentoo effort from RedHat 5.2 back in the days, so no Debian involved there. On the mac I booted from a Debian image, partitioned up disk, made filesystems, created directory, mounted new filesystem to that directory, untared the basic packages, chroot into new root, found stuff missing, untared some more basic packages till I think I had it all working ok in the chroot. After that it was time for booting with new partition as root, which actually went fine, and my system was up with my Gentoo packages, and I could continue from there, leaving the debian image behind.

Most, if not all, m68k kernel devs use Debian. I know Geert Uytterhoeven had OpenWRT going for a while, but that was more as a test than anything else, and probably only in aranym, not sure. But the kernel sources are maintained outside debian, Geert Uytterhoeven is chief maintainer for the m68k git tree. All I have is portage ebuild that pull sources from him to build the m68k kernel source tree.

I have three kernels I compile, one for Aranym, one for the A1200 machines and one for the Mac Quadra 910, each in their own directory, and I do all the work on Aranym:

Code: [Select]
aranym /usr/src # ls -ld linux-2.6.30-rc6*
drwxr-xr-x 23 root root 4096 2009-06-03 12:43 linux-2.6.30-rc6-m68k
drwxr-xr-x 24 root root 4096 2009-06-08 03:21 linux-2.6.30-rc6-m68k-amiga
drwxr-xr-x 24 root root 4096 2009-06-08 02:21 linux-2.6.30-rc6-m68k-atari
drwxr-xr-x 24 root root 4096 2009-06-08 03:50 linux-2.6.30-rc6-m68k-mac

The directory without any extension is the one from my m68k-sources package, and after that one is emerged, I copy it out to ..-amiga, ..-atari and ..-mac (atari being aranym), copy in .config from /etc/kernels/kernel-config-m68k-2.6.*-{amiga,atari,mac} respectively, run "make oldconfig" in each directory to settle new config entries, symlink /usr/src/linux to the one I want to build and use Gentoo's "genkernel --no-clean" to build the kernel and modules, which I then afterwards tar together and copy over to the machines where they will be used.

Btw - I read now in the debian-m68k list about toolchain being ready with NPTL/TLS support for m68k in upcoming releases - great news! :D
« Last Edit: March 17, 2010, 04:01:25 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
 

Offline kolla

Re: Bringing m68k GNU/Linux back from the brink
« Reply #5 on: March 17, 2010, 03:48:27 AM »
Quote from: MrZammler;547649
www.linuxonamiga.org

Oh... I remember I said I would write something there :(
Documenting the magic I do is not something I'm good at, even at work this is a problem for me :hammer:
("What, you want me to write this simple 200+ char one-liner down for you? Why? Isn't it obvious?")
« Last Edit: March 17, 2010, 03:50:40 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
 

Offline MrZammler

Re: Bringing m68k GNU/Linux back from the brink
« Reply #6 on: March 17, 2010, 10:35:03 AM »
Quote from: kolla;547964
Oh... I remember I said I would write something there :(
Documenting the magic I do is not something I'm good at, even at work this is a problem for me :hammer:
("What, you want me to write this simple 200+ char one-liner down for you? Why? Isn't it obvious?")


Lol, :-) I hate it when I have to search for the same one-liner each time I want to mess with it. Mainly that's why I started the site (as a grand notepad) :-)

Anyway, no worries, the site is there (sorry if I spamed the thread btw) and open.

But: Since I also love Gentoo (it's my main desktop at home, work, netbook), could you share those "basic packages"? I assume a stage 3 tarball could be made out of them and make things easier to get started with Gentoo on Amiga?

Thanks!
Anyway is the only way