LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9 (https://www.linuxquestions.org/questions/red-hat-31/red-hat-custom-kernel-compilation-mini-how-to-for-red-hat-8-9-a-91503/)

IBall 04-11-2007 04:37 AM

Make sure that you compile in the correct USB modules in the kernel.

Is there any reason why you are using RH9? This is very, very old now and is unsupported. It no longer receives security updates.

You would be much better off installing a newer, supported version of Linux. Fedora is the successor to free Redhat distros, the current release is version 6 and 7 will be released soon. Alternatively, try Ubuntu or openSuse.

IMNSHO, you are wasting your time with RH9 unless you have a really specific reason why you need it.

--Ian

Thetargos 04-11-2007 11:37 AM

The problem might have to do with the options for the HID portion of the USB subsystem, you might as well want to check that with menuconfig.

gauchy 04-11-2007 08:10 PM

I did chose the USB HID support:
-------------------------------
USB support-->
---USB Human Interface Devices(HID)
[M] USB HIDBP Keyboard(basic) support
[M] USB HIDBP Mouse(basic) support
--------------------------------
and I found some messages in boot messages:
-----------------------------------
keytable: Loading keymap
kernel: Console: colour dummy device 80x25
keytable:[
keytable:
keytable: Loading system font:
keytable: ^[(K
keytable:
keytable: /sbin/setsysfont: line 40: /dev/console: No such device
rc: Starting keytable: succeeded
..
: USB HID v1.10 Keyboard [CHESEN USB Keyboard] on usb1:2.0(original RH9 has input0 before :)
usb-uhci.c: interrupt, status 2, frame# 665
: USB HID v1.10 Mouse [CHESEN USB Keyboard] on usb1:2.1(original RH9 has input1 before :)
...
usb.c: registered new driver keyboard
...
usbkbd.c: :USB HID Boot Protocol keyboard driver
-----------------------------------------
then I thought the keytable was loaded and registered keyboard driver, but why the keyboard didn't work?
BTW: why I use RH9.0?
because my boss asked me to develop my programs on RH9.0, then I have no choice! I use openSUSE10.2 as my desktop!
the reason I want to recomplie RH9.0 is I have changed my boot logo as bootsplash done, but not used bootsplash, I followed this patch which Jason McMullan had pasted: http://www.uwsg.iu.edu/hypermail/lin...10.0/0515.html and I recompile the source, then the usb keyboard didn't work!
In order to test if my changes made the mistake, I reinstalled the kernel-source* in my RH9.0, changed nothing and compiled it, the problem was the same! then the problem is not relation to my codes.
I guess the reason maybe the usb modules, which probe usb devices, on the normal RH9.0, I can plug out and plug in keyboard, it works well, but my recompiled kernel don't know the keyboard, then the usb probe doesn't work? that's right?
I'll set my login screen to autologin, then I can use mouse to see the modules loaded on my recompiled kernel.

Thetargos 04-11-2007 08:33 PM

Read the documentation, it clearly states that unless you really have a good reason to, never to build the HID basic support either into the kernel or as modules, as that will limit the functionality of your devices. I'm pretty sure in this case that's what causing the problems. I could be wrong, but it is worth trying... You *could* runa 2.6 based kernel on that machine, but that would require such an overhaul of other stuff that you may end up braking things up, so unless you had access to an RH9 sand box I wouldn't attempt it... First try disabling those modules.

PS:By HID Basic support I mean HID Keyboard (basic) and Mouse (basic) modules, not the whole HID subsystem!

gauchy 04-11-2007 09:05 PM

thanks to Thetargos, I had done what you said, that was not include supportting USB HID keyboard and mouse in .config, which is the default set in RH9.0, the problem was still on!
like this:
-----------------
USB support-->
---USB Human Interface Devices(HID)
[] USB HIDBP Keyboard(basic) support
[] USB HIDBP Mouse(basic) support
-----------------
keyboard is no response and numlock is off.
I set my RH9.0 autologin just now, and started my recompiled kernel, I used mouse to open hardware navigator in system tools, and I found :
----------------
USB Devices
82801EB USB EHCI Controller #2
82801EB USB (Hub #1)
82801EB USB (Hub #2)
82801EB USB (Hub #3)
...
System Devices
CHESEN USB Keyboard
USB UHCI Root Hub
USB UHCI Root Hub
USB UHCI Root Hub
USB UHCI Root Hub
...
Keyboard
CHESEN USB Keyboard
(information is CHESEN keybdev)
------------------------
If I pull out the usb keyboard, the keyboard item was not on the hardware navigator!
then I think the driver is loaded, and RH9.0 know the keyboard is connected, also keymap is loaded, what's the reason? I'm confused!

Thetargos 04-11-2007 09:09 PM

The USB subsystem in kernel 2.4 was kind of messy. If I may suggest you to grab the latest 2.4(32, I believe) and try to build that instead of trying to rebuild the Red Hat kernel? I had endless problems when trying to build Red Hat specific kernels, and had much more luck with plain vanilla ones, not that you miss any features (unless you require those features, which you could see in the spec file in the kernel src.rpm package, and you may even try to apply those patches by hand and see which ones are the responsible for braking your compilation... Which I'd say is a bit too much of work to do. You should be fine with a vanilla kernel and the patches you need, though.

Edit

What do you know? The latest 2.4 kernel is 2.4.34.2... Try that instead of the ancient 2.4.19 (or 20) Red Hat sports.

gauchy 04-11-2007 09:24 PM

thank you,Thetargos.
I agree with you, but the boss don't care that, he wants to run our program on RH9.0 with less modified sources!
I'll try the other things,thank you!

Thetargos 04-11-2007 09:27 PM

The kernel, even though it is core to any Linux distribution, is far from the most important part, depending what your program(s) have to do, you may find out that gcc and GlibC are a much more sensitive part of the system than the kernel itself. After all, the kernel also gets both linked and built by/against those ;)

gauchy 04-11-2007 10:11 PM

yes, I know that, also I can change the keyboard interface to ps/2.:)

brave heart 04-12-2007 10:35 PM

I want to compile my kernel from 2.4.20 to 2.6.20, after my compile(make bzImage), there is following error message:

Code:

BFD: Warning: Writing section `.bss' to huge (ie negative) file offset 0xc0241000.
objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated
make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2

where is my error reason? can I make this compile passed via modify somewhere?

thanks, :D

brave heart 04-12-2007 10:46 PM

during my compiling process(make menuconfig), I choose default and not change anyplace.

brave heart 04-13-2007 05:19 AM

Please leave my last 2 threads alone. For I found it's big puzzle in kernel 2.6.20 after navigating via google.

I have successfuly got kernal 2.4.20-8 to run. But now I compile with 2.4.34(for my netcard driver) and then I get a problem when I try to boot with that kernal, the screen will stop at here:

Code:

VFS: Cannot open root device "LABEL=/" or 00:00
Pleas append a correct "root=" boot option
Kernal panic: VFS :Unable to mount root fs on 00:00


Pls help!:scratch:


All times are GMT -5. The time now is 07:19 AM.