[Openswan Users] UML Test Suite

Mike Horn lists at caddisconsulting.com
Wed Oct 18 18:34:44 EDT 2006


Hi Michael,

Thanks, as a sanity check I'm trying to build 2.6.15 and I'm still seeing
errors.  Did you apply any kernel patches?  What version of glibc are you
using?  I get the following build error:

  CC      arch/um/os-Linux/sys-i386/registers.o
arch/um/os-Linux/sys-i386/registers.c: In function 'get_thread_regs'
arch/um/os-Linux/sys-i386/registers.c:134: error: 'JB_PC' undeclared
(firstuse in this function)
arch/um/os-Linux/sys-i386/registers.c:134: error: (Each undeclared
identifier is reported only once
arch/um/os-Linux/sys-i386/registers.c:134: error: for each function it
appears in.)
arch/um/os-Linux/sys-i386/registers.c:135: error: 'JB_SP' undeclared
(firstuse in this function)
arch/um/os-Linux/sys-i386/registers.c:136: error: 'JB_BP' undeclared
(firstuse in this function)
make[3]: *** [arch/um/os-Linux/sys-i386/registers.o] Error 1
make[2]: *** [arch/um/os-Linux/sys-i386] Error 2
make[1]: *** [arch/um/os-Linux] Error 2
make[1]: Leaving directory `/umls-3/umlbuild/plain26'
make: *** [uml] Error 1
[mhorn at dev openswan-2]$

A search of the error yields a UML patch:

http://www.mail-archive.com/user-mode-linux-user@lists.sourceforge.net/msg03
878.html

But when I apply the patch I get a failure (I can successfully apply the
same patch to 2.6.18 kernel w/o issue).

patching file arch/um/sys-x86_64/setjmp.S
can't find file to patch at input line 219
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: linux-2.6.17/arch/um/include/longjmp.h
|===================================================================
|--- linux-2.6.17.orig/arch/um/include/longjmp.h        2006-08-15
11:50:53.0000
00000 -0400
|+++ linux-2.6.17/arch/um/include/longjmp.h     2006-08-15
11:51:32.000000000 -0
400
--------------------------
File to patch:

I have been beating my head against the wall trying to get a working
openswan UML for several days, so any help is greatly appreciated!  Btw, my
host system is FC5.

-mike

-----Original Message-----
From: mcr at sandelman.ottawa.on.ca [mailto:mcr at sandelman.ottawa.on.ca] On
Behalf Of Michael Richardson
Sent: Wednesday, October 18, 2006 3:41 PM
To: Lists
Cc: 'Paul Wouters'; users at openswan.org
Subject: Re: [Openswan Users] UML Test Suite 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>>>>> "Lists" == Lists  <lists at caddisconsulting.com> writes:
    Lists> I tried a 2.6.18.1 kernel, but I couldn't get it to compile
    Lists> due to what appeared to be issues with KLIPS (again using gcc
    Lists> 4.1.0).  I did some looking and it looked like there were
    Lists> some known issues with 2.6 & KLIPS.  Btw, is there a way to
    Lists> compile the UML environment without KLIPS support?

  I built 2.6.15 and 2.6.16.18 just now with:

gimli-[/i/hifn/2.6.0ocf] mcr 1156 %gcc -v gcc version 4.1.2 20060814
(prerelease) (Debian 4.1.1-11)

  This is was the #public tree, not 2.4.7.

  During the build process both a kernel with KLIPS and one without KLIPS
are built. Both will have the NAT-T patch applied.
  The one without the KLIPS is used as a base for a module-based KLIPS.

  If you just want a UML, you can do:
       bzcat kernel.tgz.bz
       cd linux-2.6.16.18
       make ARCH=um menuconfig
       make

  Here is my umlsetup.sh, for a debian etch machine. Note: it's a XenU, and
it seems that UML won't run under Xen3 XenUs, but does work on Xen2 XenuUs.
(Most annoying)


=== cut ===
# stuff
OPENSWANSRCDIR=/i/hifn/2.6.0ocf export OPENSWANSRCDIR

if [ -x /usr/local/bin/gmake ]; then
    MAKE=gmake export MAKE
fi

# space for everything:
# Just a shorthand for the following definitions.
# Can be eliminated if available space is fragmented.
UMLPREFIX=/0i/sandboxes/UMLPOOL/260ocf

# set this to someplace with at least 100Mb free.
POOLSPACE=$UMLPREFIX/umlbuild

# if you are using a 2.6 kernel,
KERNVER=26

# Set this to original kernel source.
# It will not be modified.
# Could be native build:
#KERNPOOL=/usr/src/linux
#
# or something you downloaded.
#KERNPOOL=/distros/kernel/linux-2.6.17.13
KERNPOOL=/distros/kernel/linux-2.6.16.18

# if you have a kernel that already has the NAT-T patch applies, then # set
this to false.
NATTPATCH=true

# NONINTPATCH is a patch that comes from Redhat kernels. It permits # "make
oldconfig" to complete without interacting with the user.
# I think that 2.6. kernels have this. This patch is optional, if you # do
not want it, then set it to "none".  The purpose of the patch is # make
scripts/cronjobs not hang if you run with too new a kernel.
NONINTPATCH=none

# For make check's kernel patch tests, virgin kernel sources are needed #
They will not be modified.
#KERNEL_LINUS2_0_SRC=
#KERNEL_LINUS2_2_SRC=
KERNEL_LINUS2_4_SRC=$KERNPOOL

# set this to the UML tar file, gotten from, e.g.
#     http://ftp.nl.linux.org/uml/uml-patch-2.4.18-53.bz2
#
UMLPATCH=none

# set BASICROOT this to an unpacked copy of the root file system you # want
to use.
#
# a small-ish one is at:
#     http://www.sandelman.ottawa.on.ca/freeswan/uml/
#
# umlfreeroot-5.1.tar.gz  is 17Mb, unpacks to around 50Mb.
#
# umlfreesharemini.tar.gz is 3Mb, unpacks to around 8Mb.
# umlfreeshareall.tar.gz is 6Mb, unpacks to around 26Mb.
#
# I did
#   mkdir -p $UMLPREFIX/basic-root
#   cd $UMLPREFIX/basic-root
#   nftp -o -
http://www.openswan.org/download/umlrootfs/umlswanroot-30.tar.gz | tar xzvf
-
#  (or ncftp, or whatever your favorite program is) # # There is an
advantage to having this on the same partition as # $POOLSPACE, as hard
links can be used.
#
BASICROOT=/0i/uml/root

# the mini /usr/share has Canada zoneinfo and "en" locale only.
# the all one has everything from the original UML debian root.
# I run debian, so I can just use my native /usr/share!
SHAREDIR=/usr/share

# note that "nic" and "sec" are the same host in different configurations
REGULARHOSTS='sunrise sunset nic carrot beet sec pole'
OPENSWANHOSTS='east west japan road north'

# tell system location of special tcpdump, if any #export
TCPDUMP="/usr/local/sbin/tcpdump"

# we always use OBJ directories for UML builds.
USE_OBJDIR=true export USE_OBJDIR

# comment this out to signify that you've customized this script #echo
"please create a umlsetup.sh" ; exit 99

REGRESSRESULTS=$UMLPOOL/results

=== tuc ===

- -- 
]            Bear: "Me, I'm just the shape of a bear."          |  firewalls
[
]   Michael Richardson,    Xelerance Corporation, Ottawa, ON    |net
architect[
] mcr at xelerance.com      http://www.sandelman.ottawa.on.ca/mcr/ |device
driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security
guy"); [



  
  
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Finger me for keys

iQEVAwUBRTafeICLcPvd0N1lAQKieAf/Vdjm4OzUi57u8B2Km/GPQoLMiwt9NSX/
ppDjSzIv8ht65B0kXzXu3BIZk4edYzM8a1UiehAectSJ8wuvgcSfsTgyzjBDjol4
A/Jam09qUIU9YNtXhCuWTNjdV5YGs1d9uaE+oDVqy7VvWDXnIabbPBW8T2CjNlkL
C38eFC31nef2MioXNG1KGAU2g7R6GaMwYNRIVsOmpJ3dKeh7hvp0qn7iY+PFuV0V
fuPcXhizXYZqxzGUhhaEfU8TwuQKwV6ZFKycWnuHiIyCZIqzdMcJKzocV12NtuMo
V6ktC/EJJcp8/rjyfWiPtxb0dHjgbjafX1cB9Nh4oeWWfBTWs7HwYw==
=M0R3
-----END PGP SIGNATURE-----





More information about the Users mailing list