From: David Gardiner <daveg@sonartech.com.au>
To: linuxppc-dev@ozlabs.org
Subject: Linux-2.6.9-rc2 kernel build for mvme5100
Date: Thu, 16 Sep 2004 14:29:49 +1000 [thread overview]
Message-ID: <414916BD.9080607@sonartech.com.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3034 bytes --]
Hi all,
I've got two questions in regard to building linux-2.6.9-rc2 for a mvme5100
Target info:
build platform: mvme5100, gcc-3.3.4, debian-testing, linuxppc_2_4_devel,
default mvme5100 config
target platform: mvme5100
Questions 1:
I was getting this error when I tried to build the kernel:
CC arch/ppc/boot/common/bootinfo.o
CC arch/ppc/boot/common/misc-common.o
CC arch/ppc/boot/common/ns16550.o
arch/ppc/boot/common/ns16550.c:14: error: conflicting types for `outb'
include/asm/io.h:142: error: previous declaration of `outb'
arch/ppc/boot/common/ns16550.c:15: error: conflicting types for `inb'
include/asm/io.h:157: error: previous declaration of `inb'
make[2]: *** [arch/ppc/boot/common/ns16550.o] Error 1
make[1]: *** [arch/ppc/boot/common] Error 2
make: *** [zImage] Error 2
I changed arch/ppc/boot/common/ns16550.c so that it managed to compile
based on what was in io.h, the patch for which is attatched, are these
changes okay?
Question 2:
I'm now getting the error:
daveg@occy:/usr/src/play-2.6.9.new$ make
CHK include/linux/version.h
make[1]: `arch/ppc/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
GZIP arch/ppc/boot/images/vmlinux.gz
HOSTCC arch/ppc/boot/utils/addnote
HOSTCC arch/ppc/boot/utils/mknote
HOSTCC arch/ppc/boot/utils/hack-coff
HOSTCC arch/ppc/boot/utils/mkprep
HOSTCC arch/ppc/boot/utils/mkbugboot
HOSTCC arch/ppc/boot/utils/mktree
AS arch/ppc/boot/simple/head.o
AS arch/ppc/boot/simple/relocate.o
CC arch/ppc/boot/simple/misc.o
CC arch/ppc/boot/simple/dummy.o
objcopy -O elf32-powerpc \
--add-section=.image=arch/ppc/boot/images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \
arch/ppc/boot/simple/dummy.o arch/ppc/boot/simple/image.o
ld -T /usr/src/play-2.6.9.new/arch/ppc/boot/ld.script -Ttext 0x00800000
-Bstatic -o arch/ppc/boot/simple/zvmlinux arch/ppc/boot/simple/head.o
arch/ppc/boot/simple/relocate.o arch/ppc/boot/simple/misc.o
arch/ppc/boot/simple/image.o arch/ppc/boot/common/lib.a
arch/ppc/boot/lib/lib.a
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0x2e): In function
`serial_init':
: undefined reference to `isa_io_base'
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0x42): In function
`serial_init':
: undefined reference to `isa_io_base'
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0x7e): In function
`serial_init':
: undefined reference to `isa_io_base'
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0x86): In function
`serial_init':
: undefined reference to `isa_io_base'
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0xda): In function
`serial_init':
: undefined reference to `isa_io_base'
arch/ppc/boot/common/lib.a(ns16550.o)(.text+0xfa): more undefined
references to `isa_io_base' follow
make[2]: *** [arch/ppc/boot/simple/zvmlinux] Error 1
make[1]: *** [simple] Error 2
make: *** [zImage] Error 2
Now I know isa_io_base is declared/defined in arch/ppc/kernel/pci.c so
how is it supposed to link?
Ta,
dlg
[-- Attachment #2: ns16550.c.patch --]
[-- Type: text/plain, Size: 1880 bytes --]
--- linux/arch/ppc/boot/common/ns16550.c 2004-08-14 20:56:23.000000000 +1000
+++ play-2.6.9.new/arch/ppc/boot/common/ns16550.c 2004-09-16 13:56:44.000000000 +1000
@@ -11,8 +11,8 @@
#define SERIAL_BAUD 9600
-extern void outb(int port, unsigned char val);
-extern unsigned char inb(int port);
+extern void outb(unsigned int val, unsigned int port);
+extern unsigned int inb(unsigned int port);
extern unsigned long ISA_io;
static struct serial_state rs_table[RS_TABLE_SIZE] = {
@@ -47,7 +47,7 @@
/* save the LCR */
lcr = inb(com_port + (UART_LCR << shift));
/* Access baud rate */
- outb(com_port + (UART_LCR << shift), 0x80);
+ outb(0x80, com_port + (UART_LCR << shift));
dlm = inb(com_port + (UART_DLM << shift));
/*
* Test if serial port is unconfigured.
@@ -58,20 +58,20 @@
if ((dlm <= 4) && (lcr & 2))
/* port is configured, put the old LCR back */
- outb(com_port + (UART_LCR << shift), lcr);
+ outb(lcr, com_port + (UART_LCR << shift));
else {
/* Input clock. */
- outb(com_port + (UART_DLL << shift),
- (BASE_BAUD / SERIAL_BAUD) & 0xFF);
- outb(com_port + (UART_DLM << shift),
- (BASE_BAUD / SERIAL_BAUD) >> 8);
+ outb((BASE_BAUD / SERIAL_BAUD) & 0xFF,
+ com_port + (UART_DLL << shift));
+ outb((BASE_BAUD / SERIAL_BAUD) >> 8,
+ com_port + (UART_DLM << shift));
/* 8 data, 1 stop, no parity */
- outb(com_port + (UART_LCR << shift), 0x03);
+ outb(0x03, com_port + (UART_LCR << shift));
/* RTS/DTR */
- outb(com_port + (UART_MCR << shift), 0x03);
+ outb(0x03, com_port + (UART_MCR << shift));
}
/* Clear & enable FIFOs */
- outb(com_port + (UART_FCR << shift), 0x07);
+ outb(0x07, com_port + (UART_FCR << shift));
return (com_port);
}
@@ -81,7 +81,7 @@
{
while ((inb(com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0)
;
- outb(com_port, c);
+ outb(c, com_port);
}
unsigned char
next reply other threads:[~2004-09-16 4:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 4:29 David Gardiner [this message]
2004-09-16 5:36 ` Linux-2.6.9-rc2 kernel build for mvme5100 Matt Porter
2004-09-16 7:54 ` David Gardiner
2004-09-20 17:32 ` Tom Rini
2004-09-20 19:23 ` Matt Porter
2004-09-20 22:55 ` David Gardiner
2004-09-21 0:12 ` David Gardiner
2004-09-22 16:33 ` Tom Rini
2004-09-22 16:47 ` Matt Porter
2004-09-23 20:14 ` David Gardiner
2004-09-21 9:15 ` Marius Groeger
2004-09-21 15:48 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=414916BD.9080607@sonartech.com.au \
--to=daveg@sonartech.com.au \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).