http://blog.csdn.net/flydream0/article/details/9163119

之前已讲解了如何下载及编译tizen源码(http://blog.csdn.net/flydream0/article/details/9004746),接下来我将讲解如下将制作镜像文件。

1 安装mic工具

tizen是使用MIC工具来制作其镜像文件的,因此我们首先得安装它。

  1. $ sudo apt-get install mic

查看MIC工具的当前版本:

  1. $ mic --version
  2. mic 0.19.1 (Ubuntu 12.04 precise)

2 下载ks文件

  1. wget http://download.tizen.org/releases/daily/2.0alpha/ivi-wayland/tizen-2.0alpha_20130522.2/images/ivi-wayland-release/ivi-wayland-release.ks

下载完后会在当前目录下有一个名为ivi-wayland-release.ks的文件,打开此文件,如下内容:

  1. # -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*-
  2. #
  3. # Do not Edit! Generated by:
  4. # kickstarter.py
  5. #
  6. lang en_US.UTF-8
  7. keyboard us
  8. timezone --utc America/Los_Angeles
  9. part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align 1024
  10. part /opt --size 676 --ondisk sdb --fstype=ext4 --label opt --align 1024
  11. part / --size 3072 --ondisk sdb --fstype=ext4 --label platform --align 1024
  12. rootpw tizen
  13. xconfig --startxonboot
  14. bootloader  --timeout=0  --append="rootwait rootfstype=ext4 quiet"   --ptable=gpt
  15. desktop --autologinuser=tizen
  16. user --name tizen  --groups audio,video --password 'tizen'
  17. repo --name=Tizen-base --baseurl=https://download.tizen.org/snapshots/2.0alpha/ivi-wayland/@BUILD_ID@/repos/base/ia32/packages/ --ssl_verify=no
  18. repo --name=Tizen-ivi-wayland --baseurl=https://download.tizen.org/snapshots/2.0alpha/ivi-wayland/@BUILD_ID@/repos/ivi-wayland/ia32/packages/ --ssl_verify=no
  19. %packages
  20. @adaptation-automotive-intel
  21. @commonwayland
  22. @ivi-middleware
  23. @appswayland
  24. @toyota-ui
  25. kernel-x86-ivi
  26. release-repos
  27. -simulator-opengl
  28. -opengl-es
  29. %end
  30. %prepackages
  31. eglibc
  32. systemd
  33. busybox
  34. libacl
  35. libcap
  36. dbus-libs
  37. libgcc
  38. libudev
  39. libattr
  40. default-files-slp
  41. openssl
  42. libprivilege-control
  43. libprivilege-control-conf
  44. security-server
  45. libdlog
  46. libsecurity-server-client
  47. sqlite
  48. tzdata-slp
  49. vconf
  50. tizen-coreutils
  51. %end
  52. %post
  53. # to make udev happy
  54. ln -sf /bin/busybox /sbin/blkid
  55. # where in the world is xinitrc?
  56. ln -sf /etc/X11/xinitrc /usr/etc/X11/xinitrc
  57. # inittab hack to fix console - UI switching
  58. sed -ri 's/--noclear tty1/tty3/' /etc/inittab
  59. sed -ri 's/tty2/tty4/' /etc/inittab
  60. # modprobe fuse for sqlfs-mount
  61. /bin/sed -i "3i /sbin/modprobe fuse || :" /etc/rc.d/init.d/sqlfs-mount
  62. if [ -d /etc/init.d ]; then
  63. cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
  64. fi
  65. rm -rf /etc/init.d*
  66. ln -sf /etc/rc.d/init.d /etc/init.d
  67. rm -rf /etc/localtime
  68. ln -sf /opt/etc/localtime /etc/localtime
  69. # Without this line the rpm doesn't get the architecture right.
  70. # echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
  71. > /etc/rpm/platform
  72. ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
  73. ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
  74. ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
  75. pkg_initdb
  76. rm -fr /opt/dbspace/.app_info.*
  77. INITDB=1 ail_initdb
  78. # ims-service domain setting
  79. RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`
  80. if [ -z "$RESULT" ]; then
  81. echo "Set domain for auto configuration"
  82. echo "192.168.0.163 config.45001.rcse" >> /etc/hosts
  83. else
  84. echo "Already setted domain for test auto configuration"
  85. fi
  86. # ims-service domain setting
  87. cat > /usr/bin/press << EOF
  88. #!/bin/sh
  89. JUNK="SLP"
  90. [ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
  91. echo "Press return key to stop scripts"
  92. read -t \$TIMEOUT JUNK
  93. exit \$?
  94. EOF
  95. chmod +x /usr/bin/press
  96. ln -s /opt/etc/X11/xkb /usr/share/X11
  97. ln -s /home/app /opt/home/app
  98. ln -s /home/developer /opt/home/developer
  99. echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
  100. rm -rf /usr/share/man
  101. rm -rf /usr/share/doc
  102. ldconfig
  103. mkdir -p /opt/var/lib/dbus
  104. rm -f /var/lib/rpm/__db*
  105. mv -f /var/lib/rpm /opt/var/lib/
  106. ln -sf /opt/var/lib/rpm /var/lib/rpm
  107. rpmdb --rebuilddb
  108. if [ -e /usr/bin/build-backup-data.sh ]; then
  109. /usr/bin/build-backup-data.sh
  110. fi
  111. sed -i s/ENGINE=gl/ENGINE=fb/ /etc/profile.d/menu-screen.sh
  112. # enable USB networking with IP address 192.168.1.1 by default
  113. cat >/etc/rc.d/rc3.d/S01usbnet.sh <<END
  114. #!/bin/sh
  115. echo 0 > /sys/class/android_usb/android0/enable
  116. echo adb,rndis > /sys/class/android_usb/android0/functions
  117. echo 1 > /sys/class/android_usb/android0/enable
  118. ifconfig rndis0 192.168.100.1
  119. END
  120. chmod 755 /etc/rc.d/rc3.d/S01usbnet.sh
  121. ln -sf /etc/rc.d/init.d/ssh /etc/rc.d/rc3.d/S90ssh
  122. # this file should be deleted after elegant fix merged
  123. ############################### hacks to get
  124. # usbnet, udev, ssh, and other stuff
  125. cat > /etc/rc.d/rc3.d/S01debug << EOF
  126. # udev
  127. /sbin/udevd --daemon
  128. /sbin/udevadm trigger
  129. EOF
  130. chmod +x /etc/rc.d/rc3.d/S01debug
  131. ###############################
  132. mkdir /root
  133. chmod 755 /root
  134. %end
  135. %post --nochroot
  136. if [ -n "$IMG_NAME" ]; then
  137. echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release
  138. fi
  139. %end

此文件为mic的配置文件,描述mic如何制作镜像文件。有关此文件的说明请参考:http://blog.csdn.net/flydream0/article/details/9162187 一文的第5章。

默认情况下repo使用的是远程资料库的RPM包。

3 使用MIC工具从远程repo下载RPM包并制作镜像文件

使用如下指令生成镜像文件:

  1. $ sudo mic create raw ivi-wayland-release.ks --pack-to=test.tar.bz2 --logfile=log


中 create表示创建镜像文件,raw表示raw格式的镜像, ivi-way...这里指定ks文件. --pack-to=xxx
表示打包生成test.tar.bz2文件,即此raw镜像文件打包到test.tar.bz2,
--logfile=xxx表示将打印信息存放到log文件中.

如下图:

最终结束后,会在当前目录生成log文件,保存制作镜像文件过程中的打印信息,同时会生成mic-output目录,压缩打包后的镜像文件test.tar.bz2文件就放在此目录下。

  1. $ tree mic-output/ -L 3
  2. mic-output/
  3. ├── ivi-wayland-release-201306251509.xml
  4. └── test.tar.bz2
  5. 0 directories, 2 files

注:默认情况下,mic工具会在/var/tmp目录下创建一mic目录,然后在mic目录下创建cache目录用来保存从远程repo下载的RPM包:

  1. $ tree mic -L 2
  2. mic
  3. ├── build
  4. ├── cache
  5. │   ├── etc
  6. │   ├── packages
  7. │   ├── raw
  8. │   ├── solv
  9. │   ├── Tizen-base
  10. │   ├── Tizen-ivi-wayland
  11. │   └── var
  12. └── device
  13. └── loop0

4 使用本地RPM包生成镜像文件

使用如下指令:

  1. $ sudo mic create raw ivi-wayland-release.ks --pack-to=local_test.tar.bz2 --logfile=log1 --local-pkgs-path=/home/arthur/GBS-ROOT/local/repos

其中--local-pkgs-path=后面为使用gbs build时生成的本地repo的所在目录。见:http://blog.csdn.net/flydream0/article/details/9004746一文的2.3节。

注:如果gbs build生成的目录下,即repos的tizenxxx目录下包含多个硬件平台架构的目录时,可以在MIC指令后通过-A选项来指令目标平台的架构,如:

  1. $ sudo mic create raw ivi-wayland-release.ks --pack-to=local_test.tar.bz2 --logfile=log1 --local-pkgs-path=/home/arthur/GBS-ROOT/local/repos -A i586

下一章我将讲述如何在目标设备上烧录镜像文件,敬请关注!

注:有关如何烧录镜像文件,请参考下一篇文章:http://blog.csdn.net/flydream0/article/details/9179143

[转]如何制作tizen镜像文件(图文教程)?的更多相关文章

  1. [转]如何烧录tizen镜像文件?(图文教程)

    http://blog.csdn.net/flydream0/article/details/9179143 上一篇文章我已讲过如何制作镜像文件(http://blog.csdn.net/flydre ...

  2. [转]如何下载tizen源码(图文教程)?

    http://blog.csdn.net/flydream0/article/details/8996654 当前tizen发布的最新源码版本是2.1,本文将以图文教程讲述如何下载tizen源码,关于 ...

  3. 【iOS系列】-iOS查看沙盒文件图文教程(真机+模拟器)

    [iOS系列]-iOS查看沙盒文件图文教程(真机+模拟器) 1:模拟器 1.1 方法1: 程序中打印一下的地址,能直接前往沙盒路径. NSString *path = [NSSearchPathFor ...

  4. [转]如何编译tizen源码(图文教程)?

    http://blog.csdn.net/flydream0/article/details/9004746 前一篇文章已经介绍了如何下载tizen源码(http://blog.csdn.net/fl ...

  5. 如何编译tizen源码(图文教程)?

    前一篇文章已经介绍了如何下载tizen源码,下面我将继续讲述如何编译源码. 1 下载安装gbs编译工具 tizen源码是用gbs工具进行编译的,因此我们首先得将此工具下载下来,并且设置好. 下面的Ub ...

  6. UltraISO制作ISO镜像文件

    怎样制作一个ISO的镜像文件呢,镜像文件的应用范围比较广泛,最常见的应用就是数据备份(如软盘和光盘).随着宽带网的普及,有些下载网站也有了ISO格式的文件下载,方便了软件光盘的制作与传递.常见的镜像文 ...

  7. Remastersys -- 将正在使用的Ubuntu14.04 制作成镜像文件

    remastersys 是一个能够备份你的ubuntu系统的工具. 源码在github上能找到:Remastersys Source 另外系统是 Ubuntu14.04/12.04 也可以直接 apt ...

  8. 将正在使用的Ubuntu14.04 制作成镜像文件

    remastersys 是一个能够备份你的ubuntu系统的工具. 源码在github上能找到:Remastersys Source 可以直接 apt 安装: sudo add-apt-reposit ...

  9. 【转】【iOS系列】-iOS查看沙盒文件图文教程(真机+模拟器)

    原文网址:http://www.cnblogs.com/fengtengfei/p/5090276.html 1:模拟器 1.1 方法1: 程序中打印一下的地址,能直接前往沙盒路径. NSString ...

随机推荐

  1. Eclipse报错 Unable to execute dex: Multiple dex files define Lcom/kenai/jbosh/AbstractAttr

    这个错误时jar包重复造成的!! 看看有没有多的private Libary  删除即可!!!

  2. js 原型模型重写1

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  3. Ext.form.ComboBox 后台取值 动态加载 ext5.0.0

    我用的extjs是5.0.0版本的. 请注意:如果这里没有的combobox相关内容,这里一定有. 开始的时候keyup事件取到的数据就是放不到ComboBox中,放全局变量也不好用.最后大神出手帮忙 ...

  4. 【转】Android 属性动画(Property Animation) 完全解析 (上)

    http://blog.csdn.net/lmj623565791/article/details/38067475 1.概述 Android提供了几种动画类型:View Animation .Dra ...

  5. Freescale OSBDM JM60仿真器

    OSBDM-JM60 - 9S08JM60 Based OSBDM — It includes interfaces and firmware applied to all the targets s ...

  6. CORTEX -M3 : Registers in depth

    http://www.zembedded.com/cortex-m3-registers-in-depth/ Thanks for the overwhelm response you show in ...

  7. Uva 10167 - Birthday Cake 暴力枚举 随机

      Problem G. Birthday Cake Background Lucy and Lily are twins. Today is their birthday. Mother buys ...

  8. The source attachment does not contain the source for the file SignatureParser.class错误

    在myeclipse整合tomcat的完毕后,再启动tomcat的时候会出现这样的错误,呵呵,错误的大致意思是什么相关联错误,其实是myeclipse新加入的tomcat的模式出现错误了,myecli ...

  9. 泛型Dictionary的用法详解

    泛型最常见的用途是泛型集合,命名空间System.Collections.Generic 中包含了一些基于泛型的集合类,使用泛型集合类可以提供更高的类型安全性,还有更高的性能,避免了非泛型集合的重复的 ...

  10. 【SSH三大框架】Hibernate基础第二篇:编写HibernateUtil工具类优化性能

    相对于上一篇中的代码编写HibernateUtil类以提高程序的执行速度 首先,仍然要写一个javabean(User.java): package cn.itcast.hibernate.domai ...