LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-24-2008, 01:33 AM   #16
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612

I don't have a slack build script for that, but here are the options I use to configure with:

--disable-auto-linux-mem-opt --disable-minix --disable-md5-password --disable-hercules --disable-serial --disable-packet-retransmission --enable-pci-direct --enable-preset-menu=preset_menu.lst

I have also compiled with diskless network boot support without problems, including support for several common ethernet cards. You may wish to leave out the pci-direct or linux-mem options.

As for the splashimage, the one I use is not compresssed -it just has the gz suffix. Apparently this is necessary for them to load. Some other images I have seen *are* compressed. Either way, they need the gz suffix. See the note above from osor about the 14 colors. I haven't tested many of these images lately -it has just occured to me that there may be a difference in the feature implementation so that with one patch the images can really be compressed and with another patch they cannot. Note that there have been three pretty distinct graphics patches among the different distros. Try using my image as-is to be sure there is not some other problem.
 
Old 05-24-2008, 11:10 PM   #17
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Well, this is disappointing. I added the options you listed, recompiled, no errors, installed and again ran grub-install, but no splash image.

I must be missing something terribly obvious. Running grep splash /boot/grub/stage2 is always empty. For whatever reason the diff files are not being merged or have no effect.

I'll welcome any ideas....

Quote:
As for the splashimage, the one I use is not compressed -it just has the gz suffix.
Oh, okay. I opened the file through an image viewer rather than letting karchive automatically try to open. The image is fine. Same image that I downloaded from another site, but compressed. A nice image that I wish worked here --- and I tried your (uncompressed) version too.
 
Old 05-25-2008, 02:54 AM   #18
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Aha! This crossed my mind the other day and I meant to mention it, but then it slipped my mind...
When you patch sources and new files are added new references to these files are added to the Makefile.am and Makefile.in(and sometimes to the configure.in). But simply running ./configure in the sources does not update these files.

You need to recreate all the conf files -the easiest way to do (and remember how to) is to run 'autoreconf -if' in the sources before running the configure script. This will do the right thing about 95% of the time. You could also do it like this:
aclocal -I., automake, autoheader, automake -a --force --copy --foreign, autoconf
and maybe 'libtoolize' as well. there are other combinations as well -you don't alwas need all that. If there is an autogen.sh script in the sources, run that instead of running the commands manually or look at it to see which commands are being used.
autoconf is the main one which is missing in this case, but you have to run aclocal first anyway, so go through the list. Also make sure to remove any config.cache files, .dep directories, autom4te.cache directories and config.status files in the sources

The need for this can sometimes be avoided by directly editing the configure script, but thit is not really the right way to patch stuff. When patching conf files, only the configure.in/ac and Makfeile.am should be patched. Running automake then creates the Makefile.in files and autoconf creates the new configure script.

You can demonstate all this to yourself in this case. After patching the sources, run './configure --help' and *notice* that there is no option for '--enable-graphics'. Then, run the commands as above and re-run './configure --help', now you should see the '--enable-graphics' option.

Don't feel bad, I had the same trouble more than once when working on the patches and forgetting to update the conf files.

Here's a block of code from src2pkg which shows a typical list of commands:
Code:
[[ -d $CONFIG_DIR/autom4te.cache ]] && rm -rf $CONFIG_DIR/autom4te.cache
[[ -d $CONFIG_DIR/.deps ]] && rm -rf $CONFIG_DIR/.deps
[[ -f $CONFIG_DIR/.deps ]] && rm -f $CONFIG_DIR/.deps
[[ -f $CONFIG_DIR/config.status ]] && rm -f $CONFIG_DIR/config.status
[[ -f $CONFIG_DIR/config.cache ]] && rm -f $CONFIG_DIR/config.cache
cd $CONFIG_DIR ;
# automake
aclocal -I . 2> /dev/null 1> /dev/null 
autoheader 2> /dev/null 1> /dev/null 
# automake --add-missing --copy --foreign 2> /dev/null 1> /dev/null
automake -a --force --copy --foreign 2> /dev/null 1> /dev/null
autoconf 2> /dev/null
That's just one section of what src2pkg does in these cases. The whole routine is pretty complex, because sometimes running some of these commands will *destroy* wnated changes. src2pkg lists all files which are patched and if the configure script has been patched directly, it does not run these commands -sometimes people create patches which make changes to the configure script which are not 'mirrored' in the confgure.in file. In these cases, running autoconf would destroy the changes in configure. When it seems to be recommended, src2pkg runs autoreconf -if first and only runs the above list if autoreconf has failed. It also throws in an extra autoconf after running autoreconf -sometimes autoreconf returns an error and fails to run autoconf as the last command so we run it an extra time to be sure.

If you use src2pkg it will create a pretty good package for you simply by placing the pactches in the same dir with the sources. I said I don't have a SlackBuild for grub, but I do use src2pkg to create grub packages, though I have never gotten around to doing the final tweaks to the grub.src2pkg script which are so important for such a program.
 
