Unleash the power of technology

Coderoar's Blog

黑苹果评测

当初刚接触计算机时,我就曾耳闻MacOS炫目的界面。可惜当时周围并没有苹果用户,而且以前它仅支持PPC,不能安装在x86架构的机器上。而直到10.4推出,普通PC才有了可能。

趁着今年五一假期,我凭借以往尝试安装的经验,又考虑了目前破解的成熟度,选择了10.5 进行安装,终于得到了一个可用的系统。

OSX体验

使用OSX最大的震撼莫过于整个系统一致的风格:每个程序的菜单都位于顶部,并保持统一的主题。比起Windows下第三方软件界面风格的多样性,OSX统一的界面更加容易上手,使用户对新软件容易产生亲切感。

使用任何软件,首先免不得要一番设置。其它操作系统的界面,特别是选项,常常严重依赖“确定”按钮,甚至不惜弹出对话框来打扰用户。OSX的做法是:对于简单的选项,选择后立即生效;只有复杂的选项才提供“确定”按钮。

UNIX有一个传统:Do one thing, and do it well. 在命令行下,各种程序除了能完成自己特定的任务外,还能通过管道来协同工作,执行复杂的任务。结果是每个环节都可以被特定的程序完美处理,整个任务得以完成。但是在Linux下,这种体验仅限于命令行。OSX独有的“服务”概念,将其扩展至图形界面,其中便利可想而知。

作为类UNIX系统,OSX与传统UNIX和Linux有诸多类似之处,比如设备文件存在于/dev下(但命名方式不同),文件系统权限及ACL的概念,全局配置文件保存于/etc下。值得一提的是,Gentoo还有一个子项目,能够在OSX下使用很多Gentoo Linux下的跨平台程序。

黑苹果

首先,Chameleon并不是越新越好。我用rc1还成,rc4就不行了,启动有会有一些莫名其妙的故障(某些设置会被重置)。大概是新版本对Snow Leopard做了优化,对Leopard却不适用。

并不是所有的硬件都是可以成功驱动的,像我的3945ABG无线网卡就不行(非官方驱动还不成熟)。

而且,即使某个硬件能够使用,也并不意味着可以得到像苹果机一样完整的功能。比如,虽然我的有线网卡能够正常联网,但是Time Machine却一直无法使用,提示的错误信息跟网络有关;Popcap的某些游戏的demo版本因为无法获取网卡信息而不能运行。

此外,我的系统如果使用电池供电的话,关机时会死机;Virtualbox也有可能引起死机。

 

总之,黑苹果的作用也就是感觉一下,要长期日常使用还得苹果机。

OSX给我留下了深刻的印象,这不仅仅在于系统本身的精致,还因为许多平台独有的第三方软件,比如,Daisydisk、Textmate,和其他系统里的同类软件相比,用户体验完全不同。

至于是否要留下来,我是这么看的:作为用户,我选择一个系统不会是因为它本身好用,而是因为在这个系统上能完成其它系统上无法更好完成的任务。

OSX超赞,但是Linux已经融入了我的思维方式。虽然有Gentoo Prefix for OSX,但毕竟不完整,而OSX的独有功能我又用不上。所以,最终我还是回归了Gentoo。

Written by coderoar

06/26/2010 at 09:51

Posted in Journal

Tagged with

我的新路由器

一直想整台路由器清理下杂乱的线路,前段时间看中了D-Link DIR-300/600这两款无线路由,配置如下。

DIR-300 (A1) DIR-300 (B1) | DIR-600 (B1, B2)
SoC Atheros 2317 (180Mhz) Ralink RT3050F (384Mhz)
RAM 32M 32M
Flash 4M 4M
Wireless 802.11b/g 802.11b/g/n

在本地市场看的是DIR-300 A1和DIR-600 B2。

第一眼很震撼DIR-300的5dB天线,跟DIR-600的2dB天线相比,堪称楷模。联系到后者2倍于前者的芯片频率,以及更先进的无线标准,前者2倍于后者的价格简直是个笑话。

虽然没有当场刷机验证配置,但是网上已有成功的先例。而且其Web界面顶上大大的B1字样,更让我确信这台机器没有大的改动。

原厂固件下在更新固件的地方上传dlink-revb-factory-webflash.bin就好了。只是DD-WRT默认的IP是192.168.1.1,所以更新完毕不会自动跳转。

第一次Web界面登录会提示修改默认的用户名和密码,但是这里的用户名不能用于telnet——telnet还得用root登录——很诡异。4M的Flash应该只能刷micro,但这里却是std。按说std提供了telnet和SSHd,但是我却怎么都打不开SSHd,也许是被躲猫猫了吧。

DD-WRT v24-sp2 std (c) 2009 NewMedia-NET GmbH
Release: 10/10/09 (SVN revision: 13064)

DD-WRT login: root
Password:
==========================================================

