Saturday, May 15, 2010

Windows 7 : 2 days to get first BSOD

I do not have Windows 7 Professional for a long time and it took me only 2 days to get my first BSOD. ma config info :
  • Bug Check Code : 0x000000C2
  • Bug Check String : BAD_POOL_CALLER
  • Date du crash : 14/05/2010 22:38
  • Source du crash : fltmgr.sys+8F0B
  • Chemin : C:\Windows\system32\drivers\fltmgr.sys
  • Description : Gestionnaire de filtres de système de fichiers Microsoft
  • Version du produit : 6.1.7600.16385
Secunia PSI might be to blame.

Friday, May 14, 2010

Setup Gentoo on Asus U30JC-QX010X : Part 2

Here is common hardware info about Asus U30JC-QX010X : lspci
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)
01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 310M] (rev a2)
03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
04:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (rev c0)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model  : 37
model name : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping : 2
cpu MHz  : 2267.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id  : 0
cpu cores : 2
apicid  : 0
initial apicid : 0
fpu  : yes
fpu_exception : yes
cpuid level : 11
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 4521.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model  : 37
model name : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping : 2
cpu MHz  : 2267.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id  : 2
cpu cores : 2
apicid  : 4
initial apicid : 4
fpu  : yes
fpu_exception : yes
cpuid level : 11
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 4521.75
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model  : 37
model name : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping : 2
cpu MHz  : 2267.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id  : 0
cpu cores : 2
apicid  : 1
initial apicid : 1
fpu  : yes
fpu_exception : yes
cpuid level : 11
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 4521.75
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model  : 37
model name : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping : 2
cpu MHz  : 2267.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id  : 2
cpu cores : 2
apicid  : 5
initial apicid : 5
fpu  : yes
fpu_exception : yes
cpuid level : 11
wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 4521.75
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
cat /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         84000 mWh
last full capacity:      80700 mWh
battery technology:      rechargeable
design voltage:          15000 mV
design capacity warning: 8400 mWh
design capacity low:     840 mWh
capacity granularity 1:  840 mWh
capacity granularity 2:  840 mWh
model number:            UL50-56
serial number:            
battery type:            LIon
OEM info:                ASUSTek

Setup Gentoo on Asus U30JC-QX010X : Part 1

Here is how to setup Gentoo on my brand new asus. Summary :
  • Resize partitions with gparted.
  • Setup minimal gentoo
  • Update Windows 7 boot loader
Partitioning :
  • Burn last GParted live iso (current is 0.5.2-9).
  • Enter BIOS (sup key)
  • Switch boot devices
  • Launch GParted
  • Remove 30 GB from D: (/dev/sda5)
  • Add / partition : 25 GB (/dev/sda6)
  • Add /home partition : 5 GB (/dev/sda7)
I don't think I need a swap partition. To install Gentoo, I followed both x64 (last updated in 2008) and x86 (updated in 2010) guides.
  • Boot : gentoo with fr keymap.
  • Set root pasword : passwd ...
  • Load wifi : modprobe ath9k
  • ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0
  • Edit /etc/conf.d/net and /etc/wpa_supplicant/wpa_supplicant.conf
Copy them from another box through a usb key or edit them from scratch with nano. /etc/conf.d/net :
modules=( "wpa_supplicant" "!iwconfig" )
wpa_supplicant_wlan0="-Dwext"
/etc/wpa_supplicant/wpa_supplicant.conf :
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
 ssid="freebox_essid"
 key_mgmt=WPA-PSK
 psk="secret"
 priority=20
}
  • Start network : /etc/init.d/net.wlan0 start
  • Mount partitions :
mount /dev/sda6 /mnt/gentoo
mkdir /mnt/gentoo/home
mount /dev/sda7 /mnt/gentoo/home
  • Set date
Stage3 :
cd /mnt/gentoo
links http://www.gentoo.org/main/en/mirrors.xml
  • Links keys : Download / Quit.
  • releases/amd64/current-iso/stage3-amd64-20100408.tar.bz2
