I.MX6 system.img unpack repack

简介: /************************************************************************* * I.MX6 system.img unpack repack * 说明: * 以前的system.img直接ext4的,现在的system.img是data类型的,需要工具 * 进行转换才行,需要这些工具主要是还是为了减少开发中编译等待时间过长。
/*************************************************************************
 *                 I.MX6 system.img unpack repack
 * 说明:
 *     以前的system.img直接ext4的,现在的system.img是data类型的,需要工具
 * 进行转换才行,需要这些工具主要是还是为了减少开发中编译等待时间过长。
 *
 *                                     2016-9-10 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文档:
    1. Android中system.img的两种格式及其相互转换方法
        http://www.th7.cn/Program/Android/201501/381202.shtml
    2. ext4 unpack/repack tools
        http://web.djodjo.org/article/download/android/tools/x86_linux/ext4tools

二、执行命令:
    1. source ./build/envsetup.sh 
    2. make img2simg_host

三、编译输出信息:
    ......
    including ./system/security/softkeymaster/Android.mk ...
    including ./system/vold/Android.mk ...
    including ./tools/external/fat32lib/Android.mk ...
    *** Overlay change detected, clean shared intermediate files...
    *** rm -rf out/target/common/obj/APPS/framework-res_intermediates out/target/common/obj/APPS/Launcher2_intermediates out/target/common/obj/APPS/SettingsProvider_intermediates out/target/common/obj/APPS/Settings_intermediates out/target/common/obj/APPS/Bluetooth_intermediates
    Import includes file: out/host/linux-x86/obj32/EXECUTABLES/img2simg_host_intermediates/import_includes
    Header: out/target/product/generic/obj/include/libexpat/expat.h
    Header: out/target/product/generic/obj/include/libexpat/expat_external.h
    Header: out/target/product/generic/obj/include/libpng/png.h
    Header: out/target/product/generic/obj/include/libpng/pngconf.h
    Header: out/target/product/generic/obj/include/libpng/pngusr.h
    Header: out/target/product/generic/obj/include/selinux/selinux.h
    Header: out/target/product/generic/obj/include/selinux/label.h
    Header: out/target/product/generic/obj/include/selinux/context.h
    Header: out/target/product/generic/obj/include/selinux/avc.h
    Header: out/target/product/generic/obj/include/selinux/android.h
    Header: out/target/product/generic/obj/include/libsonivox/eas.h
    Header: out/target/product/generic/obj/include/libsonivox/eas_types.h
    Header: out/target/product/generic/obj/include/libsonivox/eas_reverb.h
    Header: out/target/product/generic/obj/include/libsonivox/jet.h
    Header: out/target/product/generic/obj/include/libsonivox/ARM_synth_constants_gnu.inc
    Header: out/target/product/generic/obj/include/libwpa_client/wpa_ctrl.h
    Header: out/target/product/generic/obj/include/libwpa_client/qca-vendor.h
    host C: img2simg_host <= system/core/libsparse/img2simg.c
    Export includes file: system/core/libsparse/Android.mk -- out/host/linux-x86/obj32/EXECUTABLES/img2simg_host_intermediates/export_includes
    host Executable: img2simg_host (out/host/linux-x86/obj32/EXECUTABLES/img2simg_host_intermediates/img2simg)
    Install: out/host/linux-x86/bin/img2simg

#### make completed successfully (03:18 (mm:ss)) ####

    zengjf@zengjf:~/myandroid$ 

四、真正的img2simg
    1. 上面编译出来的img2simg还是有问题,会报如下错误:
        zengjf@zengjf:~/myandroid$ img2simg out/target/product/sabresd_6dq/obj/PACKAGING/systemimage_intermediates/system.img system.img
        img2simg: ../../core/libsparse/sparse.c:143: write_all_blocks: Assertion `pad >= 0' failed.
        Aborted (core dumped)
    2. 下载参考文档中的img2simg,验证可行。    

 

目录
相关文章
|
5月前
webpack——You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
webpack——You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
863 0
Webpack打包出错:Error: Cannot find module ‘webpack/lib/node/NodeTemplatePlugin‘ Require stack:
Webpack打包出错:Error: Cannot find module ‘webpack/lib/node/NodeTemplatePlugin‘ Require stack:
Error: Cannot find module ‘webpack‘ 问题解决办法
Error: Cannot find module ‘webpack‘ 问题解决办法
991 1
|
JavaScript Cloud Native Go
Error: Cannot find module ‘webpack/bin/config-yargs‘ at Function.Module._resolveFilename (intern
Error: Cannot find module ‘webpack/bin/config-yargs‘ at Function.Module._resolveFilename (intern
91 0
|
资源调度 开发工具 git
Cannot find module 'webpack'
Cannot find module 'webpack'
|
存储 前端开发 JavaScript
webpack中output中path和publicPath区别详解
webpack中output中path和publicPath区别详解
302 0
find_package
find_package
110 1
Package ffnvcodec was not found in the pkg-config search path
Package ffnvcodec was not found in the pkg-config search path
181 0
Package sqlite3 was not found in the pkg-config search path.add the directory containing `sqlite3.pc
Package sqlite3 was not found in the pkg-config search path.add the directory containing `sqlite3.pc
199 0