#/*******************************************************************************
# * OK335xS-Android pack-ubi-256M.sh hacking
# * 声明:
# * 1. 本文解析仅仅是为了知道pack-ubi-256M.sh自动生成ubi文件系统的原理
# * 2. 本文在网页上可能不好阅读,最好cp一份在其他文本编辑器中阅读
# * 2015-6-4 晴 深圳 南山平山村 曾剑锋
# ******************************************************************************/ # /bin/sh ANDROID_PATH=`pwd` # get android root path
KERNEL_PATH=$ANDROID_PATH/kernel # get android kernel path
UBOOT_PATH=$ANDROID_PATH/u-boot # get android u-boot path
echo "start make rootfs.tar.bz2......" # show start message
cd $ANDROID_PATH/out/target/product/am335xevm # change directory to out path
rm -rf android_rootfs # remove android_rootfs directory
mkdir android_rootfs # make directory for android_rootfs
cp -rf root/* android_rootfs # cp all file to android_rootfs directory from root directory
cp -rf data android_rootfs/ # cp data directory to android_rootfs directory
cp -rf system android_rootfs/ # cp system directory to android_rootfs directory
cp -rf $ANDROID_PATH/vendor/busybox android_rootfs/system/bin # cp busybox as a shell command
cp -rf $ANDROID_PATH/RowboPerf/RowboPerf_libs/armeabi/* android_rootfs/system/lib # cp RowboPerf armeabi lib as system lib
cp -rf $ANDROID_PATH/RowboPerf/Zeroxbench_bins/armeabi/* android_rootfs/system/bin # cp RowboPerf armeabi bin as system bin
cp -rf $ANDROID_PATH/RowboPerf/*.apk android_rootfs/data/app # cp RowboPerf apk as data spp
cd android_rootfs/data # change directory to android_rootfs/data
mkdir data # make directory for data
cd $ANDROID_PATH/out/target/product/am335xevm # change directory to out path
chown 1000:1000 android_rootfs/data/app -R # change file own
chmod 775 android_rootfs/data/app # change file mode of app
chmod 777 android_rootfs/data/data # change file mode of data
../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats android_rootfs . rootfs rootfs.tar.bz2 # create a tar file
sleep 2
cp -rf rootfs.tar.bz2 $ANDROID_PATH/mkubifs # cp rootfs.tar.bz2 to mkubifs directory
cd $ANDROID_PATH/mkubifs # go to mkubifs directory
rm -rf rootfs # rm -rf rootfs directory
mkdir rootfs # make rootfs directory
tar -jxvf rootfs.tar.bz2 -C rootfs # use tar with -jxvf argument extract files from rootfs.tar.bz2
./mkfs.ubifs -F -r rootfs -m 2048 -e 126976 -c 1866 -o ubifs.img # create the ubifs image
# ubinize.cfg |
# [ubifs] |
# mode=ubi |
# image=ubifs.img <---------------------------------+
# vol_id=0
# vol_size=220MiB
# vol_type=dynamic
# vol_name=rootfs
# vol_flags=autoresize
./ubinize -o ubi.img -O 2048 -m 2048 -p 128KiB -s 2048 ubinize.cfg # create the ubi image
sleep 2
echo " make end" # show work end cd $ANDROID_PATH # goto android root path
cp $KERNEL_PATH/arch/arm/boot/uImage temp # cp uImage to temp directory
#cp $UBOOT_PATH/MLO temp # cp MLO to temp directory
#cp $UBOOT_PATH/u-boot.img temp # cp u-boot.img to temp directory
cp $ANDROID_PATH/mkubifs/ubi.img temp # cp ubi.img to temp directory cp $KERNEL_PATH/arch/arm/boot/uImage mmc-android-ubifs/Boot_Images # cp uImage to mmc-android-ubifs/Boot_Images
#cp $UBOOT_PATH/MLO mmc-android-ubifs/Boot_Images # cp MLO to temp directory
#cp $UBOOT_PATH/u-boot.img mmc-android-ubifs/Boot_Images # cp u-boot.img to temp directory
cp $ANDROID_PATH/mkubifs/ubi.img mmc-android-ubifs/Filesystem # cp ubi.img to temp directory
echo "pack complete"

OK335xS-Android pack-ubi-256M.sh hacking的更多相关文章

  1. OK335xS psplash make-image-header.sh hacking

    /***************************************************************************** * OK335xS psplash mak ...

  2. AM335x Android eMMC mkmmc-android.sh hacking

    # AM335x Android eMMC mkmmc-android.sh hacking # # . 有空解读一下android的分区文件. # . 代码来源:https://github.com ...

  3. Android Mokoid Open Source Project hacking

    /***************************************************************************** * Android Mokoid Open ...

  4. OK335xS-Android mkmmc-android-ubifs.sh hacking

    #/******************************************************************************* # * OK335xS-Androi ...

  5. I.MX6 mkuserimg.sh hacking

    /*********************************************************************** * I.MX6 mkuserimg.sh hackin ...

  6. OK335xS Linux kernel check clock 24M hacking

    /****************************************************************************** * OK335xS Linux kern ...

  7. Woobuntu woobuntu_build.sh hacking

    # Woobuntu woobuntu_build.sh hacking # 说明: # 有时候因为一些需求,我们需要定制一些系统,包括Ubuntu系统,于是 # 我们自然需要知道如何去解包一个Ubu ...

  8. ti processor sdk linux am335x evm setup.sh hacking

    #!/bin/sh # # ti processor sdk linux am335x evm setup.sh hacking # 说明: # 本文主要对TI的sdk中的setup.sh脚本进行解读 ...

  9. ti processor sdk linux am335x evm /bin/setup-host-check.sh hacking

    #!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-host-check.sh hacking # 说明: # 本文主要对TI的sdk ...

随机推荐

  1. 适用于目前环境的bug记录

    问测试,bugtracker.JIRA,你们用起来啊? 难道bugtracker/JIRA只有测试用吗? 截屏忽略,只有测试人员自己提bug,开发不管不顾,解决了也不关闭bug,bug提得太多,还嫌测 ...

  2. 使用 data.table 包操作数据

    在第一节中,我们回顾了许多用于操作数据框的内置函数.然后,了解了 sqldf 扩展包,它使得简单的数据查询和统计变得更简便.然而,两种方法都有各自的局限性.使用内置函数可能既繁琐又缓慢,而相对于各式各 ...

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

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

  4. 禁用表单元素 && 禁止选中

    一.禁用表单元素 1.dom设置属性 disabled="disabled" || disabled=true 2.css样式(高版本浏览器) pointer-events:non ...

  5. 工程优化暨babel升级小记

    小记背景 随着业务代码的增多,项目代码的编译时长也在增多,遂针对这个痛点在dev下做些优化 第一部分:优化dev编译时间 这里优化的主要思路是在dev环境下,单独出来一个dll配置文件,将项目中的部分 ...

  6. R语言plot函数参数合集

    最近用R语言画图,plot 函数是用的最多的函数,而他的参数非常繁多,由此总结一下,以供后续方便查阅. plot(x, y = NULL, type = "p", xlim = N ...

  7. English trip -- VC(情景课)5 D

    Read 阅读 Listen and read. 听并读 Notice from Riverside Library Come and visit Riverside Library.The new ...

  8. English trip -- VC(情景课)1 C What's your name?

    Grammar focus 语法点 What's your name? What's his name? What her name? My name is Angela. His name is K ...

  9. 安卓本地化之SharedPreferences

    SharedPreferences的本质是基于XML文件存储key-value键值对数据,通常用来存储一些简单的配置信息,用Sqlite数据库来存放并不划算,因为数据库连接跟操作等耗时大大影响了程序的 ...

  10. Connecting Vertices CodeForces - 888F (图论,计数)

    链接 大意: 给定邻接表表示两点是否可以连接, 要求将图连成树, 且边不相交的方案数 n范围比较小, 可以直接区间dp $f[l][r]$表示答案, $g[l][r]$表示区间[l,r]全部连通且l, ...