setenv bootcmd_android_recovery 'run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x7AA00 0x2000;bootm'
fastboot烧写
首先进入uboot命令行
setenv fastboot_dev mmc0
fas
然后在dos
按照需要烧写:
fastboot flash bootloader \\192.168.40.243\work\imx_r10.2_myandroid\bootable\bootloader\uboot-imx\u-boot-no-padding.bin
fastboot flash bootloader \\192.168.40.243\work\lhyz\myandroid-r94-ok\bootable\bootloader\uboot-imx\u-boot-no-padding.bin
fastboot flash bootloader \\192.168.40.243\work\lhyz\myandroid-r9.2.1\bootable\bootloader\uboot-imx\u-boot-no-padding.bin
fastboot flash recovery \\192.168.40.243\work\lhyz\myandroid-r9.2.1\out\target\product\imx51_bbg\recovery.img
fastboot flash kernel \\192.168.40.243\work\lhyz\myandroid-r9.2.1\kernel_imx\arch\arm\boot\uImage
fastboot flash system \\192.168.40.243\work\lhyz\myandroid-r9.2.1\out\target\product\imx51_bbg\system.img
fastboot flash uramdisk \\192.168.40.243\work\lhyz\myandroid-r9.2.1\out\target\product\imx51_bbg\uramdisk.img
fastboot flash userdata \\192.168.40.243\work\lhyz\myandroid-r9.2.1\out\target\product\imx51_bbg\userdata.img
fastboot flash kernel \\192.168.0.243\work\lhyz\myandroid-r94-ok\kernel_imx\arch\arm\boot\uImage
fastboot flash system \\192.168.0.243\work\lhyz\myandroid-r94-ok\out\target\product\imx51_bbg\system.img
fastboot flash uramdisk \\192.168.0.243\work\lhyz\myandroid-r94-ok\out\target\product\imx51_bbg\uramdisk.img
fastboot flash kernel \\192.168.40.243\work\lhyz\kernel_imx_r92\arch\arm\boot\uImage
fastboot flash kernel \\192.168.40.243\work\lhyz\kernel_imx_t3\arch\arm\boot\uImage
fastboot flash kernel \\192.168.40.243\work\lhyz\kernel_imx_1064\arch\arm\boot\uImage
fastboot flash uramdisk \\192.168.40.243\work\lhyz\myandroid-r94-ok\out\target\product\imx51_bbg\uramdisk.img
fastboot flash uramdisk \\192.168.0.100\share\903\image\t3\uramdisk.img
fastboot flash system \\192.168.0.100\share\903\image\t3\system.img
fastboot flash system \\192.168.0.100\share\903\image\wei\0827\system.img
fastboot flash uramdisk \\192.168.0.100\share\903\image\wei\0827\uramdisk.img
fastboot flash uramdisk \\192.168.0.100\share\903\image\SD_sfdisk\uramdisk.img
fastboot flash userdata \\192.168.40.243\work\lhyz\t3_image\userdata.img
烧完后重启
fastboot reboot
fastboot flash bootloader Y:\fsl\myandroid_r9.2.1\bootable\bootloader\uboot-imx\u-boot-no-padding.bin
分区内核,要先烧这个u-boot-no-padding.bin
fastboot flash bootloader D:\hui\lhyz\project\903\tools\SD_sfdisk\u-boot-no-padding.bin
fastboot flash kernel D:\hui\lhyz\project\903\tools\SD_sfdisk\uImage
fastboot flash uramdisk D:\hui\lhyz\project\903\tools\SD_sfdisk\uramdisk.img
烧广告机固件
fastboot flash kernel Y:\fsl\myandroid_r9.2.1\kernel_imx\arch\arm\boot\uImage
fastboot flash uramdisk Y:\fsl\myandroid_r9.2.1\out\target\product\imx51_bbg\uramdisk.img
fastboot flash system Y:\fsl\myandroid_r9.2.1\out\target\product\imx51_bbg\system.img
fastboot reboot
setenv bootargs_android 'console=ttymxc0 video=mxcdi0fb:RGB24,720P60 video=mxcdi1fb:RGB565,1024x768M@55 di1_primary gpu_memory=32M ip=off root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 androidboot.console=ttymxc0 '
git 常用命令
./repo init -u git://192.168.1.25/platform/manifest.git -b r10.2_t4 //初始化
repo init -u ssh://
[email protected]/git_repo/manifest.git
git reset --hard ORIG_HEAD //回退到原始版本
git pull //从服务器更新代码到本地
一、打tag的命令是先hard reset到自己模块(包含自己和组员)最后一次提交的位置,然后git tag tagname。Tagname的取法要统一,小项目名+完成阶段+日期。比如bsp完成了第二阶段的目标(7月6号的阶段目标),就可以命令tag为bsp-phase2-20110630
如果碰到没有全部完成,但是需要进release测试的,就把tag冠名ongoing, 如bsp-ongoing-20110630
如果碰到完成了某个bugfix,就 把BUG Number包含进去,如bsp-PRxxx-20110630 (PR指ProblemResolve,xxx指bug在JIRA系统里的编号)
二、上传tag的命令是git push review --tags
一、tag的命名加一个“工程名”的字段即 “工程名-小项目名-完成阶段-日期”;这样曾良均做整合版本的时候就知道android下有哪些工程有了需要包含的修改;
二、打tag可以指定位置,命令格式为git tag tagname commit,如git tag kernel_imx-pwrsave-phase2-20110631 cd8c0beb9ecec5e68c0535a416aea972d5f67251
三、上传某个特定tag的命令是git push review tagname.这样可以避免把本地自己命名的tag误传到服务器。
#uboot读取seltest uramdisk改成3M
setenv bootcmd_selftest 'mmc read 1 ${loadaddr} 0x3800 0x2000;mmc read 1 ${rd_loadaddr} 0x5800 0x2000;'
setenv bootargs 'console=ttymxc0 init=/linuxrc androidboot.console=ttymxc0 video=mxcdi0fb:RGB666,XGA ldb=di0 di0_primary ip=off gpu_nommu,gpu_memory=64M'
#写乱mmc uboot参数区,可清除所有变量,用默认设置
mmc write 0 91000000 600 10
sf probe 0:1
sf erase d0000 1000
#SD卡启动Android时,默认讲system挂载为只读,把system挂载为可读可写模式,在kernel串口命令行下打入如下命令:
mount -o remount -rw /dev/block/mmcblk1p2 /system
mount -o remount -rw /dev/block/mmcblk0p2 /system
mount -o remount -rw /dev/block/nandd /system
mount -o remount -rw emmc@android /system
git review服务器:192.168.1.25
git发邮件脚本: /home/git/repositories/android/platform/bionic.git/hooks/post-receive
mx51 903 uboot参数:
setenv bootcmd 'run bootcmd_SD1 bootcmd_SD2'
setenv bootcmd_SD1 'run bootargs_base bootargs_android'
setenv bootcmd_SD2 'mmc read 0 ${loadaddr} 0x800 0x1800;mmc read 0 ${rd_loadaddr} 0x3000 0x2600;bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,XGA video=mxcdi1fb:RGB565,1024x768M@60 di1_primary gpu_memory=32M calibration'
setenv loadaddr '0x90800000'
setenv rd_loadaddr '0x90C00000'
setenv netdev 'eth0'
setenv ethprime 'FEC0'
setenv uboot_addr '0xa0000000'
setenv uboot 'u-boot.bin'
setenv kernel 'uImage'
setenv rd_loadaddr '0x90C00000'
setenv nfsroot '/opt/eldk/arm'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 gpu_memory=16M'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp'
setenv bootcmd_net 'run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm'
setenv prg_uboot 'tftpboot ${loadaddr} ${uboot}; protect off ${uboot_addr} 0xa003ffff; erase ${uboot_addr} 0xa003ffff; cp.b ${loadaddr} ${uboot_addr} ${filesize};'
setenv bootcmd 'run bootcmd_SD'
setenv bootcmd_SD 'run bootargs_base bootargs_android;mmc read 0 ${loadaddr} 0x800 2000;mmc read 0 ${rd_loadaddr} 0x3000 0x258;bootm ${loadaddr}'
setenv bootcmd_android_recovery 'run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x2000;bootm'
setenv bootargs_android_recovery 'setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4 video=mxcdi0fb:RGB24,XGA video=mxcdi1fb:RGB565,1024x768M@60 di1_primary gpu_memory=32M'
setenv stdin 'serial'
setenv stdout 'serial'
setenv stderr 'serial'
setenv ethact 'FEC0'
1001广告机:
setenv bootcmd_SD2 'mmc read 0 ${loadaddr} 0x800 0x1800;mmc read 0 ${rd_loadaddr} 0x3000 0x3000;bootm ${loadaddr} ${rd_loadaddr}'
mx51 uboot参数:
setenv bootdelay '1'
setenv loadaddr '0x90800000'
setenv rd_loadaddr '0x90B00000'
setenv crc_mode '0'
setenv kernel_mode ''
setenv ubootversion 'uboot_version=05/04/11'
setenv bootcmd 'run bootcmd_nand'
setenv nand_read_kernel 'nand read ${loadaddr} 0x0 0x500000'
setenv nand_read_rd 'nand read ${rd_loadaddr} 0x500000 0x200000'
setenv bootcmd_nand 'run bootargs_base bootargs_android bootargs_nand; run nand_read_kernel; run nand_read_rd; bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nand 'setenv bootargs ${bootargs} ubi.mtd=4'
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 ${ubootversion} ${kernel_mode} video=mxcdi0fb:RGB24,800x600M@60 video=mxcdi1fb:YUV444,720P60 tve di1_primary'
setenv netdev 'eth0'
setenv ethprime 'FEC0'
setenv uboot_addr '0xa0000000'
setenv uboot 'u-boot.bin'
setenv kernel 'uImage'
setenv nfsroot '/opt/eldk/arm'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp'
setenv bootcmd_net1 'run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm '
setenv bootcmd_net '${bootcmd_net1} mmcinit;cp.b 0x100000 ${loadaddr} 0x250000; cp.b 0x400000 ${rd_loadaddr} 0x4B000; bootm ${loadaddr} ${rd_loadaddr}'
setenv prg_uboot1 'tftpboot ${loadaddr} ${uboot}; protect off ${uboot_addr} 0xa003ffff; '
setenv prg_uboot '${prg_uboot1} erase ${uboot_addr} 0xa003ffff; cp.b ${loadaddr} ${uboot_addr} ${filesize}; bootargs=console=ttymxc0,115200 ip=dhcp mem=480M init=/init wvga calibration'
setenv bootcmd_SD1 'run bootargs_base bootargs_android bootargs_SD'
setenv bootcmd_SD2 'mmc read 0 ${loadaddr} 0x800 0x1800;mmc read 0 ${rd_loadaddr} 0x2000 0x1000;bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_SD 'setenv bootargs ${bootargs}'
setenv mtdparts 'mtdparts=nand0:0x500000@0x0(KERNEL),0x200000@0x500000(RAMDISK),0x100000@0x700000(MISC),0x1400000@0x800000(RECOVERY),-@0x1c00000(ROOT)'
setenv mtdids 'nand0=nand0'
setenv partition 'nand0,4'
setenv mtddevnum '4'
setenv mtddevname 'ROOT'
setenv ethact 'FEC0'
saveenv
mx51 R10.1 SD卡启动 uboot参数:
setenv loadaddr '0x90800000'
setenv rd_loadaddr '0x90D00000'
setenv bootargs 'console=ttymxc0,115200'
setenv bootargs_android 'init=/init root=/dev/mmcblk0p2 rootfstype=ext4 console=ttymxc0,115200 gpu_memory=16M androidboot.console=ttymxc0 video=mxcdi0fb:800x600M@60 ${ubootversion} ${kernel_mode} di1_primary'
setenv bootargs_base 'init=/init root=/dev/mmcblk0p2 rootfstype=ext4 console=ttymxc0,115200 gpu_memory=16M androidboot.console=ttymxc0 video=mxcdi0fb:800x600M@60 ${ubootversion} ${kernel_mode} di1_primary`
setenv bootcmd_SD1 'mmc read 0 ${loadaddr} 0x800 0x2000'
setenv bootcmd_SD2 'mmc read 0 ${rd_loadaddr} 0x3000 0x300;bootm ${loadaddr} ${rd_loadaddr}'
setenv bootcmd 'run bootcmd_SD1 bootcmd_SD2'
saveenv
mx53 uboot参数:
setenv baudrate '115200'
setenv loadaddr '0x70800000'
setenv netdev 'eth0'
setenv ethprime 'FEC0'
setenv uboot 'u-boot.bin'
setenv kernel 'uImage'
setenv loadaddr '0x70800000'
setenv rd_loadaddr '0x70D00000'
setenv nfsroot '/opt/eldk/arm'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 console=ttymxc0,115200 console=tty0,v3,tcp'
setenv bootargs_android 'setenv bootargs ${bootargs} androidboot.console=ttymxc0 init=/init di1_primary video=mxcdi1fb:RGB666,XGA hdmi ldb=di1 gpu_memory=32M'
setenv bootcmd 'run bootcmd_SD; bootm ${loadaddr} ${rd_loadaddr}'
setenv bootcmd_eMMC 'run bootargs_base bootargs_android;mmc read 1 ${loadaddr} 0x800 2000;mmc read 1 ${rd_loadaddr} 0x3000 0x258;bootm ${loadaddr} ${rd_loadaddr}'
setenv bootcmd_net 'run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm'
setenv bootcmd_android_recovery 'run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x2000;bootm
bootargs_android_recovery=setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4'
setenv bootargs 'console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB666,XGA ldb=di0 di0_primary ip=off gpu_nommu,gpu_memory=64M'
setenv ethact 'FEC0'
setenv bootcmd_SD 'mmc read 0 ${loadaddr} 0x800 0x2000; mmc read 0 ${rd_loadaddr} 0x3000 0x1000;'
setenv stdin 'serial'
setenv stdout 'serial'
setenv stderr 'serial'
saveenv
NFS启动:
setenv bootcmd 'run bootcmd_eMMC; bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_base 'setenv bootargs ${bootargs} root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0'
setenv bootargs 'console=ttymxc0 video=mxcdi0fb:RGB666,vga ldb=di0 di0_primary ip=off gpu_nommu,gpu_memory=64M root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 androidboot.console=ttymxc0 '
setenv bootargs 'console=ttymxc0 di1_primary video=mxcdi1fb:RGB666,VGA-SVGA ldb=di1 gpu_memory=32M ip=off root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 androidboot.console=ttymxc0 '
903 nfs:
setenv bootargs_nfs 'setenv bootargs ${bootargs} ip=off root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0,v3,tcp'
setenv bootargs_android 'setenv bootargs ${bootargs} ${bootargs_nfs} video=mxcdi0fb:RGB24,720P60 video=mxcdi1fb:RGB565,1024x768M@55 di1_primary gpu_memory=32M androidboot.console=ttymxc0 '
imx53_smd开发板uboot参数:
setenv ethaddr 00:04:9f:00:ea:d3
setenv fec_addr 00:04:9f:00:ea:d3
setenv loadaddr 0x70800000
setenv rd_loadaddr 0x70D00000
setenv bootcmd 'run bootcmd_SD; bootm ${loadaddr} ${rd_loadaddr}'
setenv bootcmd_SD 'mmc read 0 ${loadaddr} 0x800 0x3000; mmc read 0 ${rd_loadaddr} 0x3000 0x300;'
setenv bootargs 'console=ttymxc0,115200 init=/init androidboot.console=ttymxc0 video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary ip=off gpu_memory=64M'
saveenv
setenv bootcmd_SD 'mmc read 0 ${loadaddr} 0x800 0x2000; mmc read 0 ${rd_loadaddr} 0x3000 0x1000;'
格式化SD卡
sudo mkfs.vfat /dev/sdb1
sudo mkfs.ext4 /dev/sdb2 -O ^extent -L system
sudo mkfs.ext4 /dev/sdb4 -O ^extent -L recovery
sudo mkfs.ext4 /dev/sdb5 -O ^extent -L data
sudo mkfs.ext4 /dev/sdb6 -O ^extent -L cache
复制系统文件到SD卡
sudo dd if=u-boot.bin of=/dev/sdb bs=1K skip=1 seek=1; sync
sudo dd if=uImage of=/dev/sdb bs=1M seek=1; sync
sudo dd if=SD/uramdisk.img of=/dev/sdb bs=1M seek=6; sync
sudo dd if=SD/system.img of=/dev/sdb2 bs=128k; sync
sudo dd if=/home/bill/work/mx53/r10.2_t4/kernel_imx/arch/arm/boot/uImage of=/dev/sdb bs=1M seek=1; sync
sudo dd if=/home/bill/work/mx53/r10.2_t4/out/target/product/imx53_smd/uramdisk.img of=/dev/sdb bs=1M seek=6; sync
sudo dd if=/home/bill/work/mx53/r10.2_t4/out/target/product/imx53_smd/recovery.img of=/dev/sdb4; sync
sudo dd if=/home/bill/work/mx53/r10.2_t4/out/target/product/imx53_smd/system.img of=/dev/sdb2 bs=128k; sync
使用 logcat程序来查看系统的日志。
Logcat的日志输出分类:
Logcat ?查看所有LOG
logcat –b radio ?查看系统radio模块日志
logcat –s ZTEMT ?查看ZTEMT分类日志
logcat –s ZTEMT-AT ?查看ZTEMT-AT 分类日志
#创建视频需要的节点
mknod /dev/null c 1 3
mknod /dev/console c 5 1
/bin/busybox mknod /dev/fb0 c 29 0
/bin/busybox mknod /dev/fb1 c 29 1
/bin/busybox mknod /dev/fb2 c 29 2
mknod /dev/video0 c 81 0
mknod /dev/video16 c 81 1
./mxc_v4l2_overlay.out -iw 800 -ih 480 -ow 800 -oh 480 -it 20 -il 140 -r 0 -fr 30 -fg -t 10
/unit_tests/mxc_v4l2_overlay.out -iw 800 -ih 480 -ow 720 -oh 480 -it 0 -il 0 -r 0 -fr 30 -fg -t 1200
rm /dev/tty
ln -s /dev/ttymxc0 /dev/tty
/data/t232
#初始化MCU
hffaa8001010a
hffaa8001010a
hffaa8101010a
#切换到DVD模式
hffaa8d01010a
hffaa8e00010a
hffaa8d05010a
#切换到ARM模式
hffaa8d0a010a
hffaa8e00010a
#调节功放音量
hffaa8b08180a
#蓝牙电源
echo 1 > /sys/class/rfkill/rfkill0/state
#调试摄像头
adb push \\192.168.40.248\work\zh\camera\rgb_4p\rgb_4p system/bin
chmod 777 /system/bin/rgb_4p
rgb_4p 320 240 16 0 0
\\192.168.40.248\work\zh\myandroid_R9\bootable\bootloader\uboot-imx-nand\u-boot.bin
\\192.168.40.248\work\zh\myandroid_R9\kernel_imx\arch\arm\boot\uImage
\\192.168.40.248\work\zh\myandroid_R9\out\target\product\imx51_bbg\android_root.img
\\192.168.40.248\work\zh\myandroid_R9\out\target\product\imx51_bbg\uramdisk.img
\\192.168.0.97\all\home\hui\myandroid_R9\trunk\kernel_imx\arch\arm\boot\uImage
\\192.168.0.97\all\home\hui\myandroid_R9\trunk\out\target\product\imx51_bbg\android_root.img
#用ATK工具烧写文件到nand
00000000 uboot
00300000 uImage
00600000 uramdisk
00800000 android_recovery //注意,有分2k page和4k page,打包方法如下介绍
01C00000 android_root //注意,有分2k page和4k page,打包方法如下介绍
#删除触摸屏校准文件,开机重新校准
rm /data/system/calibration
打包成uboot可识别的内核:
mkimage -A arm -O linux -T kernel -C none -a 0x90008000 -e 0x90008000 -n "Android Linux Kernel" -d arch/arm/boot/Image arch/arm/boot/uImage_nozip
在Android下打包uboot可识别的uramdisk:
out/host/linux-x86/bin/mkbootfs out/target/product/imx51_bbg/root | out/host/linux-x86/bin/minigzip > out/target/product/imx51_bbg/ramdisk.img
bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x90308000 -n "Android Root Filesystem" -d out/target/product/imx51_bbg/ramdisk.img out/target/product/imx51_bbg/uramdisk.img
#mx53
out/host/linux-x86/bin/mkbootfs out/target/product/imx53_smd/rootfs | out/host/linux-x86/bin/minigzip > out/target/product/imx53_smd/ramdisk.img
bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d out/target/product/imx53_smd/ramdisk.img out/target/product/imx53_smd/uramdisk.img
在Android下打包SD卡启动的system.img:
【1】解压SD卡格式的system.img到目录abc,
mkdir abc
sudo mount system.img -o loop abc/
【2】把需要修改的内容复制到abc,如开机动画bootanimation.zip
cp bootanimation.zip abc/media
【3】直接sudo umount abc/ 即可
或者
【3】把abc目录打包回system.img
su进入超级用户root模式
num_blocks=`du -sk out/target/product/imx51_bbg/system | tail -n1 | awk '{print $1;}'`; if [ $num_blocks -lt 20480 ]; then extra_blocks=3072; else extra_blocks=20480; fi ; if [ "" != "" ]; then num_blocks=; num_inodes=4096; else num_blocks=`expr $num_blocks + $extra_blocks` ; num_inodes=`find out/target/product/imx51_bbg/system | wc -l` ; num_inodes=`expr $num_inodes + 500`; fi; out/host/linux-x86/bin/genext2fs -a -d out/target/product/imx51_bbg/system -b $num_blocks -N $num_inodes -m 0 out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img;
tune2fs -L system out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img
tune2fs -j out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img
tune2fs -O uninit_bg,dir_index out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img
tune2fs -C 1 out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img
e2fsck -fyD out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img ;
out/host/linux-x86/bin/acp -fpt out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img out/target/product/imx51_bbg/system.img
在Android下打包UBI文件系统android_root.img,android_recovery.img:
#2K page:
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/system -o out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img -m 2048 -e 129024 -c 2048 -x none
out/host/linux-x86/bin/acp -fpt out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img out/target/product/imx51_bbg/system.img
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/data -o out/target/product/imx51_bbg/userdata.img -m 2048 -e 129024 -c 2048 -x none
out/host/linux-x86/bin/ubinize -o out/target/product/imx51_bbg/android_root.img -m 2048 -p 128KiB -s 512 -O 512 out/target/product/imx51_bbg/ubinize.ini
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/recovery/root -o out/target/product/imx51_bbg/recovery.img -m 2048 -e 129024 -c 2048 -x none
out/host/linux-x86/bin/ubinize -o out/target/product/imx51_bbg/android_recovery.img -m 2048 -p 128KiB -s 512 -O 512 out/target/product/imx51_bbg/ubinize_reco.ini
#4K page:
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/system -o out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img -m 4096 -e 516096 -c 4096 -x none
out/host/linux-x86/bin/acp -fpt out/target/product/imx51_bbg/obj/PACKAGING/systemimage_unopt_intermediates/system.img out/target/product/imx51_bbg/system.img
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/data -o out/target/product/imx51_bbg/userdata.img -m 4096 -e 516096 -c 4096 -x none
out/host/linux-x86/bin/ubinize -o out/target/product/imx51_bbg/android_root.img -m 4096 -p 512KiB out/target/product/imx51_bbg/ubinize.ini
out/host/linux-x86/bin/mkfs.ubifs -d out/target/product/imx51_bbg/recovery/root -o out/target/product/imx51_bbg/recovery.img -m 4096 -e 516096 -c 40 -x none
out/host/linux-x86/bin/ubinize -o out/target/product/imx51_bbg/android_recovery.img -m 4096 -p 512KiB out/target/product/imx51_bbg/ubinize_reco.ini
编译内核要编译成uImage:
make uImage -j2 ARCH=arm CROSS_COMPILE=arm-linux-
生成uboot能识别的uramdisk:
~/work/android_r9/myandroid_R9/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img
\\192.168.40.248\work\android_r9\myandroid_R9\kernel_imx\arch\arm\boot\uImage
kernel启动命令行的一些设置:
noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=off
root=/dev/nfs init=/init nfsroot=192.168.1.10:/nfs/rootfs ip=192.168.1.100 console=ttymxc0,115200 fbcon=rotate:1
root=/dev/mtdblock2 rw rootfstype=ubifs noinitrd mtdparts=nand_mtd:0x300000@0x300000(uImage),0x1c00000@0x10000000(rootfs) rw console=ttymxc0,115200 fbcon=rotate:1
U-Boot环境变量设置:
setenv nand_read_kernel 'nand read ${loadaddr} 0x300000 0x290000'
setenv nand_read_rd 'nand read ${rd_loadaddr} 0x600000 0x4B000'
setenv bootcmd_nand 'run bootargs_base bootargs_android bootargs_nand; run nand_read_kernel; run nand_read_rd; bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nand 'setenv bootargs ${bootargs} ubi.mtd=3'
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0'
setenv loadaddr 0x90800000
setenv rd_loadaddr 0x90B00000
#busybox启动
setenv bootargs_android 'setenv bootargs ${bootargs} init=/linuxrc androidboot.console=ttymxc0'
#如果停留在Touchscreen Calibration界面,意思即校准触摸屏.如果不想校正,可去掉wvga calibration,跳过此界面
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 console=tty0'
saveenv
#串口3(ttymxc2)用来做调试控制台
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc2 console=tty0 wvga calibration'
setenv bootargs_base 'setenv bootargs console=ttymxc2,115200'
saveenv
NSF启动环境变量设置:
setenv bootargs_android 'setenv bootargs ${bootargs} root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 console=ttymxc0,115200 console=tty0 wvga fbcon=rotate:1'
setenv bootargs_android 'setenv bootargs ${bootargs} root=/dev/nfs init=/init nfsroot=192.168.1.10:/nfs/rootfs ip=192.168.1.100::usb0 console=ttymxc0,115200 fbcon=rotate:1 video=mxcdi0fb:RGB565,800x480M-16@60 di0_primary wvga calibration'
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,800x480M@60 video=mxcdi1fb:RGB24,800x480M@60 di0_primary calibration'
setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,800x480M@60 video=mxcdi1fb:YUV444,720P60 tve calibration'
mx51:
setenv bootargs_android 'setenv bootargs ${bootargs} root=/dev/nfs init=/init nfsroot=192.168.0.10:/nfs/rootfs ip=192.168.0.100::::usb0 androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,800x600M@60 video=mxcdi1fb:RGB24,800x480M@60 di0_primary'
mxcdi1fb:TV-PAL
svn import --no-ignore uboot-imx-nand svn://192.168.0.97/iMx51_Android/Android2.2/trunk/bootable/bootloader/uboot-imx-nand -m "iMx51 android r9 nand uboot for ZhongHong" --username hui --password
svn import --no-ignore kernel_imx svn://192.168.0.97/iMx51_Android/Android2.2/trunk/ -m "iMx51 android r9 Linux-2.6.31 kernel for ZhongHong" --username hui --password
svn import --no-ignore kernel_imx svn://192.168.0.97/iMx51_Android/imx-android-r9.2/trunk -m "iMx51 android r9.2 Linux-2.6.31 kernel for ZhongHong" --username hui --password
svn import --no-ignore kernel_imx svn://192.168.0.97/iMx51_Android/imx-android-r10/trunk -m "iMx51 android2.3 (BSP r10) Linux-2.6.35 kernel for ZhongHong" --username hui --password
svn import --no-ignore luvcview_port https://192.168.0.121:8443/svn/BSP/Android/iMX51/Base/trunk/luvcview_port -m "quick camera preview project. add by hui" --username liuyh --password ***
svn import --no-ignore kernel_imx https://product/svn/903/myandroid_R9.2.1 -m "iMx51 android r92.2 kernel for product 903 of lhyz" --username bill --password
svn import --no-ignore myandroid-r94-ok https://product/svn/903_R9.4/myandroid_R9.4 -m "iMx51 android r92.2 kernel for product 903 R9.4 of lhyz" --username bill --password
svn import --no-ignore myandroid-r9.2.1 https://192.168.0.100/svn/903/myandroid_R9.2.1 -m "iMx51 android r92.2.1 orig android for product 903 of lhyz" --username bill --password
svn import --no-ignore starl https://192.168.0.100/svn/rk2918_byd/trunk/ -m "BYD rk2918 MID" --username bill --password
svn import --no-ignore sdk_2906 https://192.168.0.21/svn/rk_2906_v2.00/trunk/ -m "rk_2906_v2.00 for lhyz 760" --username bill --password
svn import --no-ignore 4.0 https://192.168.0.21/svn/A10_crane_sdk_v4.0.3_v1.5/trunk/ -m "A10_crane_sdk_v4.0.3_v1.5 for lhyz " --username bill --password
svn import --no-ignore exdroid4.1.1_r1-a10-v0.3 https://192.168.0.21/svn/exdroid4.1.1_r1-a10-v0.3/trunk/ -m "exdroid4.1.1_r1-a10-v0.3 for lhyz " --username bill --password
svn import --no-ignore A13 https://192.168.1.45/svn/A13_1.5/trunk -m "A13_1.5 for tdx" --username bill --password
svn import --no-ignore 4.1_v1.2 https://192.168.1.45/svn/A13_4.1_v1.2/trunk -m "A13_android4.1_v1.2 for tdx" --username bill --password
svn import --no-ignore 4.1_v1.0 https://192.168.1.45/svn/A13_4.1_v1.0/trunk -m "A13_android4.1_v1.0 for tdx" --username bill --password
svn import --no-ignore exdroid4.1.1_r1-a10-v0.4release https://192.168.1.45/svn/A10_4.1_v1.2/trunk -m "A13-4.1-v1.2 for tdx" --username bill --password
svn import --no-ignore exdroid4.0.4r1-a10-v1.5release https://192.168.1.45/svn/A10_4.0_v1.5/trunk -m "exdroid4.0.4r1-a10-v1.5release for tdx" --username bill --password
svn import --no-ignore 4.0_git_orig https://192.168.1.169/svn/exdroid4.0.4r1-a10-v1.5release/trunk -m "exdroid4.0.4r1-a10-v1.5release for TDC " --username bill --password
svn import --no-ignore A13-4.2_importsvn https://192.168.1.169/svn/A13_4.2/trunk/ -m "A13_4.2 for TDC " --username bill --password
svn import --no-ignore 1322_alps https://192.168.1.169/svn/mbk89_tb_jb2/trunk/ -m "MTK8389 for TDC 1322" --username bill --password
svn import --no-ignore A20-v3.0.1 https://192.168.1.169/svn/A20-v3.0.1/trunk/ -m "A20-v3.0.1 for TDC smart home" --username bill --password
svn import --no-ignore Service https://192.168.1.169/svn/Tdc_test_controller/trunk -m "import fiirt" --username bill --password
svn import --no-ignore RT288x_SDK_4210 https://192.168.1.169/svn/SmartPlug7620/trunk/ -m "import 7620_SDK_4210" --username bill --password
svn import --no-ignore TdcSmartHomeIpcamControl20141220 https://192.168.1.169/svn/SmartPlug7620/trunk/TdcSmartHome -m "import TdcSmartHome" --username bill --password
由于svn服务器地址改变,原来check out的源码无法连接svn服务器,请用如下方法更新源码svn地址:
svn switch --relocate https://192.168.1.44/svn/A13_4.1_v1.2/trunk/lichee/linux-3.0/drivers/mmc/sunxi-host/ https://192.168.1.169/svn/A13_4.1_v1.2/trunk/lichee/linux-3.0/drivers/mmc/sunxi-host/
objdump -x libmedia_jni.so | grep NEEDED
logcat Vold:* *:S&
logcat Sensor:* *:S&
logcat SerialPort:* *:S&
logcat bluedroid:* *:S&
logcat glgpsd:* *:S&
chmod u+r /system/lib/*
ls -l /system/lib/*
SMDKC110:
dnw 40000000
U-Boot
onenand erase 0 80000;onenand write 40000000 0 80000
zImage
dnw 40000000;onenand erase 600000 500000;onenand write 40000000 600000 500000;re
ramdisk
onenand erase b00000 300000;onenand write 40000000 b00000 300000
system.img
onenand erase e00000 7800000;onenand write.yaffs2 40000000 e00000 5A00000
userdata.img
onenand erase b800000 14800000;onenand write.yaffs 40000000 b800000 1080
onenand erase 0 10000000
onenand write 57e00000 0 40000
onenand erase 0 40000;onenand write c0008000 0 40000
当你uboot跑起来之后再用仿真器或者USB下载到c0008000 再用如下命令烧写.
SMDK6410:
Clean
onenand erase 04600000 02800000
U-Boot
onenand erase 0 40000;onenand write c0008000 0 40000
测试:onenand erase 80000 80000;onenand write c0008000 80000 80000
zImage
dnw;onenand erase 600000 300000;onenand write c0008000 600000 300000;re
ramdisk
onenand erase 900000 100000;onenand write c0008000 900000 100000
system.img
onenand erase a00000 4300000;onenand write.yaffs2 c0008000 a00000 377F040
userdata.img
####onenand erase A000000 5E00000;onenand write.yaffs2 c0008000 A000000 2559C0
onenand erase A000000 5E00000;onenand write.yaffs2 c0008000 A000000 2559C0
onenand erase 4d00000 5300000
SMDKC100:
U-Boot
nand erase 0 40000;nand write c0000000 0 40000
onenand erase 0 40000;onenand write c0008000 0 40000
zImage
dnw;nand erase 600000 300000;nand write c0000000 600000 300000
dnw;onenand erase 600000 300000;onenand write c0008000 600000 300000;re
ramdisk
nand erase 900000 100000;nand write c0000000 900000 100000
onenand erase 900000 100000;onenand write c0008000 900000 100000
system.img
nand erase a00000 4300000;nand write.yaffs2 c0000000 a00000 352f980
onenand erase a00000 4300000;onenand write.yaffs2 c0008000 a00000 ?
userdata.img
nand erase 9000000 7000000;nand write.yaffs c0000000 9000000 840
onenand erase 9000000 7000000;onenand write.yaffs c0008000 9000000 840
root=/dev/nfs init=/init nfsroot=192.168.1.10:/nfs ip=192.168.1.100 console=ttySAC2,115200 no_console_suspend=1
root=/dev/nfs init=/init nfsroot=192.168.1.10:/nfs ip=192.168.1.100 console=ttySAC2,115200
console=ttySAC2,115200,mem=256M
nfs cdc
root=/dev/nfs init=/init nfsroot=192.168.1.10://nfsroot/rootfs ip=192.168.1.100 console=ttySAC2,115200 fbcon=rotate:1
root=/dev/nfs init=/init nfsroot=192.168.1.10:/nfs ip=192.168.1.100 console=tty0 console=ttySAC2,115200 fbcon=rotate:3
root=/dev/nfs init=/linuxrc nfsroot=192.168.1.10:/nfs ip=192.168.1.100 console=tty0 console=ttySAC2,115200 fbcon=rotate:3
#邱俊涛svn linux-2.6.27-android
init=/init console=ttySAC2,115200 root=/dev/nfs nfsroot=192.168.1.110:/home/win_share/root ip=192.168.1.100:192.168.1.110:192.168.1.110:255.255.255.0:ubuntu9.04:usb0:off
init=/init console=ttySAC2,115200 root=/dev/nfs nfsroot=192.168.1.10:/nfs ip=192.168.1.100:192.168.1.1:192.168.1.1:255.255.255.0:ubuntu9.04:usb0:off
#linux2.6.24 onenand 配置
root=/dev/mtdblock2 rw rootfstype=jffs2 init=/linuxrc console=ttySAC2,115200
root=/dev/mtdblock3 rw rootfstype=jffs2 init=/linuxrc console=ttySAC2,115200
init=/linuxrc console=ttySAC2,115200
sudo smbmount //192.168.16.99/开发部/ /mnt/ -o iocharset=utf8,codepage=cp936,username=liuyihui,password=lyh2009
sudo smbmount //192.168.16.248/all/ ./mnt -o iocharset=utf8,codepage=cp936,username=lyh,password=23456
sudo smbmount //172.16.10.248/all/ ./mnt -o iocharset=utf8,codepage=cp936,username=hui,password=linux
sudo smbmount //192.168.0.97/Share/ /mnt -o iocharset=utf8,codepage=cp936,username=svn,password=
sudo smbmount //192.168.16.247/samsung /mnt/ -o username=hui%pwd
sudo smbmount //192.168.16.247/android-1.5 /mnt/ -o username=hui%pwd
将luther_ramdisk.img打包成u-boot下载格式
mkimage -A arm -O linux -T ramdisk -C none -a 0x50800000 -n "ramdisk" -d luther_ramdisk.img luther_ramdisk.img-uboot.img
#在当前目录及其子目录下查找*.txt文件,并将查找到的文件信息显示出来。注意:{}和\之间有空格;不要少了最后的分号
find ./ -name "*.mk" -exec grep "apns" {} -nH \;
find . -type d -iname ".svn" -exec rm -rf {} \;
find ./dir -size +100000000c -print 如何用find查找大于100M的所有文件?
sed -i "s/原字符串/新字符串/g" `grep 原字符串 -rl 所在目录` 例如:把mahuinan替换为huinanma,执行命令:sed -i "s/mahuinan/huinanma/g" 'grep mahuinan -rl /www'
find -name "*.php" |xargs perl -pi -e 's|21andy.com|www.21andy.com|g';以上表示:在当前目录及子目录下搜索所有后缀为 .php 的文件,并且将 字符串 21andy.com 替换成 www.21andy.com
询Linux应用程序运行依赖哪些库
arm-linux-objdump -x rootfs_imx_test/usr/sbin/lsusb | grep NEED
改变控制台debug消息显示级别,可以打印printk(DEBUG ...)信息
echo > /proc/sys/kernel/printk "8"
把system.img挂载区重新挂到可写
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
mount -o rw,remount -t yaffs2 /dev/block/mmcblk0 /system
echo "at">/dev/ttyspi0
./memdmp E0200E00 182
md e0200f00
./configure --with-linux=/home/hui/work/zh/myandroid_R9/kernel_imx --host=arm-linux
#有的编译器没有arm-linux-,编译某些代码需要arm-linux-,因此需要链接
ln -s arm-eabi-addr2line arm-linux-addr2line
ln -s arm-eabi-ar arm-linux-ar
ln -s arm-eabi-as arm-linux-as
ln -s arm-eabi-c++ arm-linux-c++
ln -s arm-eabi-c++filt arm-linux-c++filt
ln -s arm-eabi-cpp arm-linux-cpp
ln -s arm-eabi-g++ arm-linux-g++
ln -s arm-eabi-gcc arm-linux-gcc
ln -s arm-eabi-gccbug arm-linux-gccbug
ln -s arm-eabi-gcov arm-linux-gcov
ln -s arm-eabi-gdb arm-linux-gdb
ln -s arm-eabi-gdbtui arm-linux-gdbtui
ln -s arm-eabi-gprof arm-linux-gprof
ln -s arm-eabi-ld arm-linux-ld
ln -s arm-eabi-nm arm-linux-nm
ln -s arm-eabi-objcopy arm-linux-objcopy
ln -s arm-eabi-objdump arm-linux-objdump
ln -s arm-eabi-ranlib arm-linux-ranlib
ln -s arm-eabi-readelf arm-linux-readelf
ln -s arm-eabi-run arm-linux-run
ln -s arm-eabi-size arm-linux-size
ln -s arm-eabi-strings arm-linux-strings
ln -s arm-eabi-strip arm-linux-strip
export TARGET_TYPE=%MISSING%
export cross_stack_direction=-1
export cross_signum=64
export cross_linuxthreads=0
#启动停止svn服务
sudo svnserve -d -r /home/root/
killall svnserve
不同3G模块移植
【1】
打开:out\target\product\imx51_bbg\root\init.rc
根据不同模块修改:
#ZTE C100, add by hui
service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ttyUSB0 -u /dev/ttyUSB2
#WCDMA U6300V, add by hui
#service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ttyUSB1 -u /dev/ttyUSB2
【2】
打开:out\target\product\imx51_bbg\system\etc\init.gprs-pppd
根据不同模块修改:
#below is config for U6300 WCDMA modem
/system/bin/pppd /dev/ttyUSB2 9600 mru 1280 mtu 1280 nodetach debug dump defaultroute usepeerdns novj novjccomp noipdefault ipcp-accept-local ipcp-accept-remote connect-delay 5000 linkname ppp0
#below is config for ZTE CDMA modem
#/system/bin/pppd /dev/ttyUSB0 115200 mru 1280 mtu 1280 nodetach debug dump defaultroute usepeerdns novj novjccomp noipdefault ipcp-accept-local ipcp-accept-remote connect-delay 5000 linkname ppp0 name "card" password "card"
在我们的工作经常要验证不同相同源码不同配置内核版本,比如imx51_evk,imx53_smd,imx53_t4.imx_51_t3,
可以针对每个配置生成一个.config,
mkdir imx53_smd
cp .config_imx53_smd imx53_smd/.config
make uImage O=imx53_smd -j4
mkdir imx53_t4
cp .config_imx53_t4 imx53_t4/.config
make uImage O=imx53_t4 -j4
备份M9短信,电话本数据库,
cat /data/data/com.android.providers.telephony/databases/mmssms.db > /sdcard/mmssms.db
cat /sdcard/mmssms.db > /data/data/com.android.providers.telephony/databases/mmssms.db
cat /data/data/com.android.providers.contacts/databases/contacts2.db > contacts2.db
这样备份LINUX
tar -cvpzf /media/Data/linux_bak.tgz –exclude=/proc –exclude=/lost+found –exclude=/media –exclude=/mnt –exclude=/sys /
cpio解压绝对路径解决方法
cpio -iF initramfs --no-absolute-filenames
添加用户超级权限方法
sudo usermod -aG admin
更改目录用户拥有者
sudo chown liufc.liufc 目录名 -R
samba添加账户:
sudo smbpasswd -a LiSi
samba添加用户权限:
sudo vi /etc/samba/smb.conf
valid users=ZhangSan LiSi
RK内核编译需要安装:uudecode
sudo apt-get install sharutils
在init.rc不能直接/sbin/feedplayid
要用 exec /sbin/feedplayid 好了.
/system/bin/busybox find / -name dram
/system/bin/busybox find / -name ft5x_ts.ko
/system/bin/busybox lsusb
A10 fastboot烧固件
fastboot flash boot \\192.170.99.100\home\tdx\work\tdx\A13\android4.1\out\target\product\nuclear-evb\boot.img
//往flash boot分区烧录boot.img
$fastboot flash system system.img //往flash system分区烧录system.img
fastboot flash system Z:\project\A10XX\4.0_svn\android4.0\out\target\product\crane-3g\system.img
$fastboot flash data userdata.img
查看wake_lock锁
cat /sys/power/wake_lock
A10打包system.img
mkuserimg.sh -s out/target/product/crane-iNote_v4/system out/target/product/crane-iNote_v4/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 536870912
A10打包userdata.img
mkuserimg.sh -s out/target/product/crane-iNote_v4/data out/target/product/crane-iNote_v4/userdata.img ext4 data
/system/bin/busybox ifconfig
广东省深圳市宝安区建安二路流塘荔景新村38栋401
/data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml
A10下载源码
$ git clone ssh://
[email protected]/git_repo/repo.git
1 、下载 android4.0 仓库 : : username 替换成客户帐号的用户名
$ mkdir android4.0
$ cd android4.0
$ repo init -u ssh://
[email protected]/git_repo/manifest.git
$ repo sync
$ repo start ics-exdroid --all
2 、下载 lichee (linux kernel) 代码 : username 替换成客户帐号的用户名
注意 : 客户不要在 android4.0 目录下面去创建 lichee 目录 , 否则初始化时不会生成新的 .rep o
文件,而是用上一级的 .repo 文件。最好在 android4.0 的同一级目录创建 lichee 目录。
$ cd ..
$ mkdir lichee
$ cd lichee
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -m lichee.xml
$ repo sync
$ repo start lichee-dev --all
3 、 更新 android4.1 代码: username 替换成客户帐号的用户名
$ mkdir android4.1
$ cd android4.1
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -b jb-exdroid
$ repo sync
$ repo start jb-exdroid --all
4 、 对应 android4.1 的 lichee 代码,更新地址如下: username 替换成客户帐号的用户名
$ mkdir lichee-jb
$ cd lichee-jb
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -b jb-exdroid -m lichee-jb.xml
$ repo sync
$ repo start lichee-jb --all
A13下载源码
电信网络使用 IP 地址: 61.143.53.198
1 、下载 android4.0 仓库: username 替换成客户帐号的用户名
$ mkdir android4.0
$ cd android4.0
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -m android_a13.xml
$ repo sync
全部下载完成之后,创建分支
$ repo start ics-exdroid --all
2 、 更新 android4.1 代码: username 替换成客户帐号的用户名
$ mkdir android4.1
$ cd android4. 1
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -b jb-exdroid -m android_a13.xml
$ repo sync
全部下载完成之后,创建分支
$ repo start jb-exdroid --all
3 、下载 lichee_a13 部分 (linux kernel 3.0) 代码: username 替换成客户帐号的用户名,
注意 : 客户不要在 android4.0 目录下面去创建 lichee 目录 , 否则初始化时不会生成新的 .rep o
文件,而是用上一级的 .repo 文件。最好在 android4.0 的同一级目录创建 lichee 目录。
$ cd ..
$ mkdir lichee
$ cd lichee
$ repo init -u ssh://
[email protected]/git_repo/manifest.git -m lichee_a13.xml
$ repo sync
全部下载完成之后,创建分支
$ repo start a1x-dev --all
/system/bin/busybox find / -name ft5x_ts.ko
adb -s 20080411413fc082 push Z:\project\A10XX\indoor_terminal\lichee\linux-3.0\drivers\input\touchscreen\ft5x_ts.ko /system/vendor/modules/ft5x_ts.ko
adb -s 200804116818d41 push Z:\project\A13XX\A13-4.2\lichee\linux-3.0\drivers\input\touchscreen\ft5x_ts.ko /system/vendor/modules/ft5x_ts.ko
adb pull /system/build.prop d:\
adb push d:\build.prop /system/build.prop
mount -o remount -t ext4 -rw /dev/block/nandd /system
mount -o remount -t ext4 -rw /dev/block/system /system
umount /system
/system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/nandd /system
/system/bin/busybox insmod /system/vendor/modules/sw_usb_mu509.ko
adb -s 20080411413fc082 push Z:\project\A10XX\C13_LCD7inch\android4.0\out\target\product\crane-3g\system\lib\libreference-ril.so /system/lib/
/system/bin/t232 115200 /dev/ttyUSB0
通过ssh拷贝文件夹
scp -r /home/cdf本地目录
[email protected]:/home/abc
scp /home/你的文件
[email protected]:/home/cg (pwd:cg)
#改MAC地址
/system/bin/busybox ifconfig eth0 down
/system/bin/busybox ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
/system/bin/busybox ifconfig eth0 up
#SystemUI.apk,有返回按钮,状态栏
adb -s 20080411413fc082 push Z:\project\A10XX\C13_LCD7inch_old\android4.0\out\target\product\crane-3g\system\app\SystemUI.apk /system/app
#system目录改为可写,使得可以用adb push调试tvin库:
adb -s 20080411413fc082 push Z:\project\A10XX\C13_LCD7inch\android4.0\out\target\product\crane-3g\system\lib\libTvdJni.so /system/lib
adb -s 20080411413fc082 push Z:\project\A10XX\C13_LCD7inch\android4.0\out\target\product\crane-3g\system\lib\libtvdecoder.so /system/lib
adb -s 20080411413fc082 push Z:\project\A10XX\C13_LCD7inch\android4.0\out\target\product\crane-3g\system\lib\libenc_test.so /system/lib
chmod 777 /system/bin/t232
t232 115200 /dev/ttyUSB0
AT+CREG=2
H41542B435245473D320D0A
AT+CREG?
H41542B435245473FODOA
ATD13691956871
H41544431333639313935363837310D0A
H41544431383637363637393733310D0A
H41542B4353513D3F0D0A
AT回车
H41540D0A
H4154443131320D0A
H41544431303038360D0A
H41542B435245473F0D0A
9300按这个进入工程模式:
*#*#3646633#*#*
/system/bin/busybox ifconfig wlan0 212.123.5.211 netmask 255.255.0.0
把logcat记录保存在内存卡,然后pull到本地硬盘
logcat -b radio > /sdcard/logcat-b_radio.txt
adb -s C16-SEV850413fc082 pull /sdcard/logcat-b_radio.txt f:\tmp\
E:\download\android\NDK\android-ndk-r8e\ndk-build
MTK代码只编译内核new kernel
./mk mbk89_tb_jb2 n k
./mk mbk89_tb_jb2 r bootimage
MTK代码编译步骤:
【1】如果修改过底层代码,通常要make update-api一次:
./mk -o=TARGET_BUILD_VARIANT=user mtk77_cu_ics2 update-api
【2】./mk -o=TARGET_BUILD_VARIANT=user mtk77_cu_ics2 new
【3】把packages\apps\prebuild_app\Phone.apk
复制到
out\target\product\mtk77_cu_ics2\system\app
【4】./mk -o=TARGET_BUILD_VARIANT=user mtk77_cu_ics2 systemimage
打包SD卡升级包方法:
./mk -o=TARGET_BUILD_VARIANT=user mtk77_cu_ics2 otapackage
全志gsensor旋转90度改法,需要删掉obj目录下的编译中间文件,因为有可能其它产品有编译过导致不会重新编译
SW_BOARD_USES_GSENSOR_TYPE := mma7660
SW_BOARD_GSENSOR_DIRECT_X := true
SW_BOARD_GSENSOR_DIRECT_Y := false
SW_BOARD_GSENSOR_XY_REVERT := false
rm -fr out/target/product/crane-G70/obj/SHARED_LIBRARIES/sensors.exDroid_intermediates/AccelSensor.P
rm -fr out/target/product/crane-G70/obj/SHARED_LIBRARIES/sensors.exDroid_intermediates/AccelSensor.o
mmm device/softwinner/common/hardware/libsensors/
pack
g:\blat\blat G:\blat\INFO_2052.txt -to
[email protected] -attach G:\blat\INFO_349_diff.txt -base64 -charset Gb2312 -subject "Svn_A10_4.0_v1.5_Commit_User_bill_Version_349" -server smtp.163.com -u liuyihui8 -pwd huihui
东用售后 28696138
全局path
C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin;C:\Users\Administrator\Documents\UltraEdit\;D:\android-sdk-windows\tools;C:\Program Files (x86)\Java\jre1.6.0_05\bin;E:\download\android\NDK\android-ndk-r8e;C:\Program Files (x86)\Bugzilla\apache\bin;D:\MentorGraphics\9.5PADS\SDD_HOME\common\win32\lib
administrator用户path
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows7Master;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\MentorGraphics\9.5PADS\SDD_HOME\common\win32\bin;D:\MentorGraphics\9.5PADS\SDD_HOME\common\win32\lib;%MGC_HOME%\bin;%MGC_HOME%\lib;
/system/bin/busybox cat /init.sun7i.rc
insmod /system/vendor/modules/disp.ko
insmod /system/vendor/modules/lcd.ko
insmod /system/vendor/modules/hdmi.ko
ls -l /system/vendor/modules/disp.ko
ls -l /system/vendor/modules/*
adb push Y:\project\A20-v2.0-BOX\lichee\linux-3.4\drivers\video\sun7i\lcd\lcd.ko /system/vendor/modules
chmod 777 /system/vendor/modules/lcd.ko
adb shell mount -o remount -t ext4 -rw /dev/block/system /system
adb shell chmod 777 /system/vendor/modules/ft5x_ts.ko
adb push x:\project\A20\A20-v3.0.1_ok\lichee\linux-3.4\drivers\input\touchscreen\ft5x_ts.ko /system/vendor/modules/ft5x_ts.ko
设置IP,子网掩码
sudo ifconfig eth0:1 192.168.1.23 netmask 255.255.255.0 broadcast 192.168.1.23
adb -s 20080411 push Y:\project\other\t232\t232 /system/bin
adb -s 20080411 shell chmod 777 /system/bin/t232
adb -s 20080411 shell
adb -s c282056488009c1df4f push Y:\project\other\t232\t232 /system/bin
adb -s c282056488009c1df4f shell chmod 777 /system/bin/t232
adb -s c282056488009c1df4f shell
rm -rf /system/lib/libSerialPort.so
t232 115200 /dev/ttyS5
adb -s c282056488009c1df4f push Y:\project\A20\A20-v3.0.1\lichee\linux-3.4\drivers\net\ethernet\sunxi\gmac\sunxi_gmac.ko /system/lib/
rm -fr /system/app/Tdc_test_controller.apk
adb -s 20080411 push D:\hui\tdx\project\服务器\tdc_android\Tdc_test_controller\bin\Tdc_test_controller.apk /system/app
stop /system/app/Tdc_test_controller.apk
用adb命令启动你的Android程序
启动的方法为
# am start -n 包(package)名/活动(activity)全路径
查看包中每个activity的全路径的方法:
1、安装并启动“固件工具箱”
2、进入“App manager”,显示系统中所有安装程序,长按想通过命令行启动的程序。
3、弹出的窗口中选择"Advanced Freeze",该程序所有的activity就会全部显示出来
activity有两种显示格式,一种直接显示全路径,另一种在括号里显示相对路径,相对路径加上包名即是全路径。
am start -n com.tdc.test.controller/com.tdc.test.controller.MainActivity
am start -n com.tdc.test.ResetQtActivity/com.tdc.test.ResetQtActivity.RestartQtActivity
am start -n org.qtproject.example.DeviceTests/org.qtproject.qt5.android.bindings.QtActivity
杀进程
busybox killall com.tdc.test.controller
DM9620网卡烧MAC apk davicom_usb1.2命令行启动
am start -n com.example.davicom_usb/com.example.davicom_usb.USBMain
如何通过ADB获取安卓设备中正在运行的程序
adb shell dumpsys activity|grep qt
rm /data/local/tmp/QtApp-debug.apk
rm /data/app/QtApp-debug.apk
rm /data/local/tmp/QtActivity.apk
rm /data/app/QtActivity.apk
rm /data/local/tmp/Tdc_test_controller.apk
rm /data/app/Tdc_test_controller.apk
adb pull /data/data/com.tdc.test.controller/files/devices.db d:\
adb uninstall com.tdc.smarthome
??mem2mem_testdev.ko
cd /vendor/modules
insmod videobuf2-core.ko
insmod v4l2-mem2mem.ko
insmod videobuf2-memops.ko
insmod videobuf2-vmalloc.ko
insmod mem2mem_testdev.ko
console=ttyS1,38400 root=/dev/mtdblock1
console=ttyS0,38400 root=/dev/mtdblock1
cat /system/usr/keylayout/
adb push Y:\project\A10XX\C13_LCD7inch\android4.0\device\softwinner\crane-C13-wireless\sun4i-ir.kl /system/usr/keylayout/
export LD_LIBRARY_PATH=$PROG_LIB:/bin/DeviceTest/
export LD_LIBRARY_PATH=/bin/DeviceTest
查找依赖库
mipsel-linux-objdump -x ~/work/TDCclound/Device_qt4/App/Device/DeviceTests|grep "NEED"
批量减肥
sudo find /usr/local/Trolltech/QtEmbedded-4.7.4-mips/lib/ -name "lib*.so*" -exec ~/work/rtl819x-SDK-v3.4.6.4-full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin/mips-linux-strip {} \;
./configure -v -xplatform linux-mips-g++ -confirm-license -release -shared -opensource -nomake examples -nomake tests -no-sql-sqlite -no-openvg -no-eglfs -no-gui -no-openssl -no-sse2
setenv ipaddr 192.168.1.6
setenv serverip 192.168.1.169
saveenv
a_uImage
/system/bin/busybox ifconfig eth0
netcfg eth0 dhcp up
ping 192.168.1.1
ifconfig br0 192.168.1.6 netmask 255.255.255.0
route add default gw 192.168.1.1
打开resolv.conf加入:nameserver 202.106.0.20
IPv4 DNS 服务器: 210.21.196.6, 202.96.128.68
【1】去掉cdc_ether.ko驱动,这个驱动会与dm9621抢注册设备,导致没用到dm9621,进而造成以太网不稳定
【2】DM9621驱动改为2.49版本,之前版本会出现断电重启读不到vid情况,进而不加载驱动
ping -c 4 58.251.13.168
编译乱码问题的解决:
controllermodel.h:1: error: stray '\239' in program
controllermodel.h:1: error: stray '\187' in program
controllermodel.h:1: error: stray '\191' in program
这个问题是由于文件头三个字节是EFBBBF造成,用ultraEdit打开,ctrl+D删除即可
文件->转换->Unix/MAC转DOS
不行则
用ultraEdit打开,文件->转换->Unicode 转 Unicode big Endian,再 文件->转换->ASCII转UTF8(Unicode编辑)
gpio l 24 4000 1000 1000 1000 1000
gpio l 13 4000 0 1 1 4000
killall DeviceTests
nvram_set restore_defaults=1
nvram_set commit
# 海思3518烧录
# 单板上电后,敲任意键进入u-boot。设置serverip(即tftp服务器的ip)、ipaddr(单板ip)和ethaddr(单板的MAC地址)。
setenv serverip 192.168.1.169
setenv ipaddr 192.168.1.9
setenv netmask 255.255.255.0
setenv gatewayip 192.168.1.1
ping 192.168.1.1
确保网络畅通。
以16M SPI Flash为例。
1)地址空间说明
| 1M | 3M | 12M |
|------------|---------------|-----------------------|
| boot | kernel | rootfs |
以下的操作均基于图示的地址空间分配,您也可以根据实际情况进行调整。
2)烧写u-boot
sf probe 0
sf erase 0 0x100000
mw.b 82000000 ff 100000
tftp 0x82000000 u-boot-200MHZ.bin
#如果是hi3516c,使用u-boot-220MHZ.bin
sf write 82000000 0 100000
reset
3)烧写内核
sf probe 0
sf erase 100000 0x300000
mw.b 82000000 ff 300000
tftp 82000000 uImage
sf write 82000000 100000 300000
4)烧写文件系统
sf probe 0
sf erase 400000 0xc00000
mw.b 82000000 ff c00000
tftp 82000000 rootfs_64k.jffs2
sf write 82000000 400000 0xc00000
5)设置启动参数
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs)'
setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x300000;bootm 0x82000000'
save
#NFS使用方法
#【1】嵌入式Linux配置:
| | --- Network File Systems | |
| | [*] NFS client support | |
| | [*] NFS client support for NFS version 3 | |
#【2】7620 busybox配置
| |[*] mount | |
| |[*] Support mounting NFS file systems | |
#【3】NFS服务器端配置
sudo vi /etc/exports
添加:/home/a/work/TDCclound/SmartPlug/App/Device *(rw,sync,no_root_squash)
重启nfs服务:sudo /etc/init.d/nfs-kernel-server restart
ifconfig br-lan 192.168.1.9 up
ifconfig eth0 192.168.1.9 up
ifconfig eth0.1 192.168.1.9 up
ifconfig eth2 10.10.10.254 up
mount -t nfs -o nolock 192.168.1.24:/home/a/work/TDCclound/HisiGW_qt4/App/Device /mnt
ifconfig br0 192.168.1.9 up
mount -t nfs -o nolock 192.168.1.24:/home/a/work/TDCclound/RouterGW_qt4/App/Device /mnt
ifconfig br0 192.168.1.9 up
mount -t nfs -o nolock 192.168.1.24:/home/a/work/TDCclound/SmartPlug/App/Device /mnt
ifconfig br0 192.168.1.9 up
mount -t nfs -o nolock 192.168.1.24:/home/a/work/MTK_Ralink_APSoc_SDK_4210_ZYJ-FINISH/RT288x_SDK_4210/source_zyj/user/uvc_stream /mnt