無腦安裝法

$ sudo add-apt-repository ppa:vincent-c/nevernote
$ sudo apt-get update
$ sudo apt-get install nixnote

文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

最近買了 TP-Link WR740N , 但是hw version不是之前的 2.x 了

進 dd-wrt router database 有寫 4.0 support , 但是沒有官方下載點 ,要去 other download才有
http://www.dd-wrt.com/site/support/router-database


進了other downloads ,找了 Downloads › others › eko › BrainSlayer-V24-preSP2 › 2012 › 07-20-12-r19519 › tplink_tl-wr740nv4 這個版號
抓了下面2個檔,
http://dd-wrt.com/dd-wrtv2/downloads/others/eko/BrainSlayer-V24-preSP2/2012/07-20-12-r19519/tplink_tl-wr740nv4/factory-to-ddwrt.bin
http://dd-wrt.com/dd-wrtv2/downloads/others/eko/BrainSlayer-V24-preSP2/2012/07-20-12-r19519/tplink_tl-wr740nv4/tl-wr740nv4-webflash.bin

方法很簡單,先用web upgrade factory 那個檔, 重開後再用web upgrade另一個
打完收工
文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

http://www.squashfs-lzma.org/
--> squashfs4.2


http://tukaani.org/xz/
--> http://tukaani.org/xz/xz-5.0.4.tar.bz2


./mksquashfs ../filesystem/rootfs squashfs.img -comp xz -noappend -all-root
--> 9396224 2012-11-05 11:01 squashfs.img


./mksquashfs ../filesystem/rootfs squashfs.img -comp xz -noappend -all-root -b 262144

block size 用 262144 , 壓出來的image更小一點
--> 9179136 2012-11-05 11:04 squashfs.img


@How to mount
mount -o loop /squashfs.img /media/net


@kernel config
CONFIG_SQUASHFS_XZ --> 要開

文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

linux 好像都是用 CONFIG_MTD_M25P80 這個 module 去驅動大部份的 spi flash

在 mach-omap2/board-am335xevm.c 裡面我加了下面的宣告

static const struct flash_platform_data am335x_spi_flash = {
.type = "mx25l25635e",
.name = "spi_flash",
.parts = am335x_spi_partitions,
.nr_parts = ARRAY_SIZE(am335x_spi_partitions),
};

static struct spi_board_info am335x_spi0_slave_info[] = {
{
.modalias = "m25p80",
.platform_data = &am335x_spi_flash,
.irq = -1,
.max_speed_hz = 24000000,
.bus_num = 1,
.chip_select = 0,
.mode = SPI_MODE_3,
},
};