tar xvjpf stage3-*.tar.bz2
  • snapshots/current/portage-latest.tar.bz2
tar -xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
make.conf :
nano -w /mnt/gentoo/etc/make.conf
  • Got CFLAGS and CXXFLAGS from Gentoo wiki.
  • MAKEOPTS is cpu count plus one.
CFLAGS="-march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
mirrorselect (free.fr) :
emerge mirrorselect
mirrorselect -i -o >> /etc/make.conf
mirrorselect -i -r -o >> /etc/make.conf
Chroot :
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
export PS1="(chroot) $PS1"
Portage :
emerge --sync
USE="-fortran -ipv6 mmx nptl nptlonly sse sse2 unicode"
locale & time :
nano -w /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15
fr_FR.UTF-8 UTF-8
cp /usr/share/zoneinfo/Europe/Paris /etc/localtime
Kernel (2.6.32-r7) :
emerge gentoo-sources
make menuconfig
    Device Drivers  --->
[*]   Network device support  --->
[*]     Wireless LAN  --->
[*]       Wireless LAN (IEEE 802.11)  --->
<M>         Atheros Wireless Cards  --->
<M>           Atheros 802.11n wireless cards support
    File systems  --->
<*>   The Extended 4 (ext4) filesystem
[*]     Ext4 extended attributes
[*]       Ext4 POSIX Access Control Lists
[*]       Ext4 Security Labels
CONFIG_ATH_COMMON=m
CONFIG_ATH9K=m
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
make -j5 && make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel-2.6.32-gentoo-r7
nano -w /etc/modules.autoload.d/kernel-2.6
ath9k
  • fstab :
nano -w /etc/fstab
/dev/sda6 / ext4 defaults,noatime 1 1
/dev/sda7 /home ext4 noatime   0 2
  • network : copy net and wpa_supplicant.conf (you can use alternate console with Alt-F2)
cd /etc/init.d
ln -s net.lo net.wlan0
rc-update add net.wlan0 default
emerge dhcpcd wpa_supplicant
System configuration :
emerge syslog-ng vixie-cron
rc-update add syslog-ng default
rc-update add vixie-cron default
rc-update add sshd default
  • Set root password (do not skip this step!) :
passwd
  • Config files :
nano -w /etc/conf.d/clock

TIMEZONE="Europe/Paris"

nano -w /etc/rc.conf

EDITOR="/usr/bin/vim"
XSESSION="e16"

nano -w /etc/conf.d/rc

RC_PARALLEL_STARTUP="yes"

nano -w /etc/conf.d/keymaps

KEYMAP="fr-latin9"
grub :
emerge grub

nano -w /boot/grub/grub.conf

default 0
timeout 50
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo
root (hd0,5)
kernel /boot/kernel-2.6.32-r7 root=/dev/sda6

grub

grub> root (hd0,5)
grub> setup (hd0,5)
grub> quit
  • Save boot sector (to some usb key):
dd if=/dev/sda6 of=boot.grub bs=512 count=1
Reboot :
exit
umount /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo/home /mnt/gentoo
reboot
Update boot loader :
  • Steps based on this post
  • Copy boot.grub to C:\
  • Open a cmd as administrator :
C:\>bcdedit /export bcdedit-export-100513
L'opération a réussi.

C:\>bcdedit /create /d Gentoo /application BOOTSECTOR
L'entrée {4bd6ad4c-7c0c-11de-baef-deb9d273c9fa} a été correctement créée.
L'entrée {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa} a été correctement créée.

C:\>bcdedit /set {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa} device boot
L'opération a réussi.

C:\>bcdedit /set {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa} path \boot.grub
L'opération a réussi.

C:\>bcdedit /set {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa} locale fr-FR
L'opération a réussi.

C:\>bcdedit /displayorder {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa} /addlast
L'opération a réussi.

C:\>bcdedit -v
...

