LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 11-20-2005, 08:03 AM   #181
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Question


Javasnob, why do you need the initrd? I use a normal kernel on Gentoo linux (2.6.14-gentoo-r2), no need for the initrd, never needed. But in case you have some strange hardware...
I've compiled my kernel enough times to forget how many(I have my problems too
Try a custom kernel, configure it yourself, include anything needed to boot the machine and the rest as modules.
I advise to build alsa as modules. The sound card support you can build it as a modules or in the kernel, I did the second.
Iptables support (netfilter) I had included them in the kernel (just too much modules to track
I'm here if you need more explaining.
I hope I have been of any good help.
 
Old 11-20-2005, 08:19 AM   #182
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Provide more info!

Hey dookie would you mind if I'd ask you to provide more info?
It would be easier than I having to search for the IBM T43 laptop specs. (I'm kindda lazy and my net is crappy lately)
What chipset does it have?
What standards does it comply too? (ACPI, APM, PnP ACPI, PnP BIOS)
What (ATI) videocard?
What bus? (AGP, PCI)
What soundcard etc so any problems may be solved without too much messages exchanged.
If you don't know what these are than you search the net for the IBM T43 laptop and come back with more info.

BTW don't disable DMA, you can use hdparam to enable it if your kernel does not enable it automatically, this may not be a problem with 2.6, it enables DMA by default.
I recommend kernel 2.6. And I also recommend Gentoo over Debian(I've used Debian before ).
 
Old 11-20-2005, 09:59 PM   #183
MKSrivastava
Member
 
Registered: Apr 2005
Posts: 34

Rep: Reputation: 15
I was able to upgrade from 2.4 to 2.6.8-1 with following steps-

Kernel-Image
1. apt-get install kernel-image-2.6.8-2-386
2. cd usr/src
tar -jvxf linux-2.6.8-1
3. cd linux-2.6.8-1

Installing & Compilling
1. apt-get install kernel-package ncurses-dev fakeroot wget bzip2
2. cd usr/src
wget http://www.kernel.org/pub/linux/kern...-2.6.8.tar.bz2
tar -jvxf linux-2.6.8.tar.bz2
3. make menuconfig
4. make -kpkg clean
5. make -kpkg --initrd

tx/MKS.
 
Old 11-21-2005, 12:02 AM   #184
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Debian ways are strange :-\

What's the kernel image for?
As I see you just untar the archive but I don't see any further use of it?!
Maybe that's a prebuilt kernel, or kernel config?
And the kernel package??? What is that? Another source? Scripts to generate a dpkg?
The part where you use wget to actually get the kernel source code I understand but...
Nevermind, I quit Debian long time ago
It was way to complicated, making a dpkg and then installing it so it would configure grub/lilo automatically, that would just lead to problems, especially if the scripts can't handle the kernel version; and that means you have to wait for new make dpkg (or kpkg, or whatever) versions.
Way to complicated for a newbie oriented distro!
But that's just my opinion!
 
Old 01-07-2006, 09:51 PM   #185
walterbyrd
Member
 
Registered: Apr 2004
Posts: 565

Rep: Reputation: 30
I am trying to install a new kernel on my AMD box with:

aptitude install kernel-image-2.6-k7

I keep getting the error:

"You are installing a kernel with an initrd image.

You are attempting to install an initrd kernel image (version 2.6.15-k7) on a machine currently running kernel version 2.4.27-386.

I have been unable to find a suitable tool for generating initrd imaages. I looked at the list mkinitrd.yaird.mkinitramfs"

I don't understand this at all.
 
Old 01-08-2006, 08:37 AM   #186
walterbyrd
Member
 
Registered: Apr 2004
Posts: 565

Rep: Reputation: 30
I think I fixed my problem by:

aptitude install intrafms-tools.

I'm still not sure what all this initrd stuff is.
 
Old 01-13-2006, 05:20 AM   #187
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Cool The initrd stuff

The inirtd stuff you should read more about on forums and on the net.
In short it's a initial disk of a specific size in the RAM used to load code needed to properly load all the other stuff you need to run your specific hardware including the kernel itself.
In my opinion you only need one if you have some hardware with a special condition to run or any other reason that can be like configuring SCSI etc.
Debian automatically uses a initrd.
If you build the kernel from source then you can also build the initrd at the compile time.
 
Old 01-24-2006, 12:34 AM   #188
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
am I the only one who can't compile this 2.6.8 source code with gcc4? I've had to fix a bunch of header issues and compile errors in order to keep the build running. I'm sure I'm not going to get a good kernel out of this.
 
Old 01-24-2006, 03:36 AM   #189
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
This is kinda out of place here, but I can't think of any other place to post it.

I finally got linux 2.6.8 (from debian package) to compile using gcc-4.0.2. I had to upgrade to bleeding edge packages because it wouldn't compile with a make-kpkg more than a month old. I had to disable about a dozen different modules and hack the source. I had to remove 'static' from a number of places, so I have little faith that this kernel will run. I'm posting this patch simply as a tool so that someone who actually knows better how to fix these compile problems can do it.

file is too big to paste into this message. here's the first bit of it.

Code:
diff -ur orig/kernel-source-2.6.8/arch/i386/kernel/cpu/mtrr/if.c kernel-source-2.6.8/arch/i386/kernel/cpu/mtrr/if.c
--- orig/kernel-source-2.6.8/arch/i386/kernel/cpu/mtrr/if.c	2004-08-14 01:36:32.000000000 -0400
+++ kernel-source-2.6.8/arch/i386/kernel/cpu/mtrr/if.c	2006-01-23 16:13:52.000000000 -0500
@@ -16,7 +16,7 @@
 
 #define FILE_FCOUNT(f) (((struct seq_file *)((f)->private_data))->private)
 
-static char *mtrr_strings[MTRR_NUM_TYPES] =
+char *mtrr_strings[MTRR_NUM_TYPES] =
 {
     "uncachable",               /* 0 */
     "write-combining",          /* 1 */
diff -ur orig/kernel-source-2.6.8/drivers/char/generic_serial.c kernel-source-2.6.8/drivers/char/generic_serial.c
--- orig/kernel-source-2.6.8/drivers/char/generic_serial.c	2005-08-16 07:23:50.000000000 -0400
+++ kernel-source-2.6.8/drivers/char/generic_serial.c	2006-01-23 18:33:58.000000000 -0500
@@ -34,7 +34,7 @@
 static char *                  tmp_buf; 
 static DECLARE_MUTEX(tmp_buf_sem);
 
-static int gs_debug;
+int gs_debug;
 
 #ifdef DEBUG
 #define gs_dprintk(f, str...) if (gs_debug & f) printk (str)
diff -ur orig/kernel-source-2.6.8/drivers/char/mxser.c kernel-source-2.6.8/drivers/char/mxser.c
--- orig/kernel-source-2.6.8/drivers/char/mxser.c	2005-08-16 07:23:50.000000000 -0400
+++ kernel-source-2.6.8/drivers/char/mxser.c	2006-01-23 18:23:27.000000000 -0500
@@ -1303,69 +1303,6 @@
 	wake_up_interruptible(&info->open_wait);
 }
 
-/*
- * This is the serial driver's generic interrupt routine
- */
-static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-	int status, i;
-	struct mxser_struct *info;
-	struct mxser_struct *port;
-	int max, irqbits, bits, msr;
-	int pass_counter = 0;
-	int handled = 0;
-
-	port = NULL;
-	for (i = 0; i < MXSER_BOARDS; i++) {
-		if (dev_id == &(mxvar_table[i * MXSER_PORTS_PER_BOARD])) {
-			port = dev_id;
-			break;
-		}
-	}
-
-	if (i == MXSER_BOARDS)
-		return IRQ_NONE;
-	if (port == 0)
-		return IRQ_NONE;
-	max = mxser_numports[mxsercfg[i].board_type];
-
-	while (1) {
-		irqbits = inb(port->vector) & port->vectormask;
-		if (irqbits == port->vectormask)
-			break;
-		handled = 1;
-		for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) {
-			if (irqbits == port->vectormask)
-				break;
-			if (bits & irqbits)
-				continue;
-			info = port + i;
-			if (!info->tty ||
-			  (inb(info->base + UART_IIR) & UART_IIR_NO_INT))
-				continue;
-			status = inb(info->base + UART_LSR) & info->read_status_mask;
-			if (status & UART_LSR_DR)
-				mxser_receive_chars(info, &status);
-			msr = inb(info->base + UART_MSR);
-			if (msr & UART_MSR_ANY_DELTA)
-				mxser_check_modem_status(info, msr);
-			if (status & UART_LSR_THRE) {
-/* 8-2-99 by William
-   if ( info->x_char || (info->xmit_cnt > 0) )
- */
-				mxser_transmit_chars(info);
-			}
-		}
-		if (pass_counter++ > MXSER_ISR_PASS_LIMIT) {
-#if 0
-			printk("MOXA Smartio/Indusrtio family driver interrupt loop break\n");
-#endif
-			break;	/* Prevent infinite loops */
-		}
-	}
-	return IRQ_RETVAL(handled);
-}
-
 static inline void mxser_receive_chars(struct mxser_struct *info,
 					 int *status)
 {
@@ -1408,6 +1345,49 @@
 
 }
 
+static inline void mxser_check_modem_status(struct mxser_struct *info,
+					      int status)
+{
+
+	/* update input line counters */
+	if (status & UART_MSR_TERI)
+		info->icount.rng++;
+	if (status & UART_MSR_DDSR)
+		info->icount.dsr++;
+	if (status & UART_MSR_DDCD)
+		info->icount.dcd++;
+	if (status & UART_MSR_DCTS)
+		info->icount.cts++;
+	wake_up_interruptible(&info->delta_msr_wait);
+
+	if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
+		if (status & UART_MSR_DCD)
+			wake_up_interruptible(&info->open_wait);
+		else
+			set_bit(MXSER_EVENT_HANGUP, &info->event);
+		schedule_work(&info->tqueue);
+	}
+	if (info->flags & ASYNC_CTS_FLOW) {
+		if (info->tty->hw_stopped) {
+			if (status & UART_MSR_CTS) {
+				info->tty->hw_stopped = 0;
+				info->IER |= UART_IER_THRI;
+				outb(info->IER, info->base + UART_IER);
+
+				set_bit(MXSER_EVENT_TXLOW, &info->event);
+				schedule_work(&info->tqueue);
+			}
+		} else {
+			if (!(status & UART_MSR_CTS)) {
+				info->tty->hw_stopped = 1;
+				info->IER &= ~UART_IER_THRI;
+				outb(info->IER, info->base + UART_IER);
+			}
+		}
+	}
+}
+
+
 static inline void mxser_transmit_chars(struct mxser_struct *info)
 {
 	int count, cnt;
@@ -1444,46 +1424,68 @@
 	}
 }
 
