Skip to contentSkip to conversation

problem building uclibc + udev

DISCUSSION Cliff Brake 3 participants 4 messages Aug 25, 2009 – Aug 30, 2009 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

I'm running into the following issue building udev:

NOTE: Running task 606 of 631 (ID: 8,
/build/oe/oe-testing/openembedded/recipes/udev/udev_141.bb,
do_compile)
ERROR: function do_compile failed
ERROR: log data follows (/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/temp/log.do_compile.14745)

| NOTE: make -j 5
| make  all-recursive
| make[1]: Entering directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | Making all in udev
| make[2]: Entering directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | Making all in lib
| make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Nothing to be done for all'.
| make[3]: Leaving directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | /bin/sh ../arm-angstrom-linux-uclibcgnueabi-libtool --tag=CC
--mode=link arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a
-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed -L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib -Wl,-rpath-link,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o
udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o
libudev-util.o libudev-device.o libudev-device-db-write.o
libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o
udevd.o
| arm-angstrom-linux-uclibcgnueabi-libtool: link:
arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a -mtune=cortex-a8
-mfpu=neon -mfloat-abi=softfp -isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed -Wl,-rpath-link -Wl,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o
udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o
libudev-util.o libudev-device.o libudev-device-db-write.o
libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o
udevd.o -L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib | udevd.o: In function `main':
| /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/udevd.c:978:
undefined reference to `ppoll'

| collect2: ld returned 1 exit status
| make[3]: *** [udevd] Error 1
| make[3]: Leaving directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | make: *** [all] Error 2
| FATAL: oe_runmake failed

It appears that uclibc is being built without ppoll as the headers don't have it. The beagleboard kernel is patched
(http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1f0d91e152f16fbd40bb2fb3c44a30d774d4dede)
to include ppoll, and the headers are modified as such:

cbrake@happy:/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging$ searchc ppoll ./armv7a-angstrom-linux-uclibcgnueabi/usr/include/asm/unistd.h:

                         /* 336 for ppoll */

./beagleboard-angstrom-linux-gnueabi/kernel/arch/arm/include/asm/unistd.h:#define
__NR_ppoll (__NR_SYSCALL_BASE+336)
./beagleboard-angstrom-linux-gnueabi/kernel/include/linux/syscalls.h:asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, ./beagleboard-angstrom-linux-gnueabi/kernel/include/asm-arm/unistd.h:#define
__NR_ppoll (__NR_SYSCALL_BASE+336)
./armv7a-angstrom-linux-gnueabi/usr/include/asm/unistd.h:

                         /* 336 for ppoll */