Secteur de démarrage en mode réel
---------------------------------
identificateur          {4bd6ad4d-7c0c-11de-baef-deb9d273c9fa}
device                  boot
path                    \boot.grub
description             Gentoo
locale                  fr-FR
Now you should be able to select Gentoo on next reboot. Not seen in amd64 guide :
ccache
emerge -vuD --newuse world
emerge --oneshot libtool
dispatch-conf
perl-cleaner all
python-updater
Notes :
  • grub menu is not visible ?!
  • A lot of packages need to be emerged, still.
Some hardware info is available in next post.

Monday, May 10, 2010

Commande materiel.net

0 % jeudi soir : paiement (produit en stock) 30 % vendredi : demande de justificatifs pour justifier mon identité (1ère commande?) sur mon mail perso non consultable depuis le boulot :( 50 % lundi : en cours d'approvisionnement (suite à l'envoi des documents pendant le week-end). Plus de stock ?! 60 % lundi soir : commande complète : en cours de traitement 85 % mardi matin : commande complète : préparation 100 % mardi midi : commande expédiée UPS mardi après midi : infos facturation reçues UPS mardi soir : enlèvement UPS mercredi matin : livraison refusée à cause d'un naze UPS mercredi soir : re-livraison et réception ! Yes !

Sunday, May 9, 2010

Update wampserver apache version

Here is a batch that would do the work. It is based on a thread in the forums. Provided as is without any warranty.
@echo off
set dest_root=E:\usr\wamp\bin\apache
set source_root=%~dp0

set apache_zip=
for /f %%f in ('dir /b/ogn %source_root%httpd-*') do set apache_zip=%%f
if "%apache_zip%"=="" goto :eof
set unzip_dir=%apache_zip%
set unzip_dir=%unzip_dir:~0,-4%
if "%unzip_dir%"=="" goto :eof
if exist "%unzip_dir%" rd /s/q "%unzip_dir%"
e:\usr\7-Zip\7z x -o%unzip_dir% %apache_zip%

echo %unzip_dir%

set ver=%unzip_dir:~6,-14%
set dest_dir=%dest_root%\Apache%ver%
echo %dest_dir%

if exist "%dest_dir%" rd /s/q "%dest_dir%"

set previous_ver=
for /f %%f in ('dir /b/ogn/ad %dest_root%\Apache*') do if not "%%f"=="%ver%" set previous_ver=%%f
set previous_ver=%previous_ver:~6%
set previous_dir=%dest_root%\Apache%previous_ver%
echo %previous_dir%

mkdir %dest_dir%
robocopy /NP /MIR /NFL "%unzip_dir%\Apache2" "%dest_dir%" /XD lib /XD include /XD manual
copy %previous_dir%\wampserver.conf %dest_dir% >nul
copy %previous_dir%\conf\httpd.conf %dest_dir%\conf >nul

rd /s/q %unzip_dir%

Elixir setup


Free a lancé le projet elixir poru développer des jeux pour freebox. Ce toolkit se base sur enlightenment mon window manager par défaut quand je retourne sur la banquise.

Pour éviter d'installer Elixir n'importe où sur ma babasse en suivant le tutorial de noob plein de ./configure && make && make install, j'ai préféré utiliser la méthode gentoo en utilisant l'overlay officiel d'enlightenment. De l'aide supplémentaire est disponible sur le wiki gentoo.

Quelques notes :
  • Installation de portage-2.2 (mise à jour nécessaire de package.keywords et package.unmask)
  • Pour chaque package du set, ajout d'une ligne =category/package-9999 ** dans package.keywords pour éviter l'erreur missing keyword.
SpiderMonkey

package.use : dev-lang/spidermonkey threadsafe

Last version of SpiderMonkey in current portage tree is 1.7.0-r1. This version does not support JSVERSION_1_8. We need to create our own ebuild for version 1.8.0.

Create a local overlay to host this ebuild :

mkdir -p /usr/local/portage/profiles/
echo "local_overlay" > /usr/local/portage/profiles/repo_name
Add at the end of /etc/make.conf :
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

Create spidermonkey ebuild :

