Re: SOURCES: irqbalance.init - use functions - add chkconfig - actuall...

2006-12-13 Thread Elan Ruusamäe
On Wednesday 13 December 2006 21:35, Paweł Gołaszewski wrote:
> On Wed, 13 Dec 2006, glen wrote:
> > Author: glen Date: Wed Dec 13 18:42:44 2006 GMT
> > Module: SOURCES   Tag: HEAD
> >  Log message:
>
> [...]
>
> > - skip very early on UP
>
> [...]
>
> > +# useless on UP
> > +if [ "$(LC_ALL=C grep "^processor.*:.*[0-9]" /proc/cpuinfo | wc -l)" -lt
> > 2 ]; then + exit 0
> > +fi
>
> [...]
>
> Well...
>
> The test should only check if kernel is SMP.
> CPU alone can be hotpluged and you can start with only one.
>
> It's theoretical but really possible (I have one machine which can have
> processors hotpluged... never tried, but is possible on the paper :D ).

not my change :)

i just moved it earlier (to skip heavy init.d/functions if the script will 
exit as the next thing)

on the topic, how you check if kernel is smp? matcing smp from `uname -r` ?

-- 
glen
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: SOURCES: irqbalance.init - use functions - add chkconfig - actuall...

2006-12-13 Thread Paweł Gołaszewski
On Wed, 13 Dec 2006, glen wrote:
> Author: glen Date: Wed Dec 13 18:42:44 2006 GMT
> Module: SOURCES   Tag: HEAD
>  Log message:
[...]
> - skip very early on UP
[...]
> +# useless on UP
> +if [ "$(LC_ALL=C grep "^processor.*:.*[0-9]" /proc/cpuinfo | wc -l)" -lt 2 
> ]; then
> + exit 0
> +fi
[...]

Well...

The test should only check if kernel is SMP.
CPU alone can be hotpluged and you can start with only one.

It's theoretical but really possible (I have one machine which can have 
processors hotpluged... never tried, but is possible on the paper :D ).

-- 
pozdr.  Paweł Gołaszewski  jid:bluesjabbergdapl
--
If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby
Pro-Logic Surround Sound with Bass Boost and all the music is free.___
pld-devel-pl mailing list
pld-devel-pl@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: Initramfs in geninitrd - ready RFC

2006-12-13 Thread Cezary Krzyzanowski
Dnia 10-12-2006, nie o godzinie 00:41 +0100, Cezary Krzyzanowski
napisał(a):
> Ok these changes *should* make possible proper initramfs start with both
> udev on and off (I'm using udev, but I've also tested without and it
> seems to work)
> 

Ok - so finished - works.

I've replaced a mix of awk and sh to clean awk parsing and then I do
what I must in sh (like making a device node). The device will be
created if there is no device in /dev passed by root (regardless of
udev). So if there is no udev or udev fails to make a device and s/b
passed it as a parameter - it will be made as long it exists
in /proc/partitions

Full support for fbsplash incorporated as well. Some sanity checks (as
not both bootsplash and fbslash, or no fbsplash other then in
initramfs). Should work nicely.

I've also modified the sysconfig geninitrd file and splashutils
sysconfig fbsplash file to show options needed to be set for fbplash to
work correctly.

The only remaining problem is udev. Gonna toy with it later.

For now please wrie any comments. On resolving all comments I'm
commiting back to trunk and sending to buildres.

[EMAIL PROTECTED]
Index: geninitrd
===
--- geninitrd	(.../trunk/geninitrd)	(wersja 8099)
+++ geninitrd	(.../branches/devel/geninitrd)	(wersja 8099)
@@ -41,6 +41,8 @@
 rootdev_nr=0
 # default bootsplash is off, if it have to be on, install bootsplash package
 BOOT_SPLASH=no
+# default same as bootsplash, if on install splashutils and some splashutils theme
+FB_SPLASH=no
 
 # is /dev on tmpfs. internal variable
 tmpfs_dev=
@@ -59,7 +61,8 @@
 	echo "   [--with=] [--image-version] [--fstab=] [--nocompress]"
 	echo "   [--initrdfs=rom|ext2|cram] [--modules-conf=]"
 	echo "   [--with-raidstart] [--without-raidstart] [--with-insmod-static]"