Old 05-25-2008, 11:57 AM   #19
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Okay! Success! As the young folks nowadays say --- woot!

Quote:
Aha! This crossed my mind the other day and I meant to mention it, but then it slipped my mind...
I know the feeling! To paraphrase an old joke, someone once asked me if I believe in the hereafter. I replied, "I sure do --- every time I walk into a room I have to ask myself, 'Now, what am I here after?'"

Quote:
You need to recreate all the conf files -the easiest way to do (and remember how to) is to run 'autoreconf -if' in the sources before running the configure script.
Okay, the water is getting less muddy! Last night I found a grub slackbuild script at slacky.eu for version 11.0, and that script contained the commands autoconf, aclocal, automake. Those additional commands ini my build script failed to produce a splash image, although I likely did not implement correctly.

Quote:
Here's a block of code from src2pkg which shows a typical list of commands:
I modified and added your commands to my build script.

Quote:
After patching the sources, run './configure --help' and *notice* that there is no option for '--enable-graphics'. Then, run the commands as above and re-run './configure --help', now you should see the '--enable-graphics' option.
I ran the following command on the unpatched files:

grep graphics ./configure

Nothing --- as expected.

Next, in my build script, which is a modified stock Slackware build script from extras, I temporarily added an exit command before the .configure command. I added your mods as previously described. I ran the build script and again grepped the configure file. I did not find the --enable-graphics command. My grep results:

--disable-graphics disable graphics terminal support
# Check whether --enable-graphics was given.
if test "${enable_graphics+set}" = set; then
enableval=$enable_graphics;
if test "x$enable_graphics" != xno; then


I searched the diff file and the phrase --disable-graphics is added, not --enable-graphics. I'm not nit-picking! Your explanation still makes sense in context, but I thought I'd clarify for future visitors of this thread.

Since the --disable-graphics option is not in my build script, I presumed the splash image support was enabled by default. I therefore ran the build script in entirety, installed the package, ran grub-install /dev/hda, and grepped the stage2 file for the word splash. Finally! I received the message Binary file /boot/grub/stage2 matches.

Of course, the final test was rebooting. Gilbert, you brought a fine smile to my face!

Quote:
Don't feel bad, I had the same trouble more than once when working on the patches and forgetting to update the conf files.
I don't feel bad --- I have way too much to learn about compiling software!

Anyway, for those who prefer to use a modified Slackware build script I intend to post a mini how-to at my web site, along with my modified build script and a link to this thread.

My apologies for not trying src2pkg. I have your package downloaded, but with a new box, I have many items on my to-do list. The list shrinks significantly each weekend and eventually that will mean more time to experiment with src2pkg. However, I still need to find a how-to to understand the basics of compiling software (big picture stuff). Although I realized the patches were not merging, I never would have figured out to remake the config files as you explained. Then again, now I've been exposed to the idea and will be more aware in the future.

This was a very productive thread. Thanks much Gilbert!
 
Old 04-13-2009, 06:21 AM   #20
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo
Posts: 43

Rep: Reputation: 18
Question Patches are not working well

Hello i work with slack12.2 and followed the suggestions above.

After applying the first patch (cvs-sync.diff) I tried the splashimage.diff.
I got this back:
Code:
can't find file to patch at input line 2310
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./docs/grub.texi.graph_tex 2007-10-10 09:06:46.000000000 +0200
|+++ ./docs/grub.texi   2007-10-10 09:08:09.000000000 +0200
I did:
Code:
patch -p0 < 02-splashimage.diff
I searched via google, on this and other forums, but I can't find a solution.

- Does anyone have a grub pkg with splash support?
- Or does anyone knows where to find working patches for the grub 0.97?

I can not write build scripts by myself like Woodsman did, I have really no idea where he is talking about or what to do and where exactly. It is too misty for me.

Or give me a step by step explanation how this works and not a vague story like above (sorry, I don't want to insult anyone, but I really have NO idea).

Thanks in advance!
 
Old 04-13-2009, 01:09 PM   #21
larryhaja
Member
 
Registered: Jul 2008
Distribution: Slackware 13.1
Posts: 305

Rep: Reputation: 80
Quote:
Originally Posted by henkees View Post
Code:
can't find file to patch at input line 2310
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./docs/grub.texi.graph_tex 2007-10-10 09:06:46.000000000 +0200
|+++ ./docs/grub.texi   2007-10-10 09:08:09.000000000 +0200
I did:
Code:
patch -p0 < 02-splashimage.diff
It should be:
Code:
# patch -p1 < 02-splashimage.diff
That's how it is in my slackbuild.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub splash image themanwhowas Linux - Software 1 02-21-2006 06:49 AM
Grub splash image hfawzy Linux - General 3 08-13-2005 06:16 AM
GRUB Splash crud Slackware 3 07-04-2005 02:32 PM
Grub and splash-image Harp00 Slackware 1 11-10-2004 06:23 PM
Splash screen for Grub nabil Linux - General 15 05-08-2002 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration