NanoPC-T2 使用记录

这里记录一些脚本,方便开发。大多基于http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T2/zh来的。

交叉工具链我使用的是gcc-arm-linux-gnueabihf,安装方法是

sudo apt-get install gcc-arm-linux-gnueabihf    

来源:http://blog.csdn.net/kangear/article/details/40710815

内核中配置交叉工具链
make menuconfig
 General setup  --->
   (arm-linux-gnueabihf-) Cross-compiler tool prefix 

编译内核

make nanopi2_android_defconfig
touch .scmversion
make uImage

在线更新内核

adb shell mount -t ext4 /dev/block/mmcblk0p1 /mnt/media_rw/sdcard1/
adb push arch/arm/boot/uImage /mnt/media_rw/sdcard1/
adb reboot

待补充.

NanoPi K2操作
更新内核

adb shell mount -t ext4 /dev/block/mmcblk0p1 /storage/sdcard1
adb push arch/arm64/boot/Image /storage/sdcard1
adb push arch/arm64/boot/dts/amlogic/nanopi-k2.dtb /storage/sdcard1
adb reboot

adb shell mount -t ext4 /dev/block/mmcblk0p1 /storage/sdcard1 && adb push arch/arm64/boot/Image /storage/sdcard1 && adb push arch/arm64/boot/dts/amlogic/nanopi-k2.dtb /storage/sdcard1 && adb reboot

更新固件
板子启动后通过串口快速按任意键进入uboot命令行模式,输入命令fastboot usb即可更新Android。
连接USB线,然后PC端输入以下命令:

cd out/target/product/nanopi-k2
sudo fastboot flash boot boot.img
sudo fastboot flash cache cache.img
sudo fastboot flash userdata userdata.img
sudo fastboot flash system system.img
sudo fastboot reboot

常见选项:

USB Audio

Device Drivers  --->
Sound card support  --->
 Advanced Linux Sound Architecture  --->
  USB sound devices  --->
   USB Audio/MIDI driver

UVC Camera

Device Drivers  --->
 Multimedia support  --->
  V4L USB devices  --->
    USB Video Class (UVC)
    3.

你可能感兴趣的:(Android)