Showing posts with label Gentoo Others. Show all posts
Showing posts with label Gentoo Others. Show all posts

2006-10-19

Upgrade Firefox to 2.0 RC3 from 1.5

Firefox 1.5 把 RAM 都吃光光,升級 2.0RC3
$ qlop -gvH mozilla-firefox

mozilla-firefox-1.5.0.1-r3: Tue Mar 21 13:06:12 2006: 56 minutes, 53 seconds
mozilla-firefox-1.5.0.1-r4: Tue Apr  4 03:45:30 2006: 41 minutes, 31 seconds
mozilla-firefox-1.5.0.2   : Sun Apr 16 15:00:27 2006: 50 minutes, 12 seconds
mozilla-firefox-1.5.0.2-r1: Mon May  1 07:45:20 2006: 33 minutes, 10 seconds
mozilla-firefox-1.5.0.3   : Fri May  5 23:14:43 2006: 38 minutes, 46 seconds
mozilla-firefox-1.5.0.3   : Fri May 19 05:14:50 2006: 41 minutes, 47 seconds
mozilla-firefox-1.5.0.4   : Mon Jun  5 22:37:49 2006: 39 minutes, 46 seconds
mozilla-firefox-1.5.0.5   : Sat Jul 29 23:00:49 2006: 33 minutes, 34 seconds
mozilla-firefox-1.5.0.6   : Sat Aug  5 12:08:51 2006: 57 minutes, 35 seconds
mozilla-firefox-1.5.0.7   : Tue Sep 19 03:00:08 2006: 44 minutes, 4 seconds
mozilla-firefox-1.5.0.7   : Tue Sep 19 20:25:02 2006: 1 minute, 3 seconds
mozilla-firefox-1.5.0.7   : Sat Sep 23 02:36:14 2006: 47 minutes, 55 seconds
mozilla-firefox-2.0_rc3   : Thu Oct 19 04:41:51 2006: 1 hour, 3 minutes, 58 seconds
mozilla-firefox: 13 times

2006-09-21

Linux zd1211rw usb wireless