./armv7a-angstrom-linux-gnueabi/usr/include/sys/poll.h:extern int ppoll (struct pollfd *__fds, nfds_t __nfds,

However, the headers are only modified in the kernel include directory. I suspect uclibc is getting unistd.h from the usr/include directory which does not have __NR_ppoll defined. What is the best way to fix this. I suspect we need to tell uclibc to look at the kernel headers?

Thanks,
Cliff

#1 lore raw
Quoted 81 lines · Cliff Brake

I'm running into the following issue building udev:

NOTE: Running task 606 of 631 (ID: 8,
/build/oe/oe-testing/openembedded/recipes/udev/udev_141.bb,
do_compile)
ERROR: function do_compile failed
ERROR: log data follows (/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/temp/log.do_compile.14745)

| NOTE: make -j 5
| make  all-recursive
| make[1]: Entering directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | Making all in udev
| make[2]: Entering directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | Making all in lib
| make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Nothing to be done for all'.
| make[3]: Leaving directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | /bin/sh ../arm-angstrom-linux-uclibcgnueabi-libtool --tag=CC
--mode=link arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a

(quoted diff) +0 -7
-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed
-L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-rpath-link,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o

udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o libudev-util.o libudev-device.o libudev-device-db-write.o libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o udevd.o
| arm-angstrom-linux-uclibcgnueabi-libtool: link:
arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a -mtune=cortex-a8

(quoted diff) +0 -6
-mfpu=neon -mfloat-abi=softfp
-isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed -Wl,-rpath-link
-Wl,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o

udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o
libudev-util.o libudev-device.o libudev-device-db-write.o
libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o
udevd.o -L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib | udevd.o: In function `main':
| /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/udevd.c:978:
undefined reference to `ppoll'

| collect2: ld returned 1 exit status
| make[3]: *** [udevd] Error 1
| make[3]: Leaving directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | make: *** [all] Error 2
| FATAL: oe_runmake failed

It appears that uclibc is being built without ppoll as the headers don't have it. The beagleboard kernel is patched
(http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1f0d91e152f16fbd40bb2fb3c44a30d774d4dede)
to include ppoll, and the headers are modified as such:

cbrake@happy:/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging$ searchc ppoll ./armv7a-angstrom-linux-uclibcgnueabi/usr/include/asm/unistd.h:

                         /* 336 for ppoll */

./beagleboard-angstrom-linux-gnueabi/kernel/arch/arm/include/asm/unistd.h:#define
__NR_ppoll (__NR_SYSCALL_BASE+336)
./beagleboard-angstrom-linux-gnueabi/kernel/include/linux/syscalls.h:asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, ./beagleboard-angstrom-linux-gnueabi/kernel/include/asm-arm/unistd.h:#define
__NR_ppoll (__NR_SYSCALL_BASE+336)
./armv7a-angstrom-linux-gnueabi/usr/include/asm/unistd.h:

                         /* 336 for ppoll */
Quoted 8 lines

./armv7a-angstrom-linux-gnueabi/usr/include/sys/poll.h:extern int ppoll (struct pollfd *__fds, nfds_t __nfds,

However, the headers are only modified in the kernel include directory. I suspect uclibc is getting unistd.h from the usr/include directory which does not have __NR_ppoll defined. What is the best way to fix this. I suspect we need to tell uclibc to look at the kernel headers?

it already does look into kernel headers to configure its system calls. All you need is to wireup this syscall in kernel and also in linux-libc-headers. IOW Port
http://www.spinics.net/lists/arm-kernel/msg38114.html to both above places.

Thx

-Khem

Quoted 8 lines

Thanks,
Cliff

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 85 lines · Khem Raj
Quoted 84 lines · Cliff Brake

I'm running into the following issue building udev:

NOTE: Running task 606 of 631 (ID: 8,
/build/oe/oe-testing/openembedded/recipes/udev/udev_141.bb,
do_compile)
ERROR: function do_compile failed
ERROR: log data follows (/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/temp/log.do_compile.14745)

| NOTE: make -j 5
| make  all-recursive
| make[1]: Entering directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | Making all in udev
| make[2]: Entering directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | Making all in lib
| make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Nothing to be done for all'.
| make[3]: Leaving directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/lib' | make[3]: Entering directory /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | /bin/sh ../arm-angstrom-linux-uclibcgnueabi-libtool --tag=CC
--mode=link arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a

(quoted diff) +0 -7
-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed
-L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-rpath-link,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o

udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o libudev-util.o libudev-device.o libudev-device-db-write.o libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o udevd.o
| arm-angstrom-linux-uclibcgnueabi-libtool: link:
arm-angstrom-linux-uclibcgnueabi-gcc -march=armv7-a -mtune=cortex-a8

(quoted diff) +0 -6
-mfpu=neon -mfloat-abi=softfp
-isystem/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/include
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb3 -Wl,--as-needed -Wl,-rpath-link
-Wl,/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib
-Wl,-O1 -Wl,--hash-style=gnu -o udevd udev-event.o udev-watch.o

udev-node.o udev-rules.o udev-util.o libudev.o libudev-list.o
libudev-util.o libudev-device.o libudev-device-db-write.o
libudev-monitor.o libudev-enumerate.o libudev-queue.o libudev-ctrl.o
udevd.o  -L/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging/armv7a-angstrom-linux-uclibcgnueabi/usr/lib | udevd.o: In function `main':
| /build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev/udevd.c:978:
undefined reference to `ppoll'

| collect2: ld returned 1 exit status
| make[3]: *** [udevd] Error 1
| make[3]: Leaving directory

`/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141/udev' | make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/build/oe/oe-testing/build/angstrom-2008.1/tmp/work/armv7a-angstrom-linux-uclibcgnueabi/udev-141-r11/udev-141' | make: *** [all] Error 2
| FATAL: oe_runmake failed

It appears that uclibc is being built without ppoll as the headers don't have it.  The beagleboard kernel is patched
(http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=1f0d91e152f16fbd40bb2fb3c44a30d774d4dede)
to include ppoll, and the headers are modified as such:

cbrake@happy:/build/oe/oe-testing/build/angstrom-2008.1/tmp/staging$ searchc ppoll ./armv7a-angstrom-linux-uclibcgnueabi/usr/include/asm/unistd.h:
                         /* 336 for ppoll */ ./beagleboard-angstrom-linux-gnueabi/kernel/arch/arm/include/asm/unistd.h:#define __NR_ppoll                    (__NR_SYSCALL_BASE+336) ./beagleboard-angstrom-linux-gnueabi/kernel/include/linux/syscalls.h:asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, ./beagleboard-angstrom-linux-gnueabi/kernel/include/asm-arm/unistd.h:#define __NR_ppoll                 (__NR_SYSCALL_BASE+336) ./armv7a-angstrom-linux-gnueabi/usr/include/asm/unistd.h:
                         /* 336 for ppoll */ ./armv7a-angstrom-linux-gnueabi/usr/include/sys/poll.h:extern int ppoll (struct pollfd *__fds, nfds_t __nfds,

Quoted 11 lines
Quoted 5 lines

However, the headers are only modified in the kernel include directory.  I suspect uclibc is getting unistd.h from the usr/include directory which does not have __NR_ppoll defined.  What is the best way to fix this.  I suspect we need to tell uclibc to look at the kernel headers?

it already does look into kernel headers to configure its system calls. All you need is to wireup this syscall in kernel and also in linux-libc-headers. IOW Port
http://www.spinics.net/lists/arm-kernel/msg38114.html to both above places.

There are several solutions to this problem:

1) patch the kernel and linux-libc-headers with the attached patch files (2.6.29 kernel, and 2.6.23 headers)
2) use the micro-base-image which uses mdev instead of udev.

Unfortunately, the linux-libc-headers patch is probably not distro friendly as it modifies a non-machine specific package. So there does not seem to be a clear path forward.

Cliff

From 8f39350ba89a593ddc778a566835c69e4bae469a Mon Sep 17 00:00:00 2001
From: Cliff Brake <[email protected]>
Date: Sat, 29 Aug 2009 13:48:55 -0400
Subject: [PATCH] arm ppoll select

---
 include/asm-arm/thread_info.h |    2 ++
 include/asm-arm/unistd.h      |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
include/asm-arm/thread_info.h +2 -0
index 4178435..723303e 100644
@@ -142,6 +142,7 @@ extern void iwmmxt_task_switch(struct thread_info *);
 #define TIF_SIGPENDING		0
 #define TIF_NEED_RESCHED	1
 #define TIF_SYSCALL_TRACE	8
+#define TIF_RESTORE_SIGMASK	9       /* restore signal mask in do_signal */
 #define TIF_POLLING_NRFLAG	16
 #define TIF_USING_IWMMXT	17
 #define TIF_MEMDIE		18
@@ -150,6 +151,7 @@ extern void iwmmxt_task_switch(struct thread_info *);
 #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
 #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
+#define _TIF_RESTORE_SIGMASK	(1 << TIF_RESTORE_SIGMASK)
 #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
 #define _TIF_USING_IWMMXT	(1 << TIF_USING_IWMMXT)
 #define _TIF_FREEZE		(1 << TIF_FREEZE)
include/asm-arm/unistd.h +4 -3
index d327b25..9269f5f 100644
@@ -360,8 +360,8 @@
 #define __NR_readlinkat			(__NR_SYSCALL_BASE+332)
 #define __NR_fchmodat			(__NR_SYSCALL_BASE+333)
 #define __NR_faccessat			(__NR_SYSCALL_BASE+334)
-					/* 335 for pselect6 */
-					/* 336 for ppoll */
+#define __NR_pselect6			(__NR_SYSCALL_BASE+335)
+#define __NR_ppoll			(__NR_SYSCALL_BASE+336)
 #define __NR_unshare			(__NR_SYSCALL_BASE+337)
 #define __NR_set_robust_list		(__NR_SYSCALL_BASE+338)
 #define __NR_get_robust_list		(__NR_SYSCALL_BASE+339)
@@ -372,7 +372,7 @@
 #define __NR_vmsplice			(__NR_SYSCALL_BASE+343)
 #define __NR_move_pages			(__NR_SYSCALL_BASE+344)
 #define __NR_getcpu			(__NR_SYSCALL_BASE+345)
-					/* 346 for epoll_pwait */
+#define __NR_epoll_pwait		(__NR_SYSCALL_BASE+346)
 #define __NR_kexec_load			(__NR_SYSCALL_BASE+347)
 #define __NR_utimensat			(__NR_SYSCALL_BASE+348)
 #define __NR_signalfd			(__NR_SYSCALL_BASE+349)
@@ -419,6 +419,7 @@
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
 #define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
 
 #if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
 #define __ARCH_WANT_SYS_TIME
Signature · 1 line
1.6.0.4

From 8a7643b09856f4f661403dcedbe0455b3cbeeea9 Mon Sep 17 00:00:00 2001
From: Steven Newbury <[email protected]>
Date: Fri, 22 May 2009 14:25:40 +0200
Subject: [PATCH] implement TIF_RESTORE_SIGMASK support and enable the related
syscalls:

pselect6
ppoll
epoll_pwait

Based on http://www.spinics.net/lists/arm-kernel/msg38114.html

---
 arch/arm/include/asm/thread_info.h |    2 +
 arch/arm/include/asm/unistd.h      |    7 ++-
 arch/arm/kernel/calls.S            |    6 +-
 arch/arm/kernel/signal.c           |   90 +++++++++++++++---------------------
 4 files changed, 46 insertions(+), 59 deletions(-)
arch/arm/include/asm/thread_info.h +2 -0
index 4f88482..2cf0917 100644
@@ -136,6 +136,7 @@ extern void vfp_sync_state(struct thread_info *thread);
 #define TIF_SIGPENDING		0
 #define TIF_NEED_RESCHED	1
 #define TIF_SYSCALL_TRACE	8
+#define TIF_RESTORE_SIGMASK	9       /* restore signal mask in do_signal */
 #define TIF_POLLING_NRFLAG	16
 #define TIF_USING_IWMMXT	17
 #define TIF_MEMDIE		18
@@ -144,6 +145,7 @@ extern void vfp_sync_state(struct thread_info *thread);
 #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
 #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
+#define _TIF_RESTORE_SIGMASK	(1 << TIF_RESTORE_SIGMASK)
 #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
 #define _TIF_USING_IWMMXT	(1 << TIF_USING_IWMMXT)
 #define _TIF_FREEZE		(1 << TIF_FREEZE)
arch/arm/include/asm/unistd.h +4 -3
index 94cc58e..cd1eaa0 100644
@@ -360,8 +360,8 @@
 #define __NR_readlinkat			(__NR_SYSCALL_BASE+332)
 #define __NR_fchmodat			(__NR_SYSCALL_BASE+333)
 #define __NR_faccessat			(__NR_SYSCALL_BASE+334)
-					/* 335 for pselect6 */
-					/* 336 for ppoll */
+#define __NR_pselect6			(__NR_SYSCALL_BASE+335)
+#define __NR_ppoll			(__NR_SYSCALL_BASE+336)
 #define __NR_unshare			(__NR_SYSCALL_BASE+337)
 #define __NR_set_robust_list		(__NR_SYSCALL_BASE+338)
 #define __NR_get_robust_list		(__NR_SYSCALL_BASE+339)
@@ -372,7 +372,7 @@
 #define __NR_vmsplice			(__NR_SYSCALL_BASE+343)
 #define __NR_move_pages			(__NR_SYSCALL_BASE+344)
 #define __NR_getcpu			(__NR_SYSCALL_BASE+345)
-					/* 346 for epoll_pwait */
+#define __NR_epoll_pwait		(__NR_SYSCALL_BASE+346)
 #define __NR_kexec_load			(__NR_SYSCALL_BASE+347)
 #define __NR_utimensat			(__NR_SYSCALL_BASE+348)
 #define __NR_signalfd			(__NR_SYSCALL_BASE+349)
@@ -430,6 +430,7 @@
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
 #define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
 
 #if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
 #define __ARCH_WANT_SYS_TIME
arch/arm/kernel/calls.S +3 -3
index 1680e9e..534000d 100644
@@ -344,8 +344,8 @@
 		CALL(sys_readlinkat)
 		CALL(sys_fchmodat)
 		CALL(sys_faccessat)
-/* 335 */	CALL(sys_ni_syscall)		/* eventually pselect6 */
-		CALL(sys_ni_syscall)		/* eventually ppoll */
+/* 335 */	CALL(sys_pselect6)
+		CALL(sys_ppoll)
 		CALL(sys_unshare)
 		CALL(sys_set_robust_list)
 		CALL(sys_get_robust_list)
@@ -355,7 +355,7 @@
 		CALL(sys_vmsplice)
 		CALL(sys_move_pages)
 /* 345 */	CALL(sys_getcpu)
-		CALL(sys_ni_syscall)		/* eventually epoll_pwait */
+		CALL(sys_epoll_pwait)
 		CALL(sys_kexec_load)
 		CALL(sys_utimensat)
 		CALL(sys_signalfd)
arch/arm/kernel/signal.c +37 -53

176 lines not on this page · raw message

Signature · 1 line
1.6.2.4
#3 lore raw
Quoted 9 lines · Cliff Brake

There are several solutions to this problem:

1) patch the kernel and linux-libc-headers with the attached patch files (2.6.29 kernel, and 2.6.23 headers)
2) use the micro-base-image which uses mdev instead of udev.

Unfortunately, the linux-libc-headers patch is probably not distro friendly as it modifies a non-machine specific package. So there does not seem to be a clear path forward.

I think the only real way ahead with the ppoll thing is to get that patch landed in the upstream kernel (if it isn't there already) and then rev all the appropriate packages to include the fix.

Or, given that the syscall numbers were already reserved anyway and hence unlikely to collide with anything else, it should be safe enough to just apply those patches in OE. It doesn't matter that the linux-libc-headers package is used on multiple machines: if somebody builds against the patched linux-libc-headers and then tries to run on an unpatched kernel, ppoll() will just return -ENOSYS which is the same thing it would have done anyway.

p.