I.MX6 working note for high efficiency
/****************************************************************************
* 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的更多相关文章
- 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 ...
- CRC 详解
http://www.barrgroup.com/Embedded-Systems/How-To/Additive-Checksums CRC Series, Part 1: Additive Che ...
- 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 ...
- [源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行
[源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行 目录 [源码解析] 模型并行分布式训练 Megatron (4) --- 如何设置各种并行 0x00 摘要 0x0 ...
- 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 ...
- I.MX6 Ethernet UI patch failed
/*********************************************************************** * I.MX6 Ethernet UI patch f ...
- I.MX6 Android U-blox miniPCI 4G porting
/************************************************************************** * I.MX6 Android U-blox m ...
- I.MX6 Goodix GT9xx touchscreen driver porting
/************************************************************************ * I.MX6 Goodix GT9xx touch ...
- I.MX6 Android 移除 Settings wifi功能
/********************************************************************* * I.MX6 Android 移除 Settings w ...
随机推荐
- gpg: no valid OpenPGP data found. 解决办法
在Ubuntu14.04 server(amd64)上面安装ros,运行命令 wget http://packages.ros.org/ros.key -O - | sudo apt-key add ...
- SQLServer中对时间和长度的处理
---关于时间处理的函数 GETDATE() DATEADD(DAY,-20,GETDATE()) CONVERT(VARCHAR(100), GETDATE(), 112) DATENAME(PAR ...
- Django模板语言详解
本节将介绍Django模版系统的语法.Django模版语言致力于在性能和简单性上取得平衡. 如果你有过其它编程背景,或者使用过一些在HTML中直接混入程序代码的语言,那么你需要记住,Django的模版 ...
- Qt_DLL_4_MFC
1.下载地址: https://github.com/qtproject/qt-solutions 2. ZC: 做用于MFC的DLL的时候,app的创建 只能是在 主线程中,不然的话 就会报错... ...
- tp5.0 composer命令插件
1.单元测试composer require topthink/think-testing 1.* (5.0) composer require topthink/think-testing 5.1官 ...
- Codeforces 898F - Restoring the Expression(字符串hash)
898F - Restoring the Expression 思路:字符串hash,base是10,事实证明对2e64取模会T(也许ull很费时),对1e9+7取模. 代码: #include< ...
- Python -- Scrapy 命令行工具(command line tools)
结合scrapy 官方文档,进行学习,并整理了部分自己学习实践的内容 Scrapy是通过 scrapy 命令行工具进行控制的. 这里我们称之为 “Scrapy tool” 以用来和子命令进行区分. 对 ...
- NotifyIcon实现托盘程序
NotifyIcon 控件的常用属性属性:Icon类型:System.Drawing.Icon说明:将在系统任务栏中显示的图标.可以在设计时指定,也可在运行时动态指定.属性:Text类型:String ...
- 『科学计算』可视化二元正态分布&3D科学可视化实战
二元正态分布可视化本体 由于近来一直再看kaggle的入门书(sklearn入门手册的感觉233),感觉对机器学习的理解加深了不少(实际上就只是调包能力加强了),联想到假期在python科学计算上也算 ...
- 『cs231n』作业3问题2选讲_通过代码理解LSTM网络
LSTM神经元行为分析 LSTM 公式可以描述如下: itftotgtctht=sigmoid(Wixxt+Wihht−1+bi)=sigmoid(Wfxxt+Wfhht−1+bf)=sigmoid( ...