/****************************************************************************
* I.MX6 working note for high efficiency
*
* 主要是将在I.MX6 Android工作中的用到的特殊需求用法的记录,并对boot.img
* 分解、合成进行了说明,另外增加了一个shell脚本自动完成boot.img合成与拷贝。
*
* 深圳 南山平山村 晴 2015/05/13 周三 曾剑锋
***************************************************************************/ \\\\\\\\\\\-*- 目录 -*-///////////
| 一. 获取目录的读写权限:
| 二. vi编辑器:
| 三. 查看网络方法:
| 四. 配置网络方法:
| 五. dhcp的配置方法:
| 六. boot.img pack unpack:
| 七. system.img pack unpack:
\\\\\\\\\\\\\\\\\\\////////////// 一. 获取目录的读写权限:
. 嵌入式重新挂根目录
mount -o rw -o remount /dev/block/actb /
. 嵌入式重新挂载/system
mount -o remount /dev/block/mtdblock2 /system
3. Ubuntu脚本挂载
echo "aplex" | sudo -S mount -t ext4 system.img yaffs
4. Ubuntu脚本卸载
     echo "aplex" | sudo umount yaffs
二. vi编辑器:
busybox vi 三. 查看网络方法:
. netcfg
. busybox ifconfig 四. 配置网络方法:
. ifconfig eth0 192.168.1.1
. busybox ifconfig eth0 192.168.1.1/ 五. dhcp的配置方法:
. netcfg eth0 up
. netcfg eth0 dhcp 六. boot.img pack unpack:
. 下载工具:[TOOL] Boot.img tools [unpack, repack, ramdisk]
http://forum.xda-developers.com/showthread.php?t=2319018
. 看1中网站对工具的描述说明、使用说明
. 封装一个repack工具:
cat repack << EOF
#!/bin/sh echo "begin to repacking boot.img" KERNEL=boot/boot.img-kernel
RAMDISK=boot/new-ramdisk.cpio.gz
PAGESIZE=
BASE=0x10800000
RAMDISKADDR=0x11800000
CMDLINE="console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale" out=${out:-"/home/myzr/myandroid/out/target/product/sabresd_6dq"}
# 检查必要的文件或者文件夹
if [ ! -f $RAMDISK ] ; then
echo " \nCan't find the boot/new-ramdisk.cpio.gz file.\n "
exit
fi if [ ! -f $KERNEL ] ; then
echo " \nCan't find the boot/boot.img-kernel file.\n "
exit
fi if [ ! -d boot/ramdisk ] ; then
echo " \nCan't find the boot/ramdisk directory.\n "
exit
fi ./repack_ramdisk boot/ramdisk ./mkbootimg --kernel $KERNEL --ramdisk $RAMDISK --pagesize $PAGESIZE --base $BASE --ramdiskaddr $RAMDISKADDR --cmdline "$CMDLINE" -o newboot.img echo "repacking boot.img over EOF
. 如果我们是使用虚拟机和Windows,协同工作,何不让让shell脚本帮我们再多做点事,
编译内核时,合成boot.img,并拷贝boot.img到固定的目录Windows制定目录下去:
cat remake.sh << EOF
#!/bin/sh make uImage out=${out:-"/home/myzr/myandroid/out/target/product/sabresd_6dq"}
if [ ! -d $out/bootimgTools/boot/ ]; then
mkdir $out/bootimgTools/boot -p
echo "mkdir $out/bootimgTools/boot "
fi
echo "cp arch/arm/boot/zImage $out/bootimgTools/boot/boot.img-kernel"
cp arch/arm/boot/zImage $out/bootimgTools/boot/boot.img-kernel #repack boot.img file
cd $out/bootimgTools #跳到工具所在的目录
./repack #执行上3中封装的合成脚本
echo "boot.img repacked over." #共享目录下的目录路径,本人的共享目录是PC机的桌面
WIN_PATH="MY-I.MX6DL-MFG-TOOL-V2.5/MY-I.MX6DL-MFG-TOOL-V2.5/Profiles/MX6DL Linux Update/OS Firmware/files/android" cp newboot.img "${win}/${WIN_PATH}/boot.img"
echo "move over. :)" EOF 七. system.img pack unpack:
. shell命令:file system.img
输出结果:system.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
由上面的结果分析可知,我们只需要挂载system.img,然后就可以直接修改其中的内容了,很幸运而已:
sudo mount -t ext4 system.img <目标路径>
. 可以考虑做同样的事,写个脚本,让电脑代劳拷贝之类的工作

