2007年9月19日 星期三

QEMU Installion

http://www.aurel32.net/info/debian_mips_qemu.php
http://d-i.alioth.debian.org/manual/en.mipsel/index.html

wget http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz
$ cd qemu-0.9.0
$ ./configure --prefix=/usr

$ make
$make install

$cd ..
$qemu-img create -f qcow hda.img 10G

wget http://ftp.de.debian.org/debian/dists/etch/main/installer-mipsel/current/images/qemu/netboot/vmlinux-2.6.18-5-qemu

wget http://ftp.de.debian.org/debian/dists/etch/main/installer-mipsel/current/images/qemu/netboot/initrd.gz

dd if=/dev/zero of=/usr/share/qemu/mips_bios.bin bs=1024 count=128

qemu-system-mipsel -kernel vmlinux-2.6.18-5-qemu -initrd initrd.gz -hda hda.img -append "root=/dev/ram console=ttyS0" -nographic

#After installation

qemu-system-mipsel -kernel vmlinux-2.6.18-5-qemu -initrd initrd.gz -hda hda.img -append "root=/dev/hda1 console=ttyS0" -nographic

2007年9月10日 星期一

System upgrade by cpio

Link


http://linux.vbird.org/linux_basic/0240tarcompress.php#cpio


http://tw.myblog.yahoo.com/blue-comic/article?mid=41&prev=48&next=40&l=f&fid=7


1.備份檔案


find phone/bin/nxphone -print | cpio -o -H newc > ./nxphone.cpio


2.備份整個目錄


find phone -type f -print | cpio -o -H newc > ./phone.cpio


find參數 -type f 代表檔案形態為一般檔案 (即不包含目錄)


3.輸出備份檔案列表


cpio -t < phone.cpio > phone.list


4.以檔案列表做備份


cat phone.list | cpio -o -H newc > phone.cpio


5.還原檔案


5.1.還原檔案並自動覆蓋較舊的檔案


cpio -iu < phone.cpio


5.2.還原檔案及建立目錄並自動覆蓋較舊的檔案


cpio -idu < phone.cpio


2007年8月28日 星期二

Squash FS with Lzma

squashfs3.2-r2.tar.gz
sqlzma3.2-r2b.zip
lzma443.zip

tar -zxvf squashfs3.2-r2.tar.gz
unzip sqlzma3.2-r2b.zip
unzip lzma443.zip

cd squashfs3.2-r2

[gigijoe@localhost squashfs3.2-r2]$ patch -p1 < ../sqlzma3.2-r2b/sqlzma2u-3.2-r2.patch
patching file squashfs-tools/Makefile
patching file squashfs-tools/mksquashfs.c
patching file squashfs-tools/read_fs.c
patching file squashfs-tools/unsquashfs.c

cd lzma443

[gigijoe@localhost lzma443]$ patch -p1 < ../sqlzma3.2-r2b/sqlzma1-443.patch
patching file C/7zip/Compress/LZMA_Alone/comp.cc
patching file C/7zip/Compress/LZMA_Alone/sqlzma.mk
patching file C/7zip/Compress/LZMA_C/kmod.mk
patching file C/7zip/Compress/LZMA_C/sqlzma.mk
patching file C/7zip/Compress/LZMA_C/testflags.c
patching file C/7zip/Compress/LZMA_C/uncomp.c
patching file C/7zip/Compress/LZMA_C/kmod/Makefile
patching file C/7zip/Compress/LZMA_C/kmod/module.c

cd sqlzma3.2-r2b
mv ../squashfs3.2-r2 .
mv ../lzma443 .

Disable BuildSquashfs in Makefile

make

Then we have squashfs tools with lzma support

2007年6月28日 星期四

Allwin MySQL

cd /opt/mysql


bin/mysql


mysql> UPDATE user SET Password=PASSWORD('allwin')
           WHERE user='allwin';
mysql> FLUSH PRIVILEGES;


Start MySQL


cd /opy/mysql


bin/mysqld_safe --user=mysql &


2007年5月8日 星期二

CLE yum

Yum Repository 的使用方式:

我舉 FC5 為例:
1.到 ftp://cle.linux.org.tw/pub/fedora/yum/repos/ 目錄底下把所有的 *.repo 檔下載回去,放到 /etc/yum.repos.d/ 底下 (可以蓋掉原來的舊的設定檔)


2.相關的 RPM GPG KEYs 都可以在 ftp://cle.linux.org.tw/pub/fedora/yum/ 目錄底下找到,把 RPM-* 的檔案都下載回去,然後用 “rpm –import RPM-*” 指令來把所需的 KEYs Import 進去


3.接下來,就是 yum update、yum install
、yum remove ….


rpm --import /usr/share/doc/fedora-release-3/*GPG-KEY*


刪除/etc/yum..repos.d/livna.repo


2007年5月4日 星期五

HOWTO : can&#39;t access tty; job control turned off

#/etc/fstab

/dev/root       /       auto    defaults,errors=continue        0 0
proc            /proc   proc    defaults    0   0
none            /tmp    tmpfs   defaults    0   0

#/etc/init.d/rcS

mount -a
mount -n /proc
mount -n -o remount,rw /

ln -s /dev/tts/0 /dev/ttyS0
ln -s /dev/vc/0 /dev/tty0

#/etc/inittab

::sysinit:-/etc/init.d/rcS
#::askfirst:-/bin/sh
#::respawn:-/bin/sh
::respawn:/sbin/getty -L ttyS0 9600 vt100
::ctrlaltdel:/bin/umount -a -r