Skip to contentSkip to conversation

2.5 and serial console

DISCUSSION Olaf Hering 3 participants 8 messages May 4, 2003 – Aug 15, 2003 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

Morning,

is there a fix for this? It seems to involve Makefile tweaking, at least.

ld -T arch/ppc/boot/ld.script -Ttext 0x00800000 -Bstatic -o arch/ppc/boot/prep/zImage arch/ppc/boot/prep/head.o arch/ppc/boot/prep/misc.o arch/ppc/boot/prep /vreset.o arch/ppc/boot/prep/kbd.o arch/ppc/boot/simple/legacy.o arch/ppc/boot/prep/image.o arch/ppc/boot/common/lib.a arch/ppc/boot/lib/lib.a arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x92): In function `tstc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x96): In function `tstc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x98): In function `tstc':
: undefined reference to `serial_tstc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xaa): In function `tstc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xae): In function `tstc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xb0): In function `tstc':
: undefined reference to `serial_tstc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xca): In function `getc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xd2): In function `getc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0xd4): In function `getc':
: undefined reference to `serial_tstc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x112): In function `getc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x114): In function `getc':
: undefined reference to `serial_getc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x13a): In function `putc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x142): In function `putc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x148): In function `putc':
: undefined reference to `serial_putc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x212): In function `putc':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x218): In function `putc':
: undefined reference to `serial_putc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x252): In function `puts':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x25e): In function `puts':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x264): In function `puts':
: undefined reference to `serial_putc'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x312): In function `puts':
: undefined reference to `com_port'
arch/ppc/boot/common/lib.a(misc-common.o)(.text+0x31c): In function `puts':
: undefined reference to `serial_putc'
make[2]: *** [arch/ppc/boot/images/zImage.prep] Error 1
make[1]: *** [prep] Error 2
make: *** [zImage] Error 2
builds@ibook:~/linux-2.5.68> grep -wlr serial_tstc .
./arch/ppc/boot/simple/m8xx_tty.c
./arch/ppc/boot/simple/m8260_tty.c
./arch/ppc/boot/simple/gt64260_tty.c
./arch/ppc/boot/common/misc-common.c
./arch/ppc/boot/common/ns16550.c
./arch/ppc/boot/common/misc-common.o
./arch/ppc/boot/common/lib.a

--
USB is for mice, FireWire is for men!

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 7 lines · Tom Rini
Quoted 3 lines · Olaf Hering

Morning,

is there a fix for this? It seems to involve Makefile tweaking, at least.

What .config file?

It seems CONFIG_SERIAL_8250_CONSOLE is gone. I can not activate it anywhere.

CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_EXPERIMENTAL=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ALL_PPC=y
CONFIG_PPC_STD_MMU=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_ALL_PPC_CH=y
CONFIG_PCI=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_PPC601_SYNC_FIX=y
CONFIG_PROC_DEVICETREE=y
CONFIG_PPCBUG_NVRAM=y
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_BOOT_LOAD=0x00800000
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=128000
CONFIG_BLK_DEV_INITRD=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_REPORT_LUNS=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_MAC53C94=y
CONFIG_IEEE1394=y
CONFIG_IEEE1394_OHCI1394=y
CONFIG_IEEE1394_SBP2=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_SYN_COOKIES=y
CONFIG_IPV6_SCTP__=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_MACE=y
CONFIG_FB=y
CONFIG_FB_OF=y
CONFIG_FB_PLATINUM=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
CONFIG_SOUND_GAMEPORT=y
CONFIG_ADB_CUDA=y
CONFIG_MAC_SERIAL=y
CONFIG_ADB=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_I2C=y
CONFIG_I2C_KEYWEST=y
CONFIG_I2C_CHARDEV=y
CONFIG_NVRAM=y
CONFIG_GEN_RTC=y
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_ZISOFS_FS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_SUNRPC=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_SOUND=y
CONFIG_ZLIB_INFLATE=y
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_KALLSYMS=y
CONFIG_XMON=y
--
USB is for mice, FireWire is for men!

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 4 lines · Olaf Hering
Quoted 2 lines · Tom Rini

On Sun, May 04, 2003 at 06:51:16PM +0200, Olaf Hering wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Morning,

is there a fix for this? It seems to involve Makefile tweaking, at least.

What .config file?

It seems CONFIG_SERIAL_8250_CONSOLE is gone. I can not activate it anywhere.

You don't ahve CONFIG_SERIAL_8250 selected either. But you do have CONFIG_SERIAL_CONSOLE enabled. So the question is then, (a) why do you have that set (pmac serial console?) and (b) why don't you have CONFIG_SERIAL_8250 set?

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 11 lines · Tom Rini
Quoted 10 lines · Olaf Hering
Quoted 7 lines · Tom Rini
Quoted 3 lines · Olaf Hering

Morning,

is there a fix for this? It seems to involve Makefile tweaking, at least.

What .config file?

Quoted 7 lines
Quoted 2 lines

It seems CONFIG_SERIAL_8250_CONSOLE is gone. I can not activate it anywhere.

You don't ahve CONFIG_SERIAL_8250 selected either. But you do have CONFIG_SERIAL_CONSOLE enabled. So the question is then, (a) why do you have that set (pmac serial console?) and (b) why don't you have CONFIG_SERIAL_8250 set?

I had serial console set. Maybe I screwed my config while hunting for a workaround.
[*] Support for PowerMac serial ports
[*] Support for console on serial port

Well, I bet such a zImage links in 2.4.
I just enabled the PC part and now I have CONFIG_SERIAL_8250. grepping for CONFIG_FOO doesnt work anymore, you must grep for FOO now. fun...

Gruss Olaf

--
USB is for mice, FireWire is for men!

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
Quoted 21 lines · Olaf Hering
Quoted 11 lines · Tom Rini
Quoted 10 lines · Olaf Hering
Quoted 7 lines · Tom Rini
Quoted 3 lines · Olaf Hering

Morning,

is there a fix for this? It seems to involve Makefile tweaking, at least.

What .config file?

Quoted 7 lines
Quoted 2 lines

It seems CONFIG_SERIAL_8250_CONSOLE is gone. I can not activate it anywhere.

You don't ahve CONFIG_SERIAL_8250 selected either. But you do have CONFIG_SERIAL_CONSOLE enabled. So the question is then, (a) why do you have that set (pmac serial console?) and (b) why don't you have CONFIG_SERIAL_8250 set?

Quoted 4 lines

I had serial console set. Maybe I screwed my config while hunting for a workaround.
[*] Support for PowerMac serial ports
[*] Support for console on serial port

Well that explains it then. The pmac code is bad and still uses CONFIG_SERIAL_CONSOLE. It needs to be changed, at a miniumum to CONFIG_SERIAL_PMAC_CONSOLE, and the driver really should be ported to the new serial backend.

Quoted 1 line

Well, I bet such a zImage links in 2.4.

That's tangental. But I do need to move the weak symbol code from 2.4 into 2.5 (*sigh*, I thought I did that already).

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#6 lore raw
Quoted 9 lines · Tom Rini
Quoted 4 lines

I had serial console set. Maybe I screwed my config while hunting for a workaround.
[*] Support for PowerMac serial ports
[*] Support for console on serial port

Well that explains it then. The pmac code is bad and still uses CONFIG_SERIAL_CONSOLE. It needs to be changed, at a miniumum to CONFIG_SERIAL_PMAC_CONSOLE, and the driver really should be ported to the new serial backend.

I'm not the one who can port the driver, but this patch makes it useable for me.

arch/ppc/Kconfig +1 -1
diff -purNX /home/olaf/kernel/kernel_exclude.txt linuxppc-2.5/arch/ppc/Kconfig linux-2.6.0-test3-lxppc25/arch/ppc/Kconfig
@@ -1293,7 +1293,7 @@ config MAC_SERIAL
 	  here. If you also have regular serial ports and enable the driver
 	  for them, you can't currently use the serial console feature.
 
-config SERIAL_CONSOLE
+config SERIAL_PMAC_CONSOLE
 	bool "Support for console on serial port"
 	depends on PPC_PMAC && MAC_SERIAL=y
 
drivers/macintosh/macserial.c +5 -5
diff -purNX /home/olaf/kernel/kernel_exclude.txt linuxppc-2.5/drivers/macintosh/macserial.c linux-2.6.0-test3-lxppc25/drivers/macintosh/macserial.c
@@ -28,7 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_SERIAL_PMAC_CONSOLE
 #include <linux/console.h>
 #endif
 #include <linux/slab.h>
@@ -88,7 +88,7 @@ struct tty_struct zs_ttys[NUM_CHANNELS];
 
 static int is_powerbook;
 
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_SERIAL_PMAC_CONSOLE
 static struct console sercons;
 #endif
 
@@ -2230,7 +2230,7 @@ static int rs_open(struct tty_struct *tt
 		return retval;
 	}
 
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_SERIAL_PMAC_CONSOLE
 	if (sercons.cflag && sercons.index == line) {
 		tty->termios->c_cflag = sercons.cflag;
 		sercons.cflag = 0;
@@ -2706,7 +2706,7 @@ void unregister_serial(int line)
  * Serial console driver
  * ------------------------------------------------------------
  */
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_SERIAL_PMAC_CONSOLE
 
 /*
  *	Print a string to the serial port trying not to disturb
@@ -2950,7 +2950,7 @@ static void __init mac_scc_console_init(
 }
 console_initcall(mac_scc_console_init);
 
-#endif /* ifdef CONFIG_SERIAL_CONSOLE */
+#endif /* ifdef CONFIG_SERIAL_PMAC_CONSOLE */
 
 #ifdef CONFIG_KGDB
 /* These are for receiving and sending characters under the kgdb

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#7 lore raw
Quoted 7 lines · Olaf Hering
Quoted 5 lines · Tom Rini
Quoted 4 lines

I had serial console set. Maybe I screwed my config while hunting for a workaround.
[*] Support for PowerMac serial ports
[*] Support for console on serial port

Quoted 7 lines
Quoted 4 lines

Well that explains it then. The pmac code is bad and still uses CONFIG_SERIAL_CONSOLE. It needs to be changed, at a miniumum to CONFIG_SERIAL_PMAC_CONSOLE, and the driver really should be ported to the new serial backend.

I'm not the one who can port the driver, but this patch makes it useable for me.

The driver has been ported in my tree, I'll send it to Linus rsn, that is once Linus has merged some other pending patches and I've had time to test it on a few more configurations.

Also, my current port enables the serial console a bit late, I want to fix that as well.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/