kernel:
Makefile中,
将ARCH改为ARCH ?= arm
添加CROSS_COMPILE ?= /home/lizm/arm-2009q3/bin/arm-none-linux-gnueabi-
编译:
$make distclean
$make origen4412a_android_defconfig
$make
编译成功后得到文件arch/arm/boot/zImage
Android:
build_android.sh中:
KERNEL_DIR="$ROOT_DIR/../ex4412_kernel",前提是kernel文件夹和android文件夹在同一文件夹下。
WIFI_CROSS_COMPILER=/usr/local/arm/arm-2009q3/bin/arm-none-linux-gnueabi-这个要不要改为我的交叉编译工具目录呢?改了好像会出错,不改对吗?
可以, WIFI_CROSS_COMPILER=/home/lizm/arm-2009q3/bin/arm-none-linux-gnueabi-,编译通过。
编译:
$make clobber
$./build_android.sh
如果编译有错误,请参照http://blog.csdn.net/lizhenmingdirk/article/details/8472278
**************************************************************************
这是压缩包里其他人写的文档,仅作参考
uboot:
$ make origen4412_config
$ make
制作启动卡的方法:
$ ls /dev/sd?
/dev/sda
插入SD卡在ubuntu机器。
$ ls /dev/sd?
/dev/sda
/dev/sdb
表示SD卡为sdb
然后运行uboot目录下的mksdboot.sh脚本文件:
$ sudo ./mksdboot.sh /dev/sdb
将卡插入开发板
开机uboot启动后,格式化卡:
# fdisk -c 0
fdisk is completed
partion # size(MB) block start # block count partition_Id
1 6530 2003760 13373580 0x0C
2 303 136620 622380 0x83
3 303 759000 622380 0x83
4 303 1381380 622380 0x83
# fatformat mmc 0:1
# ext3format mmc 0:2
# ext3format mmc 0:3
# ext3format mmc 0:4
格式化后就可以用fastboot了
注意: uboot.bin不能用fastboot烧写。
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
烧录:
板子启动到uboot,通过串口终端一次输入以下命令:
#fdisk -c 0
#fatformat mmc 0:1
#ext3format mmc 0:2
#ext3format mmc 0:3
#ext3format mmc 0:4
上面几个命令是用来格式化EMMC card
#fastboot
出现提示Insert a OTG cable into the connector!后,usb线连接电脑和板子
启动windows命令窗口:运行——cmd,环境变量如果没有关联到fastboot.exe(输入fastboot提示错误),则要通过cd命令进入到fastboot.exe所在目录,例如:
这就表示fastboot可以起作用了。
然后依次输入以下命令:
>fastboot flash kernel E:\samsung\lizmcompile\zImage
>fastboot flash ramdisk E:\samsung\lizmcompile\ramdisk-uboot.img
>fastboot flash Recovery E:\samsung\lizmcompile\ramdisk-recovery-uboot.img
>fastboot flash system E:\samsung\lizmcompile\system.img
>fastboot -w
>fastboot reboot
烧录完成