mkdir -p /usr/local/portage/dev-lang/spidermonkey
cp /usr/portage/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild /usr/local/portage/dev-lang/spidermonkey/spidermonkey-1.8.0.ebuild
cp -R /usr/portage/dev-lang/spidermonkey/files /usr/local/portage/dev-lang/spidermonkey/files
Edit ebuild :
SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}-rc1.tar.gz"
...
#epatch "${FILESDIR}/${PN}-1.5-build.patch"
epatch "${FILESDIR}/${P}-build.patch"
#epatch "${FILESDIR}/${PN}-1.6-header.patch"
epatch "${FILESDIR}/${P}-threadsafe.diff"
spidermonkey-1.8.0-build.patch :
diff -rupN js.ref/js/src/Makefile.ref js.new/js/src/Makefile.ref
--- js.ref/js/src/Makefile.ref 2009-02-25 14:24:29.000000000 +0100
+++ js.new/js/src/Makefile.ref 2010-05-09 00:02:50.000000000 +0200
@@ -363,3 +363,16 @@ TARFILES = files `cat files`
SUFFIXES: .i
%.i: %.c
$(CC) -C -E $(CFLAGS) $< > $*.i
+
+DESTDIR :=
+PREFIX := /usr
+BINDIR := $(PREFIX)/bin
+MY_LIBDIR := $(PREFIX)/$(LIBDIR)
+INCLUDEDIR := $(PREFIX)/include/js
+INSTALL := install -g 0 -o root
+install:
+ $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(MY_LIBDIR) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(MY_LIBDIR)
+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(MY_LIBDIR)
+ $(INSTALL) -m 755 $(OBJDIR)/js $(OBJDIR)/jscpucfg $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 644 $(HFILES) $(DESTDIR)$(INCLUDEDIR)
ebuild spidermonkey-1.8.0.ebuild digest
package.keywords : ~dev-lang/spidermonkey-1.8.0 **
emerge -va spidermonkey

Elixir setup :

Appliquer le patch basé sur les indications du blog de zigazou :
diff -rupN elixir-0.1.24.ref/src/modules/bindings/ecore/ecore_module.c elixir-0.1.24.new/src/modules/bindings/ecore/ecore_module.c
--- elixir-0.1.24.ref/src/modules/bindings/ecore/ecore_module.c 2010-05-09 00:36:48.000000000 +0200
+++ elixir-0.1.24.new/src/modules/bindings/ecore/ecore_module.c 2010-05-09 00:37:37.000000000 +0200
@@ -905,7 +905,7 @@ elixir_ecore_thread_run(JSContext *cx, u

elixir_function_stop(cx);

- result = ecore_thread_run(_elixir_func_heavy, _elixir_func_end, new);
+ result = ecore_thread_run(_elixir_func_heavy, _elixir_func_end, new, NULL);

elixir_function_start(cx);
Setup elixir :

./configure
make
# sudo make install
# ldconfig

Il est toujours possible de supprimer elixir en faisant :

# make uninstall
# rm -rf /usr/local/lib/elixir

Tester :

elixir Simple.js

Liens / Références :Notes sur gentoo :
  • L'overlay installe media-libs/edje-9999 qui contient edje_player (qui remplace edje_viewer)
Avertissement : edge ne semble pas fonctionner avec cette installation :( Seuls les exemples basiques passent. Il est peut être finalement préférable d'utiliser l'image virtualbox...

Saturday, May 8, 2010

Asus U30JC-QX010X

Quick summary :
  • Intel core i5-430M
  • 4 GB memory DDR3 1066 MHz
  • 13.3" WXGA 1366 x 768 TFT LED
  • nVidia® GeForce™ G310M 512 MB
  • 320 GB SATA 5400 rpm
  • Webcam 0.3 MP 640x480
  • RJ 45, 3 USB, VGA, HDMI, wifi n, bluetooth, card reader
  • DVD burner
  • 8 cells battery 5600 mAh
  • Windows 7 Professional 64 bits
  • 2 years warranty
Can't wait !