#链接/dev/tty
rm /dev/tty
ln -s /dev/ttymxc0 /dev/tty
/data/t232
#初始化MCU
hffaa8001010a
hffaa8001010a
hffaa8101010a
#切换到DVD模式
hffaa8d01010a
hffaa8e00010a
#切换到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
#用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
在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-nand/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
在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
#如果停留在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.1.10:/nfs/rootfs ip=192.168.1.100 console=ttymxc0,115200 wvga calibration 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 console=ttymxc0,115200 fbcon=rotate:1 video=mxcdi0fb:RGB565,800x480M-16@60 di0_primary wvga calibration'
svn import --no-ignore kernel_imx https://192.168.0.121:8443/svn/BSP/Android/iMX51/Base/trunk/kernel_imx_r9 -m "iMx51 android r9 Linux-2.6.31 kernel for ZhongHong" --username liuyh --password
objdump -x libmedia_jni.so | grep NEEDED
logcat Vold:* *:S&
logcat SerialPort:* *:S&
logcat bluedroid:* *:S&
logcat glgpsd:* *:S&
chmod u+r /system/lib/*
ls -l /system/lib/*