From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Mon, 3 Mar 2003 05:00:00 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 61 ************************************************** Sunday 02 March 2003 Number 61 ************************************************** Subjects for today 1 Building Linux kernels on OS/2 : John Poltorak 2 Re: bpbatch : John Poltorak 3 Re: Building Linux kernels on OS/2 : Stefan Neis 4 Re: Building Linux kernels on OS/2 : John Poltorak 5 Re: Building Linux kernels on OS/2 : Holger Veit 6 Re: Building Linux kernels on OS/2 : Holger Veit 7 grep 2.5.1 : Andreas Buening 8 Re: grep 2.5.1 : John Poltorak **= Email 1 ==========================** Date: Mon, 3 Mar 2003 13:35:46 +0000 From: John Poltorak Subject: Building Linux kernels on OS/2 I'm trying to configure a remote-boot workstation for booting up Linux and it appears that I need to build myself a specific Linux kernel. I'm not at all familiar with building kernels, but it seems to require Linux... Is there any way build Linux kernels from within OS/2? What does building kernels actually involve? Is it simply lumping together a number of small files into one big file? If I can't build a Linux kernel on OS/2, is there any place I could download one? I'm not even sure what I should be looking for...Is it a file called vmlinuz, bzImage or just Linux? -- John **= Email 2 ==========================** Date: Mon, 3 Mar 2003 16:09:31 +0000 From: John Poltorak Subject: Re: bpbatch On Sun, Jan 05, 2003 at 12:03:25PM -0800, Ken Ames wrote: > hi John, > I believe the actual file is not called bpbatch but rather mrbatch. as > I said, I have not had time yet to start setting this up. you should get > hold of the linux remoteboot mini howto and read it and also read > bpbatch.org docs, all you can find. good luck to you. I actually managed to get bpbatch working recently, and it turns out that all I needed to do was rename the bpbatch.P from the archive as bpbatch. That's all it needed, and I wasted weeks before discovering this!!! Now it works OK - well at least as far a initiating bpbatch. I'm still not sure mrbatch is for.. So after months of trying I've finally made some progress with DHCP/PXE, although I still don't know how to boot Linux, which is one of the things I'd like to try. > Ken -- John **= Email 3 ==========================** Date: Mon, 3 Mar 2003 16:40:24 +0100 (CET) From: Stefan Neis Subject: Re: Building Linux kernels on OS/2 On Mon, 3 Mar 2003, John Poltorak wrote: > Linux... Is there any way build Linux kernels from within OS/2? Well, if you manage to install a cross-compiler ... > What does building kernels actually involve? Is it simply lumping together > a number of small files into one big file? Compiling C source code into a specific executable format. Regards, Stefan **= Email 4 ==========================** Date: Mon, 3 Mar 2003 17:13:53 +0000 From: John Poltorak Subject: Re: Building Linux kernels on OS/2 On Mon, Mar 03, 2003 at 04:40:24PM +0100, Stefan Neis wrote: > On Mon, 3 Mar 2003, John Poltorak wrote: > > > Linux... Is there any way build Linux kernels from within OS/2? > > Well, if you manage to install a cross-compiler ... I've been looking at the KERNELS directory on a SLACKWARE CD and can't see any references to a compiler anywhere, although there was this compile_.sh shell script:- #!/bin/sh # compile_kern.sh version 1.0 (Wed Mar 17 19:46:14 CST 1999) pjv # # Rebuild a tree of directories containing a System.map, .config (renamed # config), and kernel (zImage or bzImage). The input is a tree of # directories beneath the current one with names matching the wildcard *.? # (in Slackware, these will typically be *.i for IDE kernels and *.s for # IDE/SCSI kernels). At the minimum, each directory must contain the file # 'config', which is the .config to start with when building the kernel. CWD=`pwd` KERNEL=2.2.16 KERNELSRC=$CWD/../source/kernel-source/v2.2/linux-${KERNEL}.tar.bz2 TMP=/tmp OUTPUT=$TMP/output if [ ! -d $TMP/linux-${KERNEL} ]; then ( cd $TMP tar xyvf $KERNELSRC mv $TMP/linux $TMP/linux-${KERNEL} # Apply AC's 2.2.16 errata patch: ( cd $TMP/linux-${KERNEL} zcat $CWD/../source/kernel-source/v2.2/2.2.16-ac-errata.diff.gz | patch -p1 --verbose --backup ) ) fi if [ ! -d $OUTPUT ]; then mkdir -p $OUTPUT fi for dir in *.? ; do if [ ! -r $dir/config ]; then continue fi if [ -r $OUTPUT/$dir/zImage \ -o -r $OUTPUT/$dir/bzImage ]; then echo "kernel found in $OUTPUT/$dir... skipping." # sleep 1 continue fi echo echo "------------------------------------------" echo " BUILDING: $dir" echo "------------------------------------------" echo sleep 1 cp $dir/config $TMP/linux-${KERNEL}/.config cd $TMP/linux-${KERNEL} make oldconfig ; make dep ; make clean make -j 3 zImage if [ $? = 0 ]; then # good build echo echo "------------------------------------------" echo "Saving output in $OUTPUT/$dir" echo "------------------------------------------" echo mkdir -p $OUTPUT/$dir cp arch/i386/boot/zImage $OUTPUT/$dir cp System.map $OUTPUT/$dir cp .config $OUTPUT/$dir/config echo "Cleaning up..." make clean else # If building a zImage didn't fit, we'll try building a bzImage. make -j 3 bzImage if [ $? = 0 ]; then # good build echo echo "------------------------------------------" echo "Saving output in $OUTPUT/$dir" echo "------------------------------------------" echo mkdir -p $OUTPUT/$dir cp arch/i386/boot/bzImage $OUTPUT/$dir cp System.map $OUTPUT/$dir cp .config $OUTPUT/$dir/config echo "Cleaning up..." make clean fi fi cd $CWD done > > What does building kernels actually involve? Is it simply lumping together > > a number of small files into one big file? > > Compiling C source code into a specific executable format. As I say, I have no idea what 'compiling a kernel' actually involves, but I haven't seen any reference to 'cc' anywhere... > Regards, > Stefan -- John **= Email 5 ==========================** Date: Mon, 3 Mar 2003 18:19:36 +0100 From: Holger Veit Subject: Re: Building Linux kernels on OS/2 On Mon, Mar 03, 2003 at 04:40:24PM +0100, Stefan Neis wrote: > On Mon, 3 Mar 2003, John Poltorak wrote: > > > Linux... Is there any way build Linux kernels from within OS/2? > > Well, if you manage to install a cross-compiler ... It requires a recent version of gcc cmpiling int o ELF. My elf cross compiler which was good for C++ for L4/Fiasco is unforatunately still 2.8.1, you need some 2.95.x there. > > What does building kernels actually involve? Is it simply lumping together > > a number of small files into one big file? > > Compiling C source code into a specific executable format. You need at least the GNU build tools. It would be an interesting exercise to do crosscompilation, but then: why? It is no problem to get a Linux system up, and compile the kernel there. The kernel likely won't boot in a "DOS from 'A:'" session, as this is no full 386 emulation - OS/2 still successfully attempts to be the boss. To inherit certain properties of the Linux kernel, as dne by some people in order to run Linux driver code in OS/2, you don't need a full kernel. Holger -- Please update your tables to my new e-mail address: holger.veit$ais.fhg.de (replace the '$' with ' at ' -- spam-protection) **= Email 6 ==========================** Date: Mon, 3 Mar 2003 18:26:00 +0100 From: Holger Veit Subject: Re: Building Linux kernels on OS/2 On Mon, Mar 03, 2003 at 05:13:53PM +0000, John Poltorak wrote: > On Mon, Mar 03, 2003 at 04:40:24PM +0100, Stefan Neis wrote: > > On Mon, 3 Mar 2003, John Poltorak wrote: > > > > > Linux... Is there any way build Linux kernels from within OS/2? > > > > Well, if you manage to install a cross-compiler ... > > I've been looking at the KERNELS directory on a SLACKWARE CD and can't see > any references to a compiler anywhere, although there was this compile_.sh > shell script:- The essential lines are: > make oldconfig ; make dep ; make clean > make -j 3 zImage > if [ $? = 0 ]; then # good build > make -j 3 bzImage > if [ $? = 0 ]; then # good build The logic is in the makefiles in the corresponding directories, and they are in the native gcc/gas/ld as well - they'll produce the binary format the kernel requires (formerly a.out, now ELF). A small stub to be merged with the kernel is a self-extractor which unpacks the zImage or bzImage file and loads it into memory properly (in comparison to OS/2 this is like OS2LDR vs. OS2KRNL, except that in Linux the "linuxLDR" is prepended to the "linuxKRNL" part. > > > What does building kernels actually involve? Is it simply lumping together > > > a number of small files into one big file? > > > > Compiling C source code into a specific executable format. > > As I say, I have no idea what 'compiling a kernel' actually involves, but > I haven't seen any reference to 'cc' anywhere... Look into the makefiles. Holger -- Please update your tables to my new e-mail address: holger.veit$ais.fhg.de (replace the '$' with ' at ' -- spam-protection) **= Email 7 ==========================** Date: Mon, 03 Mar 2003 22:24:29 +0100 From: Andreas Buening Subject: grep 2.5.1 Hello! I've uploaded grep 2.5.1 to unixos2.com in case anybody wants to know. All internal tests work fine now. NLS seems to work, too. sources: http://unix.os2site.com/sw/pub/source/grep/grep-2_5_1.zip binary: http://unix.os2site.com/sw/pub/binary/grep/grep-2_5_1-bin.zip Special bootstrap package (statically linked, i.e. it doesn't require any other libs but emx*.dll), especially for people who want to run their own build systems: ;-) http://unix.os2site.com/sw/pub/binary/grep/grep-2_5_1-bootstrap.zip Btw, has there been any progress with installpkg lately? Bye, Andreas -- One OS to rule them all, One OS to find them, One OS to bring them all and in the darkness bind them In the Land of Mordor where the Shadows lie. **= Email 8 ==========================** Date: Mon, 3 Mar 2003 22:42:39 +0000 From: John Poltorak Subject: Re: grep 2.5.1 On Mon, Mar 03, 2003 at 10:24:29PM +0100, Andreas Buening wrote: > Hello! > > I've uploaded grep 2.5.1 to unixos2.com in case anybody wants to know. > All internal tests work fine now. NLS seems to work, too. > > sources: http://unix.os2site.com/sw/pub/source/grep/grep-2_5_1.zip Here's what I get when I try building it:- u:/unixos2/workdir/grep-2.5.1 patching file `configure.in' patching file `m4/progtest.m4' patching file `src/system.h' patching file `tests/file.sh' configure.in:13: warning: do not use m4_patsubst: use patsubst or m4_bpatsubst configure.in:82: warning: AC_CANONICAL_HOST invoked multiple times configure.in:82: warning: AC_CANONICAL_HOST invoked multiple times configure.in:144: warning: do not use m4_regexp: use regexp or m4_bregexp configure.in:12: your implementation of AM_INIT_AUTOMAKE comes from an configure.in:12: old Automake version. You should recreate aclocal.m4 configure.in:12: with aclocal and run automake again. ./configure --without-included-gettext ... checking whether included gettext is requested... no checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes Why does this happen:- ? make[1]: Entering directory `U:/unixos2/workdir/grep-2.5.1' Making all in intl make[2]: Entering directory `U:/unixos2/workdir/grep-2.5.1/intl' gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl intl-compat.c gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl bindtextdom.c ... And then it ends with this:- In file included from osdep.c:20: os2compat.c:52: parse error before `char' os2compat.c: In function `os2_initialize': os2compat.c:62: `_os2_libdir' undeclared (first use in this function) os2compat.c:62: (Each undeclared identifier is reported only once os2compat.c:62: for each function it appears in.) os2compat.c:107: warning: passing arg 1 of `strcpy' discards `const' from pointer target type make[2]: *** [osdep.o] Error 1 make[2]: Leaving directory `U:/unixos2/workdir/grep-2.5.1/intl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `U:/unixos2/workdir/grep-2.5.1' make: *** [all] Error 2 Making install in intl make[1]: Entering directory `U:/unixos2/workdir/grep-2.5.1/intl' gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl osdep.c In file included from osdep.c:20: os2compat.c:52: parse error before `char' os2compat.c: In function `os2_initialize': os2compat.c:62: `_os2_libdir' undeclared (first use in this function) os2compat.c:62: (Each undeclared identifier is reported only once os2compat.c:62: for each function it appears in.) os2compat.c:107: warning: passing arg 1 of `strcpy' discards `const' from pointer target type make[1]: *** [osdep.o] Error 1 make[1]: Leaving directory `U:/unixos2/workdir/grep-2.5.1/intl' make: *** [install-recursive] Error 1 > Bye, > Andreas > > -- > One OS to rule them all, One OS to find them, > One OS to bring them all and in the darkness bind them > In the Land of Mordor where the Shadows lie. -- John