-	echo "   [--without-bootsplash] [--lvmtoolsversion=1|2] [--with-udev] [--without-udev]"
+	echo "   [--without-bootsplash] [--without-fbsplash]"
+	echo "   [--lvmtoolsversion=1|2] [--with-udev] [--without-udev]"
 	echo "   [--without-suspend] [--without-suspend2] [--without-dmraid]"
 	echo ""
 	echo "   (ex: `basename $0` /boot/initrd-2.2.5-15.img 2.2.5-15)"
@@ -781,6 +784,10 @@
 	. /etc/sysconfig/bootsplash
 fi
 
+if [ -r /etc/sysconfig/fbsplash ] ; then
+	. /etc/sysconfig/fbsplash
+fi
+
 if [ ! -x /bin/initrd-busybox ] ; then
 	echo "/bin/initrd-busybox is missing !"
 	exit 1
@@ -817,6 +824,9 @@
 	--without-bootsplash)
 		BOOT_SPLASH="no"
 		;;
+	--without-fbsplash)
+		FB_SPLASH="no"
+		;;
 	--without-suspend)
 		USE_SUSPEND="no";
 		;;
@@ -915,8 +925,7 @@
 if [ "x" = "x$INITRDFS" ] ; then
 	if [ "x" = "x$FS" ] ; then
 		# default value
-		# XXX: initramfs blocked for now
-		if [ "1" = " 0" -a "$pack_version" -ge "002005" ] ; then
+		if [ "$pack_version" -ge "002005" ] ; then
 			INITRDFS="initramfs"
 		else
 			INITRDFS="rom"
@@ -1005,6 +1014,16 @@
 	fi
 fi
 
+if is_yes "$FB_SPLASH"; then
+	if is_yes "$BOOT_SPLASH"; then
+		echo >&2 "You can't use both bootsplash and fbsplash! Please choose one."
+		exit 1
+	elif [ "$INITRDFS" != "initramfs" ]; then
+		echo >&2 "FB_SPLASH works only if INITRDFS is initramfs!."
+		exit 1
+	fi
+fi
+
 if [ ! -f /proc/mounts ]; then
 	echo >&2 "WARNING: /proc filesystem not mounted, may cause wrong results or failure."
 fi
@@ -1047,6 +1066,9 @@
 	findmodule "-lzf"
 fi
 
+if is_yes "$FB_SPLASH"; then
+	findmodule "-evdev"
+fi
 if [ -n "$ifneeded" -a -z "$MODULES" ]; then
 	debug "No modules are needed -- not building initrd image."
 	exit 0
@@ -1464,8 +1486,58 @@
 if [ "$INITRDFS" = "initramfs" ]; then
 	mkdir -p $MNTIMAGE/newroot
 	cp -HR $org_rootdev $MNTIMAGE/dev
