顯示具有 prex 標籤的文章。 顯示所有文章
顯示具有 prex 標籤的文章。 顯示所有文章

2009年2月15日 星期日

Prex - FAT32

原本是打算將ELM FAT implementation移植到Prex上
然而因為Prex的Embedded VFS設計的緣故(該設計相當接近於VFS in Sun Unix),
若採用整合ELM FAT的方式需要相當的時間
而其中原因在於資料結構上的考量
因此就改為直接修改Prex本身具有的FAT 12/16以支援FAT32
如此還能針對FAT深入瞭解

而經過數日的奮戰
目前Prex 已經能夠操作 FAT32 檔案系統
也簡短地測試過, 檔案/目錄的新增移除是正常的
尚未支援用以輔助配置free block的 FSINFO以及長檔名的LFN(Long File Name)
有機會再把實做補上
由於處理FAT32的緣故, 研讀了些關於FS的相關資料
而先前所提到的書 File System Forensic Analysis 也幫助不少
另外下列資訊也有相當得助益

boot log如下:
Prex version 0.8.1 for arm-at2440ii (Feb 12 2009)
Free pages:
start end size
-------- -------- --------
00000000 - 00010000 64K
00033800 - 01c27000 28622K
01c39c00 - 04000000 36633K
used=142K free=65319K total=65461K
Time slice is 50 msec
IRQ10 attached priority=10
Clock rate: 1000 ticks/sec
Prex driver module built: Feb 12 2009
Calibrating delay loop... ok count=837
Initializing NULL device
Initializing Power Management
pm: Default power policy is performance mode
Initializing Zero device
Initializing Serial Console
UBRDIV0:0x23
IRQ28 attached priority=1
Initializing RAM disk
RAM disk at 0x01c270e0 (74K bytes)
Initializing SD card
Init. SD Freq. is 401256Hz

In idle
MMC check end!!

In SD ready

End id
RCA=0x9ffc
SD Frequency is 33304320Hz

In stand-by

****4bit bus****
SD disk
IRQ21 attached priority=2
Initializing TTY device
Driver initialized
Loading task:'boot'
Loading task:'proc'
Loading task:'fs'
Loading task:'exec'
Starting Bootstrap Server
Starting Process Server
Starting File System Server
Starting Exec Server
boot: Mounting file systems
VFS: Mounting ramfs dev= dir=/
VFS: Mounting devfs dev= dir=/dev
VFS: Mounting arfs dev=/dev/ram0 dir=/boot
VFS: Mounting fifofs dev= dir=/fifo
VFS: Mounting fatfs dev=/dev/card0 dir=/mnt/floppy
fatfs_mount device=/dev/card0
0 1 1 0 b 1f fd f7 3d 0 0 0 c3 42 1e 0
fatfs partition at sect: 3d
----- FAT 12/16/32 info ----- 3c673
drive:80
total_sectors:1983170
heads :32
serial :49984554
cluster size:8 sectors
fat_start :5d
root_start :2
data_start :f77
fat_type :FAT32
fat_eof :0xfffffff

boot: Run init process
Prex version 0.8.1 (arm-at2440ii)
[prex:/]# cat /mnt/floppy/champ.txt
fatfs_lookup: name=champ.txt
fat_lookup_denode: cl=0 name=champ.txt
fat_lookup_dirent: Ac
fat_lookup_dirent: found sec=3959
fatfs_lookup: cl=4
fatfs_read: vp=38e3c
Hello World!
fatfs_read: vp=38e3c
[prex:/]#

2009年2月9日 星期一

S3C2440A - SD Card works on Prex!

參考著Samsung的測試程式與u-boot, 把SD driver for prex 移植完畢
目前使用的是處理read/write interrupt的方式完成實做
一開始是採用使用DMA方式實作, 然而碰到無法讀寫完畢
像是read counter會有尚未讀出的資料, 而停留在Rx Active的狀態
今日全部改寫後就可以使用了, 日後會多花時間在blog上撰寫文件與porting過程

日後會實做AC97 driver與 Audio Server
接著就是完成所設定目標的CLI MP3 Player

prex本身有FAT16的支援(之後有打算將fat32移植上去)

以下是開機到把SD Card上名為TEST.TXT的檔案內容印出的過程

Prex Boot Loader V1.00
loading: hdr=01c02008 module=000030e4 name=prex
loading: hdr=01c0a290 module=00003114 name=dev.ko
loading: hdr=01c0e260 module=00003144 name=boot
loading: hdr=01c0fe78 module=00003174 name=proc
loading: hdr=01c12a38 module=000031a4 name=fs
loading: hdr=01c21880 module=000031d4 name=exec
bootdisk base=01c26358 size=000128bc
kernel_entry=00010074
Entering kernel...

Prex version 0.8.1 for arm-at2440ii (Feb 9 2009)
Free pages:
start end size
-------- -------- --------
00000000 - 00010000 64K
00032c00 - 01c26000 28621K
01c39000 - 04000000 36636K
used=140K free=65321K total=65461K
Time slice is 50 msec
IRQ10 attached priority=10
Clock rate: 1000 ticks/sec
Prex driver module built: Feb 9 2009
Calibrating delay loop... ok count=837
Initializing NULL device
Initializing Power Management
pm: Default power policy is performance mode
Initializing Zero device
Initializing Serial Console
UBRDIV0:0x23
MMC check end!!

In SD ready

End id
RCA=0x9ffc
SD Frequency is 33304320Hz

In stand-by

****4bit bus****
SD disk
IRQ21 attached priority=2
Initializing TTY device
Driver initialized
Loading task:'boot'
Loading task:'proc'
Loading task:'fs'
Loading task:'exec'
Starting Bootstrap Server
Starting Process Server
Starting File System Server
Starting Exec Server
boot: Mounting file systems
VFS: Mounting ramfs dev= dir=/
VFS: Mounting devfs dev= dir=/dev
VFS: Mounting arfs dev=/dev/ram0 dir=/boot
VFS: Mounting fifofs dev= dir=/fifo
VFS: Mounting fatfs dev=/dev/card0 dir=/mnt/floppy
boot: Run init process
Prex version 0.8.1 (arm-at2440ii)
[prex:/]# cat /mnt/floppy/TEST.TXT
Hello World !!

[prex:/]#

2009年1月22日 星期四

Plan

由於正處於一段空檔時間, 除了休息外, 也做了一些規劃
當然, 不外乎唸書, 念英文, 為了在專業能力上的精進
所以個人也規劃了兩個個人專案

1. Prex on AT2440-II

Fig: Prex 在 AT2440-II上運作情形

這個專案的目的主要在於期望自己對於軟硬體的系統有更深一層的認識
設立的目標有
  • OS porting
  • SD/MMI device driver
  • FAT32 file system
  • Audio device driver
  • MP3 playback
  • Memory Management
  • Power Management

在這一週來已經有基本的實做, OS port已經完成, Prex本身已經能夠在板上運作
日後會補足porting過程, Prex/S3C2440的細節介紹
未來是著重於實做與文件的撰寫, 並且完成進一步的目標

2. BeagleBoard
前一陣子取得了Rev.B7的板子
OMAP3530-based的平台, 而且目前已經有相當多的軟體資源
專案目標在於讓自己熟悉幾點
  • ARM NEON technology
  • DSP programming model, ex: TI OpenMax IL implementation
  • embedded linux
  • Android (System, OpenCore)
總之, 一個專案比較講求底層基礎技術, 另一為追求高階系統整合架構所設立的目標

在 ARM 平台上使用 Function Multi-Versioning (FMV) - 以使用 Android NDK 為例

Function Multi-Versioning (FMV) 過往的 CPU 發展歷程中, x86 平台由於因應各種應用需求的提出, 而陸陸續續加入了不同的指令集, 此外也可能因為針對市場做等級區隔, 支援的數量與種類也不等. 在 Linux 平台上這些 CPU 資訊可以透過...