It looks as though Malcolm's code requires SMP support to be turned on in the kernel.
Also, when compiling bootshell, don't use gcc. Use the g++ command. There's some problem with using gcc. Mark Post -----Original Message----- From: Monteleone [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 10:45 AM To: [EMAIL PROTECTED] Subject: RE : RE : signal shutdown Hello Malcom Have a look please to the response i get when i try to compile ext_int: lnxtrs7:/ext_int # gcc ext_int.c -o ext_int In file included from /usr/include/asm/posix_types.h:59, from /usr/include/linux/posix_types.h:46, from /usr/include/linux/types.h:4, from /usr/include/asm/ptrace.h:110, from /usr/include/linux/ptrace.h:24, from /usr/include/linux/binfmts.h:4, from /usr/include/linux/sched.h:8, from ext_int.c:14: /usr/include/asm/bitops.h:41: #error "bitops won't work without CONFIG_SMP" lnxtrs7:/ext_int # uname -a Linux lnxtrs7 2.4.7-timer-SMP #1 SMP Tue May 21 12:58:16 GMT 2002 s390 unknown Is there a particularity to compile this module ? Can you give me the way to search? Gerard MONTELEONE Ingenieur Systeme & Reseau ( 04.95.23.68.09 / 06.87.72.70.32 S.I.TE.C zi du Vazzio 20090 AJACCIO Cedex [EMAIL PROTECTED] -----Message d'origine----- De�: Linux on 390 Port [mailto:[EMAIL PROTECTED] De la part de Malcolm Beattie Envoy�: mardi 25 novembre 2003 12:01 ��: [EMAIL PROTECTED] Objet�: Re: RE : signal shutdown Monteleone writes: > This is what i get when i run bootshell > > lnxtrs7 login: /sbin/bootshell: /sbin/bootshell: cannot execute binary > file [...] > - run gcc -c ./bootshell-1.3.cc -o /sbin/bootshell [...] The "-c" option produces an object file, not an executable. Leave out the "-c" option and gcc will also do the link stage and create an executable for you. Another option for consideration may be the ext_int kernel module I wrote which lets you trap the external interrupt number of your choice and have it deliver a signal of your choice to the PID of your choice. I used that when doing the Large Scale Linux Deployment redbook to be able to trigger a remote shutdown of a Linux guest before the SIGNAL SHUTDOWN support was widely available. See section 9.8 of that redbook for details. Using it to trigger a shutdown is nice and simple since you only need to deliver a SIGINT (signal 2) to init (PID 1) and init will then do the ctrlaltdel line in your /etc/inittab (similar to how the SIGNAL SHUTDOWN does it, except that that communicates extra data (timeout info) out of band rather than just being the external interrupt). --Malcolm -- Malcolm Beattie <[EMAIL PROTECTED]> Linux Technical Consultant IBM EMEA Enterprise Server Group... ...from home, speaking only for myself