Switching from net-wireless/zd1211 to kernel 2.6.18 zd1211rw support.
$ lsusb
Bus 001 Device 002: ID 14ea:ab13
$ nano -w /usr/src/linux/drivers/net/wireless/zd1211rw/zd_usb.c
static struct usb_device_id usb_ids[] = {
        /* ZD1211 */
        { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
+        { USB_DEVICE(0x14ea, 0xab13), .driver_info = DEVICE_ZD1211 },
$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# USB Device: 0x14ea:0xab13 (zd1211rw)
#SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0"
#SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth1"
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth2"
$ grep ZD /usr/src/linux/.config
# CONFIG_USB_ZD1201 is not set
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
$ insmod zd1211rw
$ lsmod
Module                  Size  Used by
zd1211rw               32384  0
ieee80211softmac       20736  1 zd1211rw
ieee80211_crypt_tkip    8832  2
ieee80211              24584  2 zd1211rw,ieee80211softmac
ieee80211_crypt         4032  2 ieee80211_crypt_tkip,ieee80211
$ dmesg
usbcore: registered new driver zd1211rw
usb 1-3: new high speed USB device using ehci_hcd and address 2
usb 1-3: configuration #1 chosen from 1 choice
zd1211rw 1-3:1.0: firmware version 4605
zd1211rw 1-3:1.0: zd1211 chip 14ea:ab13 v4330 high 00-90-cc AL2230_RF pa0 g--
zd1211rw 1-3:1.0: eth0
SoftMAC: Open Authentication completed with aa:bb:cc:dd:ee:ff
$ iwconfig eth2
eth2      802.11g zd1211  ESSID:"access_point"
          Mode:Managed  Frequency:2.437 GHz  Access Point: aa:bb:cc:dd:ee:ff
          Bit Rate=54 Mb/s
          Encryption key:40AA-A249-F54A-ACB9-XXXX-0079-XXXX-014C-XXXX-94E6-XXXX-CFDF-A787-XXXX-F34C-XXXX   Security mode:open
          Link Quality=98/100  Signal level=100/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
$ iwlist scan
eth2      Scan completed :
          Cell 02 - Address: aa:bb:cc:dd:ee:ff
                    ESSID:"access_point"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Quality=100/100  Signal level=100/100
                    IE: WPA Version 1
                        Group Cipher : WEP-40
                        Pairwise Ciphers (1) : WEP-40
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : WEP-40
                        Pairwise Ciphers (1) : WEP-40
                        Authentication Suites (1) : PSK
                    Extra: Last beacon: 17ms ago
$ ifconfig -a
eth2      Link encap:Ethernet  HWaddr aa:bb:cc:dd:ee:ff
          inet addr:192.168.xx.yy  Bcast:192.168.xx.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

2006-01-15

RAID0 / RAID1 under AMD Duron 600MHz

256MB PC133
ML810LR motherboard

CHOST=i686-pc-linux-gnu
CFLAGS="-Os -pipe -mtune=athlon-tbird -fomit-frame-pointer -fno-ident -mmmx -m3dnow"
Benchmark

$ hdparm -tT /dev/md0
 Timing cached reads:   608 MB in  2.01 seconds = 302.77 MB/sec
 Timing buffered disk reads:  162 MB in  3.00 seconds =  53.92 MB/sec

 Timing cached reads:   592 MB in  2.00 seconds = 295.39 MB/sec
 Timing buffered disk reads:  168 MB in  3.00 seconds =  56.00 MB/sec

 Timing cached reads:   600 MB in  2.00 seconds = 299.38 MB/sec
 Timing buffered disk reads:  156 MB in  3.02 seconds =  51.58 MB/sec

 Timing cached reads:   616 MB in  2.00 seconds = 307.98 MB/sec
 Timing buffered disk reads:  168 MB in  3.00 seconds =  55.92 MB/sec

 Timing cached reads:   620 MB in  2.01 seconds = 308.75 MB/sec
 Timing buffered disk reads:  156 MB in  3.02 seconds =  51.65 MB/sec

 Timing cached reads:   612 MB in  2.01 seconds = 304.16 MB/sec
 Timing buffered disk reads:  156 MB in  3.00 seconds =  51.93 MB/sec

$ hdparm -tT /dev/md1
 Timing cached reads:   600 MB in  2.01 seconds = 298.79 MB/sec
 Timing buffered disk reads:  146 MB in  3.01 seconds =  48.53 MB/sec

 Timing cached reads:   612 MB in  2.00 seconds = 305.98 MB/sec
 Timing buffered disk reads:  152 MB in  3.01 seconds =  50.46 MB/sec

 Timing cached reads:   628 MB in  2.01 seconds = 312.73 MB/sec
 Timing buffered disk reads:  146 MB in  3.02 seconds =  48.34 MB/sec

 Timing cached reads:   600 MB in  2.01 seconds = 298.79 MB/sec
 Timing buffered disk reads:  146 MB in  3.01 seconds =  48.53 MB/sec

 Timing cached reads:   612 MB in  2.00 seconds = 305.98 MB/sec
 Timing buffered disk reads:  152 MB in  3.01 seconds =  50.46 MB/sec

 Timing cached reads:   628 MB in  2.01 seconds = 312.73 MB/sec
 Timing buffered disk reads:  146 MB in  3.02 seconds =  48.34 MB/sec

4X DVD Recording under AMD Duron 600MHz

256MB PC133
ML810LR motherboard

$ time growisofs -speed=10 -Z /dev/hda=test4700m.iso
Executing 'builtin_dd if=test4700m.iso of=/dev/hda obs=32k seek=0'
/dev/hda: "Current Write Speed" is 4.1x1385KBps.
 19267584/4702013440 ( 0.4%) @3.8x, remaining 24:18
 37486592/4702013440 ( 0.8%) @3.8x, remaining 18:39
   ....
4674682880/4702013440 (99.4%) @3.9x, remaining 0:04
4693098496/4702013440 (99.8%) @3.9x, remaining 0:01
builtin_dd: 2295920*2KB out @ average 3.9x1385KBps
/dev/hda: flushing cache
/dev/hda: updating RMA
/dev/hda: closing session

real    15m11.160s
user    0m6.736s
sys     2m27.657s

2006-01-09

Gentoo Crossdev

Syntax:
$ crossdev --target i586-pc-linux-gnu
1) Target
C3-2 Samuel:   i586-pc-linux-gnu / i586-pc-linux-uclibc
2) Setup categories
$ mkdir -p /etc/portage
$ echo cross-i586-pc-linux-gnu >> /etc/portage/categories
3) Setup PORTDIR_OVERLAY=/usr/local/portage
$ mkdir -p /usr/local/portage/cross-i586-pc-linux-gnu
$ cd /usr/local/portage/cross-i586-pc-linux-gnu
$ ln -s /usr/portage/sys-devel/binutils binutils
$ ln -s /usr/portage/sys-devel/gcc gcc
$ ln -s /usr/portage/sys-kernel/linux-headers linux-headers
$ ln -s /usr/portage/sys-libs/glibc glibc
4) binutils
$ emerge cross-i586-pc-linux-gnu/binutils
5) gcc [C compiler only]
$ USE=nocxx emerge cross-i586-pc-linux-gnu/gcc
$ gcc-config 
6) linux headers
$ emerge cross-i586-pc-linux-gnu/linux-headers
7) glibc
$ USE=x86 emerge cross-i586-pc-linux-gnu/glibc
8) gcc [C and C++ compiler]
$ emerge cross-i586-pc-linux-gnu/gcc
9) Build stuff!
10) install a basic system into a target area
# use a stage-tarball OR
# check your USE variable!
# Many variables are needed for the root: $CTARGET $CHOST $CBUILD
$ ROOT="/tmp/minime" emerge uclibc busybox baselayout-lite dropbear
# When compiling glibc, you might notice that 'prefix' == /usr. This is OK, even if $ROOT points elsewhere
11) install other packages
$ ROOT="/tmp/minime" INSTALL_MASK="*.h" emerge mypackage
12) strip all symbols
You can add the following to your make.conf or export it in your environment.

PORTAGE_STRIP_FLAGS="--strip-unneeded -R .comment"
If your not using java and have no plans of it you can remove the .jcr as well or use this patch.