在 drivers/mtd/devices/m25p80.c 已經有大部份的spi flash id
/* Macronix */
{ "mx25l4005a", INFO(0xc22013, 0, 64 * 1024, 8, SECT_4K) },
{ "mx25l8005", INFO(0xc22014, 0, 64 * 1024, 16, 0) },
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, 0) },
{ "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, 0) },
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
{ "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },


開機可以看到 這些partition 跑出來
[ 8.159545] Creating 10 MTD partitions on "spi_flash":
[ 8.165008] 0x000000000000-0x000000020000 : "SPL"
[ 8.171875] 0x000000020000-0x000000050000 : "U-Boot"
[ 8.178833] 0x000000050000-0x000000060000 : "U-Boot Env"
[ 8.186187] 0x000000060000-0x000000080000 : "Def-config"
[ 8.193572] 0x000000080000-0x0000000a0000 : "Cur-config"
[ 8.200775] 0x0000000a0000-0x000000100000 : "User-data"
[ 8.207916] 0x000000100000-0x000000480000 : "KernelA"
[ 8.214874] 0x000000480000-0x000000800000 : "KernelB"
[ 8.221862] 0x000000800000-0x000001400000 : "rootfsA"
[ 8.228912] 0x000001400000-0x000002000000 : "rootfsB"
文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

1.
debootstrap --verbose --foreign --arch armel wheezy armel_rootfs http://ftp.tw.debian.org/debian

## 補充網樂通的指令
sudo debootstrap --arch=sh4 --foreign --include aptitude,vim,openssh-server,gcc,python lenny /opt/rootfs/ http://www.si-linux.co.jp/pub/debian-sh/lenny-sh4/
##

順便插一下花, 貼一下debian 版本的代號,之前都一直搞不懂這些英文單字代表什麼意思

Debian 8 Jessie
Debian 7.0 wheezy
Debian 6.0 squeeze
Debian GNU/Linux 5.0 (lenny) — 被淘汰的穩定版
Debian GNU/Linux 4.0 (etch) — 被淘汰的穩定版
Debian GNU/Linux 3.1 (sarge) — 被淘汰的穩定版
Debian GNU/Linux 3.0 (woody) — 被淘汰的穩定版
Debian GNU/Linux 2.2 (potato) — 被淘汰的穩定版
Debian GNU/Linux 2.1 (slink) — 被淘汰的穩定版
Debian GNU/Linux 2.0 (hamm) — 被淘汰的穩定版


2.
修改 fstab
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
sysfs /sys sysfs defaults 0 0

--> chroot 之後, mount -a

3.
/debootstrap/debootstrap --second-stage


4.
echo "deb http://ftp.tw.debian.org/debian unstable main non-free contrib" > /etc/apt/sources.list

## 網樂通的 sourcelist
deb http://www.si-linux.co.jp/pub/debian-sh/lenny-sh4/ lenny main contrib non-free
deb-src http://ftp.debian.org/debian/ lenny main contrib non-free

echo LANG="C" >> /etc/environment

5.
apt-get update


ps.
遇到無法 執行 second-stage 的問題, 要把 LD_LIBRARY_PATH 改成 /lib/arm-linux-gnueabi

LD_LIBRARY_PATH contains the traditional /lib directory,
but not the multiarch directory /lib/arm-linux-gnueabi.
It is not safe to upgrade the C library in this situation;
please remove the /lib/directory from LD_LIBRARY_PATH and
try again.
文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

之前我的fon 一代掛了, 只要設定完, 機器就會掛點, 想說沒救了

前題:
最近剛好看到 tp-link 740n v2 可以刷 gargoyle
請參考 http://www.mobile01.com/topicdetail.php?f=110&t=2226398&p=1
我是從 ddwrt 要刷成 gargoyle
照 aven138 大的方法直刷,
# cd /tmp
# wget http://www.gargoyle-router.com/downloads/images/ar71xx/gargoyle_1.3.15-ar71xx-tl-wr741nd-v1-squashfs-sysupgrade.bin
# mv gargoyle_1.3.15-ar71xx-tl-wr741nd-v1-squashfs-sysupgrade.bin tplink.bin
# mtd -r write /tmp/tplink.bin linux

而且gargoyle的介面還滿容易上手的, 之前 ddwrt 有點複雜, 而且 wireless client mode 我都設定不成功
沒想到 gargoyle 設計的很讚, 一下子就能設定client + AP 成功!!!


正題:
後來看到 gargoyle 也能支援我的fon , 馬上眼睛亮了起來
就去下載, 在 atheros 231x/5312 這個分類, 而且用它的 fonflash 工具 ,超方便的啦....
gargoyle_1.5.7-atheros-root.squashfs
gargoyle_1.5.7-atheros-vmlinux.lzma
一下子就刷成功了


後記:
1.5.7 + fon 設定成 wireless client + AP , 跑起來很慢, 不過至少我的fon 又復活了
文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()

弄了一整天,終於可以動了
我灌在 wl-500gp v1 這台 router 上 ,
這台有2個usb port , 插上16G usb disk , 當作安裝軟體的路徑


asterisk 主要是根據下面這篇,
http://www.osslab.com.tw/VoIP/IP_PBX/%E7%A1%AC%E9%AB%94%E5%BC%8F_IP_PBX/Embeeded/%E5%AE%B6%E7%94%A8_IP_PBX-ASUS_WL-500GU_%E6%94%B9%E8%A3%9D%E7%AF%87

但其中有2個地方需要變動
1. install optware
請依照這篇安裝, 需要花個1~2小時安裝
http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way

2. 最後的 sip_custom.conf
帳號裡的 context 都要改成 local , 因為 extensions_custom.conf 裡面根本沒有 internal 這個 section ,
local 裡面才有 echo test

[1000]
type=friend
context=internal
context=local
callerid="Softphone" <1000>
qualify=yes
secret=1111
nat=yes
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw

[1001]
type=friend
context=internal
context=local
callerid="Home" <1001>
qualify=yes
secret=1111
nat=yes
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw

搞定收工
文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4344405661680&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(1) 人氣()



http://www.facebook.com/photo.php?fbid=4331522659613&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4327542960123&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4327266433210&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4327053067876&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4319914169408&set=a.1379479460378.48768.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()

最近買了 raspberry pi 這個熱門的小pc
但是在 hdmi to vga 這裡吃了好大的苦頭
找了好久才找到適合我的 dell lcd 的設定
分享一下

hdmi_drive=2
config_hdmi_boost=4
hdmi_group=2
hdmi_mode=16
hdmi_force_hotplug=1
disable_overscan=0

但是這個設定又不適合我公司的 acer 的螢幕(快昏了)
公司的卻要改成下面的設定
hdmi_drive=2
config_hdmi_boost=4
hdmi_group=1
hdmi_mode=16
hdmi_force_hotplug=1
disable_overscan=0
overscan_left=200

有了螢幕就好辨事了, 接下來的設定請參考
http://yehnan.blogspot.tw/2012/06/raspberry-pi_10.html


有彩蛋?!!
http://blog.linz.im/2012/rpi-sys.html
/opt/vc/src/hello_pi/ 這個目錄有很多demo code

截圖秀一下
sudo apt-get install imagemagick
sleep 5; import -window root screen.png

把你的raspberrypi 桌面截圖丟到FB吧




文章標籤

jchuang1977 發表在 痞客邦 留言(0) 人氣()



http://www.facebook.com/photo.php?fbid=4310574975934&set=a.1813474029971.95872.1633655490&type=1




ifttt
Put the internet to work for you. via Personal Recipe 863516

jchuang1977 發表在 痞客邦 留言(0) 人氣()