原创 patch和diff
1. 生成patch diff -Naur olddir(oldfile) newdir(newfile) > new-patch diff -Naur --exclude=.svn olddir newdir > new-patch
原创 uboot環境變量腳本
setenv loader_addr 0xcxxxxxxx setenv bootloader_loc /home/nchen/work/images/u-boot.bin setenv kernel_loc /home/nchen/wo
原创 各種查找文件的腳本
1. Linux內核 #!/bin/bash LNX=. find . / -path "$LNX/arc
原创 matrix鍵盤工作驅動基本思路
以4*3鍵盤爲例: 4個gpio爲output, 3個gpio爲input. 開始時,4個output的gpio也爲input狀態. 當掃描開始時(當有鍵按下,觸發中斷),將output的某個gpio設爲1,然後起一個定時器(40
原创 對內核高精度timer體系的一些分析
因爲在vim下輸入英文比較方便, 所以一般初稿都是用英文寫的. 下面的分析是基於最新的內核(2.6.33)的. there is not included at current platform commented # 在kernel的t
原创 ARM Linux相關
1. The page table at Arm Linux It is the New ARMv6 page table, with The Not-Global (nG) bit, The Shared (S) bit, The Ex
原创 內核啓動的一些總結
1. arm linux boot flow map_io is called very early, which is at paging_init the kernel_init will not go on running unt
原创 Bash Shell使用技巧
1. Makefile與Shell取環境變量的不同方法 Makefile: cc=$(CROSS_COMPILE) Shell: cc=$CROSS_COMPILE 2.從命令中得到值 removable=$(cat /sys/blo
原创 其它命令的使用
1.如何設置IP地址: sudo ifconfig usb0 10.0.0.1 netmask 255.255.255.0 up 點贊 收藏 分享 文章舉報 hzpeterche
原创 mount命令
1. mount ramdisk mount ramimage /mnt/ramdisk -t ext2 -o loop=/dev/loop3 2.在目標機上mount nfs文件系統 mount -t nfs -o nolock $
原创 Android 常用技巧
1. how to running emulator: ./emulator -image lib/images/system.img -ramdisk lib/images/ramdisk.img -initdata lib/image
原创 一些硬件常識
1. 有關reset controller和clock enable的順序問題 異步設備(大多數設備): 先reset controller, 再clock enable 同步設備: 先clock enable, 再reset contr
原创 Linux Kernel API (2.6)
For UP system #protect share data spin_lock/spin_unlock: protect the data during process context(and only at process
原创 C語言拾遺
1. ^ is NOR, 2^4 is 0x6, 2^5 is 0x7, 2^6 is 0x4. 點贊 收藏 分享 文章舉報 hzpeterchen 發佈了50 篇原創文章 ·
原创 Linux的內存管理的一些總結
1. kmalloc: 在arm平臺上, kmalloc是以cache line的字節數對齊的,比如cortex A8, A15是64bytes 對齊, 而cortex A9則是32bytes 對齊。 2. 如何知道系統中可用的memo