From: Randy Dunlap <rdunlap@xenotime.net>
To: piotr@hosowicz.com
Cc: linux-kbuild@vger.kernel.org
Subject: Re: Maybe my frequent kernel building could be of some help to the community? And how to build?
Date: Thu, 25 Mar 2010 15:04:03 -0700 [thread overview]
Message-ID: <4BABDDD3.4040803@xenotime.net> (raw)
In-Reply-To: <4BABACE9.8000405@example.com>
On 03/25/10 11:35, Piotr Hosowicz wrote:
>>>>>>> One thing that you could do that no one focuses on is building
>>>>>>> with some kconfig symbols disabled (ones that are typically
>>>>>>> enabled),
>>>>>>> such as CONFIG_SMP=n, CONFIG_SYSFS=n, CONFIG_PROC_FS=n, CONFIG_PM=n,
>>>>>>> CONFIG_PCI=n, CONFIG_BLOCK=n, CONFIG_NET=n, CONFIG_INET=n (but
>>>>>>> latter
>>>>>>> with CONFIG_NET=y), CONFIG_HOTPLUG=n. Not all of these at the same
>>>>>>> time,
>>>>>>> just various/random combinations of them.
>>>>>> and CONFIG_SYSRQ=n (just found some errors due to this one)
>>>>> You mean CONFIG_SYSRQ=n exactly and mandatory in every config or this
>>>>> was just an example?
>>>> Sorry about that. Just make it random (sometimes disabled).
The config symbol above should be CONFIG_MAGIC_SYSRQ.
> Ok, but at present is not working properly, as expected. The scripts now
> are like this, I returned to randomizing with bash:
>
> --- try-build.sh
>
> #!/bin/bash
>
> RCPT=phz@localhost
> CPUCNT=$(cat /proc/cpuinfo | grep ^processor | wc -l)
>
> function tidy(){
> rm ../results/.config 2>/dev/null
> rm ../results/build.log 2>/dev/null
> rm ../BUILDING-NOW 2>/dev/null
> }
>
> cd ~/kernel/linux
> if test -f ../BUILDING-NOW ; then
> exit 0
> else
> touch ../BUILDING-NOW
> make mrproper
> cat ../config.all | ../randomize-conf2.sh > ./.config
> make oldconfig
I am using:
yes '' | make oldconfig
> cp .config ../results/
> DT=$(date +%y%m%d-%H%M%S)
> make -j $CPUCNT vmlinux 2>&1 | tee ../results/build.log
> if test $? -ne 0 ; then
> (cat ../results/.config && cat ../results/build.log) | mail -s
> 'Build failed at kernel phase' $RCPT
> mv ../results/.config ../results/.config.kf.$DT
> mv ../results/build.log ../results/build.log.$DT
> tidy
> exit 0
> fi
> make -j $CPUCNT modules 2>&1 | tee -a ../results/build.log
> if test $? -ne 0 ; then
> (cat ../results/.config && cat ../results/build.log) | mail -s
> 'Build failed at modules phase' $RCPT
> mv ../results/.config ../results/.config.mf.$DT
> mv ../results/build.log ../results/build.log.$DT
> tidy
> exit 0
> fi
> cp ../results/build.log ./
> rm BUILDING-NOW
> echo OK | mail -s 'ok' $RCPT
> tidy
>
> fi
>
>
> --- randomize-conf2.sh:
>
> #!/bin/bash
>
> NETENABLED=0
> function enable_or_not(){
> if test $RANDOM -lt 16383 ; then
> if test $1=CONFIG_NET ; then
> NETENABLED=1
> echo $1=y
> return
> fi
> if test $1=CONFIG_INET && test $NETENABLED -eq 1 ; then
> if test $RANDOM -lt 16383 ; then
> echo $1=y
> else
> echo '# '$1' is not set'
> fi
> return
> fi
> else
> echo '# '$1' is not set'
> fi
> }
>
> cat ../config.all | grep -v CONFIG_SMP | grep -v CONFIG_SYSFS | grep -v
> CONFIG_PROC_FS | grep -v CONFIG_PM | grep -v CONFIG_PCI | grep -v
> CONFIG_BLOCK | grep -v CONFIG_NET | grep -v CONFIG_INET | grep -v
> CONFIG_HOTPLUG > ./cfg.tmp
Note that these grep -v's drop any config that contains CONFIG_whatever,
such as CONFIG_PCI_QUIRKS. If you just want to drop those config
symbols and no others, I guess you would add "-w" to the grep command.
>
> (
> enable_or_not CONFIG_SMP
> enable_or_not CONFIG_SYSFS
> enable_or_not CONFIG_PROC_FS
> enable_or_not CONFIG_PM
> enable_or_not CONFIG_PCI
> enable_or_not CONFIG_BLOCK
> enable_or_not CONFIG_NET
> enable_or_not CONFIG_INET
> enable_or_not CONFIG_HOTPLUG
> )
> cat ./cfg.tmp
>
> I launch try-build.sh, but it still asks me about unspecified options,
> my config.all is produced by make defconfig or make oldconfig, dosen't
> matter still.
>
> Do you see what the problem is?
It's working for me just be using
yes '' | make oldconfig
--
~Randy
next prev parent reply other threads:[~2010-03-25 22:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 19:02 Maybe my frequent kernel building could be of some help to the community? And how to build? Piotr Hosowicz
2010-03-16 19:24 ` Randy Dunlap
2010-03-16 19:33 ` Piotr Hosowicz
2010-03-16 19:42 ` Randy Dunlap
2010-03-17 3:24 ` Piotr Hosowicz
2010-03-17 15:07 ` Randy Dunlap
[not found] ` <4BA0F8DE.1050006@example.com>
2010-03-17 15:54 ` Randy Dunlap
2010-03-17 16:03 ` Piotr Hosowicz
2010-03-17 17:49 ` Piotr Hosowicz
2010-03-17 17:53 ` Randy Dunlap
2010-03-18 15:40 ` Randy Dunlap
2010-03-22 3:31 ` Piotr Hosowicz
2010-03-22 3:48 ` Randy Dunlap
2010-03-22 12:42 ` Piotr Hosowicz
2010-03-22 12:53 ` Piotr Hosowicz
2010-03-24 1:12 ` Piotr Hosowicz
2010-03-24 21:43 ` Randy Dunlap
2010-03-25 11:38 ` Piotr Hosowicz
2010-03-25 17:29 ` Randy Dunlap
2010-03-25 17:37 ` Piotr Hosowicz
2010-03-25 17:40 ` Randy Dunlap
2010-03-25 17:48 ` Piotr Hosowicz
2010-03-25 17:54 ` Randy Dunlap
2010-03-25 18:35 ` Piotr Hosowicz
2010-03-25 22:04 ` Randy Dunlap [this message]
2010-03-25 22:15 ` Piotr Hosowicz
2010-03-26 16:46 ` Piotr Hosowicz
2010-03-27 16:37 ` Piotr Hosowicz
2010-03-27 16:39 ` Piotr Hosowicz
2010-04-01 16:02 ` Randy Dunlap
2010-04-01 17:24 ` Piotr Hosowicz
2010-04-01 17:44 ` Piotr Hosowicz
2010-03-29 20:16 ` Is root kernel parameter expected to be the first one or something? Piotr Hosowicz
2010-03-29 20:38 ` Randy Dunlap
2010-03-29 20:41 ` Piotr Hosowicz
2010-03-29 21:33 ` Randy Dunlap
2010-03-29 22:32 ` Piotr Hosowicz
2010-03-29 22:39 ` Randy Dunlap
2010-03-29 22:44 ` Piotr Hosowicz
2010-03-29 22:48 ` Randy Dunlap
2010-03-29 22:55 ` Piotr Hosowicz
2010-03-29 23:06 ` Randy Dunlap
2010-03-29 23:44 ` Piotr Hosowicz
2010-03-30 16:37 ` Piotr Hosowicz
2010-03-30 18:03 ` Piotr Hosowicz
2010-03-30 19:00 ` Piotr Hosowicz
2010-03-31 9:15 ` Piotr Hosowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BABDDD3.4040803@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=linux-kbuild@vger.kernel.org \
--cc=piotr@hosowicz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.