I.MX6 working note for high efficiency的更多相关文章

  1. ROS_Kinetic_x ROS栅格地图庫 Grid Map Library

    源自:https://github.com/ethz-asl/grid_map Grid Map Overview This is a C++ library with ROS interface t ...

  2. CRC 详解

    http://www.barrgroup.com/Embedded-Systems/How-To/Additive-Checksums CRC Series, Part 1: Additive Che ...

  3. SLVA299A : Load Disconnect ( Input to Output Isolation ) for the TPS61040

    http://www.ti.com/lit/an/slva299a/slva299a.pdf Many boost converters have an external rectifier diod ...

  4. [源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行

    [源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行 目录 [源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行 0x00 摘要 0x0 ...

  5. Design and Analysis of Algorithms_Fundamentals of the Analysis of Algorithm Efficiency

    I collect and make up this pseudocode from the book: <<Introduction to the Design and Analysis ...

  6. I.MX6 Ethernet UI patch failed

    /*********************************************************************** * I.MX6 Ethernet UI patch f ...

  7. I.MX6 Android U-blox miniPCI 4G porting

    /************************************************************************** * I.MX6 Android U-blox m ...

  8. I.MX6 Goodix GT9xx touchscreen driver porting

    /************************************************************************ * I.MX6 Goodix GT9xx touch ...

  9. I.MX6 Android 移除 Settings wifi功能

    /********************************************************************* * I.MX6 Android 移除 Settings w ...

随机推荐

  1. BeyondCompare

    BeyondCompare可对文本,照片,文件夹,注册表等等进行比较 在git看不清楚版本和改动项的时候,直接将生产上的包拉下来和即将发布的包,作对比.

  2. 怎么彻底删除2345的各种顽固Process

    清晨打开电脑,都是2345的不良新闻,心情不美美哒 2345如何卸载? “C:\Windows\System32\drivers”目录删除Mslmedia.sys 开始-运行-cmd输入“sc del ...

  3. 转载:oracle RAC集群启动和关闭

    http://www.cnblogs.com/yhfssp/p/8184761.html oracle 11G RAC集群启动和关闭: 1.停止数据库 $srvctl stop database –d ...

  4. [ios]安装CocoaPods及使用详解

    最新 macOS Sierra 10.12.3 安装CocoaPods及使用详解 http://www.jianshu.com/p/b64b4fd08d3c CocoaPods的安装以及遇到的坑 ht ...

  5. [C++]简单的udp通信

    UDPclient.cpp #include<WINSOCK2.H> #include<iostream> #pragma comment(lib,"WS2_32.l ...

  6. Flutter学习笔记(二)

    *.assets 当引用图片的时候,需要在pubspec.yaml的文件中的flutter下添加assets,类似于下面的样子: image.png 这里需要注意的是文件里的assets只要一个缩进即 ...

  7. Unity游戏中关于伤害范围的计算

    1.纯数学计算 范围计算 + 方向计算: 先将不在伤害范围的敌人排除掉,再计算处于伤害范围并且角度正确的敌人. 以上的计算是以人物的中心来计算的, 所以这中方式就有些局限性了,比如:一个四足怪物,只有 ...

  8. English trip V1 - 7.My dream car 我梦想的车 Teacher:Lamb Key: famous for

    中华In this lesson you will learn to describe an object(目标). 课上内容(Lesson) famous for   以…著称,闻名 国家(名词)  ...

  9. 20170706pptVBA演示文稿批量删除图片

    Public Sub StartRecursionFolder() Dim Pre As Presentation Dim FolderPath As String Dim pp As String ...

  10. Confluence 6 管理多目录

    这个页面描述了如果在 Confluence 中定义了多个目录服务器将会发生什么样的情况.例如你可能会有一个内部目录服务器同时你还可能有连接一个 LDAP 外部服务器或者使用多种类型的其他用户目录.当你 ...