Time of Update: 2018-12-05
1.用法vmstat [-a] [-n] [-S unit] [delay [ count]]vmstat [-s] [-n] [-S unit]vmstat [-m] [-n] [delay [ count]]vmstat [-d] [-n] [delay [ count]]vmstat [-p disk partition] [-n] [delay [ count]]vmstat [-f]vmstat [-V]-a:顯示活躍和非活躍記憶體-f:顯示從系統啟動至今的fork數量
Time of Update: 2018-12-05
【1】有必要查詢下Linux核心# uname -r2.6.28-11-generic# ls /usr/src/linux-headers-2.6.28-11 linux-headers-2.6.28-11-generic由此可見核心版本和核心標頭檔版本是一致的,都是2.6.28-11。(如果不一致的話在insmod一步必定出錯:Error inserting './hello.ko': -1 Invalid module
Time of Update: 2018-12-05
1.解壓arm-linux-gcc 檔案如:#tar xvzf arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz –C /2.把arm-linux-gcc 安裝到一個目錄下面如:將把 arm-linux-gcc 安裝到/opt/FriendlyARM/toolschain/4.5.1 目錄3.修改設定檔環境變數如:把編譯器路徑加入系統內容變數,運行命令#gedit /root/.bashrc編輯/root/.bashrc 檔案,注意“bashrc”前面有一個“.”,
Time of Update: 2018-12-05
(1)tree -a 顯示所有檔案和目錄(2)tree -d 顯示目錄名稱而非內容(3)tree -f 在每個檔案或目錄之前,顯示完整的相對路徑名稱(4)tree -F 在執行檔案,目錄,Socket,符號串連,管道名稱名稱,各自加上"*","/","=","@","|"號。(5)tree -r 以相反次序排列(6)tree -t 用檔案和目錄的更改時間排序(7)tree -L n 只顯示 n 層目錄 (n 為數字)(8)tree -dirsfirst
Time of Update: 2018-12-05
Time of Update: 2018-12-05
Linux 裝置驅動的學習是一項浩大的工程,讀者需要首先掌握以下基礎。1. 編寫 Linux 裝置驅動要求工程師具有良好的硬體基礎,懂得 SRAM、Flash、SDRAM、磁碟的讀寫方式,UART、I2C、USB 等裝置的介面,輪詢、中斷、DMA 的原理,PCI 匯流排的工作方式以及 CPU 的記憶體管理單元(MMU)等。2.編寫 Linux 裝置驅動要求工程師具有良好的 C 語言基礎,能靈活地運用 C 語言的結構體、指標、函數指標及記憶體動態申請和釋放等。3.編寫 Linux
Time of Update: 2018-12-05
在linux下搭建svn本機伺服器可以很好的管理自己的代碼,具體過程如下:# mkdir svn_local# cd svn_local # svnadmin create led_diplay在xxx目錄下會有下面目錄:conf dav db format hooks locks README.txt# svn import [path] URLsvn import led_diplay/
Time of Update: 2018-12-05
要在開發板上的Linux開機啟動自己的程式,想著簡單,卻改了很久,繞了一圈下來確實很簡單,只是自己一開始太過迂腐吧! 如果不想看完全文,這一段應該就夠了,從我使用的開發板的角度講,一般只要在/etc/init.d/rcS中加入你的程式或者指令碼命令就可以實現開機自動運行;想在超級終端輸入斷行符號,登入後執行,則可以在/etc/profile中加入命令;如果想去掉每次開機完後的“Please press Enter to activate this
Time of Update: 2018-12-05
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx上一節介紹了進程調度的一些基本概念,並簡單介紹了在沒有搶佔的情況下,CFS調度的是如何分配進程的優先順序和時間片。但是,核心並不會只是單一地分配時間片讓進程運行。xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Time of Update: 2018-12-05
Contents[hide]1Introduction2Driver Configuration2.1Sysfs entries configuration3IRQ handling4Driver Usage4.1Kernel Level4.2User Space - Sysfs control5ReferencesIntroduction This wiki page provides the usage information of GPIO Linux driver usage,
Time of Update: 2018-12-05
1.下載 arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2cp arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 /usr/local/2.解壓縮交叉編譯工具鏈cd /usr/local/tar -jxvf
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriveMonkeyphone:13410905075Source:#include <linux/init.h>#include <linux/module.h>MODULE_LICENSE("Dual BSD/GPL");static int mmap_init(void){printk(KERN_ALERT"Hello world!\n");return
Time of Update: 2018-12-05
1.擷取核心移植源碼http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.2.tar.bz22.解壓核心源碼(1).bzip2 -d linux-2.6.32.2.tar.bz2(2).tar -xvf linux-2.6.32.2.tar3.修改總目錄下的Makefile原:export KBUILD_BUILDHOST := $(SUBARCH)ARCH ?= $(SUBARCH)CROSS_COMPILE ?=改為export
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriveMonkey承接各類嵌入式外包項目(phone:13410905075)linux 調試 GPIO 有兩個工具可以使用一個就是dubugfs另外一個就是linux自身帶的gpio驅動架構首先說一下debugfs 對於gpio調試的用法1.mount 上 debugfs mount -t debugfs debugfs /sys/kernel/debug2. 找到引腳多路配置選項
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriverMonkey承接各類嵌入式外包項目(phone:13410905075)1/*2 * SPI testing utility (using spidev driver)3 *4 * Copyright (c) 2007 MontaVista Software, Inc.5 * Copyright (c) 2007 Anton Vorontsov
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriverMonkey承接各類嵌入式外包項目(phone:13410905075)使用方法:1.核心中開啟debugfs 功能 Location: -> Kernel hacking Debug Filesystem 2.啟動核心mount
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriveMonkey 問題: 運行 ”echo 117 > /sys/class/gpio/export“ 在 gpio 目錄下不能產生gpio117 檔案調試過程:第一步:在 gpio_request 設定列印資訊發現 test_and_set_bit 函數 傳回值為 --EBUSY思考:懷疑當前 gpio117 已經被其他驅動使用第二步:驗證第一步的懷疑在 gpio_request
Time of Update: 2018-12-05
author:DriverMonkeymail:bookworepeng@hotmail.comqq:196568501phone:13410905075-歡迎交流測試硬體平台-am335x(linux 3.2)前提條件:1.busybox 已經支援 mdev 2.核心已經直至隨身碟1) 在etc/init.d/ 目錄下船艦rcS 指令碼#! /bin/sh/bin/mount
Time of Update: 2018-12-05
1. virualobox 設定 setting -> shared folders -> added shared folders 輸入 folder path , folder name 選擇 make permanent 2. 修改 fstab 檔案 路徑 /etc/fstab 加入 # <file system> <mount point> <type> <options>
Time of Update: 2018-12-05
Linux下USB gadget裝置詳解 USB gadget是什嗎?Linux-USB Gadget 驅動架構(以下簡稱 Gadget)實現了USB 協議定義的裝置端的軟體功能。相對於 Linux USB 主機端(Host) 驅動而言, Gadget 驅動出現較晚,它出現在2.4.23 以後。 Gadget 架構提出了一套標準 API, 在底層, USB 裝置控制器(USB Device Controller, UDC)驅動則實現這一套 API, 不同的 UDC (通常是 SOC