Skip to contentSkip to conversation

2.6.15-rc1 + sf.net patches on x86 needs a patch

uml-devel Antoine Martin 1 participant 4 messages Nov 22, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

patch attached, I've no idea what I've done really, but it builds ok now.

This time on an x86 box:

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.15-rc1.bz2 wget http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.15-rc1/patches.tar
tar -xf patches.tar
tar -jxf linux-2.6.14.tar.bz2
mv linux-2.6.14 linux-2.6.15-rc1-uml
cd linux-2.6.15-rc1-uml
bzcat ../patch-2.6.15-rc1.bz2 | patch -p1
for patch in cat ../patches/series; do echo $patch; patch -p1 < ../patches/$patch; done find . -type f -size 0 -exec rm {} \;
make ARCH=um defconfig
make ARCH=um vmlinux

  LD      arch/um/drivers/net.o
  LD      arch/um/drivers/mconsole.o
  LD      arch/um/drivers/ubd.o
  CC      arch/um/drivers/null.o
  LD      arch/um/drivers/port.o
  CC      arch/um/drivers/pty.o
  CC      arch/um/drivers/tty.o
  CC      arch/um/drivers/cow_user.o
  CC      arch/um/drivers/random.o
  LD      arch/um/drivers/built-in.o
  CC      arch/um/os-Linux/aio.o

arch/um/os-Linux/aio.c: In function ‘init_aio_26’:
arch/um/os-Linux/aio.c:402: error: ‘finish_aio_26’ undeclared (first use in this function) arch/um/os-Linux/aio.c:402: error: (Each undeclared identifier is reported only once arch/um/os-Linux/aio.c:402: error: for each function it appears in.) make[1]: *** [arch/um/os-Linux/aio.o] Error 1
make: *** [arch/um/os-Linux] Error 2

Antoine

arch/um/os-Linux/aio.c +2 -2
@@ -389,8 +389,6 @@
 	goto out;
 }
 
-#else
-#define DEFAULT_24_AIO 1
 static int submit_aio_26(struct aio_context *aio)
 {
         return -ENOSYS;
@@ -402,6 +400,8 @@
 	finish_proc = finish_aio_26;
         return -ENOSYS;
 }
+#else
+#define DEFAULT_24_AIO 1
 #endif
 
 static int aio_24 = DEFAULT_24_AIO;
#1 lore raw

Ignore that, it does not solve anything. Just delays the problem until link time.
Anyone know why my kernel headers don't have aio_abi.h?

Antoine

Quoted 27 lines · Antoine Martin

patch attached, I've no idea what I've done really, but it builds ok now.

This time on an x86 box:

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.15-rc1.bz2 wget http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.15-rc1/patches.tar
tar -xf patches.tar
tar -jxf linux-2.6.14.tar.bz2
mv linux-2.6.14 linux-2.6.15-rc1-uml
cd linux-2.6.15-rc1-uml
bzcat ../patch-2.6.15-rc1.bz2 | patch -p1
for patch in cat ../patches/series; do echo $patch; patch -p1 < ../patches/$patch; done find . -type f -size 0 -exec rm {} \;
make ARCH=um defconfig
make ARCH=um vmlinux

  LD      arch/um/drivers/net.o
  LD      arch/um/drivers/mconsole.o
  LD      arch/um/drivers/ubd.o
  CC      arch/um/drivers/null.o
  LD      arch/um/drivers/port.o
  CC      arch/um/drivers/pty.o
  CC      arch/um/drivers/tty.o
  CC      arch/um/drivers/cow_user.o
  CC      arch/um/drivers/random.o
  LD      arch/um/drivers/built-in.o
  CC      arch/um/os-Linux/aio.o
Quoted 8 lines

arch/um/os-Linux/aio.c: In function ‘init_aio_26’:
arch/um/os-Linux/aio.c:402: error: ‘finish_aio_26’ undeclared (first use in this function) arch/um/os-Linux/aio.c:402: error: (Each undeclared identifier is reported only once arch/um/os-Linux/aio.c:402: error: for each function it appears in.) make[1]: *** [arch/um/os-Linux/aio.o] Error 1
make: *** [arch/um/os-Linux] Error 2

Antoine

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&opМk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw

This patch attached *does* make it build, but it's not right. The build moans at me for using the kernel headers... ok I shouldn't.

CC arch/um/os-Linux/aio.o
In file included from /usr/src/linux/include/linux/aio_abi.h:30,

                 from arch/um/os-Linux/aio.c:47:

/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include <endian.h> instead!

How do I get the new headers for my manually compiled kernel?

Antoine

Quoted 4 lines · Antoine Martin

Ignore that, it does not solve anything. Just delays the problem until link time.
Anyone know why my kernel headers don't have aio_abi.h?

Quoted 38 lines

Antoine

Quoted 35 lines · Antoine Martin

patch attached, I've no idea what I've done really, but it builds ok now.

