1.打开JB-Chipsee-BBB-EXP-Dev-Guide文本,将其中第四点的第二条导入环境变量。
其中导入方式有两种:
一、对当前终端有效,直接export;
二、用sudo gedit . /etc/enviroment中加入export那句导入命令:export PATH=/home/zhujie下载/android-jb-rowboat-chipsee-bbb-exp-20130601/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH
(可用echo $PATH查询是否成功)
2.用. /etc/enviroment使其产生作用
3.在执行5.6中的语句,用来编译kernel。方式可用复制粘贴那几句话。即如下:
5.6 [Manually Build Android Linux Kernel]
$ cd android-jb-rowboat-chipsee-bbb-exp-20130601/kernel/
$ make CROSS_COMPILE=arm-eabi- distclean (复制这句话)
$ make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig (复制这句话)
$ make ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j<N>
缩写为:cd android-jb-rowboat-chipsee-bbb-exp-20130601/kernel/;make CROSS_COMPILE=arm-eabi- distclean;make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig;make ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j2
4.再将文件放到“kernel/driver/”中。将文件中的kconfig和makefile相应部分添加到driver中的kconfig和makefile中。
5.在kernel/arch/arm/mach-omap2/board-am335xevm.c中的部分改为
static struct i2c_board_info am335x_i2c1_boardinfo[] = {
{
I2C_BOARD_INFO("tlv320aic3x", 0x1b),
},
{
I2C_BOARD_INFO("adxl34x", 0x53),
.irq = OMAP_GPIO_IRQ(ADXL345_INT1),
.platform_data = &adxl34x_info,
},
{
I2C_BOARD_INFO("ft5x06_ts", 0x38),
.irq = OMAP_GPIO_IRQ(CAP_TSC_INT),
},
{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},
};
即添加了
{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},
,其中"0x10"来自pointer.h中的#define POINTER_ACC_I2C_ADDR 0x10
而pointer_plat_data来自
static struct pointer_acc_platform_data pointer_plat_data = {
.poll_interval = 20,
.min_interval = 10,
};
另将pointer.c中的
#ifdef __KERNEL__
static struct pointer_acc_platform_data pointer_plat_data = {
.poll_interval = 20,
.min_interval = 10,
};
#endif添加到board-am335xevm.c中,还需将结构体的定义也添加其中,以保证正确;
(对于mmc3416x则不需要加{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},中的.platform_data = &pointer_plat_data,
即只需加{I2C_BOARD_INFO("pointer", 0x10),},则可以
6.查找gedit .config &中添加CONFIG_I2C_POINTER=y,让其编入模块,而不是内核;
(或者在am335x_evm_android_defconfig中加入CONFIG_I2C_POINTER=y)
7.再执行5.6的编译kernel过程。(mm -B是编译程序的命令)
8.再将生成的uimage文本(在目录arch/arm/boot/uImage)复制到u盘,拷贝到板子中.
9.检查是否加载成功:
adb shell
ls dev/pointer (有pointer则说明pointer加载成功)
ls /sys/bus/i2c/drivers/ (其中driver下有各种目录,则说明成功)
ls /sys/bus/i2c/device (其中device都有,则说明成功)
10.检查权限ls -l /dev/pointer用来查看pointer的权限,(这次看到的是crw权限,用
chmod 666 /dev//pointer 修改权限)
\mediatek\config\mt6592\init.rc
service memsicp /system/bin/memsicp
user system
group system
class main
oneshot
抓rawdata过程,依次命令:
cd android/
. build/envsetup.sh
cd daemon
mm -B
sudo adb kill-server
sudo adb start-server
(若手机或电脑有一个重启则需要先adb root,再adb remount)
adb shell
(若有adb push memsicd,则需要修改权限chmod 777)
ps memsic
kill PID
ps memsic
memsic
最终有otp sucessful!则表明成功。
其中导入方式有两种:
一、对当前终端有效,直接export;
二、用sudo gedit . /etc/enviroment中加入export那句导入命令:export PATH=/home/zhujie下载/android-jb-rowboat-chipsee-bbb-exp-20130601/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH
(可用echo $PATH查询是否成功)
2.用. /etc/enviroment使其产生作用
3.在执行5.6中的语句,用来编译kernel。方式可用复制粘贴那几句话。即如下:
5.6 [Manually Build Android Linux Kernel]
$ cd android-jb-rowboat-chipsee-bbb-exp-20130601/kernel/
$ make CROSS_COMPILE=arm-eabi- distclean (复制这句话)
$ make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig (复制这句话)
$ make ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j<N>
缩写为:cd android-jb-rowboat-chipsee-bbb-exp-20130601/kernel/;make CROSS_COMPILE=arm-eabi- distclean;make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig;make ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j2
4.再将文件放到“kernel/driver/”中。将文件中的kconfig和makefile相应部分添加到driver中的kconfig和makefile中。
5.在kernel/arch/arm/mach-omap2/board-am335xevm.c中的部分改为
static struct i2c_board_info am335x_i2c1_boardinfo[] = {
{
I2C_BOARD_INFO("tlv320aic3x", 0x1b),
},
{
I2C_BOARD_INFO("adxl34x", 0x53),
.irq = OMAP_GPIO_IRQ(ADXL345_INT1),
.platform_data = &adxl34x_info,
},
{
I2C_BOARD_INFO("ft5x06_ts", 0x38),
.irq = OMAP_GPIO_IRQ(CAP_TSC_INT),
},
{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},
};
即添加了
{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},
,其中"0x10"来自pointer.h中的#define POINTER_ACC_I2C_ADDR 0x10
而pointer_plat_data来自
static struct pointer_acc_platform_data pointer_plat_data = {
.poll_interval = 20,
.min_interval = 10,
};
另将pointer.c中的
#ifdef __KERNEL__
static struct pointer_acc_platform_data pointer_plat_data = {
.poll_interval = 20,
.min_interval = 10,
};
#endif添加到board-am335xevm.c中,还需将结构体的定义也添加其中,以保证正确;
(对于mmc3416x则不需要加{
I2C_BOARD_INFO("pointer", 0x10),
.platform_data = &pointer_plat_data,
},中的.platform_data = &pointer_plat_data,
即只需加{I2C_BOARD_INFO("pointer", 0x10),},则可以
6.查找gedit .config &中添加CONFIG_I2C_POINTER=y,让其编入模块,而不是内核;
(或者在am335x_evm_android_defconfig中加入CONFIG_I2C_POINTER=y)
7.再执行5.6的编译kernel过程。(mm -B是编译程序的命令)
8.再将生成的uimage文本(在目录arch/arm/boot/uImage)复制到u盘,拷贝到板子中.
9.检查是否加载成功:
adb shell
ls dev/pointer (有pointer则说明pointer加载成功)
ls /sys/bus/i2c/drivers/ (其中driver下有各种目录,则说明成功)
ls /sys/bus/i2c/device (其中device都有,则说明成功)
10.检查权限ls -l /dev/pointer用来查看pointer的权限,(这次看到的是crw权限,用
chmod 666 /dev//pointer 修改权限)
\mediatek\config\mt6592\init.rc
service memsicp /system/bin/memsicp
user system
group system
class main
oneshot
抓rawdata过程,依次命令:
cd android/
. build/envsetup.sh
cd daemon
mm -B
sudo adb kill-server
sudo adb start-server
(若手机或电脑有一个重启则需要先adb root,再adb remount)
adb shell
(若有adb push memsicd,则需要修改权限chmod 777)
ps memsic
kill PID
ps memsic
memsic
最终有otp sucessful!则表明成功。