Those boring never-ending builds...
Can some dualCPU power be spent, if building is interactive (i.e. sent to
terminal), to have them a bit colored?My last rant about "colored printk()" led away from kernel developers
and their solutions. But now, let me share something.(maybe some terminal emulators have more colors, finally?) usage:
olecom@flower:/tmp/blinux$ stty -tostop ; mkfifo stdout.pipe stderr.pipe
olecom@flower:/tmp/blinux$ sh ./colorize-linux-build.sh <stdout.pipe &
[1] 22070
olecom@flower:/tmp/blinux$ COLORIZERR=y sh colorize-linux-build.sh <stderr.pipe &
[2] 22145
olecom@flower:/tmp/blinux$
olecom@flower:/tmp/blinux$ LANG=C make >stdout.pipe 2>stderr.pipe
make -C /mnt/zdev0/linux-2.6 O=/dev/shm/blinux/.
Using /mnt/zdev0/linux-2.6 as source for kernel
GEN /dev/shm/blinux/Makefile
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL /mnt/zdev0/linux-2.6/scripts/checksyscalls.sh
CHK include/linux/compile.h
VDSOSYM arch/x86/vdso/vdso-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds
VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syms.lds
LD arch/x86/vdso/built-in.o
CC mm/memory.oolecom@flower:/tmp/blinux$
make[3]: *** [mm/memory.o] Interrupt
make[2]: *** [mm] Interrupt
make[1]: *** [sub-make] Interrupt
make: *** [all] Interrupt[1]- Done sh ./colorize-linux-build.sh <stdout.pipe
[2]+ Done COLORIZERR=yes sh colorize-linux-build.sh <stderr.pipe
olecom@flower:/tmp/blinux$________________________________________________________________________
#!/bin/sh
# colorize linux build# Time-stamp: Wed Apr 9 13:78:13 CEST 2008 olecom@flower.upol.cRAzY
color() {
# $1 -- regex
# $2 -- color code
# $3 -- next color code (default is $D)
# $4 -- regex match number (s///flags)
printf %s "`eval echo $TERMINAL_OUTPUT`"
}# for tty
[ -t 1 ] && {
# escape symbol
...
Forgot, email can be piped ('|' in mutt) to have script ready
to this line: sed '1,/^___/d' >/tmp/colorize-linux-build.sh'
--
sed 'sed && sh + olecom = love' << ''
http://kernelnewbies.org/olecom
-o--=O`C
#oo'L O
<___=E M
--
I don't know if it's of any use for you but there is already
*) color-make - http://bre.klaki.net/programs/colormake/ - and
*) color-gcc - http://schlueters.de/colorgcc.html -
out there.Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services--
icecc seems to do the coloring, too...
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Hallo.
This one? http://en.opensuse.org/Icecream
,--
|0.7.3 (r552930):
|[..]
| - builtin colorgcc
`--
Now i'm being pointed to C++ one. Alright!== Check this out then. ==
Linus says, make it working somehow and release, so...
I'd like to have it in menuconfig window running gcc on every */M
(i want alot more, without ncurses, perl, C++ using kernel, sh, sed)extract$ sed '1,/^__/d' >/tmp/lide.sh
use (in OBJDIR)$ clear ; sh /tmp/lide.sh kdefckdefc is a user friendly thing for `make defconfig`
ksecmis is one for funny `make CONFIG_DEBUG_SECTION_MISMATCH=y`
any ordinary command will work, no command -- interactive mode.Coloring and painting is for children, big daddies usually don't get it,
as well as most basic userspace possible(: /bin/sh ).(any tty braindamage is a cool tty design from 70s, not sh + sed)
--
Text processing(for newbies): http://kernelnewbies.org/olecom
Tech VA: http://kerneltrap.org/blog/9104
-o--=O`C
#oo'L O
<___=E M
________
#!/bin/sh
# linux integrated development environment (without text editor/pager)# Time-stamp: Sun Apr 13 16:79:15 CEST 2008 olecom@flower.upol.cRAzY
[ "$lideRELOAD" ] || {
[ -t 1 ] || exec dd count=1 # notty
#sed(){
# busybox -- cryptic errors from internal `sed`
# sed -- dash crashes
#}
stty -tostop
rm -rf /tmp/stderr.pipe /tmp/stdout.pipe
mkfifo /tmp/stderr.pipe /tmp/stdout.pipe
# /tmp/stderr.txt is for `tee ` and off-line pager
}
set +i -e# own syntax:
# $E is 'ESC[' = '\233'
# fork tty service
sed "s-[$]E-`printf '\233'`-g" << '# here' | /bin/sh -s &
# ${E} is ESC ; Ignored symbol for stderr prefix
E=`printf '\033'` ; I=`printf '\177'`# default fg;bg rendering ; reset attributes
D="7" ; RESET="$E0m"
# basic attributes (reset bg color and bold, set fg color)
V="$E40;22;3"# wrap regex, multiple times per line
T=\''\"s-$1-$V$2m&$V${3-'$D'}m-$4;\"'\'
eval '
color_lide() {
# wrap regex with color
# $1 -- regex ; $2 -- color code ; $3 -- ...
That was about "The True Kernel Developer's Way to Coloring"
by Jonathan Corbet October 9, 2007 http://lwn.net/Articles/253726/Please, show those to http://udrepper.livejournal.com/17109.html
`perl` is more welcome in Debian, btw.Free versions of color_proc_cpuinfo && color_meminfo:
TERMINAL_OUTPUT='s-"$1"-"$V$2m&$V${3-'$D'}m"-$4'
`color '[^:]*' 4 3`
`color : 3 2`
`color AMD 6 2`
`color Intel 6 2`
`color Athlon '6;44' 2`
`color Pentium '6;44' 2`Invent Your Own Easily(R)
--
sed 'sed && sh + olecom = love' << ''
-o--=O`C
#oo'L O
<___=E M
--
Yea (subject: small kbuild example).
_____
--
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| KAMEZAWA Hiroyuki | Re: 2.6.24-rc3-mm1 |
| Ingo Molnar | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: Data corruption issue with splice() on 2.6.27.10 |
| Patrick McHardy | Re: [GIT]: Networking |
