Why arm chroot environment will work.
Use build-arm-chroot to create a folder that is arm based environment:
root@neo-u910:~# apt-get install qemu-arm-static
root@neo-u910:~# build-arm-chroot karmic test-123
Remove qemu-arm-static for testing
root@neo-u910:~# apt-get remove qemu-arm-static
root@neo-u910:~# rm test-123/usr/bin/qemu-arm-static
File one file, then we know it's ARM executable file :
root@neo-u910:~# file test-123/usr/bin/lscpu
test-123/usr/bin/lscpu: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped
And we can not execute it :
root@neo-u910:~# ./test-123/usr/bin/lscpu
bash: ./test-123/usr/bin/lscpu: cannot execute binary file
And we can not chroot into.
root@neo-u910:~# chroot test-123/
chroot: cannot run command `/bin/bash': Exec format error
Check our binfmt_misc setting, there is no arm related setting
root@neo-u910:~# ls /proc/sys/fs/binfmt_misc/
cli python2.6 register status
Now we install it back
root@neo-u910:~# apt-get install qemu-arm-static
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
qemu-arm-static
0 upgraded, 1 newly installed, 0 to remove and 185 not upgraded.
Need to get 0B/559kB of archives.
After this operation, 1,430kB of additional disk space will be used.
Selecting previously deselected package qemu-arm-static.
(Reading database ... 137788 files and directories currently installed.)
Unpacking qemu-arm-static (from .../qemu-arm-static_0.11.0-0ubuntu6.3_i386.deb) ...
Setting up qemu-arm-static (0.11.0-0ubuntu6.3) ...
vm.vdso_enabled = 0
vm.mmap_min_addr = 4097
And cp into target system ( recover what build-arm-chroot will do )
root@neo-u910:~# cp /usr/bin/qemu-arm-static test-123
Now binfmt_misc/arm exist.
root@neo-u910:~# ls /proc/sys/fs/binfmt_misc/
arm cli python2.6 register status
root@neo-u910:~# cat /proc/sys/fs/binfmt_misc/arm
enabled
interpreter /usr/bin/qemu-arm-static
flags:
offset 0
magic 7f454c4601010100000000000000000002002800
mask ffffffffffffff00fffffffffffffffffeffffff
Still can't execute it, but it's because of library path incorrect
root@neo-u910:~# ./test-123/usr/bin/lscpu
/lib/ld-linux.so.3: No such file or directory
Now chroot working
root@neo-u910:~# chroot test-123/
root@neo-u910:~# ./usr/bin/lscpu
Architecture: armv5tel
CPU(s): 2
Thread(s) per core: 1
Core(s) per socket: 2
CPU socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 15
Stepping: 6
CPU MHz: 1596.000
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
Exit out, and look into what postinst of qemu-arm-static done :
root@neo-u910:~# dpkg -e /var/cache/apt/archives/qemu-arm-static_0.11.0-0ubuntu6.3_i386.deb
root@neo-u910:~# cat DEBIAN/postinst
#!/bin/sh
set -e
if [ "$1" = configure ] && which update-binfmts >/dev/null; then
update-binfmts --import arm
fi
if [ "$1" = configure ]; then
sysctl -p /etc/sysctl.d/qemu-arm-static.sysctl.conf
fi
exit 0
Actually, we could execute both x86/arm application inside this chroot environment :
root@neo-u910:/# file /usr/bin/qemu-arm-static
/usr/bin/qemu-arm-static: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.15, stripped
root@neo-u910:/# /usr/bin/qemu-arm-static -cpu ?
Available CPUs:
arm926
arm946
arm1026
arm1136
arm1136-r2
arm11mpcore
cortex-m3
cortex-a8
ti925t
pxa250
pxa255
pxa260
pxa261
pxa262
pxa270
pxa270-a0
pxa270-a1
pxa270-b0
pxa270-b1
pxa270-c0
pxa270-c5
any
Some explanation about binfmt_misc :
http://en.wikipedia.org/wiki/Binfmt_misc
Friday, February 26, 2010
Wednesday, February 17, 2010
debootstrap
debootstrap can be use to install a debian package based linux system.
Including same arch or not.
How to install a chroot arm linux environment :
https://wiki.ubuntu.com/ARM/BuildEABIChroot
So that can be use a powerful host system for native compile application for arm arch.
debootstrap is actually a generic script to install all kind version of debian based system.
Per distro/version specific information is store at /usr/share/debootstrap.
It will report to below information.
1. DEF_MIRROR
mirror site : where store the .deb files
per distro script will call default_mirror in /usr/share/debootstrap/functions, then export DEF_MIRROR
2. DOWNLOAD_DEBS, DOWNLOAD_INDICES
mirror style : release or main
1. parse necessary information
depends on 1st, 2nd stage, add necessary job item
2. include per distro script
3. run job item
for install a deb based linux system, it may need below step :
1. finddebs :
download_indices :
(1) get release file : http://ports.ubuntu.com/ubuntu-ports/dists/karmic/Release
(2) grep Components from release file, found main restricted universe multiverse
(3) get package.gz according to arch/distro, ex from :
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/restricted/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/universe/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/multiverse/binary-armel/
work_out_debs :
work_out_debs parse out three catalog, from unpacked Package file.
required : for package that list as "Priority: required"
base : for package that list as "Priority: important"
if buildd then base will be "Build-Essential: yes"
if fakechroot, minbase then base will be "apt"
finally, set up all_debs="$required $base"
2. printdebs - if assigned
just echo $all_debs
3. dldebs
download all .deb into ${target}/var/lib/apt, ${target}/var/cache/apt
download_main will parse file name from Package, then download package, also check md5.
4. maketarball - if assigned
tar ${target}/var/lib/apt,${target}/ var/cache/apt into one tarball.
... stay tune ...
debootstrap can be use to install a debian package based linux system.
Including same arch or not.
How to install a chroot arm linux environment :
https://wiki.ubuntu.com/ARM/BuildEABIChroot
So that can be use a powerful host system for native compile application for arm arch.
debootstrap is actually a generic script to install all kind version of debian based system.
Per distro/version specific information is store at /usr/share/debootstrap.
It will report to below information.
1. DEF_MIRROR
mirror site : where store the .deb files
per distro script will call default_mirror in /usr/share/debootstrap/functions, then export DEF_MIRROR
2. DOWNLOAD_DEBS, DOWNLOAD_INDICES
mirror style : release or main
1. parse necessary information
depends on 1st, 2nd stage, add necessary job item
2. include per distro script
3. run job item
for install a deb based linux system, it may need below step :
1. finddebs :
download_indices :
(1) get release file : http://ports.ubuntu.com/ubuntu-ports/dists/karmic/Release
(2) grep Components from release file, found main restricted universe multiverse
(3) get package.gz according to arch/distro, ex from :
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/restricted/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/universe/binary-armel/
http://ports.ubuntu.com/ubuntu-ports/dists/karmic/multiverse/binary-armel/
work_out_debs :
work_out_debs parse out three catalog, from unpacked Package file.
required : for package that list as "Priority: required"
base : for package that list as "Priority: important"
if buildd then base will be "Build-Essential: yes"
if fakechroot, minbase then base will be "apt"
finally, set up all_debs="$required $base"
2. printdebs - if assigned
just echo $all_debs
3. dldebs
download all .deb into ${target}/var/lib/apt, ${target}/var/cache/apt
download_main will parse file name from Package, then download package, also check md5.
4. maketarball - if assigned
tar ${target}/var/lib/apt,${target}/ var/cache/apt into one tarball.
... stay tune ...
Sunday, January 10, 2010
Git 書籤
Git 初學筆記 - 指令操作教學
http://plog.longwin.com.tw/my_note-unix/2009/05/19/git-learn-initial-command-2009
Git 初學筆記 - 實作測試
http://plog.longwin.com.tw/my_note-unix/2009/05/20/git-learn-test-command-2009
Git 中文教程
http://www.bitsun.com/documents/gittutorcn.htm
使用 Git 管理源代碼
http://www.ibm.com/developerworks/cn/linux/l-git/index.html
Git 原始碼管理
http://www.qweruiop.org/nchcrails/posts/49
Everyday GIT With 20 Commands Or So
http://people.debian.org.tw/~jesse/git/everyday_zhtw.html
http://plog.longwin.com.tw/my_note-unix/2009/05/19/git-learn-initial-command-2009
Git 初學筆記 - 實作測試
http://plog.longwin.com.tw/my_note-unix/2009/05/20/git-learn-test-command-2009
Git 中文教程
http://www.bitsun.com/documents/gittutorcn.htm
使用 Git 管理源代碼
http://www.ibm.com/developerworks/cn/linux/l-git/index.html
Git 原始碼管理
http://www.qweruiop.org/nchcrails/posts/49
Everyday GIT With 20 Commands Or So
http://people.debian.org.tw/~jesse/git/everyday_zhtw.html
grub
ubuntu 9.10 default come with grub 1.97, dont know start from which version, menu.lst had done.
Now it use grub.cfg as the configuration file. It's format and syntax is not so easy to understand, and modify.
There are two place to modify with :
/etc/grub.d/ -> lots template and stage, seems allow to add extra grub menu item
/etc/default/grub -> some general setting apply to all items
My target is remove the kernel bootsplash, also make a graphic console, so below settings satisfied me :
__
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4" # removed splash
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=800x600
__
Also it wont accept vga=xxx as kernel cmdline now, need to GRUB_GFXMODE=???x??? instead.
Test result :
1.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
#GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in 800x600 mode, and linux console in 1024x768 mode
2.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in text mode, and linux console in text mode
Conclusion :
Seems both grub should be in graphic mode ( by assign GRUB_TERMINAL,GRUB_GFXMODE )
And also linux kernel ( by assign vga=791 ), otherwise linux console wont be in graphic mode.
Older grub/syslinux, only vga=791 would be enough
Now it use grub.cfg as the configuration file. It's format and syntax is not so easy to understand, and modify.
There are two place to modify with :
/etc/grub.d/ -> lots template and stage, seems allow to add extra grub menu item
/etc/default/grub -> some general setting apply to all items
My target is remove the kernel bootsplash, also make a graphic console, so below settings satisfied me :
__
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4" # removed splash
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=800x600
__
Also it wont accept vga=xxx as kernel cmdline now, need to GRUB_GFXMODE=???x??? instead.
Test result :
1.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
#GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in 800x600 mode, and linux console in 1024x768 mode
2.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in text mode, and linux console in text mode
Conclusion :
Seems both grub should be in graphic mode ( by assign GRUB_TERMINAL,GRUB_GFXMODE )
And also linux kernel ( by assign vga=791 ), otherwise linux console wont be in graphic mode.
Older grub/syslinux, only vga=791 would be enough
Saturday, January 09, 2010
dvtm - Tiling window inside console
很多的 embedded 開發者, 平常都是用 vm 裝著 linux, 然後 host 開著 Windows 進行著 W皮L骨的開發。雖然我習慣直接用 Linux host 開發, 但是近來改用 Mac 後, 實在捨不得把漂漂的 Mac 改成 Linux 工作。所以也就開始開著 VM 裝著 Linux 研究, 在 VM 下的 Linux, 其實也是開著 terminal 工作居多。所以多半是用 awesome wm 來便利工作, 有些時候不想切到 VM console, 改用 ssh 連線時, 就缺少了 tiled window 的功能。
dvtm 是用來解決的
http://www.brain-dump.org/projects/dvtm/
http://www.brain-dump.org/projects/dvtm/screenshot1.png
default mod key 是 ctrl-g
darwin port 也有 porting 這個 package 到 mac, 所以 mac 下也可以用啦~
Keyboard commands
Mod Each keybinding begins with Mod which defaults to ^g but can be changed in config.h or with the -m
command line option.
Mod-c Create a new shell window.
Mod-x Close focused window.
Mod-l Increases the master area width about 5% (all except grid and fullscreen layout).
Mod-h Decreases the master area width about 5% (all except grid and fullscreen layout).
Mod-j Focus next window.
Mod-k Focus previous window.
Mod-[1..n]
Focus the nth window.
Mod-. Toggle minimization of current window.
Mod-u Focus next non minimized window.
Mod-i Focus prev non minimized window.
Mod-m Maximize current window (change to fullscreen layout).
Mod-PageUp
Scroll up.
Mod-PageDown
Scroll down.
Mod-Space
Toggle between defined layouts (affects all windows).
Mod-Enter
Zooms/cycles current window to/from master area.
Mod-t Change to vertical stack tiling layout.
Mod-b Change to bottom stack tiling layout.
Mod-g Change to grid layout.
Mod-s Shows/hides the status bar.
Mod-r Redraw whole screen.
Mod-G Escape the next typed key.
Mod-X Lock screen.
Mod-B Toggle bell (off by default).
Mod-M Toggle dvtm mouse grabbing. Mod-q Quit dvtm.
dvtm 是用來解決的
http://www.brain-dump.org/projects/dvtm/
http://www.brain-dump.org/projects/dvtm/screenshot1.png
default mod key 是 ctrl-g
darwin port 也有 porting 這個 package 到 mac, 所以 mac 下也可以用啦~
Keyboard commands
Mod Each keybinding begins with Mod which defaults to ^g but can be changed in config.h or with the -m
command line option.
Mod-c Create a new shell window.
Mod-x Close focused window.
Mod-l Increases the master area width about 5% (all except grid and fullscreen layout).
Mod-h Decreases the master area width about 5% (all except grid and fullscreen layout).
Mod-j Focus next window.
Mod-k Focus previous window.
Mod-[1..n]
Focus the nth window.
Mod-. Toggle minimization of current window.
Mod-u Focus next non minimized window.
Mod-i Focus prev non minimized window.
Mod-m Maximize current window (change to fullscreen layout).
Mod-PageUp
Scroll up.
Mod-PageDown
Scroll down.
Mod-Space
Toggle between defined layouts (affects all windows).
Mod-Enter
Zooms/cycles current window to/from master area.
Mod-t Change to vertical stack tiling layout.
Mod-b Change to bottom stack tiling layout.
Mod-g Change to grid layout.
Mod-s Shows/hides the status bar.
Mod-r Redraw whole screen.
Mod-G Escape the next typed key.
Mod-X Lock screen.
Mod-B Toggle bell (off by default).
Mod-M Toggle dvtm mouse grabbing. Mod-q Quit dvtm.
Ubuntu 文字模式開機
sudo update-rc.d -f gdm remove
or
echo false > /etc/X11/default-display-manager
/etc/X11/default-display-manager 記錄了用哪個 display-manager
如果是 gdm, 多半是 : /usr/sbin/gdm
另, 以下講的更完整:
http://www.cyberciti.biz/faq/prevent-xorg-from-starting-in-linux/
or
echo false > /etc/X11/default-display-manager
/etc/X11/default-display-manager 記錄了用哪個 display-manager
如果是 gdm, 多半是 : /usr/sbin/gdm
另, 以下講的更完整:
http://www.cyberciti.biz/faq/prevent-xorg-from-starting-in-linux/
Thursday, December 17, 2009
mac 下用 meld
Meld 是 Linux 下很習慣用的比對工具,仰賴 darwin port 的 project,Mac 下也有機會可以用了。
但是啟動的時候,遇到一些錯誤。
Xlib: extension "RANDR" missing on display "/tmp/launch-RsRIqw/:0".
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Traceback (most recent call last):
File "/opt/local/bin/meld", line 109, in
meldapp.main()
File "/opt/local/lib/meld/meldapp.py", line 855, in main
app = MeldApp()
File "/opt/local/lib/meld/meldapp.py", line 528, in __init__
self.prefs = MeldPreferences()
File "/opt/local/lib/meld/meldapp.py", line 465, in __init__
prefs.Preferences.__init__(self, "/apps/meld", self.defaults)
File "/opt/local/lib/meld/prefs.py", line 91, in __init__
self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory)
google 了一下,發現要執行下面兩行先:
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
注意的是,很多網站兩行都已 sudo 開頭,其實第二行必須自身的帳號執行( 也是google 來的拉)。
照做之後,果然就可以動了,耶~
但是啟動的時候,遇到一些錯誤。
Xlib: extension "RANDR" missing on display "/tmp/launch-RsRIqw/:0".
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Traceback (most recent call last):
File "/opt/local/bin/meld", line 109, in
meldapp.main()
File "/opt/local/lib/meld/meldapp.py", line 855, in main
app = MeldApp()
File "/opt/local/lib/meld/meldapp.py", line 528, in __init__
self.prefs = MeldPreferences()
File "/opt/local/lib/meld/meldapp.py", line 465, in __init__
prefs.Preferences.__init__(self, "/apps/meld", self.defaults)
File "/opt/local/lib/meld/prefs.py", line 91, in __init__
self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory)
google 了一下,發現要執行下面兩行先:
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
注意的是,很多網站兩行都已 sudo 開頭,其實第二行必須自身的帳號執行( 也是google 來的拉)。
照做之後,果然就可以動了,耶~
Thursday, December 10, 2009
log of interrupt arrange (nolapic) :
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash nolapic
CPU0
0: 10855 XT-PIC-XT timer
1: 4 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
5: 3535 XT-PIC-XT ahci
7: 1 XT-PIC-XT
8: 1 XT-PIC-XT rtc0
9: 537 XT-PIC-XT acpi, ohci_hcd:usb2, ath
10: 633 XT-PIC-XT HDA Intel
11: 54 XT-PIC-XT eth0
12: 6 XT-PIC-XT i8042
15: 835 XT-PIC-XT ehci_hcd:usb1
NMI: 0 Non-maskable interrupts
LOC: 0 Local timer interrupts
SPU: 0 Spurious interrupts
CNT: 0 Performance counter interrupts
PND: 0 Performance pending work
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
TRM: 0 Thermal event interrupts
THR: 0 Threshold APIC interrupts
MCE: 0 Machine check exceptions
MCP: 1 Machine check polls
ERR: 1
MIS: 0
* CPUINFO still show two CPU inside, and working
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash nolapic
CPU0
0: 10855 XT-PIC-XT timer
1: 4 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
5: 3535 XT-PIC-XT ahci
7: 1 XT-PIC-XT
8: 1 XT-PIC-XT rtc0
9: 537 XT-PIC-XT acpi, ohci_hcd:usb2, ath
10: 633 XT-PIC-XT HDA Intel
11: 54 XT-PIC-XT eth0
12: 6 XT-PIC-XT i8042
15: 835 XT-PIC-XT ehci_hcd:usb1
NMI: 0 Non-maskable interrupts
LOC: 0 Local timer interrupts
SPU: 0 Spurious interrupts
CNT: 0 Performance counter interrupts
PND: 0 Performance pending work
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
TRM: 0 Thermal event interrupts
THR: 0 Threshold APIC interrupts
MCE: 0 Machine check exceptions
MCP: 1 Machine check polls
ERR: 1
MIS: 0
* CPUINFO still show two CPU inside, and working
log of interrupt arrange (noapic) :
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash noapic
CPU0 CPU1
0: 38 0 XT-PIC-XT timer
1: 2 0 XT-PIC-XT i8042
2: 0 0 XT-PIC-XT cascade
7: 1 0 XT-PIC-XT
8: 1 0 XT-PIC-XT rtc0
9: 241 0 XT-PIC-XT acpi, ohci_hcd:usb2, ath
10: 500 0 XT-PIC-XT HDA Intel
11: 492 0 XT-PIC-XT eth0
12: 4 0 XT-PIC-XT i8042
15: 1168 0 XT-PIC-XT ehci_hcd:usb1
29: 3438 0 PCI-MSI-edge ahci
NMI: 0 0 Non-maskable interrupts
LOC: 10689 9561 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 135 130 Rescheduling interrupts
CAL: 39 73 Function call interrupts
TLB: 345 246 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 1 1 Machine check polls
ERR: 1
MIS: 0
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash noapic
CPU0 CPU1
0: 38 0 XT-PIC-XT timer
1: 2 0 XT-PIC-XT i8042
2: 0 0 XT-PIC-XT cascade
7: 1 0 XT-PIC-XT
8: 1 0 XT-PIC-XT rtc0
9: 241 0 XT-PIC-XT acpi, ohci_hcd:usb2, ath
10: 500 0 XT-PIC-XT HDA Intel
11: 492 0 XT-PIC-XT eth0
12: 4 0 XT-PIC-XT i8042
15: 1168 0 XT-PIC-XT ehci_hcd:usb1
29: 3438 0 PCI-MSI-edge ahci
NMI: 0 0 Non-maskable interrupts
LOC: 10689 9561 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 135 130 Rescheduling interrupts
CAL: 39 73 Function call interrupts
TLB: 345 246 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 1 1 Machine check polls
ERR: 1
MIS: 0
log of interrupt arrange (normal) :
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash
CPU0 CPU1
0: 51 0 IO-APIC-edge timer
1: 2 0 IO-APIC-edge i8042
7: 1 0 IO-APIC-edge
8: 1 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 4 0 IO-APIC-edge i8042
19: 405 0 IO-APIC-fasteoi ath
20: 1151 0 IO-APIC-fasteoi ohci_hcd:usb2
21: 4381 0 IO-APIC-fasteoi ehci_hcd:usb1
22: 701 0 IO-APIC-fasteoi HDA Intel
23: 541 0 IO-APIC-fasteoi eth0
29: 8871 0 PCI-MSI-edge ahci
NMI: 0 0 Non-maskable interrupts
LOC: 31080 24673 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 98 130 Rescheduling interrupts
CAL: 43 64 Function call interrupts
TLB: 281 622 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 3 3 Machine check polls
ERR: 1
MIS: 0
BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic root=UUID=27632531-dd03-4a63-91c3-8b6f1fdf9a82 ro quiet splash
CPU0 CPU1
0: 51 0 IO-APIC-edge timer
1: 2 0 IO-APIC-edge i8042
7: 1 0 IO-APIC-edge
8: 1 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 4 0 IO-APIC-edge i8042
19: 405 0 IO-APIC-fasteoi ath
20: 1151 0 IO-APIC-fasteoi ohci_hcd:usb2
21: 4381 0 IO-APIC-fasteoi ehci_hcd:usb1
22: 701 0 IO-APIC-fasteoi HDA Intel
23: 541 0 IO-APIC-fasteoi eth0
29: 8871 0 PCI-MSI-edge ahci
NMI: 0 0 Non-maskable interrupts
LOC: 31080 24673 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 98 130 Rescheduling interrupts
CAL: 43 64 Function call interrupts
TLB: 281 622 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 3 3 Machine check polls
ERR: 1
MIS: 0
Sunday, November 29, 2009
ReactOS :
http://www.reactos.org/tw/index.html
http://blog.roodo.com/ystuan/archives/10460581.html
試著在 binary level 與 MS 的 Windows 相容,說來有點匪夷所思。但仔細想來,就是將每個 Windows 的關鍵零件都實作一份,@@好像還是很恐怖。
It also reference some from Wine project. According to the live video, at least it's workable - at some kind of situation.
http://www.reactos.org/tw/index.html
http://blog.roodo.com/ystuan/archives/10460581.html
試著在 binary level 與 MS 的 Windows 相容,說來有點匪夷所思。但仔細想來,就是將每個 Windows 的關鍵零件都實作一份,@@好像還是很恐怖。
It also reference some from Wine project. According to the live video, at least it's workable - at some kind of situation.
Multiboot ( mboot )
Not to boot multiple OS, but to define the protocol between boot loader and OS.
Boot loader can also load lots modules into memory, and info OS to get use of it.
A good use case is for Xen, or other hypervisor, to load additional initramfs.
Grub 2 support mboot
http://www.gnu.org/software/grub/grub-2.en.html
syslinux + mboot.c32
http://syslinux.zytor.com/wiki/index.php/Mboot.c32
Multiboot speification
http://www.gnu.org/software/grub/manual/multiboot/
-> contain detail information about protocol definitions, also piece of code that OS parts may need.
Article about multiboot :
http://onlamp.com/pub/a/bsd/2007/03/01/inside-multiboot.html
Explain some idea about why multiboot been designed. One goal is to have a unify boot loader to load all kind of OS.
不過裡面提到的,BIOS 要 load HD 的第一個 sector 這件事來說。現存的各種 boot loader,也都有能力 load foreign OS 了。所以是不是要搶占這個位置,倒不重要了。
對於 boot loader 怎 load linux 這塊,這兩年搞很熟了,應該補一下關於 load Windows 這塊的知識倒是。
Not to boot multiple OS, but to define the protocol between boot loader and OS.
Boot loader can also load lots modules into memory, and info OS to get use of it.
A good use case is for Xen, or other hypervisor, to load additional initramfs.
Grub 2 support mboot
http://www.gnu.org/software/grub/grub-2.en.html
syslinux + mboot.c32
http://syslinux.zytor.com/wiki/index.php/Mboot.c32
Multiboot speification
http://www.gnu.org/software/grub/manual/multiboot/
-> contain detail information about protocol definitions, also piece of code that OS parts may need.
Article about multiboot :
http://onlamp.com/pub/a/bsd/2007/03/01/inside-multiboot.html
Explain some idea about why multiboot been designed. One goal is to have a unify boot loader to load all kind of OS.
不過裡面提到的,BIOS 要 load HD 的第一個 sector 這件事來說。現存的各種 boot loader,也都有能力 load foreign OS 了。所以是不是要搶占這個位置,倒不重要了。
對於 boot loader 怎 load linux 這塊,這兩年搞很熟了,應該補一下關於 load Windows 這塊的知識倒是。
Saturday, November 28, 2009
利用 python 啟動超簡易的 http server
http://joseph-in-linux-cht.blogspot.com/2009/09/python.html
以這個 command :
python -m SimpleHTTPServer
會啟動一個 bind to 8000 port 的 server, 分享當前的目錄
http://joseph-in-linux-cht.blogspot.com/2009/09/python.html
以這個 command :
python -m SimpleHTTPServer
會啟動一個 bind to 8000 port 的 server, 分享當前的目錄
Thursday, November 26, 2009
Tuesday, November 24, 2009
Find out which program/process is locking a file in mac osx
from : http://www.macosxhints.com/article.php?story=20091104085622117
Basically, use lsof command, with a AppleScript to work with Finder
from : http://www.macosxhints.com/article.php?story=20091104085622117
Basically, use lsof command, with a AppleScript to work with Finder
Subscribe to:
Posts (Atom)
