Time of Update: 2018-12-06
沒辦法,自己沒有看下去,又被說了“好弱”,自嘲下,在這個實驗室,習慣了dalvik-bytecode.html中描述了位元組碼的順序,其中,OP & Formatop指示執行何種操作,Format描述了該種操作所對應的資料流格式。這是師兄的一個case,記錄下: 1 class add { 2 public static void main (String[] args) 3 { 4 int i = 2;
Time of Update: 2018-12-06
格式參考Multimedia Programming Interface and Data Specifications 1.0 1 aplay -C -c 1 -f U8 -r 11025 -t wav -d 7 my.wav 2 000000 52 49 46 46 9c 2d 01 00 >RIFF.-..< 3 000008
Time of Update: 2018-12-06
mov pc, r4 @ call kernel 絕對跳轉到r4:40008000處開始執行開始進入Image,Image由vmlinux產生,所以從vmlinux開始閱讀理解。arch/unicore/kernel目錄,據其連結指令碼,從head.S開始:__lookup_processor_type:運用相對取址,取出proc_info_list,做出processor對比(因為一個鏡像支援一種processor,該processor的資訊從副處理器的c0:4d0008
Time of Update: 2018-12-06
%.d: %.c $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f
Time of Update: 2018-12-06
ssh179 1 #! /usr/bin/expect 2 set timeout 60 3 set host 172.20.106.179 4 set name [lindex $argv 0] 5 set password abc123 6 spawn ssh $name@$host 7
Time of Update: 2018-12-06
依 CSDN劉偉技術部落格,C++命令模式樣本如下: 1 // include/Command.h 2 3 #ifndef __COMMAND__ 4 #define __COMMAND__ 5 6 #include <WindowHandler.h> 7 #include
Time of Update: 2018-12-06
lwl,lwr,swl,swr中的指令尾碼r(right),l(left)都是相對寄存器而言,load操作是把取到的部分資料,置入寄存器的left或者right,store操作時將寄存器中的資料的 left或者right部分寫入目標地址。無論時大端和小端寄存器的格式都是固定的,即
Time of Update: 2018-12-06
寫了大概一下午,本以為很easy的,寫了才知道“邊界+細節”,尤其“(ones >> 2) >> ntz”,如果寫成了“ones>>(2+ntz)"就會報錯,邊界部分自己調了。關於bitcount部分,做了修改,基本只用一個大的常數,以及一些小的數字。 4 int bitcount(unsigned int n) 5 { 6 unsigned int tmp; 7 tmp = n & 0x33333
Time of Update: 2018-12-06
檔案sramboot.S#include"regdef.h".text.globl mainmain: .set noreorder .set noat la at, value lw a0, 0(at) lw a1, 4(at) jal my_add add a2, a0, a1 sw a2, 8(at) 檔案#include"regdef.h".text.globl my_add,valuemy_add: .set
Time of Update: 2018-12-06
出自0.12:main()也是一個函數。這是因為在編譯串連時它將會作為crt0.s組譯工具的函數被調用。crt0.s是一個樁(stub)程式,名稱中的“crt”是“C
Time of Update: 2018-12-06
在中心又跑了下指令集測試,順便記錄下在cache miss時write allocate和read allocate的區別 代碼: 1 movl r0, #0x7000 2 movl r1, #0xaaaaaaaa 3 stw r1, [r0] 4 movl r1, #0xbbbbbbbb 5 stw r1, [r0] ldw r1, [r0] 6 movl r0, #0x94007000 7 stw r1, [r0] 8
Time of Update: 2018-12-06
.incbin "file"[,skip[,count]] The incbin directive includes file verbatim at the current location. You can control the search paths used with the ‘-I’ command-line option . Quotation marks are required around file. The skip argument skips a number
Time of Update: 2018-12-06
由於CPU的位元一般約定俗成是8的整數倍,8位、16位、32位等等,而ADC(模數轉換器)的位元一般不是8的整數倍,比如9位、10位、12位、14位等等;採樣產生的資料在儲存時,就有了“向靠左對齊,右邊填齊,左邊填0”兩種儲存方法,這就是Left-Justified和Right-Justified。無壓縮的WAV檔案,一般使用Left-Justified。比如一個採樣結果1010 0001 0111將被儲存為1010 0001,0111 0000。
Time of Update: 2018-12-06
1 #include <stdio.h> 2 3 void show(unsigned int value, unsigned int start, unsigned seq_end) 4 { 5 int i = 0; 6 printf("%d = %d + ",
Time of Update: 2018-12-06
看I2C驅動的時候,感覺有點亂,伺服器掛了,沒法編譯,不好打樁;Makefile和Kconfig都看了下, 依據核心的標頭檔寫了個指令碼,方便查看函數執行流程。執行 postseq `pwd`輸出 執行階段的修飾符 函數名 檔案名稱+行號 1 #! /bin/bash
Time of Update: 2018-12-06
#在核心中將產生的目標檔案與源檔案放在一起,此處將產生的目標檔案放在一個目錄下,類似於 android的lk目錄下的組織。#當標頭檔更新時,更新cpp檔案的時間戳記,進而重建依賴檔案,並執行源檔案到目標檔案的編譯。#tools目錄下的depend.sh,可以直接寫在Makefile中,但是太長,所以單獨列出。#本檔案在運行時,顯示“has modification time 3.2e+05s in the
Time of Update: 2018-12-06
1 #include <iostream> 2 3 using namespace std; 4 5 struct node 6 { 7 int data; 8 node *next; 9 }; 10 11 12 node
Time of Update: 2018-12-06
1 #! /bin/bash 2 LIB_CUR_REL= 3 LIB_CUR_ABS= 4 5 get_binary_dependency() 6 { 7 readelf -d $1 | grep NEEDED | sed -n 's,.*\[\(.*\)\],\1,p' 8 }
Time of Update: 2018-12-06
寫了個platform架構的UART測試驅動,在卸載的時候出了問題,驅動卸載不掉,感覺很奇怪,使用者空間使用的rmmod最終會調用kernel/module.c 中的 SYSCALL_DEFINE2(delete_module, const char __user*, name_user, unsigned int, flags)1、按找lsmod顯示的模組名尋找模組 mod = find_module(name); if (!mod) { ret =
Time of Update: 2018-12-06
1 #! /bin/bash 2 3 name=liuchangcheng 4 5 loginme() 6 { 7 last | grep `w -u $1 | awk 'NR == 3{print $1}'` | grep 'still logged in' | awk