-static inline void mxser_check_modem_status(struct mxser_struct *info,
-					      int status)
-{
 
-	/* update input line counters */
-	if (status & UART_MSR_TERI)
-		info->icount.rng++;
-	if (status & UART_MSR_DDSR)
-		info->icount.dsr++;
-	if (status & UART_MSR_DDCD)
-		info->icount.dcd++;
-	if (status & UART_MSR_DCTS)
-		info->icount.cts++;
-	wake_up_interruptible(&info->delta_msr_wait);
+/*
+ * This is the serial driver's generic interrupt routine
+ */
+static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	int status, i;
+	struct mxser_struct *info;
+	struct mxser_struct *port;
+	int max, irqbits, bits, msr;
+	int pass_counter = 0;
+	int handled = 0;
 
-	if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
-		if (status & UART_MSR_DCD)
-			wake_up_interruptible(&info->open_wait);
-		else
-			set_bit(MXSER_EVENT_HANGUP, &info->event);
-		schedule_work(&info->tqueue);
+	port = NULL;
+	for (i = 0; i < MXSER_BOARDS; i++) {
+		if (dev_id == &(mxvar_table[i * MXSER_PORTS_PER_BOARD])) {
+			port = dev_id;
+			break;
+		}
 	}
-	if (info->flags & ASYNC_CTS_FLOW) {
-		if (info->tty->hw_stopped) {
-			if (status & UART_MSR_CTS) {
-				info->tty->hw_stopped = 0;
-				info->IER |= UART_IER_THRI;
-				outb(info->IER, info->base + UART_IER);
 
-				set_bit(MXSER_EVENT_TXLOW, &info->event);
-				schedule_work(&info->tqueue);
-			}
-		} else {
-			if (!(status & UART_MSR_CTS)) {
-				info->tty->hw_stopped = 1;
-				info->IER &= ~UART_IER_THRI;
-				outb(info->IER, info->base + UART_IER);
+	if (i == MXSER_BOARDS)
+		return IRQ_NONE;
+	if (port == 0)
+		return IRQ_NONE;
+	max = mxser_numports[mxsercfg[i].board_type];
+
+	while (1) {
+		irqbits = inb(port->vector) & port->vectormask;
+		if (irqbits == port->vectormask)
+			break;
+		handled = 1;
+		for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) {
+			if (irqbits == port->vectormask)
+				break;
+			if (bits & irqbits)
+				continue;
+			info = port + i;
+			if (!info->tty ||
+			  (inb(info->base + UART_IIR) & UART_IIR_NO_INT))
+				continue;
+			status = inb(info->base + UART_LSR) & info->read_status_mask;
+			if (status & UART_LSR_DR)
+				mxser_receive_chars(info, &status);
+			msr = inb(info->base + UART_MSR);
+			if (msr & UART_MSR_ANY_DELTA)
+				mxser_check_modem_status(info, msr);
+			if (status & UART_LSR_THRE) {
+/* 8-2-99 by William
+   if ( info->x_char || (info->xmit_cnt > 0) )
+ */
+				mxser_transmit_chars(info);
 			}
 		}
+		if (pass_counter++ > MXSER_ISR_PASS_LIMIT) {
+#if 0
+			printk("MOXA Smartio/Indusrtio family driver interrupt loop break\n");
+#endif
+			break;	/* Prevent infinite loops */
+		}
 	}
+	return IRQ_RETVAL(handled);
 }
 
 static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp,
 
Old 01-24-2006, 04:42 AM   #190
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
It booted. Wow.

I recompiled the rtl8139 driver, because the 8139too.c driver barfed during the kernel compile and I couldn't fix it.

What do I discover, I can't load a module the same as the 2.4 kernel. I can't compile a file with gcc, and install the object as a module. That was at least 50% of the beauty of linux for me, right out the window. The whole module system changed. Everything I just spent the last month or so learning about linux kernel modules is now junk.

I can't load the network, which means can't run linux 2.6.8 -> no hal libraries -> no gnome. I knew I shouldn't have started on this path.... oh. last freakin week. what a waste.
 
Old 01-24-2006, 06:28 AM   #191
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
I was able to hack 8139too.c to compile and load.

It took a 60 kb patch to do it though. I'm sure the kernel is probably broken in many places and this patch should not ever be used. I'm just posting the link in hopes that someone can tell me what's going wrong.

http://www.6thstreetradio.org/~davek/nikov-2.6.8.patch
 
Old 01-24-2006, 01:54 PM   #192
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Why did you need 2.6.8?

Why do you need 2.6.8? And use gcc4?
 
Old 01-24-2006, 02:25 PM   #193
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
a) the most recent gcc version I found is 4.0.2
and
b) the most recent debianized version of the kernel source (i.e. plus cramfs patches) is 2.6.8. I got the source from a debian package, not kernel.org. Will more recent versions compile cleanly with gcc4?
 
Old 01-24-2006, 04:06 PM   #194
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
I think the compiler may be too new for 2.6.8. New stuff has new functions, new bugs or new incompatibilities. I just think an older gcc would have worked. And I trust kernel.org more ...and I hate Debian
So good luck to you!
 
Old 01-24-2006, 05:11 PM   #195
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
k then.... does anyone have a list of patches I should use to get the stock linux kernel to work with Debian? The only patch I know is cramfs. Does the latest 2.6 kernel compile cleanly with the latest gcc?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Recompile drivers after upgrade? Tons of Fun Debian 4 09-11-2005 10:00 PM
recompile kernel laurentwahl Linux - Software 5 06-02-2005 02:27 PM
Another Kernel Guide 2.6.11 xaos5 Slackware 20 03-26-2005 12:49 PM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 04:32 PM
should i recompile after kernel upgrade? doralsoral Linux - Software 1 03-26-2004 11:50 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration