vivi开发笔记【专辑】
来源:互联网 发布:软件站排名 编辑:程序博客网 时间:2024/06/11 17:11
文章说明:calmarrow(lqm)原创
文章引自:http://piaoxiang.cublog.cn
################## Modified Start ####################################
# Data : 2007-07-21
# Modified by Liu Qingmin <piaoxiangxinling@163.com>
#
# change this to point to the Linux include directory
#
# orginal setup
#LINUX_INCLUDE_DIR = /opt/host/armv4l/include/
# my setup
LINUX_INCLUDE_DIR = /usr/local/arm/2.95.3/include
################# Modified End ######################################
################## Modified Start ####################################
# Data : 2007-07-21
# Modified by Liu Qingmin <piaoxiangxinling@163.com>
# orginal setup
#CROSS_COMPILE = /opt/host/armv4l/bin/armv4l-redhat-linux-
#CROSS_COMPILE = /opt/host/armv4l/bin/armv4l-unknown-linux-
# my setup
CROSS_COMPILE = /usr/local/arm/2.95.3/bin/arm-linux-
################# Modified End ######################################
################## Modified Start ####################################
# Data : 2007-07-21
# Modified by Liu Qingmin <piaoxiangxinling@163.com>
#
# Location of the gcc arm libs.
#
# orginal setup
#ARM_GCC_LIBS = /opt/host/armv4l/lib/gcc-lib/armv4l-unknown-linux/2.95.2
#ARM_GCC_LIBS = /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3
# my setup
ARM_GCC_LIBS = /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3
################# Modified End ######################################
#ifdef CONFIG_S3C2410_NAND_BOOT
mtd_partition_t default_mtd_partitions[] = {
{
name: "vivi", /* 128K, 1-8 sector */
offset: 0,
size: 0x00020000,
flag: 0
}, {
name: "param", /* 64K, 9-12 sector */
offset: 0x00020000,
size: 0x00010000,
flag: 0
}, {
name: "kernel", /* 2M+832K, 12-192 setctor */
offset: 0x00030000,
size: 0x002d0000,
flag: 0
}, {
name: "root", /* 29M, 193-2048 sector */
offset: 0x00300000,
size: 0x01d00000,
flag: MF_BONFS
}
};
[root@lqm vivi]# cat procedure
#!/bin/sh
make myboard_config && make oldconfig && make vivi && cp -f vivi /mnt/hgfs/common/
@@@@@@@@@@@@@@@@@@ Modified Start @@@@@@@@@@@@@@@@@@@@@
mov r0, #10 @ rotate 10 times
loop:
mov r2, #0xdf @ D1205 led on
str r2, [r1, #oGPIO_DAT]
bl delay
mov r2, #0x7f @ D1207 led on
str r2, [r1, #oGPIO_DAT]
bl delay
mov r2, #0xef @ D1204 led on
str r2, [r1, #oGPIO_DAT]
bl delay
mov r2, #0xbf @ D1206 led on
str r2, [r1, #oGPIO_DAT]
bl delay
subs r0, r0, #1
bne loop
mov r2, #0x0f @ all leds on
str r2, [r1, #oGPIO_DAT]
@ buzzer off
ldr r1, =0x56000010 @ GPBCON
ldr r2, =0x155559
str r2, [r1]
ldr r2, =0x7ff
str r2, [r1, #8]
orr r2, r2, #0x01 @ buzzer off when high voltage(PWM1)
str r2, [r1, #4]
@@@@@@@@@@@@@@@@@@ Modified End @@@@@@@@@@@@@@@@@@@@@@@@@
/*
* subroutines
*/
@@@@@@@@@@@@@@@@@@ Modified Start @@@@@@@@@@@@@@@@@@@@@
@
@ led delay
@
delay:
ldr r3, =0x00080000
wait:
subs r3, r3, #1
bne wait
mov pc, lr
@@@@@@@@@@@@@@@@@@ Modified End @@@@@@@@@@@@@@@@@@@@@
[root@lqm init]# cat version.c
/*
* vivi/lib/version.c
*/
#include "version.h"
#include "compile.h"
const char *vivi_banner =
"/n/r/t/t^_^ Well done, boy! Go on --> /n/r/n/r"
"VIVI version " VIVI_RELEASE " (" VIVI_COMPILE_BY "@"
VIVI_COMPILE_HOST ") (" VIVI_COMPILER ") " UTS_VERSION "/n/r";
^_^ Well done, Go on -->
VIVI version 0.1.4 (root@lqm) (gcc version 2.95.3 20010315 (release)) #0.1.4 日 7月 22 10:15:15 CST 2007
MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
Could not found stored vivi parameters. Use default vivi parameters.
Press Return to start the LINUX now, any other key for vivi
type "help" for help.
vivi> part show
mtdpart info. (4 partitions)
name offset size flag
------------------------------------------------
vivi : 0x00000000 0x00020000 0 128k
param : 0x00020000 0x00010000 0 64k
kernel : 0x00030000 0x002d0000 0 2M+832k
root : 0x00300000 0x01d00000 4 29M
vivi>
vivi> bon part 0 192K 3M
doing partition
offset = 0
flag = 0
offset = 196608
flag = 0
offset = 3145728
flag = 0
check bad block
part = 0 end = 196608
part = 1 end = 3145728
part = 2 end = 33554432
part0:
offset = 0
size = 196608
bad_block = 0
part1:
offset = 196608
size = 2949120
bad_block = 0
part2:
offset = 3145728
size = 30392320
bad_block = 0
vivi>
vivi> load flash vivi x
Ready for downloading using xmodem...
Waiting...
正在开始 xmodem 传输。 按 Ctrl+C 取消。
正在传输 vivi...
100% 67 KB 6 KB/s 00:00:10 0 错误
Downloaded file at 0x30000000, size = 69376 bytes
Found block size = 0x00014000
Erasing... ... done
Writing... ... done
Written 69376 bytes
vivi>
vivi> part show
mtdpart info. (4 partitions)
name offset size flag
------------------------------------------------
vivi : 0x00000000 0x00020000 0 128k
param : 0x00020000 0x00010000 0 64k
kernel : 0x00030000 0x002d0000 0 2M+832k
root : 0x00300000 0x01d00000 4 29M
vivi> bon part show
BON info. (3 partitions)
No: offset size flags bad
---------------------------------------------
0: 0x00000000 0x00030000 00000000 0 192k
1: 0x00030000 0x002d0000 00000000 0 2M+832k
2: 0x00300000 0x01cfc000 00000000 0 28M+1008k
vivi>
vivi> load flash kernel x
Ready for downloading using xmodem...
Waiting...
正在开始 xmodem 传输。 按 Ctrl+C 取消。
正在传输 zImage...
100% 646 KB 7 KB/s 00:01:25 0 错误
Downloaded file at 0x30000000, size = 661760 bytes
Found block size = 0x000a4000
Erasing... ... done
Writing... ... done
Written 661760 bytes
vivi> ?
^_^ Well done, Go on -->
VIVI version 0.1.4 (root@lqm) (gcc version 2.95.3 20010315 (release)) #0.1.4 日 7月 22 10:15:15 CST 2007
MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
Found saved vivi parameters.
Press Return to start the LINUX now, any other key for vivi
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x002d0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/bon/2 init=/linuxrc console=ttyS0"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux............................................... done, booting the kernel.
Linux version 2.4.18-rmk7-pxa1 (root@lqm) (gcc version 2.95.3 20010315 (release)) #1 Fri Jul 20 15:12:44 CST 2007
CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: Embest EduKit II (S3C2410x)
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: noinitrd root=/dev/bon/2 init=/linuxrc console=ttyS0
DEBUG: timer count 15626
Console: colour dummy device 80x30
Calibrating delay loop... 99.94 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62880KB available (1229K code, 296K data, 60K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 58) is a S3C2410
Console: switching to colour frame buffer device 30x40
Installed S3C2410 frame buffer
pty: 256 Unix98 ptys configured
s3c2410-ts initialized
S3C2410 Real Time Clock Driver v0.1
block: 128 slots per queue, batch=32
eth0: cs8900 rev K(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 37
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
bon0: 00000000-00030000 (00030000) 00000000
bon1: 00030000-00300000 (002d0000) 00000000
bon2: 00300000-01ffc000 (01cfc000) 00000000
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
cramfs: wrong magic
FAT: bogus logical sector size 65535
Kernel panic: VFS: Unable to mount root fs on 61:02
vivi> load flash root x
Ready for downloading using xmodem...
Waiting...
正在开始 xmodem 传输。 按 Ctrl+C 取消。
正在传输 root.cramfs...
100% 1104 KB 7 KB/s 00:02:22 0 错误
Downloaded file at 0x30000000, size = 1130496 bytes
Found block size = 0x00114000
Writing... size = 1130496
bad_block = 0
... done
Written 1130496 bytes
vivi>
vivi>
^_^ Well done, Go on -->
VIVI version 0.1.4 (root@lqm) (gcc version 2.95.3 20010315 (release)) #0.1.4 日 7月 22 10:15:15 CST 2007
MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
Found saved vivi parameters.
Press Return to start the LINUX now, any other key for vivi
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x002d0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/bon/2 init=/linuxrc console=ttyS0"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux............................................... done, booting the kernel.
Linux version 2.4.18-rmk7-pxa1 (root@lqm) (gcc version 2.95.3 20010315 (release)) #1 Fri Jul 20 15:12:44 CST 2007
CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: Embest EduKit II (S3C2410x)
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: noinitrd root=/dev/bon/2 init=/linuxrc console=ttyS0
DEBUG: timer count 15626
Console: colour dummy device 80x30
Calibrating delay loop... 99.94 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62880KB available (1229K code, 296K data, 60K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 58) is a S3C2410
Console: switching to colour frame buffer device 30x40
Installed S3C2410 frame buffer
pty: 256 Unix98 ptys configured
s3c2410-ts initialized
S3C2410 Real Time Clock Driver v0.1
block: 128 slots per queue, batch=32
eth0: cs8900 rev K(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 37
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
bon0: 00000000-00030000 (00030000) 00000000
bon1: 00030000-00300000 (002d0000) 00000000
bon2: 00300000-01ffc000 (01cfc000) 00000000
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
VFS: Mounted root (cramfs filesystem).
Mounted devfs on /dev
Freeing init memory: 60K
mount /etc as ramfs
re-create the /etc/mtab entries
init started: BusyBox v1.00 (2005.06.09-02:02+0000) multi-call binary
Starting pid 17, console /dev/console: '/etc/init.d/rcS'
Embest Embedded Linux Development Paltform.
Default board ip: 192.192.192.190
To change the ip addr: ifconfig eth0 new_board_ip
Start the web server: http://(board_ip)/index.htm
To connect the NFS server, please type like:
mkdir /etc/var/nfs
mount -t nfs nfs_server_ip:/home/app /etc/var/nfs -o nolock
To use the USB disc(insert first), please type like:
mount /dev/sda /mnt/udisk _OR_ mount /dev/sda1 /mnt/udisk
Please press Enter to activate this console.
Starting pid 42, console /dev/console: '/bin/sh'
~ # ls
bin etc linuxrc proc tmp var
dev lib mnt sbin usr
~ #
·vivi开发笔记(一):学习计划
·vivi开发笔记(二):软件架构分析
·vivi开发笔记(三):Makefile详解
·vivi开发笔记(四):配置机制分析
·vivi开发笔记(五):GPIO实验
·vivi开发笔记(六):GNU Tools开发工具综述
·vivi开发笔记(七):GNU AS基本使用方法
·vivi开发笔记(八):GNU LD基本用法
·vivi开发笔记(九):SDRAM实验
·vivi开发笔记(十):nand flash与uart实验
·vivi开发笔记(十一):中断和timer实验
·vivi开发笔记(十二):MMU分析
·vivi开发笔记(十三):clock
·vivi开发笔记(十四):vivi源代码分析1
·vivi开发笔记(十五):vivi源代码分析2
·vivi开发笔记(十六):vivi源代码分析3
·vivi开发笔记(十七):vivi与Linux kernel的参数传递情景分析(上)
·vivi开发笔记(十七):vivi与Linux kernel的参数传递情景分析(下)
·vivi开发笔记(十八):bootloader开发阶段总结
·vivi开发笔记(二十):vivi延时函数实现不合理性的探讨
·vivi开发笔记(十九):制作的patch集合
- vivi开发笔记【专辑】
- vivi开发笔记【专辑】
- vivi开发笔记
- vivi开发笔记
- vivi开发笔记: MMU分析|ARM,vivi
- vivi开发笔记(十三):clock
- vivi开发笔记(一):学习计划
- vivi开发笔记(三):Makefile详解
- vivi开发笔记(十七):vivi与Linux kernel的参数传递情景分析(下)
- zz vivi开发笔记(九):SDRAM实验
- vivi开发笔记(二):软件架构分析
- S3C2410 vivi阅读笔记
- vivi移植开发
- vivi开发笔记(十七):vivi与Linux kernel的参数传递情景分析(上)[转]
- Enterprise JavaBean开发专辑
- GBA开发专辑 (ZT)
- S3C2410 bootloader ----VIVI阅读笔记
- S3C2410 bootloader vivi阅读笔记
- 初始化D3D
- linux-2.6.14下USB驱动移植心得
- syslog的点滴--集中处理日志
- 通过用 .NET 生成自定义窗体设计器来定制应用程序
- uclinux内核VFS的简单遍历
- vivi开发笔记【专辑】
- How to write a JMS Faban driver
- Java中字符之间的转化
- 我为什么要开通博客?
- C指针的实质
- 2010-7-1
- BMP、JPG等六种常用图形文件的结构
- 切割图片
- C++中四种类型转换运算符的使用方法