/****************************************************************************
* 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. list_01

    双向链表 不支持随机存取([?] / at(?)) A.头尾 添加/移除 A.1.list::push_back(elemValue); A.2.list::pop_back(); A.3.list: ...

  2. RabbitMQ入门_12_发布方确认

    参考资料:https://www.rabbitmq.com/confirms.html 通过 ack 机制,我们可以确保队列中的消息一定能被消费到.那我们有办法保证消息发布方一定把消息发送到队列了吗? ...

  3. Codeforces 556D - Case of Fugitive

    556D - Case of Fugitive 思路:将桥长度放进二叉搜索树中(multiset),相邻两岛距离按上限排序,然后二分查找桥长度匹配并删除. 代码: #include<bits/s ...

  4. OpenGL入门程序二:绘制简单的圆

    学习 绘制一个圆: ; const float Pi = 3.1415926536f; const float R = 0.5f; //绘制一个圆 void DrawCircle() { //绘制一个 ...

  5. 12月8日 周五 image_tag.

    Overview of helpers provided by Action View 6.1 AssetTagHelper:用于generate html语言 image_tag ,return a ...

  6. 4-13 Webpacker-React.js; 用React做一个下拉表格的功能: <详解>

    Rails5.1增加了Webpacker: Webpacker essentially is the decisions made by the Rails team and bundled up i ...

  7. Idea改项目名

    1.点开.idea文件夹,找到 modules.xml,更改里面的项目名 2.根目录下对应的.iml文件 3.右击 pom.xml 文件,选择最下面的 “ Add as maven build fil ...

  8. AI学习路径

  9. 『cs231n』作业2选讲_通过代码理解Dropout

    Dropout def dropout_forward(x, dropout_param): p, mode = dropout_param['p'], dropout_param['mode'] i ...

  10. django的url的name参数的意义

    Templates的链接地址都是根据urlpatterns定义的地址,拼凑成地址字符串,很难看,而且Templates里拼凑成的地址,随着页面的增加而不断增加,一旦在urlpatterns里的某个地址 ...