This time on an x86 box:

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.15-rc1.bz2 wget http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.15-rc1/patches.tar
tar -xf patches.tar
tar -jxf linux-2.6.14.tar.bz2
mv linux-2.6.14 linux-2.6.15-rc1-uml
cd linux-2.6.15-rc1-uml
bzcat ../patch-2.6.15-rc1.bz2 | patch -p1
for patch in cat ../patches/series; do echo $patch; patch -p1 < ../patches/$patch; done find . -type f -size 0 -exec rm {} \;
make ARCH=um defconfig
make ARCH=um vmlinux

  LD      arch/um/drivers/net.o
  LD      arch/um/drivers/mconsole.o
  LD      arch/um/drivers/ubd.o
  CC      arch/um/drivers/null.o
  LD      arch/um/drivers/port.o
  CC      arch/um/drivers/pty.o
  CC      arch/um/drivers/tty.o
  CC      arch/um/drivers/cow_user.o
  CC      arch/um/drivers/random.o
  LD      arch/um/drivers/built-in.o
  CC      arch/um/os-Linux/aio.o

arch/um/os-Linux/aio.c: In function ‘init_aio_26’:
arch/um/os-Linux/aio.c:402: error: ‘finish_aio_26’ undeclared (first use in this function) arch/um/os-Linux/aio.c:402: error: (Each undeclared identifier is reported only once arch/um/os-Linux/aio.c:402: error: for each function it appears in.) make[1]: *** [arch/um/os-Linux/aio.o] Error 1
make: *** [arch/um/os-Linux] Error 2

Antoine

arch/um/os-Linux/aio.c +3 -1
@@ -41,8 +41,10 @@
         return 0;
 }
 
+#define HAVE_AIO_ABI 1
+
 #if defined(HAVE_AIO_ABI)
-#include <linux/aio_abi.h>
+#include </usr/src/linux/include/linux/aio_abi.h>
 
 /* If we have the headers, we are going to build with AIO enabled.
  * If we don't have aio in libc, we define the necessary stubs here.
#3 lore raw
Quoted 8 lines · Antoine Martin

This patch attached *does* make it build, but it's not right. The build moans at me for using the kernel headers... ok I shouldn't.

CC arch/um/os-Linux/aio.o
In file included from /usr/src/linux/include/linux/aio_abi.h:30,

                 from arch/um/os-Linux/aio.c:47:

/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include <endian.h> instead!

DOH DOH DOH

Founds this a few lines lower:
aio=2.4
This is used to force UML to use 2.4-style AIO even when 2.6 AIO is available. 2.4 AIO is a single thread that handles one request at a time, synchronously. 2.6 AIO is a thread which uses the 2.6 AIO interface to handle an arbitrary number of pending requests. 2.6 AIO is not available in tt mode, on 2.4 hosts, or when UML is built with /usr/include/linux/aio_abi.h not available. Many distributions don't include aio_abi.h, so you will need to copy it from a kernel tree to your /usr/include/linux in order to build an AIO-capable UML

Apologies for spamming the list for nothing, I will go and find a hole to hide in now.

Antoine

Quoted 46 lines

Antoine

Quoted 42 lines · Antoine Martin

Ignore that, it does not solve anything. Just delays the problem until link time.
Anyone know why my kernel headers don't have aio_abi.h?

Antoine

Quoted 35 lines · Antoine Martin

patch attached, I've no idea what I've done really, but it builds ok now.

This time on an x86 box:

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.15-rc1.bz2 wget http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.15-rc1/patches.tar
tar -xf patches.tar
tar -jxf linux-2.6.14.tar.bz2
mv linux-2.6.14 linux-2.6.15-rc1-uml
cd linux-2.6.15-rc1-uml
bzcat ../patch-2.6.15-rc1.bz2 | patch -p1
for patch in cat ../patches/series; do echo $patch; patch -p1 < ../patches/$patch; done find . -type f -size 0 -exec rm {} \;
make ARCH=um defconfig
make ARCH=um vmlinux

  LD      arch/um/drivers/net.o
  LD      arch/um/drivers/mconsole.o
  LD      arch/um/drivers/ubd.o
  CC      arch/um/drivers/null.o
  LD      arch/um/drivers/port.o
  CC      arch/um/drivers/pty.o
  CC      arch/um/drivers/tty.o
  CC      arch/um/drivers/cow_user.o
  CC      arch/um/drivers/random.o
  LD      arch/um/drivers/built-in.o
  CC      arch/um/os-Linux/aio.o

arch/um/os-Linux/aio.c: In function ‘init_aio_26’:
arch/um/os-Linux/aio.c:402: error: ‘finish_aio_26’ undeclared (first use in this function) arch/um/os-Linux/aio.c:402: error: (Each undeclared identifier is reported only once arch/um/os-Linux/aio.c:402: error: for each function it appears in.) make[1]: *** [arch/um/os-Linux/aio.o] Error 1
make: *** [arch/um/os-Linux] Error 2

Antoine

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&opМk
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel