|
|
(43 intermediate revisions by 3 users not shown) |
Line 5: |
Line 5: |
| | | |
| ==Make Image Files for S5P4418== | | ==Make Image Files for S5P4418== |
− | Refer to this repo: https://github.com/friendlyarm/sd-fuse_s5p4418 | + | Refer to this repo: https://github.com/friendlyarm/sd-fuse_s5p4418<br /> |
| + | <br /> |
| + | Example: <br /> |
| + | <syntaxhighlight lang="bash"> |
| + | mkdir test |
| + | cd test |
| + | git clone https://github.com/friendlyarm/sd-fuse_s5p4418 |
| + | cd sd-fuse_s5p4418/ |
| + | tar xzf /mnt/dvd/S5P4418/images-for-eflasher/friendlycore-images.tgz |
| + | tar xzf /mnt/dvd/S5P4418/images-for-eflasher/emmc-flasher-images.tgz |
| + | tar xzf /mnt/dvd/S5P4418/rootfs/rootfs-friendlycore-20190718.tgz |
| + | sed "s/\${BOARD}/XXYYZZ/g" friendlycore/rootfs/etc/rc.local -i |
| + | ./build-rootfs-img.sh friendlycore/rootfs friendlycore/rootfs.img |
| + | ./mk-emmc-image.sh friendlycore |
| + | dd if=out/s5p4418-eflasher-friendlycore-20190730.img of=/dev/sdX bs=32M |
| + | </syntaxhighlight> |
| | | |
| ==Make Image Files for S5P6818== | | ==Make Image Files for S5P6818== |
| Refer to this repo: https://github.com/friendlyarm/sd-fuse_s5p6818 | | Refer to this repo: https://github.com/friendlyarm/sd-fuse_s5p6818 |
| | | |
− | ==制作H3 平台的系统映像== | + | ==Make Image Files for H3== |
− | {{ROM-Maker-lite_Introduce |h3}}
| + | Refer to this repo: https://github.com/friendlyarm/sd-fuse_h3 |
− | | + | |
− | * <b>为H3 系列的板子制作基于Uboot-2017 + Linux-4.14 的sd ROM(例如FriendlyCore/Debian/OpenWrt...)</b>
| + | |
− | 事实上,对于Uboot-2017 + Linux-4.14版本的BSP,所有H3 系列的板子的sd ROM文件都是同一个。所以对于这个版本的BSP,所有H3 系列的板子的sd ROM 的制作命令是一样的。
| + | |
− | 这里以制作FriendlyCore sd ROM为例进行讲解,Debian、OpenWrt等sd ROM文件的制作方法是类似的。<br><br>
| + | |
− | 假设你已经有一张带有FriendlyCore系统的SD卡,并且该SD卡的rootfs目录下已经包含了你自己的应用程序和设置。请将该SD卡插入PC机中,然后挂载SD卡的rootfs分区(假设挂载路径为rom-maker-lite/part2/h3/4.14/friendlycore/rootfs/, 请注意使用真实路径),使用下面的命令可以生成你自己定制的ROM文件:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h3_linux-4.14/partmap.txt -d "misc/uboot-2017_h3/;part1/boot_linux-4.14_h3/;part2/h3/4.14/friendlycore/rootfs/"
| + | |
− | </syntaxhighlight>
| + | |
− | 如果有需要,可以将misc/uboot-2017_h3、part1/boot_linux-4.14_h3目录下的文件替换为你自己的定制文件,当然你也可以使用目录里自带的预编译系统文件,我们会不定期更新预编译系统文件,通过tree命令可查看有哪些可替换的系统文件:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree misc/uboot-2017_h3/ part1/boot_linux-4.14_h3/
| + | |
− | misc/uboot-2017_h3/
| + | |
− | └── u-boot-sunxi-with-spl.bin
| + | |
− | part1/boot_linux-4.14_h3/
| + | |
− | ├── boot.cmd
| + | |
− | ├── boot.scr
| + | |
− | ├── rootfs.cpio.gz
| + | |
− | ├── sun8i-h2-plus-nanopi-duo.dtb
| + | |
− | ├── sun8i-h3-nanopi-duo2.dtb
| + | |
− | ├── sun8i-h3-nanopi-m1.dtb
| + | |
− | ├── sun8i-h3-nanopi-m1-plus.dtb
| + | |
− | ├── sun8i-h3-nanopi-neo-air.dtb
| + | |
− | ├── sun8i-h3-nanopi-neo-core.dtb
| + | |
− | ├── sun8i-h3-nanopi-neo.dtb
| + | |
− | └── zImage
| + | |
− | </syntaxhighlight>
| + | |
− | 对于所有使用Linux-4.14 BSP的H3板子,使用的都是同一个partmap文件partmap/h3_linux-4.14/partmap.txt。<br>
| + | |
− | mkimage.sh执行成功后,会生成out/SD-bootable-1目录,其内容如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ └── u-boot-sunxi-with-spl.bin
| + | |
− | ├── SD-bootable-1.img
| + | |
− | | + | |
− | </syntaxhighlight>
| + | |
− | part1/boot_linux-4.14_h3/目录被制作成了boot.img,part2/h3/4.14/friendlycore/rootfs/被制作成了rootfs.img,SD-bootable-1.img则为最终的sd ROM文件,它等效于FriendlyElec 发布的nanopi-<h3>_sd_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip,你可以用win32diskimager或者dd命令将SD-bootable-1.img烧写到SD卡中。
| + | |
− | <!--
| + | |
− | 另外,你可以通过如下命令快速地将系统烧写到SD卡中以进行测试:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./tools/sd_update -d /dev/SD -p ./out/SD-bootable-1/your_company/partmap.txt
| + | |
− | </syntaxhighlight>
| + | |
− | 注意: 请将/dev/sdX替换为实际的SD卡设备节点。
| + | |
− | -->
| + | |
− | | + | |
− | <br>
| + | |
− | * <b>为H3 系列的板子制作基于Uboot-2011 + Linux-3.4 的sd ROM(例如FriendlyCore/Debian/OpenWrt...) </b>
| + | |
− | 无论是基于什么版本的BSP,做rom的原理都是一样的,这里不再赘述。这里以制作NanoPi M1的FriendlyCore sd ROM为例进行讲解,Debian、OpenWrt等sd ROM的制作方法是类似的。<br><br>
| + | |
− | 执行命令:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h3_linux-3.4/partmap.txt -d "misc/uboot-2011_m1/;part1/boot_linux-3.4_m1/;part2/m1/3.4/friendlycore/rootfs"
| + | |
− | </syntaxhighlight>
| + | |
− | 请将对应目录下的文件替换为你自己的定制文件。对于所有使用Linux-3.4 BSP的H3板子,使用的都是同一个partmap文件partmap/h3_linux-3.4/partmap.txt。<br>
| + | |
− | 以此类推,NanoPi M1 Plus 的sd ROM 制作命令如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h3_linux-3.4/partmap.txt -d "misc/uboot-2011_m1-plus/;part1/boot_linux-3.4_m1-plus/;part2/m1-plus/3.4/friendlycore/rootfs"
| + | |
− | </syntaxhighlight>
| + | |
− | NanoPi NEO / NanoPi NEO Air也是同样的道理,这样不再赘述。
| + | |
− | | + | |
− | <br>
| + | |
− | * <b>为H3 系列的板子制作基于Uboot-2017 + Linux-4.14 的eflasher ROM</b>
| + | |
− | 制作eflasher ROM的前提条件是已经成功制作出了FriendlyCore/Debian/OpenWrt等sd ROM,即已经有待烧写到eMMC的原材料文件,例如基于Uboot-2017 + Linux-4.14的FriendlyCore系统:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ └── u-boot-sunxi-with-spl.bin
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | 假设你有一张带有eflasher 系统的SD卡,请将该SD卡插入PC机中,然后挂载SD卡的rootfs分区(假设挂载路径为part2/h3/4.14/eflasher/rootfs, 请注意使用真实路径),然后通过以下命令就可以生成eflasher ROM:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 2 -m partmap/h3_eflasher-4.14/partmap.txt -d "misc/uboot-2017_h3/;part1/boot_linux-4.14_h3/;part2/h3/4.14/eflasher/rootfs;out/SD-bootable-1/"
| + | |
− | </syntaxhighlight>
| + | |
− | mkimage.sh执行成功后,会生成out/SD-bootable-2目录,其内容如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ └── u-boot-sunxi-with-spl.bin
| + | |
− | ├── SD-bootable-1.img
| + | |
− | ├── SD-bootable-2
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── friendlyarm.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ └── u-boot-sunxi-with-spl.bin
| + | |
− | └── SD-bootable-2.img
| + | |
− | </syntaxhighlight>
| + | |
− | SD-bootable-2.img即为最终的eflasher ROM文件,它等效于FriendlyElec 发布的nanopi-<h3>_eflasher_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip。eflasher ROM能烧写什么系统到eMMC完全取决于out/SD-bootable-1/里包含了什么系统,你可以用win32diskimager或者dd命令将SD-bootable-2.img烧写到SD卡中。
| + | |
− | <!--
| + | |
− | 另外,通过如下命令快速地将eflasher系统烧写到SD卡中以进行测试:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./tools/sd_update -d /dev/SD -p ./out/SD-bootable-2/your_company/partmap.txt
| + | |
− | </syntaxhighlight>
| + | |
− | 注意: 请将/dev/sdX替换为实际的SD卡设备节点。
| + | |
− | -->
| + | |
− | | + | |
− | ==制作H5 平台的系统映像==
| + | |
− | {{ROM-Maker-lite_Introduce |h5}}
| + | |
− | | + | |
− | * <b>为H5 系列的板子制作基于Uboot-2017 + Linux-4.14 的sd ROM(例如FriendlyCore/Debian/OpenWrt...)</b>
| + | |
− | 事实上,对于Uboot-2017 + Linux-4.14版本的BSP,所有H5 系列的板子的sd ROM文件都是同一个。所以对于这个版本的BSP,所有H3 系列的板子的sd ROM 的制作命令是一样的。
| + | |
− | 这里以制作FriendlyCore sd ROM为例进行讲解,Debian、OpenWrt等sd ROM文件的制作方法是类似的。<br><br>
| + | |
− | 假设你已经有一张带有FriendlyCore系统的SD卡,并且该SD卡的rootfs目录下已经包含了你自己的应用程序和设置。请将该SD卡插入PC机中,然后挂载SD卡的rootfs分区(假设挂载路径为rom-maker-lite/part2/h3/4.14/friendlycore/rootfs/, 请注意使用真实路径),使用下面的命令可以生成你自己定制的ROM文件:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h5_linux-4.14/partmap.txt -d "misc/uboot-2017_h5/;part1/boot_linux-4.14_h5/;part2/h5/4.14/friendlycore/rootfs/"
| + | |
− | </syntaxhighlight>
| + | |
− | 如果有需要,可以将misc/uboot-2017_h5、part1/boot_linux-4.14_h5目录下的文件替换为你自己的定制文件,当然你也可以使用目录里自带的预编译系统文件,我们会不定期更新预编译系统文件,通过tree命令可查看有哪些可替换的系统文件:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree misc/uboot-2017_h5/ part1/boot_linux-4.14_h5/
| + | |
− | misc/uboot-2017_h5/
| + | |
− | ├── sunxi-spl.bin
| + | |
− | └── u-boot.itb
| + | |
− | part1/boot_linux-4.14_h5/
| + | |
− | ├── boot.cmd
| + | |
− | ├── boot.scr
| + | |
− | ├── Image
| + | |
− | ├── overlays
| + | |
− | │ └── sun50i-h5-gpio-dvfs-overlay.dtb
| + | |
− | ├── rootfs.cpio.gz
| + | |
− | ├── sun50i-h5-nanopi-k1-plus.dtb
| + | |
− | ├── sun50i-h5-nanopi-neo2.dtb
| + | |
− | ├── sun50i-h5-nanopi-neo-core2.dtb
| + | |
− | └── sun50i-h5-nanopi-neo-plus2.dtb
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | 对于所有使用Linux-4.14 BSP的H5板子,使用的都是同一个partmap文件partmap/h5_linux-4.14/partmap.txt。<br>
| + | |
− | mkimage.sh执行成功后,会生成out/SD-bootable-1目录,其内容如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ ├── sunxi-spl.bin
| + | |
− | │ └── u-boot.itb
| + | |
− | ├── SD-bootable-1.img
| + | |
− | | + | |
− | </syntaxhighlight>
| + | |
− | part1/boot_linux-4.14_h5/目录被制作成了boot.img,part2/h5/4.14/friendlycore/rootfs/被制作成了rootfs.img,SD-bootable-1.img则为最终的sd ROM文件,SD-bootable-1.img则为最终的sd ROM文件,它等效于FriendlyElec 发布的nanopi-<h5>_sd_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip,你可以用win32diskimager或者dd命令将SD-bootable-1.img烧写到SD卡中。
| + | |
− | <!--
| + | |
− | 另外,你可以通过如下命令快速地将系统烧写到SD卡中以进行测试:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./tools/sd_update -d /dev/SD -p ./out/SD-bootable-1/your_company/partmap.txt
| + | |
− | </syntaxhighlight>
| + | |
− | 注意: 请将/dev/sdX替换为实际的SD卡设备节点。
| + | |
− | -->
| + | |
− | | + | |
− | <br>
| + | |
− | * <b>为H5 系列的板子制作基于Uboot-2014 + Linux-3.10 的sd ROM(例如FriendlyCore/Debian/OpenWrt...) </b>
| + | |
− | 无论是基于什么版本的BSP,做rom的原理都是一样的,这里不再赘述。这里以制作NanoPi NEO2的FriendlyCore sd ROM为例进行讲解,Debian、OpenWrt等sd ROM的制作方法是类似的。<br><br>
| + | |
− | 执行命令:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h5_linux-3.10/partmap.txt -d "misc/uboot-2014_neo2/;part1/boot_linux-3.10_neo2/;part2/neo2/3.10/friendlycore/rootfs"
| + | |
− | </syntaxhighlight>
| + | |
− | 请将对应目录下的文件替换为你自己的定制文件。对于所有使用Linux-3.10 BSP的H5板子,使用的都是同一个partmap文件partmap/h5_linux-3.10/partmap.txt。<br>
| + | |
− | 以此类推,NanoPi NEO Plus2 的sd ROM 制作命令如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 1 -m partmap/h5_linux-3.10/partmap.txt -d "misc/uboot-2014_neo-plus2/;part1/boot_linux-3.10_neo-plus2/;part2/neo-plus2/3.10/friendlycore/rootfs"
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | <br>
| + | |
− | * <b>为H5 系列的板子制作基于Uboot-2017 + Linux-4.14 的eflasher ROM</b>
| + | |
− | 制作eflasher ROM的前提条件是已经成功制作出了FriendlyCore/Debian/OpenWrt等sd ROM,即已经有待烧写到eMMC的原材料文件,例如基于Uboot-2017 + Linux-4.14的FriendlyCore系统:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ ├── sunxi-spl.bin
| + | |
− | │ └── u-boot.itb
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | 假设你有一张带有eflasher 系统的SD卡,请将该SD卡插入PC机中,然后挂载SD卡的rootfs分区(假设挂载路径为part2/h5/4.14/eflasher/rootfs, 请注意使用真实路径),然后通过以下命令就可以生成eflasher ROM:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./mkimage.sh -c 2 -m partmap/h5_eflasher-4.14/partmap.txt -d "misc/uboot-2017_h5/;part1/boot_linux-4.14_h5/;part2/h5/4.14/eflasher/rootfs;out/SD-bootable-1"
| + | |
− | </syntaxhighlight>
| + | |
− | mkimage.sh执行成功后,会生成out/SD-bootable-2目录,其内容如下:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ tree out/
| + | |
− | out/
| + | |
− | ├── SD-bootable-1
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ ├── sunxi-spl.bin
| + | |
− | │ └── u-boot.itb
| + | |
− | ├── SD-bootable-1.img
| + | |
− | ├── SD-bootable-2
| + | |
− | │ └── your_company
| + | |
− | │ ├── boot.img
| + | |
− | │ ├── friendlyarm.img
| + | |
− | │ ├── info.conf
| + | |
− | │ ├── partmap.txt
| + | |
− | │ ├── rootfs.img
| + | |
− | │ ├── sunxi-spl.bin
| + | |
− | │ └── u-boot.itb
| + | |
− | └── SD-bootable-2.img
| + | |
− | </syntaxhighlight>
| + | |
− | SD-bootable-2.img即为最终的eflasher ROM文件,它等效于FriendlyElec 发布的nanopi-<h5>_eflasher_friendlycore-xenial_4.14_armhf_YYYYMMDD.img.zip。eflasher ROM能烧写什么系统到eMMC完全取决于out/SD-bootable-1/里包含了什么系统,你可以用win32diskimager或者dd命令将SD-bootable-2.img烧写到SD卡中。
| + | |
− | <!--
| + | |
− | 另外,通过如下命令快速地将eflasher系统烧写到SD卡中以进行测试:
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ ./tools/sd_update -d /dev/SD -p ./out/SD-bootable-2/your_company/partmap.txt
| + | |
− | </syntaxhighlight>
| + | |
− | 注意: 请将/dev/sdX替换为实际的SD卡设备节点。
| + | |
− | -->
| + | |
− | | + | |
− | ==Update Log==
| + | |
− | ===Sep-14-2017===
| + | |
− | * Released English Version
| + | |
| | | |
− | ===Jan-30-2018=== | + | ==Make Image File for H5== |
− | * Updated Section 3
| + | Refer to this repo: https://github.com/friendlyarm/sd-fuse_h5 |