{"id":360116,"date":"2024-05-21T00:46:36","date_gmt":"2024-05-21T00:46:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=360116"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=360116","title":{"rendered":"<span>VisionFive2 (\u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0444\u0435\u0432\u0440\u0430\u043b\u0435 2023 \u0433\u043e\u0434\u0430, \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0443 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043f\u043b\u0430\u0442\u044b <a href=\"https:\/\/www.starfivetech.com\/en\/site\/boards\/\" rel=\"noopener noreferrer nofollow\">VisionFive2<\/a> , \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 8GB LPDDR4 \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.starfivetech.com\/en\/site\/company\/\" rel=\"noopener noreferrer nofollow\">StarFive<\/a>. \u041f\u043e \u0441\u0443\u0442\u0438 VisionFive2 &#8212; \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 RISC-V \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 (SBC) \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c (GPU). <strong>\u0418 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043d\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c<\/strong>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 <a href=\"https:\/\/doc-en.rvspace.org\/VisionFive2\/Product_Brief\/VisionFive_2\/specification_pb.html\" rel=\"noopener noreferrer nofollow\">\u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2a3\/eec\/976\/2a3eec976c78ad6a96ecf5279f3fe471.png\" alt=\"\u0420\u0438\u0441.1. VisionFive 2 SBC\" title=\"\u0420\u0438\u0441.1. VisionFive 2 SBC\" width=\"1600\" height=\"1200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2a3\/eec\/976\/2a3eec976c78ad6a96ecf5279f3fe471.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441.1. VisionFive 2 SBC<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e VisionFive2 \u0438\u043c\u0435\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u044f\u0434\u0435\u0440\u043d\u044b\u0439 64-\u0431\u0438\u0442\u043d\u044b\u0439 SoC c ISA RV64GC, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445 \u0434\u043e 1.5 GHz, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c IMG BXE-4-32 MC1, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 OpenCL 3.0, OpenGL ES 3.2 \u0438 Vulkan 1.2. \u041d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u044f\u043d\u043e 2\/4\/8 GB LPDDR4 RAM. \u0418\u043c\u0435\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u044a\u0435\u043c M.2, \u0440\u0430\u0437\u044a\u0435\u043c eMMC, \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0440\u0442\u0430 USB 3.0, 40-\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u044a\u0435\u043c GPIO, \u0434\u0432\u0430 \u043f\u043e\u0440\u0442\u0430 Gigabit Ethernet, \u0441\u043b\u043e\u0442 \u0434\u043b\u044f TF-\u043a\u0430\u0440\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0430\u0445, \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u044f\u0434\u0440\u0430 Linux \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<h2>Toolchains<\/h2>\n<p>\u041c\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u0432\u0430 toolchain-\u0430, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 GCC-12.2.0 \u0438 GNU Libc 2.37, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/www.gigadevice.com\/product\/mcu\/risc-v\/\" rel=\"noopener noreferrer nofollow\">GD32VF103<\/a>. \u0414\u0430\u043d\u043d\u044b\u0435 toolchain-\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/\" rel=\"noopener noreferrer nofollow\">x86_64\/1.9.8<\/a>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 <a href=\"https:\/\/ftp.radix.pro\/\" rel=\"noopener noreferrer nofollow\">https:\/\/ftp.radix.pro<\/a>. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 toolchain-\u044b: <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/riscv64-RV64GC-linux-glibc-1.9.8.tar.xz\" rel=\"noopener noreferrer nofollow\">riscv64-RV64GC-linux-glibc-1.9.8.tar.xz<\/a> \u0438 <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/riscv64-NONE-elf-newlib-1.9.8.tar.xz\" rel=\"noopener noreferrer nofollow\">riscv64-NONE-elf-newlib-1.9.8.tar.xz<\/a>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 toolchain-\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u044b \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \/opt\/toolchains\/. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432:<\/p>\n<pre><code class=\"bash\">mkdir -p \/opt\/toolchains cd \/opt\/toolchains tar xJvf riscv64-RV64GC-linux-glibc-1.9.8.tar.xz tar xJvf riscv64-NONE-elf-newlib-1.9.8.tar.xz<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c toolchain-\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu-<\/code><\/pre>\n<p>\u041a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Make-\u0444\u0430\u0439\u043b\u0430\u0445 U-Boot \u0438\u043b\u0438 \u044f\u0434\u0440\u0430 Linux.<\/p>\n<h2>U-Boot<\/h2>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0438 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <a href=\"https:\/\/github.com\/starfive-tech\/\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/starfive-tech\/<\/a>: Tools, opensbi \u0438 u-boot. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Tools \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u0440\u0435\u0437\u044b, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0435\u0433\u0438 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c VF2_6.1_v3.8.2.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/starfive-tech\/Tools.git cd Tools git archive --format=tar --prefix=tools-20231107\/ 0747c0510e090f69bf7d2884f44903b77b3db5c5 | \\     xz >..\/tools-20231107.tar.xz  git clone https:\/\/github.com\/starfive-tech\/opensbi.git cd opensbi git archive --format=tar --prefix=opensbi-1.2-3.8.2\/ c6a092cd80112529cb2e92e180767ff5341b22a3 | \\     xz >..\/opensbi-1.2-3.8.2.tar.xz  git clone https:\/\/github.com\/starfive-tech\/u-boot.git cd u-boot git archive --format=tar --prefix=u-boot-2021.10-3.8.2\/ 84c81d3d0254adb8ae88d5e0633bf01c12436898 | \\     xz >..\/u-boot-2021.10-3.8.2.tar.xz<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u043e\u043d\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u0443\u0434\u0430\u043b\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\">rm -rf Tools opensbi u-boot<\/code><\/pre>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 \u0430\u0440\u0445\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">tar xJvf tools-20231107.tar.xz tar xJvf opensbi-1.2-3.8.2.tar.xz tar xJvf u-boot-2021.10-3.8.2.tar.xz<\/code><\/pre>\n<p>\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432:<\/p>\n<pre><code>. \u251c\u2500\u2500 opensbi-1.2-3.8.2 \u251c\u2500\u2500 tools-20231107 \u2514\u2500\u2500 u-boot-2021.10-3.8.2<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0438\u043c \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 spl_tool:<\/p>\n<pre><code class=\"bash\">cd tools-20231107\/spl_tool make<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0441\u0431\u043e\u0440\u043a\u0435 U-Boot, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0432 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b VisionFive2 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b starfive_visionfive2_defconfig, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 u-boot-2021.10-3.8.2\/configs\/. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u043f\u0440\u043e\u0431\u0435\u043b, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 starfive_visionfive2_defconfig \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"bash\"># Set BOOTDELAY options: CONFIG_BOOTDELAY=5 CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT=\"Hit SPACE in %d seconds to stop autoboot.\\n\" CONFIG_AUTOBOOT_STOP_STR=\" \"<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e CONFIG_BOOTCOMMAND:<\/p>\n<pre><code class=\"bash\">CONFIG_BOOTCOMMAND=\"run distro_bootcmd\"<\/code><\/pre>\n<p>\u041e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f U-Boot \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0434\u043d\u0435\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u0431\u043e\u0440\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 _build.sh \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh  suppress_host_varnings=\"-Wno-stringop-truncation\" suppress_target_varnings=\"-Wno-unused-variable -Wno-int-conversion -Wno-cpp -Wno-implicit-function-declaration\"  make starfive_visionfive2_defconfig ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu- make HOSTCFLAGS=\"${suppress_host_varnings}\" KCFLAGS=\"${suppress_target_varnings}\" ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu-<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c, \u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 make \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 u-boot-2021.10-3.8.2, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u0444\u0430\u0439\u043b\u044b u-boot-2021.10-3.8.2\/u-boot.bin \u0438 u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a u-boot-spl.bin \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b spl_tool, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">tools-20231107\/spl_tool\/spl_tool -c -f u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin<\/code><\/pre>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.normal.out.<\/p>\n<h2>OpenSBI<\/h2>\n<p> \u0421\u0431\u043e\u0440\u043a\u0443 opensbi, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 u-boot, \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh  U_BOOT_PATH=\"..\/u-boot-2021.10-3.8.2\"  make ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu- \\      PLATFORM=generic FW_PAYLOAD_PATH=${U_BOOT_PATH}\/u-boot.bin \\      FW_FDT_PATH=${U_BOOT_PATH}\/arch\/riscv\/dts\/starfive_visionfive2.dtb \\      FW_TEXT_START=0x40000000<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 opensbi-1.2-3.8.2\/, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b fw_payload.bin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a\u0430\u043a \u0438 SPL, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<pre><code class=\"bash\">OPENSBI_PATH=\"..\/..\/opensbi-1.2-3.8.2\" U_BOOT_PATH=\"..\/..\/u-boot-2021.10-3.8.2\" cd tools-20231107\/uboot_its cp ${OPENSBI_PATH}\/build\/platform\/generic\/firmware\/fw_payload.bin .\/ ${U_BOOT_PATH}\/tools\/mkimage -f visionfive2-uboot-fit-image.its \\                              -A riscv -O u-boot -T firmware visionfive2_fw_payload.img <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0430\u0434\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 tools-20231107\/uboot_its\/visionfive2_fw_payload.img.<\/p>\n<h2>QSPI Flash Layout<\/h2>\n<p>\u0418\u0442\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 QSPI Nor Flash.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 QSPI Nor Flash \u0436\u0435\u0441\u0442\u043a\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0438\u043c\u0435\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u0442\u0440\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c:<\/p>\n<pre><code>#    Offset |    Length | Size  | Part Name | Description # ----------+-----------+-------+-----------+----------------- #       0x0     0x40000    256k   spl         SPL #   0xf0000     0x10000     64k   uboot-env   U-Boot environment variables #  0x100000    0x300000   3072k   uboot       fw_payload.img (OpenSBI + U-Boot) #  0xf00000    0x100000   1024k   data        Reseved<\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 StarFive \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0430\u044f <a href=\"https:\/\/doc-en.rvspace.org\/VisionFive2\/Boot_UG\/JH7110_SDK\/boot_address_allocation.html\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e:<\/p>\n<pre><code class=\"css\"># # linux\/arch\/riscv\/boot\/dts\/starfive\/jh7110-visionfive-v2.dtsi: # &amp;qspi {     nor_flash: nor-flash@0 {     compatible = \"jedec,spi-nor\";     reg=&lt;0>;     cdns,read-delay = &lt;5>;     spi-max-frequency = &lt;100000000>;     cdns,tshsl-ns = &lt;1>;     cdns,tsd2d-ns = &lt;1>;     cdns,tchsh-ns = &lt;1>;     cdns,tslch-ns = &lt;1>;     status = \"okay\";          partitions {             compatible = \"fixed-partitions\";             #address-cells = &lt;1>;             #size-cells = &lt;1>;              spl@0 {                     reg = &lt;0x0 0x40000>;             };             uboot-env@f0000 {                     reg = &lt;0xf0000 0x10000>;             };             uboot@100000 {                     reg = &lt;0x100000 0x300000>;             };             data@f00000 {                     reg = &lt;0xf00000 0x100000>;             };         };     }; };<\/code><\/pre>\n<p>\u0432 dts-\u0444\u0430\u0439\u043b\u0435 linux\/arch\/riscv\/boot\/dts\/starfive\/jh7110-visionfive-v2.dtsi \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u044f\u0434\u0440\u0430 Linux. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0mtd-utils, \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0437\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 QSPI Nor Flash, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u0440\u0430\u0437 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b GD25Q128E \u043e\u0431\u044a\u0435\u043c\u043e\u043c 16MB:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh # # Create empty image: # image_file=visionfive2.spi-flash.image image_size_kb=16384  dd if=\/dev\/zero bs=1k count=${image_size_kb} | tr '\\000' '\\377' > ${image_file}   # # Clear U-Boot environment: # env_size_kb=64 dd if=\/dev\/zero of=${image_file} bs=1k count=${env_size_kb} seek=960 conv=notrunc  # # write spl: # spl_size_kb=256 dd if=u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.normal.out of=${image_file} bs=1k conv=notrunc  # # write fw_payload: # fw_size_kb=3072 dd if=tools-20231107\/uboot_its\/visionfive2_fw_payload.img of=${image_file} bs=1k seek=1024 conv=notrunc <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b <strong>visionfive2.spi-flash.image<\/strong>.<\/p>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440 CH341a<\/h2>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u0440\u0430\u0437\u0430\u00a0<strong>visionfive2.spi-flash.image<\/strong>\u00a0\u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>ch341a<\/strong> \u0438 \u043f\u0440\u0438\u0449\u0435\u043f\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0438\u0441\u0443\u043d\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/845\/762\/8c4\/8457628c40d0939b33edb25ba268d5e6.png\" alt=\"\u0420\u0438\u0441.2. CH341a Mini Programmer\" title=\"\u0420\u0438\u0441.2. CH341a Mini Programmer\" width=\"950\" height=\"536\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/845\/762\/8c4\/8457628c40d0939b33edb25ba268d5e6.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441.2. CH341a Mini Programmer<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0448\u0438\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043d \u0434\u0430\u0432\u0430\u043b \u043d\u0435 5V, \u0430 3.3V. \u00a0\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6554daffff7a727696ff70bc\" data-style=\"\" id=\"6554daffff7a727696ff70bc\" width=\"\"><\/div>\n<p>\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0448\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b\u00a0<a href=\"https:\/\/download.flashrom.org\/releases\/\" rel=\"noopener noreferrer nofollow\">flashrom<\/a>\u00a0\u0432\u0435\u0440\u0441\u0438\u0438\u00a01.3.0.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441.3, \u0442\u043e \u043d\u0430\u0431\u0440\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u00a0<strong>&#171;GD25LQ128C\/GD25LQ128D&#187;<\/strong>.<\/p>\n<pre><code class=\"bash\">bash-5.2# flashrom --programmer ch341a_spi -VV flashrom v1.2 on Linux 6.1.20 (x86_64) flashrom is free software, get the source code at https:\/\/flashrom.org flashrom was built with libpci 3.7.0, GCC 11.2.0, little endian Command line (3 args): flashrom --programmer ch341a_spi -VV Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Initializing ch341a_spi programmer Device revision is 3.0.4 The following protocols are supported: SPI. Probing for AMIC A25L010, 128 kB: probe_spi_rdid_generic: id1 0xc8, id2 0x6018 . . . Found GigaDevice flash chip \"GD25LQ128C\/GD25LQ128D\" (16384 kB, SPI). This chip may contain one-time programmable memory. flashrom cannot read and may never be able to write it, hence it may not be able to completely clone the contents of this chip (see man page for details). This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE The test status of this chip may have been updated in the latest development version of flashrom. If you are running the latest development version, please email a report to flashrom@flashrom.org if any of the above operations work correctly for you with this flash chip. Please include the flashrom log file for all operations you tested (see the man page for details), and mention which mainboard or programmer you tested in the subject line. Thanks for your help! No operations were specified. <\/code><\/pre>\n<p>\u041d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: PROBE READ ERASE WRITE \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438\u00a0flashrom\u00a0\u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0<strong>&#171;GD25Q128E&#187;<\/strong>\u00a0\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0442\u0435\u043c\u0438, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f\u00a0<strong>&#171;GD25LQ128C&#187;<\/strong>, \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043d\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/777\/724\/392\/77772439279b49f3475f7b2e31d6ea28.png\" alt=\"\u0420\u0438\u0441.3. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CH341A \u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0435 GD25Q128E\" title=\"\u0420\u0438\u0441.3. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CH341A \u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0435 GD25Q128E\" width=\"960\" height=\"1200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/777\/724\/392\/77772439279b49f3475f7b2e31d6ea28.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441.3. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 CH341A \u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0435 GD25Q128E<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0448\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u00a0<strong>visionfive2.spi-flash.image<\/strong>, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 GD25Q128E. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432:<\/p>\n<pre><code class=\"bash\">bash-5.2# flashrom --programmer ch341a_spi -r GD25Q128E.bin   -c \"GD25LQ128C\/GD25LQ128D\" bash-5.2# flashrom --programmer ch341a_spi -r GD25Q128E-2.bin -c \"GD25LQ128C\/GD25LQ128D\" bash-5.2# flashrom --programmer ch341a_spi -r GD25Q128E-3.bin -c \"GD25LQ128C\/GD25LQ128D\" bash-5.2# sha256sum GD25Q128E-2.bin GD25Q128E-3.bin GD25Q128E.bin 658de4da3c9ec801e8c0c2cee8ba07bfb387019a682a15d9350e0103d52e372f  GD25Q128E-2.bin 658de4da3c9ec801e8c0c2cee8ba07bfb387019a682a15d9350e0103d52e372f  GD25Q128E-3.bin 658de4da3c9ec801e8c0c2cee8ba07bfb387019a682a15d9350e0103d52e372f  GD25Q128E.bin <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u0432\u0435\u0440\u043d\u0430 \u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 GD25Q128E \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">bash-5.2# flashrom --programmer ch341a_spi --write visionfive2.spi-flash.image -c \"GD25LQ128C\/GD25LQ128D\" <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">bash-5.2# flashrom --programmer ch341a_spi --write visionfive2.spi-flash.image -c \"GD25LQ128C\/GD25LQ128D\" flashrom v1.2 on Linux 6.1.20 (x86_64) flashrom is free software, get the source code at https:\/\/flashrom.org Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Found GigaDevice flash chip \"GD25LQ128C\/GD25LQ128D\" (16384 kB, SPI) on ch341a_spi. .  .  . Reading old flash chip contents... done. Erasing and writing flash chip... Erase\/write done. Verifying flash... VERIFIED. <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 \u0432\u043f\u0440\u0430\u0432\u043e (<code>RGPIO_0 = 0, RGPIO_1 = 0<\/code>), \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441.4 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d00\/48c\/dda\/d0048cdda96a469120b575c5e0b9f2f4.png\" alt=\"\u0420\u0438\u0441.4. VisionFive2 RGPIO_0 = 0, RGPIO_1 = 0\" title=\"\u0420\u0438\u0441.4. VisionFive2 RGPIO_0 = 0, RGPIO_1 = 0\" width=\"1090\" height=\"940\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d00\/48c\/dda\/d0048cdda96a469120b575c5e0b9f2f4.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441.4. VisionFive2 RGPIO_0 = 0, RGPIO_1 = 0<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 UART-to-USB \u0430\u0434\u0430\u043f\u0442\u0435\u0440, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441.4, \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 115200n8, \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"assembly\">U-Boot SPL 2021.10 (Feb 12 2023 - 18:15:33 +0800) DDR version: dc2e84f0. Trying to boot from SPI  OpenSBI v1.2    ____                    _____ ____ _____   \/ __ \\                  \/ ____|  _ \\_   _|  | |  | |_ __   ___ _ __ | (___ | |_) || |  | |  | | '_ \\ \/ _ \\ '_ \\ \\___ \\|  _ &lt; | |  | |__| | |_) |  __\/ | | |____) | |_) || |_   \\____\/| .__\/ \\___|_| |_|_____\/|____\/_____|         | |         |_|  Platform Name             : StarFive VisionFive V2 Platform Features         : medeleg Platform HART Count       : 5 Platform IPI Device       : aclint-mswi Platform Timer Device     : aclint-mtimer @ 4000000Hz Platform Console Device   : uart8250 Platform HSM Device       : jh7110-hsm Platform PMU Device       : --- Platform Reboot Device    : pm-reset Platform Shutdown Device  : pm-reset Firmware Base             : 0x40000000 Firmware Size             : 292 KB Runtime SBI Version       : 1.0    .  .  .   .  .  .   .  .  .  In:    serial@10000000 Out:   serial@10000000 Err:   serial@10000000 Model: StarFive VisionFive V2 Net:   eth0: ethernet@16030000, eth1: ethernet@16040000 switch to partitions #0, OK mmc1 is current device found device 1 bootmode flash device 1 ** Invalid partition 3 ** Couldn't find partition mmc 1:3 Can't set block device ** Invalid partition 3 ** Couldn't find partition mmc 1:3 Can't set block device Hit any key to stop autoboot:  2  0 StarFive #   <\/code><\/pre>\n<h2>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f U-Boot<\/h2>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 U-Boot \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 OS \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Debian, Ubuntu, Fedora. \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>CONFIG_BOOTCOMMAND<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 u-boot-2021.10-3.8.2\/configs\/starfive_visionfive2_defconfig. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0438\u0445 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 QSPI Nor Flash.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 U-Boot, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0437\u0434\u0435\u0441\u044c patch:<\/p>\n<pre><code class=\"diff\">diff --unified -Nr u-boot-2021.10-3.8.2-orig\/include\/config_distro_bootcmd.h u-boot-2021.10-3.8.2\/include\/config_distro_bootcmd.h --- u-boot-2021.10-3.8.2-orig\/include\/config_distro_bootcmd.h2023-10-18 15:15:18.000000000 +0300 +++ u-boot-2021.10-3.8.2\/include\/config_distro_bootcmd.h2023-11-13 20:59:08.609989837 +0300 @@ -37,7 +37,7 @@    #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \\  \"bootcmd_\" #devtypel #instance \"=\" \\ -\"devnum=\" #instance \"; \" \\ +\"setenv devnum \" #instance \"; \" \\  \"run \" #devtypel \"_boot\\0\"    #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \\ diff --unified -Nr u-boot-2021.10-3.8.2-orig\/include\/configs\/starfive-visionfive2.h u-boot-2021.10-3.8.2\/include\/configs\/starfive-visionfive2.h --- u-boot-2021.10-3.8.2-orig\/include\/configs\/starfive-visionfive2.h2023-10-18 15:15:18.000000000 +0300 +++ u-boot-2021.10-3.8.2\/include\/configs\/starfive-visionfive2.h2023-11-13 20:59:08.609989837 +0300 @@ -82,7 +82,7 @@  #endif    \/* HACK these should have '#if defined (stuff) around them like zynqp*\/ -#define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 0) func(DHCP, dhcp, na) +#define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 1) func(MMC, mmc, 0) func(NVME, nvme, 0) func(DHCP, dhcp, na)    #include &lt;config_distro_bootcmd.h>   @@ -202,6 +202,7 @@  \"bootenv=uEnv.txt\\0\"\\  \"bootenv_sdk=vf2_uEnv.txt\\0\"\\  \"boot_devs=mmc nvme\\0\"\\ +\"nvme_devnum=0\\0\" \\  \"emmc_devnum=0\\0\" \\  \"sd_devnum=1\\0\"\\  \"mmc_devnum_l=1 0\\0\"\\ @@ -261,6 +262,8 @@  \"bootdir=\/boot\\0\"\\  \"bootpart=3\\0\"\\  \"rootpart=4\\0\"\\ +\"bootcmd_nvme1=setenv devnum 1; run mmc_boot\\0\"\\ +\"bootcmd_nvme0=setenv devnum 0; run nvme_boot\\0\"\\  \"load_distro_uenv=\"\\  \"fatload ${bootdev} ${devnum}:${bootpart} ${loadaddr} \/${bootenv}; \" \\  \"env import ${loadaddr} ${filesize}; \\0\" \\ <\/code><\/pre>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432: mmc1, mmc0, nvme0, dhcp \u0438, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043d\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c GRUB \u0441 NVME \u0434\u0438\u0441\u043a\u0430.<\/p>\n<hr\/>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 <strong>visionfive2.spi-flash.image<\/strong> \u0434\u043b\u044f GD25Q128E \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441 <a href=\"https:\/\/ftp.radix.pro\/radix\/system\/releases\/1.9.219\/riscv64-glibc\/visionfive2\/\" rel=\"noopener noreferrer nofollow\">FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a>, \u0433\u0434\u0435 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a <a href=\"https:\/\/radix.pro\/\" rel=\"noopener noreferrer nofollow\">Radix cross Linux<\/a> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 <a href=\"https:\/\/radix.pro\/devices\/visionfive2\/\" rel=\"noopener noreferrer nofollow\">VisionFive2<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/773852\/\"> https:\/\/habr.com\/ru\/articles\/773852\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0444\u0435\u0432\u0440\u0430\u043b\u0435 2023 \u0433\u043e\u0434\u0430, \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0443 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043f\u043b\u0430\u0442\u044b <a href=\"https:\/\/www.starfivetech.com\/en\/site\/boards\/\" rel=\"noopener noreferrer nofollow\">VisionFive2<\/a> , \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 8GB LPDDR4 \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.starfivetech.com\/en\/site\/company\/\" rel=\"noopener noreferrer nofollow\">StarFive<\/a>. \u041f\u043e \u0441\u0443\u0442\u0438 VisionFive2 &#8212; \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 RISC-V \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 (SBC) \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c (GPU). <strong>\u0418 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043d\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c<\/strong>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 <a href=\"https:\/\/doc-en.rvspace.org\/VisionFive2\/Product_Brief\/VisionFive_2\/specification_pb.html\" rel=\"noopener noreferrer nofollow\">\u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438<\/a>.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441.1. VisionFive 2 SBC<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e VisionFive2 \u0438\u043c\u0435\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u044f\u0434\u0435\u0440\u043d\u044b\u0439 64-\u0431\u0438\u0442\u043d\u044b\u0439 SoC c ISA RV64GC, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445 \u0434\u043e 1.5 GHz, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c IMG BXE-4-32 MC1, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 OpenCL 3.0, OpenGL ES 3.2 \u0438 Vulkan 1.2. \u041d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u044f\u043d\u043e 2\/4\/8 GB LPDDR4 RAM. \u0418\u043c\u0435\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u044a\u0435\u043c M.2, \u0440\u0430\u0437\u044a\u0435\u043c eMMC, \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0440\u0442\u0430 USB 3.0, 40-\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u044a\u0435\u043c GPIO, \u0434\u0432\u0430 \u043f\u043e\u0440\u0442\u0430 Gigabit Ethernet, \u0441\u043b\u043e\u0442 \u0434\u043b\u044f TF-\u043a\u0430\u0440\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0430\u0445, \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u044f\u0434\u0440\u0430 Linux \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<h2>Toolchains<\/h2>\n<p>\u041c\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u0432\u0430 toolchain-\u0430, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 GCC-12.2.0 \u0438 GNU Libc 2.37, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/www.gigadevice.com\/product\/mcu\/risc-v\/\" rel=\"noopener noreferrer nofollow\">GD32VF103<\/a>. \u0414\u0430\u043d\u043d\u044b\u0435 toolchain-\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/\" rel=\"noopener noreferrer nofollow\">x86_64\/1.9.8<\/a>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 <a href=\"https:\/\/ftp.radix.pro\/\" rel=\"noopener noreferrer nofollow\">https:\/\/ftp.radix.pro<\/a>. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 toolchain-\u044b: <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/riscv64-RV64GC-linux-glibc-1.9.8.tar.xz\" rel=\"noopener noreferrer nofollow\">riscv64-RV64GC-linux-glibc-1.9.8.tar.xz<\/a> \u0438 <a href=\"https:\/\/ftp.radix.pro\/radix\/toolchains\/x86_64\/1.9.8\/riscv64-NONE-elf-newlib-1.9.8.tar.xz\" rel=\"noopener noreferrer nofollow\">riscv64-NONE-elf-newlib-1.9.8.tar.xz<\/a>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 toolchain-\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u044b \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \/opt\/toolchains\/. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432:<\/p>\n<pre><code class=\"bash\">mkdir -p \/opt\/toolchains cd \/opt\/toolchains tar xJvf riscv64-RV64GC-linux-glibc-1.9.8.tar.xz tar xJvf riscv64-NONE-elf-newlib-1.9.8.tar.xz<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c toolchain-\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu-<\/code><\/pre>\n<p>\u041a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Make-\u0444\u0430\u0439\u043b\u0430\u0445 U-Boot \u0438\u043b\u0438 \u044f\u0434\u0440\u0430 Linux.<\/p>\n<h2>U-Boot<\/h2>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0438 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <a href=\"https:\/\/github.com\/starfive-tech\/\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/starfive-tech\/<\/a>: Tools, opensbi \u0438 u-boot. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Tools \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u0440\u0435\u0437\u044b, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0435\u0433\u0438 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c VF2_6.1_v3.8.2.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/starfive-tech\/Tools.git cd Tools git archive --format=tar --prefix=tools-20231107\/ 0747c0510e090f69bf7d2884f44903b77b3db5c5 | \\     xz >..\/tools-20231107.tar.xz  git clone https:\/\/github.com\/starfive-tech\/opensbi.git cd opensbi git archive --format=tar --prefix=opensbi-1.2-3.8.2\/ c6a092cd80112529cb2e92e180767ff5341b22a3 | \\     xz >..\/opensbi-1.2-3.8.2.tar.xz  git clone https:\/\/github.com\/starfive-tech\/u-boot.git cd u-boot git archive --format=tar --prefix=u-boot-2021.10-3.8.2\/ 84c81d3d0254adb8ae88d5e0633bf01c12436898 | \\     xz >..\/u-boot-2021.10-3.8.2.tar.xz<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u043e\u043d\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u0443\u0434\u0430\u043b\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\">rm -rf Tools opensbi u-boot<\/code><\/pre>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 \u0430\u0440\u0445\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">tar xJvf tools-20231107.tar.xz tar xJvf opensbi-1.2-3.8.2.tar.xz tar xJvf u-boot-2021.10-3.8.2.tar.xz<\/code><\/pre>\n<p>\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432:<\/p>\n<pre><code>. \u251c\u2500\u2500 opensbi-1.2-3.8.2 \u251c\u2500\u2500 tools-20231107 \u2514\u2500\u2500 u-boot-2021.10-3.8.2<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0438\u043c \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 spl_tool:<\/p>\n<pre><code class=\"bash\">cd tools-20231107\/spl_tool make<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0441\u0431\u043e\u0440\u043a\u0435 U-Boot, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0432 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b VisionFive2 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b starfive_visionfive2_defconfig, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 u-boot-2021.10-3.8.2\/configs\/. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u043f\u0440\u043e\u0431\u0435\u043b, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 starfive_visionfive2_defconfig \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"bash\"># Set BOOTDELAY options: CONFIG_BOOTDELAY=5 CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT=\"Hit SPACE in %d seconds to stop autoboot.\\n\" CONFIG_AUTOBOOT_STOP_STR=\" \"<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e CONFIG_BOOTCOMMAND:<\/p>\n<pre><code class=\"bash\">CONFIG_BOOTCOMMAND=\"run distro_bootcmd\"<\/code><\/pre>\n<p>\u041e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f U-Boot \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0434\u043d\u0435\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u0431\u043e\u0440\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 _build.sh \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh  suppress_host_varnings=\"-Wno-stringop-truncation\" suppress_target_varnings=\"-Wno-unused-variable -Wno-int-conversion -Wno-cpp -Wno-implicit-function-declaration\"  make starfive_visionfive2_defconfig ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu- make HOSTCFLAGS=\"${suppress_host_varnings}\" KCFLAGS=\"${suppress_target_varnings}\" ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu-<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c, \u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 make \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 u-boot-2021.10-3.8.2, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u0444\u0430\u0439\u043b\u044b u-boot-2021.10-3.8.2\/u-boot.bin \u0438 u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a u-boot-spl.bin \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b spl_tool, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">tools-20231107\/spl_tool\/spl_tool -c -f u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin<\/code><\/pre>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.normal.out.<\/p>\n<h2>OpenSBI<\/h2>\n<p> \u0421\u0431\u043e\u0440\u043a\u0443 opensbi, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 u-boot, \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh  U_BOOT_PATH=\"..\/u-boot-2021.10-3.8.2\"  make ARCH=riscv CROSS_COMPILE=\/opt\/toolchains\/riscv64-RV64GC-linux-glibc\/1.9.8\/bin\/riscv64-rv64gc-linux-gnu- \\      PLATFORM=generic FW_PAYLOAD_PATH=${U_BOOT_PATH}\/u-boot.bin \\      FW_FDT_PATH=${U_BOOT_PATH}\/arch\/riscv\/dts\/starfive_visionfive2.dtb \\      FW_TEXT_START=0x40000000<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 opensbi-1.2-3.8.2\/, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b fw_payload.bin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a\u0430\u043a \u0438 SPL, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<pre><code class=\"bash\">OPENSBI_PATH=\"..\/..\/opensbi-1.2-3.8.2\" U_BOOT_PATH=\"..\/..\/u-boot-2021.10-3.8.2\" cd tools-20231107\/uboot_its cp ${OPENSBI_PATH}\/build\/platform\/generic\/firmware\/fw_payload.bin .\/ ${U_BOOT_PATH}\/tools\/mkimage -f visionfive2-uboot-fit-image.its \\                              -A riscv -O u-boot -T firmware visionfive2_fw_payload.img <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0430\u0434\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 tools-20231107\/uboot_its\/visionfive2_fw_payload.img.<\/p>\n<h2>QSPI Flash Layout<\/h2>\n<p>\u0418\u0442\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 QSPI Nor Flash.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 QSPI Nor Flash \u0436\u0435\u0441\u0442\u043a\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0438\u043c\u0435\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u0442\u0440\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c:<\/p>\n<pre><code>#    Offset |    Length | Size  | Part Name | Description # ----------+-----------+-------+-----------+----------------- #       0x0     0x40000    256k   spl         SPL #   0xf0000     0x10000     64k   uboot-env   U-Boot environment variables #  0x100000    0x300000   3072k   uboot       fw_payload.img (OpenSBI + U-Boot) #  0xf00000    0x100000   1024k   data        Reseved<\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 StarFive \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0430\u044f <a href=\"https:\/\/doc-en.rvspace.org\/VisionFive2\/Boot_UG\/JH7110_SDK\/boot_address_allocation.html\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e:<\/p>\n<pre><code class=\"css\"># # linux\/arch\/riscv\/boot\/dts\/starfive\/jh7110-visionfive-v2.dtsi: # &amp;qspi {     nor_flash: nor-flash@0 {     compatible = \"jedec,spi-nor\";     reg=&lt;0>;     cdns,read-delay = &lt;5>;     spi-max-frequency = &lt;100000000>;     cdns,tshsl-ns = &lt;1>;     cdns,tsd2d-ns = &lt;1>;     cdns,tchsh-ns = &lt;1>;     cdns,tslch-ns = &lt;1>;     status = \"okay\";          partitions {             compatible = \"fixed-partitions\";             #address-cells = &lt;1>;             #size-cells = &lt;1>;              spl@0 {                     reg = &lt;0x0 0x40000>;             };             uboot-env@f0000 {                     reg = &lt;0xf0000 0x10000>;             };             uboot@100000 {                     reg = &lt;0x100000 0x300000>;             };             data@f00000 {                     reg = &lt;0xf00000 0x100000>;             };         };     }; };<\/code><\/pre>\n<p>\u0432 dts-\u0444\u0430\u0439\u043b\u0435 linux\/arch\/riscv\/boot\/dts\/starfive\/jh7110-visionfive-v2.dtsi \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u044f\u0434\u0440\u0430 Linux. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0mtd-utils, \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0437\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 QSPI Nor Flash, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u0440\u0430\u0437 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b GD25Q128E \u043e\u0431\u044a\u0435\u043c\u043e\u043c 16MB:<\/p>\n<pre><code class=\"bash\">#!\/bin\/sh # # Create empty image: # image_file=visionfive2.spi-flash.image image_size_kb=16384  dd if=\/dev\/zero bs=1k count=${image_size_kb} | tr '\\000' '\\377' > ${image_file}   # # Clear U-Boot environment: # env_size_kb=64 dd if=\/dev\/zero of=${image_file} bs=1k count=${env_size_kb} seek=960 conv=notrunc  # # write spl: # spl_size_kb=256 dd if=u-boot-2021.10-3.8.2\/spl\/u-boot-spl.bin.normal.out of=${image_file} bs=1k conv=notrunc  # # write fw_payload: # fw_size_kb=3072 dd if=tools-20231107\/uboot_its\/visionfive2_fw_payload.img of=${image_file} bs=1k seek=1024 conv=notrunc <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u0439\u043b <strong>visionfive2.spi-flash.image<\/strong>.<\/p>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440 CH341a<\/h2>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u0440\u0430\u0437\u0430\u00a0<strong>visionfive2.spi-flash.image<\/strong>\u00a0\u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>ch341a<\/strong> \u0438 \u043f\u0440\u0438\u0449\u0435\u043f\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0438\u0441\u0443\u043d\u043a\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441.2. CH341a Mini Programmer<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0448\u0438\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043d \u0434\u0430\u0432\u0430\u043b \u043d\u0435 5V, \u0430 3.3V. \u00a0\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6554daffff7a727696ff70bc\" data-style=\"\" id=\"6554daffff7a727696ff70bc\" width=\"\"><\/div>\n<p>\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0448\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b\u00a0<a href=\"https:\/\/download.flashrom.org\/releases\/\" rel=\"noopener noreferrer nofollow\">flashrom<\/a>\u00a0\u0432\u0435\u0440\u0441\u0438\u0438\u00a01.3.0.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441.3, \u0442\u043e \u043d\u0430\u0431\u0440\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u00a0<strong>&#171;GD25LQ128C\/GD25LQ128D&#187;<\/strong>.<\/p>\n<pre><code class=\"bash\">bash-5.2# flashrom --programmer ch341a_spi -VV flashrom v1.2 on Linux 6.1.20 (x86_64) flashrom is free software, get the source code at https:\/\/flashrom.org flashrom was built with libpci 3.7.0, GCC 11.2.0, little endian Command line (3 args): flashrom --programmer ch341a_spi -VV Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-360116","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360116"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/360116\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}