======nand_SDK=======
1)building
$ sudo tar -zxpf linux-nand-sdk
$ cd linux-nand-sdk
$ source tools/scripts/envsetup.sh
$ cb_build_nand_image
2)product list
0 - cb2-debian-server
1 - cb2-lubuntu-server
2 - cb-lubuntu-server
3 - ct-debian-server
4 - ct-lubuntu-server
此为nand的img制作,USB刷机!!
上海的A20_PCB,LED -> SPI0_CS0_PC23 == PC23
=============================EMMC_ROOTFS_修改=================================
rootfs 修改
cd binaries/
sudo tar -zxpvf debian-server-v1.2.tar.gz
修改后tar
sudo tar -zcpvf debian-server-v22.tar.gz rootfs
sudo chown dou:dou debian-server-v22.tar.gz
chmod 774 debian-server-v22.tar.gz
也可以从A20_提取当前运行的rootfs,,插上U 盘
sudo mkdir /mnt/usb
sudo mkdir /mnt/rootfs/
sudo mount /dev/sda /mnt/usb
sudo mount /dev/mmcblk0p2 /mnt/rootfs //or sudo mount /dev/nandb /mnt/rootfs
sudo tar -zcpvf xxx_rootfs.tar.gz /mnt/rootfs
sudo sync
sudo cp /mnt/xxx_rootfs.tar.gz /mnt/usb/
sudo sync
===============rootfs_定制=====================================
$ cowsay /cdrom/_________
< /cdrom/ >
---------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
这个牛修改,,只需修改/etc/motd这个文件就可以了
vi /etc/motd
//
console logo
vi etc/rc1.d/S01motd
do_start () {
echo "" > /var/run/motd.dynamic
if [ $(cat /proc/meminfo | grep MemTotal | grep -o '[0-9]\+') -ge 1531749 ]; then
toilet -f standard -F metal "jiangdou" >> /var/run/motd.dynamic
else
toilet -f standard -F metal "jiangdou" >> /var/run/motd.dynamic
vi /a20/a20-debian-server/overlay/etc/init.d/motd
toilet -f standard -F metal "jiangdou" >> /var/run/motd.dynamic
2: ==========登录提示信息修改========================
vi /etc/issue
Debian GNU/Linux sunxi-Debian 7.6 wheezy
The default login:sunxi password:123
4: A20_DDR3 压力TEST
wget http://pyropus.ca/software/memtester/old-versions/memtester-4.2.2.tar.gz
cd $ make
$ memtester 400M 1 (400M : 表示容量,,,1:表示loop次数,,默认for(; ;))
root@sunxi:/home/dou/memtest/memtester-4.2.2# make
make: Warning: File `Makefile' has modification time 4.9e+07 s in the future
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
./compile memtester.c
./compile tests.c
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
./extra-libs.sh "`cat systype`" >extra-libs
./load memtester tests.o `cat extra-libs`
make: warning: Clock skew detected. Your build may be incomplete.
root@sunxi:/home/dou/memtest/memtester-4.2.2#
root@sunxi:/home/dou/memtest/memtester-4.2.2#
root@sunxi:/home/dou/memtest/memtester-4.2.2#
root@sunxi:/home/dou/memtest/memtester-4.2.2# ./memtester 400M
memtester version 4.2.2 (32-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 4096
pagesizemask is 0xfffff000
want 400MB (419430400 bytes)
got 400MB (419430400 bytes), trying mlock ...locked.
Loop 1:
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
==================compile memtester for android====================
1) introduce
memtester是一款测试内存的工具, 测试的主要项目有:随机值、异或比较、减法、乘法、除法、与或运算等等。通过给定内存的大小和次数,对系统现有的内存进行测试,观察内存是否足够稳定。
2) compile and install
download memtester-4.3.0.tar.gz
tar -xf memtester-4.3.0.tar.gz
rm trycpp.c
vim tests.h
在文件的开头加上
#include <stddef.h>
arm-linux-gnueabihf-gcc -o memtester *.c *.h -static
生成的可执行文件即可放到arm_android上运行
3) usage
memtester可以测试的最大内存容量少于系统安装的内存总量。
格式:memtester <memory size> [runs]
memory size: 要测试的内存大小, MB为系统默认设置。用户也可以设置为B、KB、GB;
runs: 测试次数,如果没有指定测试次数, 那么测试会一直进行, 直到用户终止。
./memtester 64 1 : 测试64M内存1次
./memtester 64k 3 :测试64K内存3次
-p:指定内存物理地址
例如,测试从物理地址0x210000开始的64KB的区域,可以执行下列命令:
./memtester -p 0x210000 64k
================compile memtester for android=====================
USB0 设置sys_config.fex
[usbc0]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio = "axp_ctrl"
usb_drv_vbus_gpio = port:PH23<1><0><default><0>
usb_restrict_gpio =
usb_host_init_state = 1
usb_restric_flag = 0
usb_restric_voltage = 3550000
usb_restric_capacity = 5