xconfig notebook strategy needed

xconfig notebook strategy needed

Post by Ed Skinne » Tue, 02 Apr 2002 23:13:46



     I have a notebook running Red Hat 7.1 (Linux 2.4.9-something at the
moment). I've always used the kernels supplied by Red Hat because,
whenever I've tried to configure my own (make xconfig, etc.), I end up
with something that crashes (probably missing something essential or
having something mis-configured), or something that is missing so many
pieces as to be mostly useless.
     Is there a general strategy I can follow that will allow me to 1)
configure a minimal kernel for my system that will (without too much bit
twiddling) boot and give me a shell prompt and let me do a few commands,
and then 2) start configuring in additional pieces, one at a time, to
verify each of them actually works?
     It's the pursuit of #1 that has frustrated me so far. Pointers and
tips would be most appreciated.

--

 
 
 

xconfig notebook strategy needed

Post by Faux_Pseud » Wed, 03 Apr 2002 06:32:34


--(Once apon a time, in comp.os.linux,)--
                --(Ed Skinner said it like only they can.)--

Quote:>      I have a notebook running Red Hat 7.1 (Linux 2.4.9-something at the
> moment). I've always used the kernels supplied by Red Hat because,
> whenever I've tried to configure my own (make xconfig, etc.), I end up
> with something that crashes (probably missing something essential or
> having something mis-configured), or something that is missing so many
> pieces as to be mostly useless.
>      Is there a general strategy I can follow that will allow me to 1)
> configure a minimal kernel for my system that will (without too much bit
> twiddling) boot and give me a shell prompt and let me do a few commands,
> and then 2) start configuring in additional pieces, one at a time, to
> verify each of them actually works?
>      It's the pursuit of #1 that has frustrated me so far. Pointers and
> tips would be most appreciated.

Lets work on number one.

Move the stock redhat kernel to /boot/vmliuz.stock

Add the following to your /etc/lilo.conf

image = /boot/vmlinuz.stock
        root = /dev/hda3  # replace this with the correct dev
        label = stock  
        read-only

First we are going to start with a stock kernel config file.

from inside your kernel dir
cp arch/i386/defconfig .config
This way we make sure you are not building on your prior misstaks.

Second start by makeing sure you are makeing the kernel correctly
we will use the following script to make sure you haven't missed
anythiing.

#!/bin/bash
# jvs script + faux_pseudo
#  march 2002

if [[ ! -d $1 ]] ; then
   echo "you must suply the path you want to use to make the kernel in
i.e /usr/src/linux would be the standerd answer
Or you may want to uniqly name the kernel by
moving that dir to /usr/src/linux.2.4.2.nofb for example and then
rerun this"

   Usage $(basename $0) /usr/src/linux/"

   exit 1
else
  cd $1
fi

XX=XXXXXXXXXXXXXXXXXXXXXXXXX
SPACES="                            "

echo -e "\n\n$SPACES make clean\n\n"
sleep 1
make clean
OK=$?
if [ $OK != 0  ]
 then
  echo "$XX make clean failed $XX"
  exit 1
fi

if [ ! -f .config ] ; then
   echo -e "\n\n$SPACES make mrproper\n\n"
   # I still have no idea what this does other than wipe out a .config
   # but its in the directions so its here
    make mrproper
    OK=$?
  if [ $OK != 0  ]
    then
     echo "$XX make mrproper $XX"
      exit 1
  fi
fi

echo -e "\n\n$SPACES make menuconfig failed\n\n"
sleep 1
make menuconfig
OK=$?
if [ $OK != 0  ]
 then
  echo "$XX make menuconfig failed $XX"
  exit 1
fi

echo -e "\n\n$SPACES make dep\n\n"
sleep 1
make dep
OK=$?
if [ $OK != 0  ]
 then
  echo "$XX make dep failed $XX"
  exit 1
fi

echo -e "\n\n$SPACES make bzImage\n\n"
sleep 1
make bzImage
OK=$?
if [ $OK != 0  ]
 then
  echo "$XX make bzImage failed $XX"
  exit 1
fi

if grep CONFIG_MODULES\=y .config 1>/dev/null ; then
# I like monolithic kernels

 echo -e "\n\n$SPACESmake modules\n\n"
 sleep 1
 make modules
 OK=$?
 if [ $OK != 0  ]
  then
   echo "$XX make modules failed $XX"
   exit 1
 fi

 echo -e "\n\n$PACES make modules_install\n\n"
 sleep 1
 make modules_install
 OK=$?
 if [ $OK != 0  ]
  then
       echo "$XX make modules_install failed $XX"
       exit 1
  fi
fi

echo -e "\n\n$SPACESmake install\n\n"
sleep 1
make install
OK=$?
if [ $OK != 0  ]
 then
  echo "$XX make INSTALL failed $XX"
  exit 1
fi

# because some people don't change their lilo
# file before running make install
echo "                      All Completed.
                    If you have not already edited
                            /etc/lilo.conf
                         as needed please do
                       and run lilo afterword"

If you do not know how to make that a exacutabl script let me know

Now that we have that out of the way we can realy mess things up and
not worry about fubaring your system.

Now run the script.  If you do not know what an option does by hart
check the help for it and in most cases it will tell you if you need
this or not.  If it says "good idea" or anything like that then say
yes.  Now if you don't get a working kernel from this you have other
issues that need addressing.  If it boots correctly then start
removing a hand full of options at a time from the working config
until it breaks.  Why do it the long way like this?  Because thats how
you learn.  I built many many kernels with realy strange bugs in my
early days.  who whould have thought that pts support would be handy?
=).  
Now I could probably cross compile you a kernel if I knew what type of
system you had and then ftp it for you with out ever having typed on
your computer based on the experiance I got from this style of
learning.  Hands on is the way to learn.  

