How to obtain the full Hijack source tree

Posted by: mlord

How to obtain the full Hijack source tree - 21/03/2003 06:53

From far too many emails:
How do I obtain the Hijjack source code?
What do I do with these "patch" files?

Please don't take this the wrong way -- I'm really not mean, but..

I prefer not to have to instruct in the art of applying patches
to every newcomer to Linux -- it takes too much of my time
and became more tedious after the first thousand or so.

If one were to ask about this on the BBS, I'm sure several people
who have not already answered questions like this a thousand times
or more might be able to help better. The instructions on how to apply
patches are actually in the Linux kernel source tree, as well,
but few bother to look for them there.

When I answer general queries like this is in private email,
then nobody else gets to see the answer, so I eventually get
even more of these emails. And the people who ask very basic
questions like this, generally come back with more questions
on how to install/run/tune linux, and where to find the tools
to cross-compile for the StrongARM, how to install/run them,
how to actually configure/build the Empeg kernel, how to download
it to a player and test it, etc..

I can (and do) answer all of those questions and more,
but thousands of people continuously email such questions
to me all of the time (not just for Empegs, I'm one of the original
Linux kernel developers and have been doing this for over a decade).

Now.. the answer to the original query.

The idea is to first "un-tar" the full kernel source tree,
and THEN apply the patches to that tree.

First, install Linux. I won't help with this part.

Next, download the following files from the Hijack site:

http://empeg-hijack.sourceforge.net/linux-v2.00b13.tar.bz2
http://empeg-hijack.sourceforge.net/rdsfake.patch
http://empeg-hijack.sourceforge.net/voladj.patch
http://empeg-hijack.sourceforge.net/v300.hijack.v200b13.patch
http://empeg-hijack.sourceforge.net/v320.hijack.v200b13.patch

Now, un-tar the kernel source tree:

tar xjf linux-v2.00b13.tar.bz2

Then apply the patches, in sequence:

cd linux-v2.00b13
patch -p0 <../rdsfake.patch
patch -p0 <../voladj.patch
patch -p1 <../v300.hijack.v200b13.patch

Pause here to save a snapshot of the work thus far,
since any new Hijack versions will be fresh patches
to be applied to the results of the above stage:

cd ..
mv linux-v2.00b13 linux-hijack-v300
tar cvjf linux-hijack-v300.tar.bz2 linux-hijack-v300/

Now apply the current Hijack version patch (v320):

cd linux-hijack-v300
patch -p1 <../v320.hijack.v200b13.patch

Look for errors:

find . -name \*.rej

Delete any leftover copies of original files that were later patched:

find . -name \*.orig -exec rm {} \;

To actually compile and download the resulting binary to an Empeg
requires an entirely different skill/knowledge set, and again,
people on the BBS can help there.

Cheers
Posted by: simspos

Re: How to obtain the full Hijack source tree - 21/03/2003 07:10

Firstly, I'm not one of the people who has contacted you and I also have next to zilch Linux experience, but I would like to say that meaningful & encouraging posts like this make me want to give it a go.

So, "Big UP" (that's a compliment by the way ) to you for taking the time to do this (and all the other empeg related stuff).

Now for some questions...........



........... ONLY JOKING

Cheers, Sim
Posted by: wfaulk

Re: How to obtain the full Hijack source tree - 21/03/2003 07:27

I'd just like to point out that not all tar implementations do bzip2 compression the same way. Some use the `j' flag you've specified. Some use `I' (capital `eye'). Some have no such option at all.

So, folks, if your ``tar xjf linux-v2.00b13.tar.bz2'' fails, then try replacing the `j' with an `I'. If that fails, try ``bzip2 -dc linux-v2.00b13.tar.bz2 | tar xf -''. If that also fails, go find and install a copy of bzip2.

The same sort of advice goes for creating the tar file. The first suggestion is the same: replace the `j' with an `I'. This will only work if it worked for you above. If you have to do the other one, the proper command would be ``tar cf - linux/ | bzip2 -c > linux-hijack-v300.tar.bz2''.
Posted by: cushman

Re: How to obtain the full Hijack source tree - 21/03/2003 07:40

If enterprising people were to search the BBS thouroughly, they would find this post which explains the process of building the Hijack kernel end to end. Your instructions are more detailed around patching the kernel, though. Maybe Loren could combine the two posts and stick this in the FAQ for Hijack.
Posted by: mdavey

Re: How to obtain the full Hijack source tree - 21/03/2003 07:51

Firstly (and I suspect mlord gets almost as many thnak yous as newbie questions, but I'll say it all the same ) a huge thanks to mlord for his great work with the hijack kernel and with generally being a nice guy (as evidenced by his frequent replies to posts here). We really do appreciate you and don't think you are at all mean.

Now a question for the BBS in general. When it comes to applying the first patch, I get:


linux-v2.00b13 $ gpatch -p1 <../rdsfake.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- arch/arm/special/empeg_rds.c.orig Wed Dec 26 14:08:15 2001
|+++ arch/arm/special/empeg_rds.c Wed Dec 26 14:18:17 2001
--------------------------
File to patch:


I should point out that I didn't follow mlord's instructions fully as I am using Solaris/SPARC. On my system, GNU patch is called gpatch. I'm using version 2.5.4. Are there other Solaris users out there that are successfully patching and hacking Empeg? If so, did you do anything special?
Posted by: mlord

Re: How to obtain the full Hijack source tree - 21/03/2003 08:02

Mmm.. I hadn't noticed before, but both the rds and voladj patches (which I got from others) do not follow the usual linux patching regime.

Just use -p0 instead of -p1 with those two patches.

Instructions above now reflect this.

Cheers
Posted by: mdavey

Re: How to obtain the full Hijack source tree - 21/03/2003 09:32

In reply to:


To actually compile and download the resulting binary to an Empeg
requires an entirely different skill/knowledge set, and again,
people on the BBS can help there.




You'll need a compiler.
RioCar.org has downloads for a Solaris cross-compiler and a DIY compiler-compiler. See this thread for more information on the DIY compiler-compiler.

If you aren't running on x86-linux, you'll need to manually recompile some of the executables used during the build:
cd scripts && mv mkdep mkdep.orig && cc-o mkdep mkdep.c &&
mv split-include split-include.orig && cc -o split-include split-include.c && cd ..
Note, we used the hosts cc, not the cross-compiler in the above step.

Next, you'll need to compile the code.
This thread gives both instructions and a nify proggy to help you. You'll need to tweek it to use the latest file names.
Posted by: tfabris

Re: How to obtain the full Hijack source tree - 21/03/2003 11:22

Hey, Loren... Link this thread from the Hijack FAQ, willya?
Posted by: Daria

Re: How to obtain the full Hijack source tree - 21/03/2003 12:07

What, you don't actually apply the patches?

(I got burned recently on a non-portable diff I generated. Oh well, at least it wasn't in a release...)
Posted by: Shonky

Re: How to obtain the full Hijack source tree - 21/03/2003 22:06

I went off searching for my post before I click on the link in your Glad more than one found it useful...
Posted by: canuckInOR

Re: How to obtain the full Hijack source tree - 21/03/2003 22:41

both the rds and voladj patches (which I got from others) do not follow the usual linux patching

Ahhh.... that explains that, then. I couldn't figure out what was going on when I set up my tree last year. I ended up hand patching those two. Yuck!
Posted by: cushman

Re: How to obtain the full Hijack source tree - 21/03/2003 23:01

Yes, I've linked to your post from my webpage on Palantir, too. It gives very clear steps on how to build yourself a kernel, and I've suggested more than once that it be placed in the Hijack FAQ.
Posted by: decay

Re: How to obtain the full Hijack source tree - 22/03/2003 03:52

Oh. I never knew there was a Hijack FAQ.

Could this link be added to the Quick Links section of the top-banner?

Now reading the whole FAQ and up to customize a bit! d=)
Posted by: tfabris

Re: How to obtain the full Hijack source tree - 22/03/2003 09:35

Could this link be added to the Quick Links section of the top-banner?
It already is. The very first one. (Hijack FAQ is a sub-section of the empeg FAQ.)
Posted by: foxtrot_xray

Re: How to obtain the full Hijack source tree - 22/03/2003 13:01


...snipped...

Mark, we all really appreciate everything you've done - and that's not just for the Empeg, either. (My company moved all their Dialer systems from SCO Unix to Linux because of the advantages, and because of that move, I've started learning C, I've actually *made* a core producrt FOR our Dialers that USE C... I don't need to go on.)
On TOP of that, you're doing Tuner Kits (last I heard, anyways..), LED conversion solderings (assuming people get the buttons..), and on top of that, keeping Hijack up to date, *AND*, the Docking stations! (FTR, I want to know when you have time to eat and sleep?!)
I'm NOT an expert at anything Linux (Databases, on the other hand..) but I was able to learn how to apply patches, compile programs, and do all the fun stuff<tm> by trial and error.. I think all the 'easy use' of Windows and such has made the 'average intelligence level' of the computer user lower. (Whatever happened to Bang paths? UUCP E-mail and News? Command Prompt?! For kicks, my PC at work runs Windows, but it boots up with a Commodore C=64 boot up screen, with a "LOAD 'WINDOWSXP',8,1" on it. That gets more laughs than anything..)
I, on the other hand, have yet to add anything to the Empeg community. Hopefully that will change a little bit when I get the PCVB made for the Serial->TTL done. (However, in the meantime, if anyone needs a Database designed, created, updated, maintained, or, a road sign, ask!)
In either case, again, I'm pretty sure everyone here appreciates what you've done. I never knew you were /that/ involved with the linux kernel and such - now I feel like a doltz for the few e-mails I've sent you. (But, I hope that $50 made up for it.) :>

Anyways, keep up the good work, man!
Me.
Posted by: foxtrot_xray

Re: How to obtain the full Hijack source tree - 22/03/2003 13:03


It already is. The very first one. (Hijack FAQ is a sub-section of the empeg FAQ.)

Hey... I think we need a FAQ of FAQs... What other FAQs are sub FAQs of the main FAQ??

Me, FAQ'in off.
(Sorry.)
Posted by: mlord

Re: How to obtain the full Hijack source tree - 22/03/2003 16:31

Alright already!

Enough of the lovefest.. let's all just get back to normal here (normal, us?)

Cheers!
Posted by: foxtrot_xray

Re: How to obtain the full Hijack source tree - 24/03/2003 12:15


(normal, us?)

Us, Normal = Hijack Requests.
Enjoy the time off.

Me.