Difference between revisions of "Template:ROM-Maker-lite Introduce"
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | If you have a customized U-boot, Linux kernel and file system and want to make a customized Linux image( | + | 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- | + | 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>Run ./mkimage.sh to check usage info:</b> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ ./mkimage.sh | $ ./mkimage.sh | ||
Line 14: | Line 15: | ||
::{| class="wikitable" | ::{| class="wikitable" | ||
|- | |- | ||
− | | | + | |Parameter||Comment |
|- | |- | ||
| -c <filesystem type> || | | -c <filesystem type> || | ||
− | -c | + | -c specifies file systems' formats for the partitions in a ROM Image. Specifically for an H3/H5 based board:<br> |
− | -c | + | -c 1 stands for "misc(bootloader) + fat32 boot.img + ext4 rootfs.img" and this applies to an sd ROM of FriendlyCore/Ubuntu/Debian/OpenWrt;<br> |
− | -c | + | -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 <partmap> || |
+ | -m specifies a partmap file for making a ROM.<br> | ||
+ | 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 "<misc dir>;<partition1 dir>;<partition2 dir>;..." || | ||
− | -d | + | -d specifies file system's path and each path is separated by a ";". Specifically for an H3/H5 based board:<br> |
− | <misc dir>: | + | <misc dir>: specifies the bootloader's path;<br> |
− | <partition1 dir>: | + | <partition1 dir>: specifies the boot partition's path;<br> |
− | <partition2 dir> | + | <partition2 dir>: specifies the rootfs partition's path;<br> |
− | + | "..." means more paths can be defined. When you make an eflasher ROM you need to include the friendlyarm partition's path; | |
|- | |- | ||
|} | |} | ||
− | * <b> | + | * <b>Preparations</b> |
− | + | 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> | ||
− | + | 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> | ||
− | + | 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