Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh start with Gentoo but using an old kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 8

PostPosted: Sat Sep 02, 2017 10:49 am    Post subject: Fresh start with Gentoo but using an old kernel Reply with quote

Whilst trying to debug a wireless networking issue on an embedded Gentoo platform at Uni (for which I only have binaries), I became intrigued by Gentoo as a whole. To date I only have Linux based experience on Ubuntu (and Debian), CentOS and some other binary based distributions.
I'm still trying to figure out the wireless problem, and to help me better understand what is going on, I've decided that I should build my own Gentoo install in a VM using VirtualBox.
The first question I have is a 'chicken-egg' question. How do I build Gentoo in the first place? Do I need cross compiling tools to do this? Do I need to get some sort of basic binary and then build the rest in the VM? (I have several VirtualBox installations; Win7 32bit, OSX, Ubuntu 14 & 16.)
If anyone would be so kind as to point me towards a guide that explains how to get past this first hurdle?
Another complication in what I'm attempting to do is that the kernel I'm interested is very old, and from what I've seen, the sources are no longer in the emerge/portage repository. Surely they still exist somewhere, and some help finding them would be appreciated. I'm specifically interested in kernel 2.6.33.

Cheers,
Nap
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Sat Sep 02, 2017 11:02 am    Post subject: Reply with quote

nap,

Welcome. Beginners start here.

You use a random linux boot system that contains the tools needed to install Gentoo.
System Rescue CD is good. You attach the ISO image to your VBox guest and boot it.
Everything else is per the handbook.

You will only need a cross toolchain when you want to build for your embedded system but that's later.
Get you handbook install in Virtualbox done first.

Such an old kernel will give you problems. It will be on kernel.org. The ebuild will be in the Gentoo CVS attic.
The biggest problem will be that it won't support an up to date install, so its not a case of running an old kernel under a current Gentoo install.
You will need a lot more old bits too.

A few words of caution. Gentoo gives you only what you ask for anh things needed to support the things you asked for.
The corollary is that if you haven't asked, you won't have it. :)

You don't fix Gentoo by reinstalling. Its very hard to break Gentoo so badly that the only way out. You fix it and learn from it.
It is possible that the fix will take longer than a reinstall. Then its your call if you need the install working, or you want the lesson too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1955

PostPosted: Sat Sep 02, 2017 11:52 am    Post subject: Reply with quote

To build Gentoo you just need a Stage 3 image for your processor, and a current portage
snapshot. (And a network connection.) The process is well documented in eg:

https://wiki.gentoo.org/wiki/Handbook:AMD64

That will get you a shell prompt, and for embedded stuff you may not need much more.
Building cross-compilers on Gentoo is fairly straightforward, certainly easier than it used to
be. However, it's easier to find a Stage 3 for the actual embedded processor you will
be using, if you can, and just cross-compile any extras that you need.

Building a Gentoo system around a 2.6.33 processor is a _lot_ more difficult, since few of
the sources will now be available. I think you'll have to see if you can run the device with
a current kernel; /proc/config.gz might help.

I'd start by installing Gentoo on your current (main) system, and then see how things go
from there.

Good luck - Will
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1955

PostPosted: Sat Sep 02, 2017 1:19 pm    Post subject: Reply with quote

I dug into my archives and found that I had the sources for a 2010 Gentoo,
which uses the 2.6.3x kernels. The stage 3, portage snapshot and distfiles
come to 12G altogether, but if you're in the UK I could put them on a USB
stick and mail them to you.

The problem then is that you'll need to build a cross-compiler, and crossdev
wasn't too solid at that point. Furthermore, updating such an old system is
entirely impractical. (The kernel sources aren't much use by themselves;
you need an obsolete Portage to build them.)

I think your best bet is to use a current kernel and Gentoo installation;
things will be a lot easier.

Will
Back to top
View user's profile Send private message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 8

PostPosted: Sun Sep 03, 2017 2:43 am    Post subject: Reply with quote

Thanks for the guidance and I will look into the links provided and go from there.

The constraint I have is that the embedded system is a NAO v4 robot (built by Aldebaran, who are now owned by SoftBank) and runs an i686 Intel(R) Atom(TM) CPU Z530 @ 1.60GHz GenuineIntel. The robot has closed-source binaries which include a Device Control Module, and a HAL that we cannot rebuild. The robot has a reduced set of binaries whilst the VM they provide has a slightly larger set (no sources on either).
I have two kernel source trees available to me on github; one from Aldebaran and the other from Bremen University (which has some minor changes to some of the Aldebaran drivers). At this point, I am not sure if they build to the same real-time kernel version (2.6.33.9-rt31-aldebaran-rt), but I think they would.

The main functions of the robot work fine, however the tools supplied are terrible and lacking. So, when something goes wrong or we develop some new functionality, we have very little wiggle room. So I really need to get a VM running that is based on that kernel with the ability to add essentials we need.

FYI: In our lab, we have already been able to build CLANG5 for the robot and, as of last night, managed to get the latest Swift4 Dev snapshot to build.

cwr: I am in Australia, but the USB offer seems like it would make life a _lot_ easier. I am happy to pay for postage if you're prepared to send it to me here.

Cheers,
Nap
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 184
Location: Brisbane, Australia

PostPosted: Sun Sep 03, 2017 5:00 am    Post subject: Reply with quote

nap wrote:
Thanks for the guidance and I will look into the links provided and go from there.

-------

cwr: I am in Australia, but the USB offer seems like it would make life a _lot_ easier. I am happy to pay for postage if you're prepared to send it to me here.

Cheers,
Nap


You can create an account with https://mega.nz/, upload the files and send the login details by private message to "nab". "nab" can then fetch the files from mega.nz.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Sun Sep 03, 2017 8:52 am    Post subject: Reply with quote

cwr/nap

I'll host that 12G of stuff if you want.

SwifT also keeps old portage snapshots
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1955

PostPosted: Sun Sep 03, 2017 12:45 pm    Post subject: Reply with quote

Neddy - can you confirm you are in the UK? If so, can you read an ext4 filesytem
on a sata2 2.5 drive? I've got a drive scrapped from a laptop which was being
disposed of; a working drive but no use to me. I can put a set of complete annual
Gentoo distros (Gnome 2.x desktop) from 2005 to 2014 on the drive, for you
to use as you wish. I don't want the drive back.

If that all makes sense, then email me (cwrseckford at gmail.com) with your
snail mail address, and I'll stick the drive in the mail.

nap - I've actually got a web site I haven't used for a number of years. I'll
sort it out tomorrow, and while I haven't the bandwidth to upload 12G I can
upload the kernel sources and possibly a portage snapshot. When I've done
that I'll post the address, whatever it is. Perhaps Neddy can supply you with
the full setup in due course.

Will
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Sun Sep 03, 2017 2:16 pm    Post subject: Reply with quote

cwr,

Yes I'm in the UK. My forums position is rounded to the nearest integer in Lat and Long, I'm not in the middle of the Forth :)
I can read most things one way or another. SATA won't be an issue.

I'll email my snail mail address as you requested.

nap,

Can you download 12 G OK?
It will be on my server. All that says is the default "It works!"
I'll make a link when I upload stuff.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1955

PostPosted: Mon Sep 04, 2017 10:05 am    Post subject: Reply with quote

Neddy - I've got your address, and will put the drive in the post tomorrow.
FWIW, it will boot a current Ubuntu 16.04 LTS, and possibly Gentoo 2010
using a 2.32 kernel. The Ubuntu setup is pretty portable, but I don't know
about the Gentoo kernel. It boots on my Thinkpad T61 ...

Will
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Wed Sep 06, 2017 12:16 pm    Post subject: Reply with quote

cwr,

Your parcel arrived this morning. LVM is a wonderful thing, I found some space I had forgotten all about.Your sda8, all the old Gentoo stuff, is uploading as I write.
I've removed the readme file.

Its not public yet, do you want a last look round before I put it on the web?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1955

PostPosted: Thu Sep 07, 2017 12:13 pm    Post subject: Reply with quote

No, all personal information should have been cleared out. One point is that
after I sent it I was messing around with the 2.6.32 (Gentoo 2010) setup and
found there was a later kernel patch and ebuild, for 2.6.32-r40 in the 2011
portage snapshot. Whether it's worth adding to the 2010 setup I don't know.

All genpatches, as you probably know, are at:
https://dev.gentoo.org/~mpagano/genpatches/tarballs

What I meant to check, and didn't, was the 2.6.33 kernel stuff in the 2011
snapshots. I still have a 2010 system running, so I concentrated on that.

Will

The penny has just dropped that OP is running a _realtime_ kernel. That's
not something I've ever looked at; didn't Gentoo have an RT version at
some stage? If so, where are the patches?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Sat Sep 09, 2017 2:55 pm    Post subject: Reply with quote

nap,

The old stuff that cwr provided is on the web. Please check your PM.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
nap
n00b
n00b


Joined: 18 Aug 2017
Posts: 8

PostPosted: Fri Dec 08, 2017 2:16 pm    Post subject: Reply with quote

@Neddy & @cwr: Thank you for organising the repo. I have downloaded the entire 'old_gentoo' folder that Neddy setup and have attached its contents to the web server running on my Mac. The Aldebaran VM is able to access this repository via wget.

I will read the handbook to get a better understanding of what the general procedure is, but I think I will initially attempt to get the Aldebaran VM to allow me to build the various tools that its missing.

Neddy mentioned that I should not use emerge-webrsync or emerge --sync since that will update emerge/portage to the lastest Gentoo repository (not what I want).
My /etc/make.profile currently symlinks to: /usr/portage/profiles/default/linux/x86/10.0, so I assume this means that its pointing to the 2010.0 files, though I'm not sure if that's the DISTFILES or GENTOO.

The kernel/cpu version the robot is running is:
Linux <hostname> 2.6.33.9-rt31-aldebaran-rt #1 SMP PREEMPT RT Thu Aug 27 21:42:34 CEST 2015 i686 Intel(R) Atom(TM) CPU Z530 @ 1.60GHz GenuineIntel GNU/Linux

I think the 1st thing I would like to build/install is iwconfig. I'm not quite sure yet if this is possible as there may be kernel build settings that might prevent it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39297
Location: 56N 3W

PostPosted: Fri Dec 08, 2017 2:46 pm    Post subject: Reply with quote

nap,

Everything in /usr/portage comes from the portage repo you install there.
Exceptions being distfiles/ and packages/
You can move both of those out of /usr/portage with settings in make.conf

If you want to use emerge --sync, you should set up an rsync server on your mac then point portage to sync against that.
The rsync server will serve one of the downloaded snapshots.
What you need to avoid meanwhile is getting a current /usr/portage.

/usr/portage/profiles/default/linux/x86/10.0 comes from the portage snapshot.
The 10.0 means the first profiles from 2010.

Thu Aug 27 21:42:34 CEST 2015 is the build time of the kernel on the robot. The files in /usr/portage/metadata/ give useful information about your snapshot.
As the kernel is from 2015, you might not need to go back to the 2010..2013 era.
New profiles were introduced in 2013 and will be retired soon.
You may be able to fast forward to 2013 or so.

The closer you get to present day, the less pain you will have reconstructing an old system.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum