Discussion:
Wheezy NSS...
(too old to reply)
Dave Jones
2012-10-21 03:30:01 UTC
Permalink
Can the wheezy s390x kernel be saved as an NSS? If so, how?

Thanks.
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Jonathan Nieder
2012-10-24 03:50:02 UTC
Permalink
Hi,
Post by Dave Jones
Can the wheezy s390x kernel be saved as an NSS? If so, how?
Based on [1], it looks like the answer is currently no, based on the
following line in the kernel config file:

# CONFIG_SHARED_KERNEL is not set

The description of that option says

Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.

You can build a custom kernel using that option if you wish. It works
like this[2]:

$ apt-get source linux
# apt-get install build-essential fakeroot
# apt-get build-dep linux
$ cd linux-<version>
$ fakeroot debian/rules source
$ fakeroot make -f debian/rules.gen setup_s390_none_s390x
$ cd debian/build/build_s390_none_s390x
$ scripts/config --disable DEBUG_INFO
$ scripts/config --enable SHARED_KERNEL
$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_s390_none_s390x

Hope that helps,
Jonathan

[1] http://www.vm.ibm.com/linux/linuxnss.html
[2] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@elie.Belkin
Dave Jones
2012-10-25 21:30:02 UTC
Permalink
Thank you very much, Jonathan. that helps a great deal. After I posted
my query to the list I did see that the shared kernel configuration was
not enabled in the build. I'll rebuild the kernel, following your
instructions, here tonight.

DJ
Post by Jonathan Nieder
Hi,
Post by Dave Jones
Can the wheezy s390x kernel be saved as an NSS? If so, how?
Based on [1], it looks like the answer is currently no, based on the
# CONFIG_SHARED_KERNEL is not set
The description of that option says
Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.
You can build a custom kernel using that option if you wish. It works
$ apt-get source linux
# apt-get install build-essential fakeroot
# apt-get build-dep linux
$ cd linux-<version>
$ fakeroot debian/rules source
$ fakeroot make -f debian/rules.gen setup_s390_none_s390x
$ cd debian/build/build_s390_none_s390x
$ scripts/config --disable DEBUG_INFO
$ scripts/config --enable SHARED_KERNEL
$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_s390_none_s390x
Hope that helps,
Jonathan
[1] http://www.vm.ibm.com/linux/linuxnss.html
[2] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Philipp Kern
2012-10-25 22:20:01 UTC
Permalink
Hi,
Post by Jonathan Nieder
Post by Dave Jones
Can the wheezy s390x kernel be saved as an NSS? If so, how?
Based on [1], it looks like the answer is currently no, based on the
# CONFIG_SHARED_KERNEL is not set
The description of that option says
Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.
You can build a custom kernel using that option if you wish. It works
$ apt-get source linux
# apt-get install build-essential fakeroot
# apt-get build-dep linux
$ cd linux-<version>
$ fakeroot debian/rules source
$ fakeroot make -f debian/rules.gen setup_s390_none_s390x
as we're talking about s390x here that would be setup_s390x_none_s390x.
Post by Jonathan Nieder
$ cd debian/build/build_s390_none_s390x
Same here.
Post by Jonathan Nieder
$ scripts/config --disable DEBUG_INFO
$ scripts/config --enable SHARED_KERNEL
That's «../source_none/scripts/config».
Post by Jonathan Nieder
$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_s390_none_s390x
And again s390x_none_s390x instead of s390_none_s390x.

I just did the recompilation. AFAICS the kernel size is indeed increased quite
a bit. We currently have:

-rw-r--r-- root/root 6303232 2012-10-22 15:36 ./boot/vmlinuz-3.2.0-4-s390x

With SHARED_KERNEL on and DEBUG_INFO off as above:

-rw-r--r-- root/root 7945728 2012-10-25 21:53 ./boot/vmlinuz-3.2.0-4-s390x

So a NSS shareable kernel is 1.26 times larger than a plain one. And I fear
that the additional bits cannot be discarded at runtime neither, but I cannot
test this right now.

Interestingly enough the kernel is already in its plain form 2.23 times bigger
than an amd64 build of vmlinuz-3.2.0-3-amd64.

Kind regards
Philipp Kern
Post by Jonathan Nieder
[1] http://www.vm.ibm.com/linux/linuxnss.html
[2] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@hub.kern.lc
Dave Jones
2012-11-02 20:30:01 UTC
Permalink
Thanks for clearing that up for me, Philipp, that saved some time in
figuring out what I was doing wrong....:-)

I've upgraded our zPDT box here to the latest IBM version so it now
supports the instructions, etc. of the new IBM EC12 systems, and I'd
like to try building Debian in that environment.

What's involved in doing a complete Debian build on the s390x architecture?

Thanks and have a good weekend, too.

DJ
Post by Philipp Kern
Hi,
Post by Jonathan Nieder
Post by Dave Jones
Can the wheezy s390x kernel be saved as an NSS? If so, how?
Based on [1], it looks like the answer is currently no, based on the
# CONFIG_SHARED_KERNEL is not set
The description of that option says
Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.
You can build a custom kernel using that option if you wish. It works
$ apt-get source linux
# apt-get install build-essential fakeroot
# apt-get build-dep linux
$ cd linux-<version>
$ fakeroot debian/rules source
$ fakeroot make -f debian/rules.gen setup_s390_none_s390x
as we're talking about s390x here that would be setup_s390x_none_s390x.
Post by Jonathan Nieder
$ cd debian/build/build_s390_none_s390x
Same here.
Post by Jonathan Nieder
$ scripts/config --disable DEBUG_INFO
$ scripts/config --enable SHARED_KERNEL
That's «../source_none/scripts/config».
Post by Jonathan Nieder
$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_s390_none_s390x
And again s390x_none_s390x instead of s390_none_s390x.
I just did the recompilation. AFAICS the kernel size is indeed increased quite
-rw-r--r-- root/root 6303232 2012-10-22 15:36 ./boot/vmlinuz-3.2.0-4-s390x
-rw-r--r-- root/root 7945728 2012-10-25 21:53 ./boot/vmlinuz-3.2.0-4-s390x
So a NSS shareable kernel is 1.26 times larger than a plain one. And I fear
that the additional bits cannot be discarded at runtime neither, but I cannot
test this right now.
Interestingly enough the kernel is already in its plain form 2.23 times bigger
than an amd64 build of vmlinuz-3.2.0-3-amd64.
Kind regards
Philipp Kern
Post by Jonathan Nieder
[1] http://www.vm.ibm.com/linux/linuxnss.html
[2] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Philipp Kern
2012-11-02 22:00:01 UTC
Permalink
Post by Dave Jones
Thanks for clearing that up for me, Philipp, that saved some time in
figuring out what I was doing wrong....:-)
I've upgraded our zPDT box here to the latest IBM version so it now
supports the instructions, etc. of the new IBM EC12 systems, and I'd
like to try building Debian in that environment.
What's involved in doing a complete Debian build on the s390x architecture?
It would be highly unusual to rebuild Debian completely. So you might want to
clarify what you try to accomplish. :-)

Kind regards
Philipp Kern
Dave Jones
2012-11-03 21:40:02 UTC
Permalink
Hi, Philip.

What I am trying to do here at the moment is rebuilt the Debian s390x
kernel with the options I want enabled. I'm following the instructions
that you and Jonathan provided, and the recompile step in running
running right now. We'''l see how long it takes on the zPDT box, adn I
will let you both know what that time is.

Thanks again and have a good one.

DJ
Post by Philipp Kern
Post by Dave Jones
Thanks for clearing that up for me, Philipp, that saved some time
in figuring out what I was doing wrong....:-)
I've upgraded our zPDT box here to the latest IBM version so it
now supports the instructions, etc. of the new IBM EC12 systems,
and I'd like to try building Debian in that environment.
What's involved in doing a complete Debian build on the s390x
architecture?
It would be highly unusual to rebuild Debian completely. So you
might want to clarify what you try to accomplish. :-)
Kind regards Philipp Kern
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Dave Jones
2012-11-05 21:20:02 UTC
Permalink
Hi, folks.

With the aid of Jonathan's and Philipp's excellent instructions I was
able to rebuild the Debian Wheezy 3.2 kernel with the NSS feature enabled.

As I have begun to experiment with building the kernel, I have found the
following issues with the Debian process

1) If I install the libncurses5-dev package and use the instructions
found in Chapter 4, Section 5 of the Debian Linux Kernel Handbook (i.e.,
the make menuconfig, make clean, make deb-pkg steps), the kernel built
is for the s390 architecture and not the s390x one.

2) If I use the "make menuconfig" command instead of the two
"scripts/config" commands shown below, then the next "fakeroot make -f
debian/rules.gen binary-arch_s390x_none_s390x" command fails with an
error. That is the following sequence does not work:

cd linux-3.2.23
fakeroot make -f debian/rules.gen setup_s390x_none_s390x
make menuconfig
fakeroot make -f debian/rules.gen binary-arch_s390x_none_s390x

3) Since it appears that I can not use the "make menuconfig" process to
update the kernel configuration file, where might I find a list of all
acceptable options for the "scripts/config --enable" command

4) Why is the kernel build process for s390x different than the one
documented in the Handbook?

Thanks again for the help, and have a good one, too.

DJ
Post by Philipp Kern
Hi,
Post by Jonathan Nieder
Post by Dave Jones
Can the wheezy s390x kernel be saved as an NSS? If so, how?
Based on [1], it looks like the answer is currently no, based on the
# CONFIG_SHARED_KERNEL is not set
The description of that option says
Select this option, if you want to share the text segment of the
Linux kernel between different VM guests. This reduces memory
usage with lots of guests but greatly increases kernel size.
You can build a custom kernel using that option if you wish. It works
$ apt-get source linux
# apt-get install build-essential fakeroot
# apt-get build-dep linux
$ cd linux-<version>
$ fakeroot debian/rules source
$ fakeroot make -f debian/rules.gen setup_s390_none_s390x
as we're talking about s390x here that would be setup_s390x_none_s390x.
Post by Jonathan Nieder
$ cd debian/build/build_s390_none_s390x
Same here.
Post by Jonathan Nieder
$ scripts/config --disable DEBUG_INFO
$ scripts/config --enable SHARED_KERNEL
That's «../source_none/scripts/config».
Post by Jonathan Nieder
$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_s390_none_s390x
And again s390x_none_s390x instead of s390_none_s390x.
I just did the recompilation. AFAICS the kernel size is indeed increased quite
-rw-r--r-- root/root 6303232 2012-10-22 15:36 ./boot/vmlinuz-3.2.0-4-s390x
-rw-r--r-- root/root 7945728 2012-10-25 21:53 ./boot/vmlinuz-3.2.0-4-s390x
So a NSS shareable kernel is 1.26 times larger than a plain one. And I fear
that the additional bits cannot be discarded at runtime neither, but I cannot
test this right now.
Interestingly enough the kernel is already in its plain form 2.23 times bigger
than an amd64 build of vmlinuz-3.2.0-3-amd64.
Kind regards
Philipp Kern
Post by Jonathan Nieder
[1] http://www.vm.ibm.com/linux/linuxnss.html
[2] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Philipp Kern
2012-11-06 10:00:02 UTC
Permalink
Post by Dave Jones
1) If I install the libncurses5-dev package and use the instructions
found in Chapter 4, Section 5 of the Debian Linux Kernel Handbook (i.e.,
the make menuconfig, make clean, make deb-pkg steps), the kernel built
is for the s390 architecture and not the s390x one.
What does «dpkg-architecture -qDEB_HOST_ARCH» say?
Post by Dave Jones
4) Why is the kernel build process for s390x different than the one
documented in the Handbook?
«Because the handbook is outdated» would be my guess.

Kind regards
Philipp Kern
Dave Jones
2012-11-07 20:40:02 UTC
Permalink
Hello, everyone.
Post by Dave Jones
1) If I install the libncurses5-dev package and use the
instructions found in Chapter 4, Section 5 of the Debian Linux
Kernel Handbook (i.e., the make menuconfig, make clean, make
deb-pkg steps), the kernel built is for the s390 architecture and
not the s390x one.
What does «dpkg-architecture -qDEB_HOST_ARCH» say?
It says:
***@debian:~/linux-3.2.23# dpkg-architecture -qDEB_HOST_ARCH
s390x
Post by Dave Jones
4) Why is the kernel build process for s390x different than the
one documented in the Handbook?
«Because the handbook is outdated» would be my guess.
OK, that's a good answer.....:-)

Now another problem has arisen....following the method that Philipp
outlines in earlier notes, I am getting the following error message in
the build modules step of:

fakeroot make -f debian/rules.gen binary-arch_s390x_none_s390x

wakeup_source_unregister module: vmlinux,
version: 0x7c778579, export: EXPORT_SYMBOL_GPL
make[1]: *** [debian/stamps/build_s390x_none_s390x_plain] Error 1
make[1]: Leaving directory `/root/linux-3.2.23'
make: *** [binary-arch_s390x_none_s390x_real] Error 2
***@debian:~/linux-3.2.23#

Where might I find the build log that would expound on what's really
wrong here?

Thanks and have a good one, too.

DJ
Kind regards Philipp Kern
--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@vsoft-software.com
Philipp Kern
2012-11-29 22:40:02 UTC
Permalink
Hi,

sorry for the late answer. I marked it as »to-do« and forgot about it.
(Also I hoped that somebody else would answer.)
Post by Dave Jones
fakeroot make -f debian/rules.gen binary-arch_s390x_none_s390x
wakeup_source_unregister module: vmlinux,
version: 0x7c778579, export: EXPORT_SYMBOL_GPL
make[1]: *** [debian/stamps/build_s390x_none_s390x_plain] Error 1
make[1]: Leaving directory `/root/linux-3.2.23'
make: *** [binary-arch_s390x_none_s390x_real] Error 2
Where might I find the build log that would expound on what's really
wrong here?
The reason for this is that Debian kernel builds check that no symbols
unexpectedly appear or disappear. If that happens modules that were
compiled against a given kernel version would break. That's the -4- in
3.2.0-4-s390x. This is increased when symbols are incompatible and
modules need to be rebuilt.

It might work to comment out the following line in »debian/rules.real«:
python debian/bin/buildcheck.py $(DIR) $(ARCH) $(FEATURESET) $(FLAVOUR)

Then probably rules.gen needs to be regenerated.

Kind regards
Philipp Kern

Loading...