-	echo "mount -t $rootFs $org_rootdev /newroot" >> "$s"
-	echo "switch_root /newroot /sbin/init" >> "$s"
+	# Parsing root parameter
+	# We support passing root as hda3 /dev/hda3 0303 0x0303
+	cat << 'EOF' >> "$s"
+set +x
+mount -t proc none /proc
+root="$(busybox awk -v prefix="root=" ' \
+function separate_root ( txt ) \
+{ \
+gsub(/.*root=/,NIL,txt); \
+gsub(/ .*/,NIL,txt); \
+return txt \
+} \
+BEGIN { \
+num_pattern = "[0-9][0-9][0-9][0-9]"; \
+dev_pattern = "[hms][a-z][a-z]([0-9])+"; \
+partition = "Metallica rocks!"; \
+min = -1; maj = -1; \
+} \
+$0 ~ prefix "0x" num_pattern { sub(/root=0x/,"root="); } \
+$0 ~ prefix num_pattern { \
+gsub(/.*root=/,NIL,partition); \
+gsub(/ .*/,NIL,partition); \
+partition = separate_root( $0 ); \
+maj = sprintf("%d",substr(partition,1,2)); \
+min = sprintf("%d",substr(partition,3)); \
+} \
+$0 ~ prefix "\/dev\/" dev_pattern { sub(/root=\/dev\//,"root="); } \
+$0 ~ prefix dev_pattern { \
+partition = separate_root( $0 ); \
+} \
+$4 ~ partition { maj = $1; min = $2; } \
+$1 ~ maj && $2 ~ min { partition = $4; } \
+END { print sprintf("/dev/%s %d %d", partition, maj, min); }
+' /proc/cmdline /proc/partitions)"
+device=${root% * *}
+maj=${root#* }
+maj=${maj% *}
+min=${root#* * }
+set -x
+if [ 

Re: vlc-gcc-hack.patch

2006-12-13 Thread Paweł Sikora
Cezary Krzyzanowski napisał(a):
> Dnia 13-12-2006, śro o godzinie 09:17 +0100, Paweł Sikora napisał(a):
> 
>> glen, if you want such typedefs use /dev/brain,
>> include  and pass -mmmx to cflags.
> 
> We aren't a group of folk screaming at each other in the middle of a
> field. Please use /dev/courtsy next time.

ok ;)
$ mode o+courtesy

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: vlc-gcc-hack.patch

2006-12-13 Thread Cezary Krzyzanowski
Dnia 13-12-2006, śro o godzinie 09:17 +0100, Paweł Sikora napisał(a):

> glen, if you want such typedefs use /dev/brain,
> include  and pass -mmmx to cflags.

We aren't a group of folk screaming at each other in the middle of a
field. Please use /dev/courtsy next time.

[EMAIL PROTECTED]

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: vlc-gcc-hack.patch

2006-12-13 Thread Elan Ruusamäe
On Wednesday 13 December 2006 10:17, Paweł Sikora wrote:
>  > copy __m64 from
>  > /usr/lib/gcc-lib/i686-pld-linux/3.3.6/include/mmintrin.h
>
> veto!
>
> glen, if you want such typedefs use /dev/brain,
> include  and pass -mmmx to cflags.

that header is included already and mmx is enabled too otherwise mmintrin.h 
would fail

[EMAIL PROTECTED] pld/SPECS $ grep -C2 __MMX 
/usr/lib/gcc-lib/i686-pld-linux/3.3.6/include/mmintrin.h
#define _MMINTRIN_H_INCLUDED

#ifndef __MMX__
# error "MMX instruction set not enabled"
#else
--

[EMAIL PROTECTED] pld/SPECS $ grep -C2 HAVE_MMX_INTRINSICS 
../BUILD/vlc-0.8.6/modules/video_chroma/i420_rgb16.c
#   include "i420_rgb_c.h"
#elif defined (MODULE_NAME_IS_i420_rgb_mmx)
#   if defined(HAVE_MMX_INTRINSICS)
#   include 
#   endif
--
for ( i_x = p_vout->render.i_width / 8; i_x--; )
{
#   if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
--
for ( i_x = p_vout->render.i_width / 8; i_x--; )
{
#   if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
--
{
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
#   if defined (HAVE_MMX_INTRINSICS)
typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
--


-- 
glen
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: vlc-gcc-hack.patch

2006-12-13 Thread Jakub Bogusz
On Wed, Dec 13, 2006 at 09:17:36AM +0100, Paweł Sikora wrote:
>  > copy __m64 from
>  > /usr/lib/gcc-lib/i686-pld-linux/3.3.6/include/mmintrin.h
> 
> veto!
> 
> glen, if you want such typedefs use /dev/brain,
> include  and pass -mmmx to cflags.

But -mmmx only for files containing code used conditionally if CPU
has MMX support. In gcc 4+ (or 3.4?) this flag allows compiler to use
MMX instructions in generated code.


-- 
Jakub Boguszhttp://qboosh.pl/
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: vlc-gcc-hack.patch

2006-12-13 Thread Paweł Sikora
 > copy __m64 from
 > /usr/lib/gcc-lib/i686-pld-linux/3.3.6/include/mmintrin.h

veto!

glen, if you want such typedefs use /dev/brain,
include  and pass -mmmx to cflags.

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en