Difference between revisions of "Template:ROM-Maker-lite Introduce"

From FriendlyELEC WiKi
Jump to: navigation, search
Line 14: Line 14:
 
::{| class="wikitable"
 
::{| class="wikitable"
 
|-
 
|-
|参数||说明
+
|Parameter||Comment
 
|-
 
|-
 
| -c <filesystem type>  ||  
 
| -c <filesystem type>  ||  
-c 用于指定ROM文件内各分区的文件系统格式,对于H3/H5系列的开发板:<br>
+
-c it is used to specify a partition's file system type. For an H3/H5 based board:<br>
-c 1适用于FriendlyCore/Ubuntu/Debian/OpenWrt等sd ROM; <br>
+
-c 1 applies to an SD card ROM image of FriendlyCore/Ubuntu/Debian/OpenWrt;<br>
-c 2适用于eflasher ROM。
+
-c 2 applies to an eflasher ROM image
 
|-
 
|-
| -m <partmap>  ||  用于指定制作ROM时需要的partmap文件,partmap文件用于指定ROM Image的布局方式和组成文件,不同的板子或者是同一板子不同版本的BSP使用的partmap文件是不一样的。
+
| -m <partmap>  ||  it is used to specify a partmap file for making a ROM image. In general different SoCs or BSPs use different partmap files.
 
|-
 
|-
 
| -d "<misc dir>;<partition1 dir>;<partition2 dir>;..."  ||
 
| -d "<misc dir>;<partition1 dir>;<partition2 dir>;..."  ||
-d 用于指定系统文件(一般包括bootloader/kernel/rootfs)所在的目录,每个路径之间用“;”分割,对于H3/H5系列的开发板:<br>
+
-d it is used to specify directories for system files such as bootloader, kernel, rootfs etc. Each directory is separated by a ";". For an H3/H5 based board:<br>
<misc dir>: 用于指定bootloader所在的目录路径;<br>
+
<misc dir>: used to specify the bootloader's directory;<br>
<partition1 dir>: 用于指定boot分区的目录路径;<br>
+
<partition1 dir>: used to specify the boot partition's directory;<br>
<partition2 dir>: 用于指定rootfs分区的目录路径;<br>
+
<partition2 dir>: used to specify the rootfs partition's directory;<br>
最后的...表示就还可以接收更多的目录路径。当制作eflasher ROM时,就需要添加friendlyarm分区的目录路径;
+
"..." means more directories can be specified for files. For example when you make an eflasher ROM image you need a directory for the "friendlyarm" partition;
 
|-
 
|-
 
|}
 
|}

Revision as of 05:02, 2 February 2019

If you have a customized U-boot, Linux kernel and file system and want to make a customized Linux image(also called "ROM") based on these files you can run the "dd" command to copy all the files in your bootable SD card. However this is not very efficient. FriendlyElec provides a better utility:rom-maker-lite.

rom-maker-lite is a general utility to make image files. It now supports making a Linux image file for both SD card and eflasher for FriendlyElec's H3/H5 based boards. It doesn't support making an Android image so far. After extract it and run the "./mkimage.sh" command you will see the following information:

$ ./mkimage.sh 
Usage:
    $ apt-get install tree exfat-utils dosfstools python3-tk
    $ ./mkimage.sh -c <filesystem type> -m <partmap> -d "<misc dir>;<partition1 dir>;<partition2 dir>;..."
        -c <filesystem type>: 
            1: misc(bootloader) + fat32 boot.img + ext4 rootfs.img
            2: misc(bootloader) + fat32 boot.img + ext4 rootfs.img + exfat friendlyarm.img
            3: misc(bootloader) + ext4 boot.img + ext4 rootfs.img
Parameter Comment
-c <filesystem type>

-c it is used to specify a partition's file system type. For an H3/H5 based board:
-c 1 applies to an SD card ROM image of FriendlyCore/Ubuntu/Debian/OpenWrt;
-c 2 applies to an eflasher ROM image

-m <partmap> it is used to specify a partmap file for making a ROM image. In general different SoCs or BSPs use different partmap files.
-d "<misc dir>;<partition1 dir>;<partition2 dir>;..."

-d it is used to specify directories for system files such as bootloader, kernel, rootfs etc. Each directory is separated by a ";". For an H3/H5 based board:
<misc dir>: used to specify the bootloader's directory;
<partition1 dir>: used to specify the boot partition's directory;
<partition2 dir>: used to specify the rootfs partition's directory;
"..." means more directories can be specified for files. For example when you make an eflasher ROM image you need a directory for the "friendlyarm" partition;

  • 准备工作

经测试过PC机 Ubuntu版本包括:
1) ubuntu-16.04.5-desktop-amd64.iso
2) ubuntu-18.04.1-desktop-amd64.iso
如果你当前PC机使用的Ubuntu系统无法成功执行出系统映像,请尝试切换到上面这两个版本的Ubuntu系统。

在开始制作系统映像前,必须先安装下列软件包:

$ apt-get install tree exfat-utils dosfstools python3-tk

由于制作系统映像需要root权限,请先切换到root用户:

$ su root