--

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson
UIN=66618055

 
 
 

xconfig notebook strategy needed

Post by Ed Skinne » Fri, 05 Apr 2002 02:54:10


Faux_Pseudo wrote, in part:

Quote:

> --(Once apon a time, in comp.os.linux,)--
>                 --(Ed Skinner said it like only they can, in part.)--
> >      I have a notebook running Red Hat 7.1 (Linux 2.4.9-something at the
> > moment). I've always used the kernels supplied by Red Hat because,
> > whenever I've tried to configure my own (make xconfig, etc.), I end up
> > with something that crashes (probably missing something essential or
> > having something mis-configured), or something that is missing so many
> > pieces as to be mostly useless.
> > [truncated]

> Lets work on number one.
> [truncated: basically start with arch/i386/defconfig and then work forward]

     I spent a couple of hours yesterday starting from that point, but
then working my way backwards when it crashed during bootup. There were
no apparent error messages in the boot sequence so I started removing
major subsystems, rebuilding and rebooting. I can now get to single-user
mode (in an odd sort of way). The last component removed, and the one
which appears to have been the stumbling block, was the "PCMCIA/Cardbus
Support". Now, when I boot that kernel (with PCMCIA and the other pieces
removed including USB, Networking, Plug & Play, SCSI and Sound), I see
the "Welcome to Red Hat Linux" and "Press 'I' to enter interactive
setup" (coming from /etc/rc.d/rc.sysinit) but, after that, the only
thing that elicits a reaction from the system is when I type a ^C which
takes me to a shell prompt.
     My machine is a Sony PCG-F580 notebook. I didn't see any special
considerations for the PCMCIA slot in the information at
http://www.linux-laptops.net/ and the kernel from Red Hat (configured
and built by them) has PCMCIA support turned on. (My network card is
plugged in there and I'm using it to send this message.) I've never
dabbled in that area so I'm somewhat at a loss on how to proceed. For
example, are there other PCMCIA/Cardbus implementations -- maybe I'm
getting the wrong driver? From /proc/pci it appears the hardware chip is
a Ricoh Co Ltd RL5c478 "CardBus bridge". But grep'ing through the
[cC]onfig.in files and Documentation/Configure.help, I can't find any
mention of that device.
     Any suggestions? I feel like I might be on a wild goose chase and
headed in the wrong direction. How can I get more diagnostics out of the
system, or do you think I'm using the wrong approach and should do
something else?
     Thanks...
 
 
 

xconfig notebook strategy needed

Post by Faux_Pseud » Fri, 05 Apr 2002 06:44:14


--(Once apon a time, in comp.os.linux,)--
                --(Ed Skinner said it like only they can.)--

Quote:> Faux_Pseudo wrote, in part:

>> --(Once apon a time, in comp.os.linux,)--
>>                 --(Ed Skinner said it like only they can, in part.)--
>> >      I have a notebook running Red Hat 7.1 (Linux 2.4.9-something at the
>> > moment). I've always used the kernels supplied by Red Hat because,
>> > whenever I've tried to configure my own (make xconfig, etc.), I end up
>> > with something that crashes (probably missing something essential or
>> > having something mis-configured), or something that is missing so many
>> > pieces as to be mostly useless.
>> > [truncated]

>> Lets work on number one.
>> [truncated: basically start with arch/i386/defconfig and then work forward]

>      I spent a couple of hours yesterday starting from that point, but
> then working my way backwards when it crashed during bootup. There were
> no apparent error messages in the boot sequence so I started removing
> major subsystems, rebuilding and rebooting. I can now get to single-user
> mode (in an odd sort of way). The last component removed, and the one
> which appears to have been the stumbling block, was the "PCMCIA/Cardbus
> Support". Now, when I boot that kernel (with PCMCIA and the other pieces
> removed including USB, Networking, Plug & Play, SCSI and Sound), I see
> the "Welcome to Red Hat Linux" and "Press 'I' to enter interactive
> setup" (coming from /etc/rc.d/rc.sysinit) but, after that, the only
> thing that elicits a reaction from the system is when I type a ^C which
> takes me to a shell prompt.
>      My machine is a Sony PCG-F580 notebook. I didn't see any special
> considerations for the PCMCIA slot in the information at
> http://www.linux-laptops.net/ and the kernel from Red Hat (configured
> and built by them) has PCMCIA support turned on. (My network card is
> plugged in there and I'm using it to send this message.) I've never
> dabbled in that area so I'm somewhat at a loss on how to proceed. For
> example, are there other PCMCIA/Cardbus implementations -- maybe I'm
> getting the wrong driver? From /proc/pci it appears the hardware chip is
> a Ricoh Co Ltd RL5c478 "CardBus bridge". But grep'ing through the
> [cC]onfig.in files and Documentation/Configure.help, I can't find any
> mention of that device.
>      Any suggestions? I feel like I might be on a wild goose chase and
> headed in the wrong direction. How can I get more diagnostics out of the
> system, or do you think I'm using the wrong approach and should do
> something else?
>      Thanks...

What is it that you are chasing?  Why is it that the standerd kernel
is not meeting you needs?  Start with the basics and tweek just one
aspect at a time.

PCAMCI support can be compiled on the side with the pc-pcmcia package
you can get on any linux software site.

--

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson
UIN=66618055