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

From FriendlyELEC WiKi
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
If you have a customized U-boot, Linux kernel and file system and want to use them to make a Linux image file(we call it "ROM" in the following sections) you can use the "dd" command the copy all the data and files in your SD card with a Linux ROM.   、文件系统,并且想基于自己定制的文件制作Linux系统映像文件 (以下简称为ROM文件),你可以选择用dd命令将带有你的应用程序和配置的SD卡的数据完整地拷贝出来,这种方法简单粗暴,但是效率不高。另外,你也可以使用FriendlyElec 提供的[https://pan.baidu.com/s/1DSd4XYXr1yGyQTdRNQNoOw rom-maker-lite]工具。<br><br>
+
If you have a customized U-boot, Linux kernel and file system and want to use them to make a customized Linux image file(we call it "ROM" in the following sections) you can do it this way: use the "dd" command to copy all the data and files from an existing SD card with a Linux ROM, replace the U-boot, kernel or file system with your customzied files and use the "dd" command again to combine these files to a ROM. However this is inefficient. We suggest you use our rom-maker-lite utility to do it, which can be downloaded at [https://pan.baidu.com/s/1DSd4XYXr1yGyQTdRNQNoOw rom-maker-lite].<br><br>
rom-maker-lite是一套通用的制作映像文件的脚本工具,目前支持为 H3/H5 系列的开发板制作Linux平台的sd/eflasher ROM文件(尚未支持Android)。<br>
+
The rom-maker-lite utility is a general tool to make a ROM. It currently supports making a Linux based sd/eflasher ROM for FriendlyElec's H3/H5 boards .Making an Android image is not supported yet.<br>
* <b>执行./mkimage.sh查看帮助信息:</b>
+
* <b>Run ./mkimage.sh to check usage info:</b>
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ ./mkimage.sh  
 
$ ./mkimage.sh  
Line 27: Line 27:
 
|-
 
|-
 
| -d "<misc dir>;<partition1 dir>;<partition2 dir>;..."  ||
 
| -d "<misc dir>;<partition1 dir>;<partition2 dir>;..."  ||
-d 用于指定系统文件所在的目录,每个路径之间用“;”分割,对于H3/H5系列的开发板:<br>
+
-d specifies file system's path and each path is separated by a ";". Specifically for an H3/H5 based board:<br>
<misc dir>: 用于指定bootloader所在的目录路径;<br>
+
<misc dir>: specifies the bootloader's path;<br>
<partition1 dir>: 用于指定boot分区的目录路径;<br>
+
<partition1 dir>: specifies the boot partition's path;<br>
<partition2 dir>: 用于指定rootfs分区的目录路径;<br>
+
<partition2 dir>: specifies the rootfs partition's path;<br>
最后的...表示就还可以接收更多的目录路径。当制作eflasher ROM时,就需要添加friendlyarm分区的目录路径;
+
"..." means more paths can be defined. When you make an eflasher ROM you need to include the friendlyarm partition's path;
 
|-
 
|-
 
|}
 
|}
  
* <b>准备工作</b>
+
* <b>Preparations</b>
经测试过PC机 Ubuntu版本包括:<br>
+
We tested the following Ubuntu versions that worked with a PC host:<br>
 
1) ubuntu-16.04.5-desktop-amd64.iso <br>
 
1) ubuntu-16.04.5-desktop-amd64.iso <br>
 
2) ubuntu-18.04.1-desktop-amd64.iso <br>
 
2) ubuntu-18.04.1-desktop-amd64.iso <br>
如果你当前PC机使用的Ubuntu系统无法成功执行出系统映像,请尝试切换到上面这两个版本的Ubuntu系统。<br>
+
If you cannot make a ROM under a Linux system with your PC host you'd better use either one of the above two systems we tested.<br>
  
在开始制作系统映像前,必须先安装下列软件包:
+
Before proceed make sure you have installed the following packages:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ apt-get install tree exfat-utils dosfstools python3-tk
 
$ apt-get install tree exfat-utils dosfstools python3-tk
 
</syntaxhighlight>
 
</syntaxhighlight>
  
由于制作系统映像需要root权限,请先切换到root用户:
+
You need the root access right to make a ROM:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ su root
 
$ su root
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 09:29, 22 July 2019

If you have a customized U-boot, Linux kernel and file system and want to use them to make a customized Linux image file(we call it "ROM" in the following sections) you can do it this way: use the "dd" command to copy all the data and files from an existing SD card with a Linux ROM, replace the U-boot, kernel or file system with your customzied files and use the "dd" command again to combine these files to a ROM. However this is inefficient. We suggest you use our rom-maker-lite utility to do it, which can be downloaded at rom-maker-lite.

The rom-maker-lite utility is a general tool to make a ROM. It currently supports making a Linux based sd/eflasher ROM for FriendlyElec's H3/H5 boards .Making an Android image is not supported yet.

  • Run ./mkimage.sh to check usage info:
$ ./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 specifies file systems' formats for the partitions in a ROM Image. Specifically for an H3/H5 based board:
-c 1 stands for "misc(bootloader) + fat32 boot.img + ext4 rootfs.img" and this applies to an sd ROM of FriendlyCore/Ubuntu/Debian/OpenWrt;
-c 2 stands for "misc(bootloader) + fat32 boot.img + ext4 rootfs.img + exfat friendlyarm.img" and this applies to an eflasher ROM.

-m <partmap>

-m specifies a partmap file for making a ROM.
A partmap file is used to specify the files and their sizes included in a ROM. ROMs made for different boards or BSPs may need different partmap files.

-d "<misc dir>;<partition1 dir>;<partition2 dir>;..."

-d specifies file system's path and each path is separated by a ";". Specifically for an H3/H5 based board:
<misc dir>: specifies the bootloader's path;
<partition1 dir>: specifies the boot partition's path;
<partition2 dir>: specifies the rootfs partition's path;
"..." means more paths can be defined. When you make an eflasher ROM you need to include the friendlyarm partition's path;

  • Preparations

We tested the following Ubuntu versions that worked with a PC host:
1) ubuntu-16.04.5-desktop-amd64.iso
2) ubuntu-18.04.1-desktop-amd64.iso
If you cannot make a ROM under a Linux system with your PC host you'd better use either one of the above two systems we tested.

Before proceed make sure you have installed the following packages:

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

You need the root access right to make a ROM:

$ su root