____  ___    __        ______ _____         ____  _  _
| _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || |
|| | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_
||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _|
|___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_|

DD-WRT v24-sp2

http://www.dd-wrt.com

==========================================================

BusyBox v1.13.4 (2009-10-10 11:34:10 CEST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

root@DD-WRT:~# cat /proc/cpuinfo
system type             : Ralink SoC
processor               : 0
cpu model               : MIPS 24K V4.12
BogoMIPS                : 212.99
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes
ASEs implemented        : mips16 dsp
VCED exceptions         : not available
VCEI exceptions         : not available

root@DD-WRT:~# dmesg
<5>Linux version 2.6.23.17 (root@dd-wrt) (gcc version 4.1.2) #968 Sat Oct 10 11:32:30 CEST 2009
<4>
<4> The CPU frequency set to 320 MHz
<6>32M RAM Detected!
<4>CPU revision is: 0001964c
<4>Determined physical RAM map:
<4> memory: 02000000 @ 00000000 (usable)
<7>On node 0 totalpages: 8192
<7>  Normal zone: 64 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 8128 pages, LIFO batch:0
<7>  Movable zone: 0 pages used for memmap
<4>Built 1 zonelists in Zone order.  Total pages: 8128
<5>Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock4 rootfstype=squashfs noinitrd
<4>Primary instruction cache 16kB, physically tagged, 4-way, linesize 32 bytes.
<4>Primary data cache 16kB, 4-way, linesize 32 bytes.
<6>Synthesized TLB refill handler (20 instructions).
<6>Synthesized TLB load handler fastpath (32 instructions).
<6>Synthesized TLB store handler fastpath (32 instructions).
<6>Synthesized TLB modify handler fastpath (31 instructions).
<6>Cache parity protection disabled
<4>cause = 800000, status = 1100ff00
<4>PID hash table entries: 128 (order: 7, 512 bytes)
<4>calculating r4koff… 0030d400(3200000)
<4>CPU frequency 320.00 MHz
<4>Using 160.000 MHz high precision timer.
<6>console [ttyS1] enabled
<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>Memory: 29480k/32768k available (2159k kernel code, 3288k reserved, 320k data, 120k init, 0k highmem)
<7>Calibrating delay loop… 212.99 BogoMIPS (lpj=1064960)
<4>Mount-cache hash table entries: 512
<6>NET: Registered protocol family 16
<6>Generic PHY: Registered new driver
<6>NET: Registered protocol family 2
<6>Time: MIPS clocksource has been installed.
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 1024 (order: 1, 8192 bytes)
<6>TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP: Hash tables configured (established 1024 bind 1024)
<6>TCP reno registered
<4>Load RT2880 Timer Module(Wdg/Soft)
<6>devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
<6>devfs: boot_options: 0×1
<6>squashfs: version 3.0 (2006/03/15) Phillip Lougher
<6>io scheduler noop registered
<6>io scheduler deadline registered (default)
<4>Ralink gpio driver initialized
<6>Serial: 8250/16550 driver $Revision: 1.3 $ 2 ports, IRQ sharing disabled
<6>serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
<6>serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
<4>rt3052 access driver initialization.
<6>PPP generic driver version 2.4.2
<6>PPP Deflate Compression module registered
<6>PPP BSD Compression module registered
<6>MPPE/MPPC encryption/compression module registered
<6>NET: Registered protocol family 24
<6>PPPoL2TP kernel driver, V1.0
<6>tun: Universal TUN/TAP device driver, 1.6
<6>tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
<5>ralink flash device: 0×1000000 at 0xbf000000
<6>Ralink SoC physically mapped flash: Found 1 x16 devices at 0×0 in 16-bit bank
<7>Ralink SoC physically mapped flash: Found an alias at 0×400000 for the chip at 0×0
<7>Ralink SoC physically mapped flash: Found an alias at 0×800000 for the chip at 0×0
<7>Ralink SoC physically mapped flash: Found an alias at 0xc00000 for the chip at 0×0
<4> Amd/Fujitsu Extended Query Table at 0×0040
<5>number of CFI chips: 1
<5>cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
<0>
<4>found squashfs at 124000
<5>Creating 6 MTD partitions on “Ralink SoC physically mapped flash”:
<5>0×00000000-0×00030000 : “uboot”
<5>0×00030000-0×00040000 : “uboot-config”
<5>0×00040000-0×00050000 : “factory-defaults”
<5>0×00050000-0x003f0000 : “linux”
<5>0×00124000-0x003f0000 : “rootfs”
<4>mtd: partition “rootfs” doesn’t start on an erase block boundary — force read-only
<5>0x003f0000-0×00400000 : “nvram”
<4>u32 classifier
<4>    Actions configured
<4>Netfilter messages via NETLINK v0.30.
<4>nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
<4>ctnetlink v0.93: registering with nfnetlink.
<6>IPv4 over IPv4 tunneling driver
<6>GRE over IPv4 tunneling driver
<6>ip_tables: (C) 2000-2006 Netfilter Core Team
<6>IPP2P v0.8.2 loading
<5>ClusterIP Version 0.8 loaded successfully
<6>TCP bic registered
<6>TCP cubic registered
<6>TCP westwood registered
<6>TCP highspeed registered
<6>TCP hybla registered
<6>TCP htcp registered
<6>TCP vegas registered
<6>TCP scalable registered
<6>NET: Registered protocol family 1
<6>NET: Registered protocol family 17
<4>Welcome to PF_RING 3.2.1
<4>(C) 2004-06 L.Deri <deri@ntop.org>
<6>NET: Registered protocol family 27
<4>PF_RING: bucket length    128 bytes
<4>PF_RING: ring slots       4096
<4>PF_RING: sample rate      1 [1=no sampling]
<4>PF_RING: capture TX       No [RX only]
<4>PF_RING: transparent mode Yes
<4>PF_RING initialized correctly.
<4>PF_RING: registered /proc/net/pf_ring/
<6>802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
<6>All bugs added by David S. Miller <davem@redhat.com>
<4>GDMA1_MAC_ADRH — : 0×00000000
<4>GDMA1_MAC_ADRL — : 0×00000000
<4>Ralink APSoC Ethernet Driver Initilization. v2.00  256 rx/tx descriptors allocated, mtu = 1500!
<4>NAPI enable, weight = 0, Tx Ring = 256, Rx Ring = 256
<4>GDMA1_MAC_ADRH — : 0x0000d6c3
<4>GDMA1_MAC_ADRL — : 0xcf062360
<1>PROC INIT OK!
<0>decode /dev/mtdblock4
<4>VFS: Mounted root (squashfs filesystem) readonly.
<6>Mounted devfs on /dev
<6>Freeing unused kernel memory: 120k freed
<4>rt2860v2_ap: module license ‘unspecified’ taints kernel.
<4>GDMA1_MAC_ADRH — : 0x00001caf
<4>GDMA1_MAC_ADRL — : 0xf74b5f2e
<4>
<4>phy_tx_ring = 0x01d2e000, tx_ring = 0xa1d2e000, size: 16 bytes
<4>
<4>phy_rx_ring = 0x01d2f000, rx_ring = 0xa1d2f000, size: 16 bytes
……

可以看出,内核将频率设为320Mhz,跟Web界面检测出来的384Mhz不一致,这个应该是准确值。RAM也显示出来了。至于Flash容量,还没找到检测的方法。

刷DD-WRT容易,刷回原厂固件却并不顺利。DD-WRT的Web界面固件更新处并不能刷原厂固件。此时就需要DIR-600的特殊能力了,这得益于Ralink芯片内置的一个ROM——容纳了一个bootloader和一个有Web界面的应急系统。

切断路由电源,按住Reset键不放,接上电源,待电源灯闪烁后松开Reset键。此时,路由器进入应急模式,IP为192.168.0.1。由于没有DHCP,所以要手动将电脑的IP设在192.168.0.0/24之内。连上路由Web界面,就可以上传任何支持的固件。

Written by coderoar

02/24/2010 at 17:41

Posted in Doc

Tagged with ,

淡定

上篇说到无法用代理访问blogger和youtube,闹了半天竟然是autoproxy和foxyproxy这两个firefox代理插件的兼容性问题。autoproxy升级到0.3后即无法与foxyproxy共用,具体表现为foxyproxy的某些设置无法生效。

禁用autoproxy后终于又重获自由,但是不知Google这棵大树还能挺多久。

刚刚看了封BT与中国P2P的未来一文,有这么一句“广电在过去这么多年的一贯表现说明,它基本上是个只知道‘随机应变’的部门,今天这里出问题了就搞一下这里,明天那里有人不满意了就搞一下那里,从来没有过什么长远的政策考虑”,其实也可用于描述GFW。它对站点的封锁明显存在一个力度的差距——某些网站(像当初Facebook、Twitter、Youtube等刚刚被封时)仅仅是在hosts里指定个IP就能正常访问,而某些网站则永远是被重置的待遇,就是明证。

至于两大特殊时期几乎所有翻墙手段同时无效,可以看出GFW并不是不能完成近乎绝对的封锁。而且很多分析GFW的文章也都指出,其技术的确复杂多样,且能根据发展及时改进。那么,平时封锁不严的事实,我认为应该是策略上的原因。

不要忘记了,GFW是一个国家机关下属单位,是向上负责的。所以它必定以完成任务为目的,只要达到一定的效果即可,而不必一味地将技术发挥到极致。

所以,拉锯仍将持续,同志仍需努力。

Written by coderoar

12/12/2009 at 20:39

Posted in Journal

Tagged with

Follow

Get every new post delivered to your Inbox.