DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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 ).
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!
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.
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.
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,
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.
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.
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?
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!
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.