From c1bb6287d299628fa6753e155e82510c373a567a Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Sat, 25 Jul 2026 18:01:43 +0400 Subject: vendor alt-rootfs-installer v0.7.4 --- alt-rootfs-installer/.gear/rules | 2 + .../tags/b087d31c15de7b47929a9ce5814e33ee9b984f72 | 22 + alt-rootfs-installer/.gear/tags/list | 1 + alt-rootfs-installer/.gear/upstream/remotes | 3 + alt-rootfs-installer/AUTHORS | 10 + alt-rootfs-installer/COPYING | 340 +++++++++ alt-rootfs-installer/EXTRA_OPTIONS | 18 + alt-rootfs-installer/README | 18 + alt-rootfs-installer/SUPPORTED-BOARDS | 96 +++ alt-rootfs-installer/alt-rootfs-installer | 765 +++++++++++++++++++++ alt-rootfs-installer/alt-rootfs-installer.spec | 252 +++++++ alt-rootfs-installer/boards.d/a64-olinuxino | 1 + alt-rootfs-installer/boards.d/a64-olinuxino-emmc | 1 + alt-rootfs-installer/boards.d/amarula_a64_relic | 1 + .../boards.d/anbernic-rg552-rk3399 | 1 + .../boards.d/anbernic-rgxx3-rk3566 | 1 + alt-rootfs-installer/boards.d/anbernic_rg35xx_h700 | 1 + alt-rootfs-installer/boards.d/atb-uspd20k | 1 + alt-rootfs-installer/boards.d/bananapi-f3 | 1 + alt-rootfs-installer/boards.d/bananapi_m2_plus_h5 | 1 + alt-rootfs-installer/boards.d/bananapi_m64 | 1 + alt-rootfs-installer/boards.d/beelink_gs1 | 1 + alt-rootfs-installer/boards.d/bpi-r2-pro-rk3568 | 1 + alt-rootfs-installer/boards.d/chromebook_bob | 1 + alt-rootfs-installer/boards.d/chromebook_kevin | 1 + alt-rootfs-installer/boards.d/cm3588-nas-rk3588 | 1 + alt-rootfs-installer/boards.d/coolpi-4b-rk3588s | 1 + .../boards.d/coolpi-cm5-evb-rk3588 | 1 + .../boards.d/coolpi-cm5-genbook-rk3588 | 1 + alt-rootfs-installer/boards.d/eaidk-610-rk3399 | 1 + .../boards.d/emlid_neutis_n5_devboard | 1 + alt-rootfs-installer/boards.d/evb-px30 | 1 + alt-rootfs-installer/boards.d/evb-rk3328 | 1 + alt-rootfs-installer/boards.d/evb-rk3399 | 1 + alt-rootfs-installer/boards.d/evb-rk3568 | 1 + alt-rootfs-installer/boards.d/evb-rk3588 | 1 + alt-rootfs-installer/boards.d/ficus-rk3399 | 1 + alt-rootfs-installer/boards.d/firefly-px30 | 1 + alt-rootfs-installer/boards.d/firefly-rk3399 | 1 + .../boards.d/gameforce-ace-rk3588s | 1 + alt-rootfs-installer/boards.d/generic-rk3568 | 1 + alt-rootfs-installer/boards.d/generic-rk3588 | 1 + alt-rootfs-installer/boards.d/jaguar-rk3588 | 1 + .../boards.d/khadas-edge-captain-rk3399 | 1 + alt-rootfs-installer/boards.d/khadas-edge-rk3399 | 1 + alt-rootfs-installer/boards.d/khadas-edge-v-rk3399 | 1 + alt-rootfs-installer/boards.d/khadas-edge2-rk3588s | 1 + alt-rootfs-installer/boards.d/lckfb-tspi-rk3566 | 1 + alt-rootfs-installer/boards.d/leez-rk3399 | 1 + .../boards.d/libretech_all_h3_cc_h5 | 1 + .../boards.d/libretech_all_h3_it_h5 | 1 + .../boards.d/libretech_all_h5_cc_h5 | 1 + alt-rootfs-installer/boards.d/lichee_rv | 1 + alt-rootfs-installer/boards.d/lubancat-2-rk3568 | 1 + alt-rootfs-installer/boards.d/milkv-jupiter | 1 + alt-rootfs-installer/boards.d/nanopc-t4-rk3399 | 1 + alt-rootfs-installer/boards.d/nanopc-t6-rk3588 | 1 + alt-rootfs-installer/boards.d/nanopi-m4-2gb-rk3399 | 1 + alt-rootfs-installer/boards.d/nanopi-m4-rk3399 | 1 + alt-rootfs-installer/boards.d/nanopi-m4b-rk3399 | 1 + alt-rootfs-installer/boards.d/nanopi-neo4-rk3399 | 1 + .../boards.d/nanopi-r2c-plus-rk3328 | 1 + alt-rootfs-installer/boards.d/nanopi-r2c-rk3328 | 1 + .../boards.d/nanopi-r2s-plus-rk3328 | 1 + alt-rootfs-installer/boards.d/nanopi-r2s-rk3328 | 1 + alt-rootfs-installer/boards.d/nanopi-r3s-rk3566 | 1 + alt-rootfs-installer/boards.d/nanopi-r4s-rk3399 | 1 + alt-rootfs-installer/boards.d/nanopi-r5c-rk3568 | 1 + alt-rootfs-installer/boards.d/nanopi-r5s-rk3568 | 1 + alt-rootfs-installer/boards.d/nanopi-r6c-rk3588s | 1 + alt-rootfs-installer/boards.d/nanopi-r6s-rk3588s | 1 + alt-rootfs-installer/boards.d/nanopi_a64 | 1 + alt-rootfs-installer/boards.d/nanopi_neo2 | 1 + alt-rootfs-installer/boards.d/nanopi_neo_plus2 | 1 + alt-rootfs-installer/boards.d/nanopi_r1s_h5 | 1 + alt-rootfs-installer/boards.d/neu6a-io-rk3588 | 1 + alt-rootfs-installer/boards.d/neu6b-io-rk3588 | 1 + alt-rootfs-installer/boards.d/nezha | 1 + alt-rootfs-installer/boards.d/nova-rk3588s | 1 + alt-rootfs-installer/boards.d/np-504a-rk3568 | 1 + alt-rootfs-installer/boards.d/oceanic_5205_5inmfd | 1 + alt-rootfs-installer/boards.d/odroid-go2 | 1 + alt-rootfs-installer/boards.d/odroid-m1-rk3568 | 1 + alt-rootfs-installer/boards.d/odroid-m1s-rk3566 | 1 + alt-rootfs-installer/boards.d/odroid-m2-rk3588s | 1 + alt-rootfs-installer/boards.d/orangepi-3b-rk3566 | 1 + .../boards.d/orangepi-4-lts-rk3399 | 1 + alt-rootfs-installer/boards.d/orangepi-4-rk3399 | 1 + .../boards.d/orangepi-5-max-rk3588 | 1 + .../boards.d/orangepi-5-plus-rk3588 | 1 + alt-rootfs-installer/boards.d/orangepi-5-rk3588s | 1 + .../boards.d/orangepi-5-ultra-rk3588 | 1 + .../boards.d/orangepi-r1-plus-lts-rk3328 | 1 + .../boards.d/orangepi-r1-plus-rk3328 | 1 + alt-rootfs-installer/boards.d/orangepi-rk3399 | 1 + alt-rootfs-installer/boards.d/orangepi-rv2 | 1 + alt-rootfs-installer/boards.d/orangepi_3 | 1 + alt-rootfs-installer/boards.d/orangepi_lite2 | 1 + alt-rootfs-installer/boards.d/orangepi_one_plus | 1 + alt-rootfs-installer/boards.d/orangepi_pc2 | 1 + alt-rootfs-installer/boards.d/orangepi_prime | 1 + alt-rootfs-installer/boards.d/orangepi_win | 1 + alt-rootfs-installer/boards.d/orangepi_zero2 | 1 + alt-rootfs-installer/boards.d/orangepi_zero2w | 1 + alt-rootfs-installer/boards.d/orangepi_zero3 | 1 + alt-rootfs-installer/boards.d/orangepi_zero_plus | 1 + alt-rootfs-installer/boards.d/orangepi_zero_plus2 | 1 + alt-rootfs-installer/boards.d/pine64-lts | 1 + alt-rootfs-installer/boards.d/pine64_plus | 1 + alt-rootfs-installer/boards.d/pine64_star64 | 1 + alt-rootfs-installer/boards.d/pine_h64 | 1 + alt-rootfs-installer/boards.d/pinebook | 1 + alt-rootfs-installer/boards.d/pinebook-pro-rk3399 | 1 + alt-rootfs-installer/boards.d/pinephone | 1 + alt-rootfs-installer/boards.d/pinephone-pro-rk3399 | 1 + alt-rootfs-installer/boards.d/pinetab | 1 + alt-rootfs-installer/boards.d/pinetab2-rk3566 | 1 + alt-rootfs-installer/boards.d/powkiddy-x35s-rk3566 | 1 + alt-rootfs-installer/boards.d/powkiddy-x55-rk3566 | 1 + alt-rootfs-installer/boards.d/puma-rk3399 | 1 + .../boards.d/px30-core-ctouch2-of10-px30 | 1 + .../boards.d/px30-core-ctouch2-px30 | 1 + .../boards.d/px30-core-edimm2.2-px30 | 1 + alt-rootfs-installer/boards.d/qnap-ts433-rk3568 | 1 + alt-rootfs-installer/boards.d/quartz64-a-rk3566 | 1 + alt-rootfs-installer/boards.d/quartz64-b-rk3566 | 1 + alt-rootfs-installer/boards.d/quartzpro64-rk3588 | 1 + alt-rootfs-installer/boards.d/radxa-cm3-io-rk3566 | 1 + alt-rootfs-installer/boards.d/radxa-e25-rk3568 | 1 + alt-rootfs-installer/boards.d/radxa-zero-3-rk3566 | 1 + alt-rootfs-installer/boards.d/repka_pi3 | 1 + alt-rootfs-installer/boards.d/repka_pi4 | 1 + alt-rootfs-installer/boards.d/ringneck-px30 | 1 + alt-rootfs-installer/boards.d/roc-cc-rk3328 | 1 + .../boards.d/roc-pc-mezzanine-rk3399 | 1 + alt-rootfs-installer/boards.d/roc-pc-rk3399 | 1 + alt-rootfs-installer/boards.d/rock-3a-rk3568 | 1 + alt-rootfs-installer/boards.d/rock-3b-rk3568 | 1 + alt-rootfs-installer/boards.d/rock-3c-rk3566 | 1 + alt-rootfs-installer/boards.d/rock-4c-plus-rk3399 | 1 + alt-rootfs-installer/boards.d/rock-4se-rk3399 | 1 + alt-rootfs-installer/boards.d/rock-5-itx-rk3588 | 1 + alt-rootfs-installer/boards.d/rock-5c-rk3588s | 1 + alt-rootfs-installer/boards.d/rock-pi-4-rk3399 | 1 + alt-rootfs-installer/boards.d/rock-pi-4c-rk3399 | 1 + alt-rootfs-installer/boards.d/rock-pi-e-rk3328 | 1 + alt-rootfs-installer/boards.d/rock-pi-e-v3-rk3328 | 1 + .../boards.d/rock-pi-n10-rk3399pro | 1 + alt-rootfs-installer/boards.d/rock5a-rk3588s | 1 + alt-rootfs-installer/boards.d/rock5b-rk3588 | 1 + alt-rootfs-installer/boards.d/rock64-rk3328 | 1 + alt-rootfs-installer/boards.d/rock960-rk3399 | 1 + alt-rootfs-installer/boards.d/rockpro64-rk3399 | 1 + alt-rootfs-installer/boards.d/sifive_unleashed | 1 + alt-rootfs-installer/boards.d/sifive_unmatched | 1 + alt-rootfs-installer/boards.d/sige7-rk3588 | 1 + alt-rootfs-installer/boards.d/sopine_baseboard | 1 + .../boards.d/soquartz-blade-rk3566 | 1 + alt-rootfs-installer/boards.d/soquartz-cm4-rk3566 | 1 + .../boards.d/soquartz-model-a-rk3566 | 1 + alt-rootfs-installer/boards.d/starfive_visionfive2 | 1 + alt-rootfs-installer/boards.d/tanix_tx1 | 1 + alt-rootfs-installer/boards.d/tanix_tx6 | 1 + alt-rootfs-installer/boards.d/teres_i | 1 + alt-rootfs-installer/boards.d/tiger-rk3588 | 1 + alt-rootfs-installer/boards.d/toybrick-rk3588 | 1 + alt-rootfs-installer/boards.d/transpeed-8k618-t | 1 + alt-rootfs-installer/boards.d/turing-rk1-rk3588 | 1 + alt-rootfs-installer/boards.d/x96_mate | 1 + alt-rootfs-installer/functions | 480 +++++++++++++ alt-rootfs-installer/log | 145 ++++ alt-rootfs-installer/shell-config | 91 +++ alt-rootfs-installer/shell-error | 41 ++ alt-rootfs-installer/shell-terminfo | 206 ++++++ alt-rootfs-installer/socs.d/AllWinner-aarch64.sh | 36 + alt-rootfs-installer/socs.d/AllWinner-riscv64.sh | 47 ++ alt-rootfs-installer/socs.d/K1x-riscv64.sh | 92 +++ alt-rootfs-installer/socs.d/Rockchips-aarch64.sh | 60 ++ alt-rootfs-installer/socs.d/SiFive-riscv64.sh | 61 ++ alt-rootfs-installer/socs.d/StarFive-riscv64.sh | 79 +++ alt-rootfs-installer/socs.d/unknown-soc.sh | 9 + 181 files changed, 3032 insertions(+) create mode 100644 alt-rootfs-installer/.gear/rules create mode 100644 alt-rootfs-installer/.gear/tags/b087d31c15de7b47929a9ce5814e33ee9b984f72 create mode 100644 alt-rootfs-installer/.gear/tags/list create mode 100644 alt-rootfs-installer/.gear/upstream/remotes create mode 100644 alt-rootfs-installer/AUTHORS create mode 100644 alt-rootfs-installer/COPYING create mode 100644 alt-rootfs-installer/EXTRA_OPTIONS create mode 100644 alt-rootfs-installer/README create mode 100644 alt-rootfs-installer/SUPPORTED-BOARDS create mode 100755 alt-rootfs-installer/alt-rootfs-installer create mode 100644 alt-rootfs-installer/alt-rootfs-installer.spec create mode 120000 alt-rootfs-installer/boards.d/a64-olinuxino create mode 120000 alt-rootfs-installer/boards.d/a64-olinuxino-emmc create mode 120000 alt-rootfs-installer/boards.d/amarula_a64_relic create mode 120000 alt-rootfs-installer/boards.d/anbernic-rg552-rk3399 create mode 120000 alt-rootfs-installer/boards.d/anbernic-rgxx3-rk3566 create mode 120000 alt-rootfs-installer/boards.d/anbernic_rg35xx_h700 create mode 120000 alt-rootfs-installer/boards.d/atb-uspd20k create mode 120000 alt-rootfs-installer/boards.d/bananapi-f3 create mode 120000 alt-rootfs-installer/boards.d/bananapi_m2_plus_h5 create mode 120000 alt-rootfs-installer/boards.d/bananapi_m64 create mode 120000 alt-rootfs-installer/boards.d/beelink_gs1 create mode 120000 alt-rootfs-installer/boards.d/bpi-r2-pro-rk3568 create mode 120000 alt-rootfs-installer/boards.d/chromebook_bob create mode 120000 alt-rootfs-installer/boards.d/chromebook_kevin create mode 120000 alt-rootfs-installer/boards.d/cm3588-nas-rk3588 create mode 120000 alt-rootfs-installer/boards.d/coolpi-4b-rk3588s create mode 120000 alt-rootfs-installer/boards.d/coolpi-cm5-evb-rk3588 create mode 120000 alt-rootfs-installer/boards.d/coolpi-cm5-genbook-rk3588 create mode 120000 alt-rootfs-installer/boards.d/eaidk-610-rk3399 create mode 120000 alt-rootfs-installer/boards.d/emlid_neutis_n5_devboard create mode 120000 alt-rootfs-installer/boards.d/evb-px30 create mode 120000 alt-rootfs-installer/boards.d/evb-rk3328 create mode 120000 alt-rootfs-installer/boards.d/evb-rk3399 create mode 120000 alt-rootfs-installer/boards.d/evb-rk3568 create mode 120000 alt-rootfs-installer/boards.d/evb-rk3588 create mode 120000 alt-rootfs-installer/boards.d/ficus-rk3399 create mode 120000 alt-rootfs-installer/boards.d/firefly-px30 create mode 120000 alt-rootfs-installer/boards.d/firefly-rk3399 create mode 120000 alt-rootfs-installer/boards.d/gameforce-ace-rk3588s create mode 120000 alt-rootfs-installer/boards.d/generic-rk3568 create mode 120000 alt-rootfs-installer/boards.d/generic-rk3588 create mode 120000 alt-rootfs-installer/boards.d/jaguar-rk3588 create mode 120000 alt-rootfs-installer/boards.d/khadas-edge-captain-rk3399 create mode 120000 alt-rootfs-installer/boards.d/khadas-edge-rk3399 create mode 120000 alt-rootfs-installer/boards.d/khadas-edge-v-rk3399 create mode 120000 alt-rootfs-installer/boards.d/khadas-edge2-rk3588s create mode 120000 alt-rootfs-installer/boards.d/lckfb-tspi-rk3566 create mode 120000 alt-rootfs-installer/boards.d/leez-rk3399 create mode 120000 alt-rootfs-installer/boards.d/libretech_all_h3_cc_h5 create mode 120000 alt-rootfs-installer/boards.d/libretech_all_h3_it_h5 create mode 120000 alt-rootfs-installer/boards.d/libretech_all_h5_cc_h5 create mode 120000 alt-rootfs-installer/boards.d/lichee_rv create mode 120000 alt-rootfs-installer/boards.d/lubancat-2-rk3568 create mode 120000 alt-rootfs-installer/boards.d/milkv-jupiter create mode 120000 alt-rootfs-installer/boards.d/nanopc-t4-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopc-t6-rk3588 create mode 120000 alt-rootfs-installer/boards.d/nanopi-m4-2gb-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopi-m4-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopi-m4b-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopi-neo4-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r2c-plus-rk3328 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r2c-rk3328 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r2s-plus-rk3328 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r2s-rk3328 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r3s-rk3566 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r4s-rk3399 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r5c-rk3568 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r5s-rk3568 create mode 120000 alt-rootfs-installer/boards.d/nanopi-r6c-rk3588s create mode 120000 alt-rootfs-installer/boards.d/nanopi-r6s-rk3588s create mode 120000 alt-rootfs-installer/boards.d/nanopi_a64 create mode 120000 alt-rootfs-installer/boards.d/nanopi_neo2 create mode 120000 alt-rootfs-installer/boards.d/nanopi_neo_plus2 create mode 120000 alt-rootfs-installer/boards.d/nanopi_r1s_h5 create mode 120000 alt-rootfs-installer/boards.d/neu6a-io-rk3588 create mode 120000 alt-rootfs-installer/boards.d/neu6b-io-rk3588 create mode 120000 alt-rootfs-installer/boards.d/nezha create mode 120000 alt-rootfs-installer/boards.d/nova-rk3588s create mode 120000 alt-rootfs-installer/boards.d/np-504a-rk3568 create mode 120000 alt-rootfs-installer/boards.d/oceanic_5205_5inmfd create mode 120000 alt-rootfs-installer/boards.d/odroid-go2 create mode 120000 alt-rootfs-installer/boards.d/odroid-m1-rk3568 create mode 120000 alt-rootfs-installer/boards.d/odroid-m1s-rk3566 create mode 120000 alt-rootfs-installer/boards.d/odroid-m2-rk3588s create mode 120000 alt-rootfs-installer/boards.d/orangepi-3b-rk3566 create mode 120000 alt-rootfs-installer/boards.d/orangepi-4-lts-rk3399 create mode 120000 alt-rootfs-installer/boards.d/orangepi-4-rk3399 create mode 120000 alt-rootfs-installer/boards.d/orangepi-5-max-rk3588 create mode 120000 alt-rootfs-installer/boards.d/orangepi-5-plus-rk3588 create mode 120000 alt-rootfs-installer/boards.d/orangepi-5-rk3588s create mode 120000 alt-rootfs-installer/boards.d/orangepi-5-ultra-rk3588 create mode 120000 alt-rootfs-installer/boards.d/orangepi-r1-plus-lts-rk3328 create mode 120000 alt-rootfs-installer/boards.d/orangepi-r1-plus-rk3328 create mode 120000 alt-rootfs-installer/boards.d/orangepi-rk3399 create mode 120000 alt-rootfs-installer/boards.d/orangepi-rv2 create mode 120000 alt-rootfs-installer/boards.d/orangepi_3 create mode 120000 alt-rootfs-installer/boards.d/orangepi_lite2 create mode 120000 alt-rootfs-installer/boards.d/orangepi_one_plus create mode 120000 alt-rootfs-installer/boards.d/orangepi_pc2 create mode 120000 alt-rootfs-installer/boards.d/orangepi_prime create mode 120000 alt-rootfs-installer/boards.d/orangepi_win create mode 120000 alt-rootfs-installer/boards.d/orangepi_zero2 create mode 120000 alt-rootfs-installer/boards.d/orangepi_zero2w create mode 120000 alt-rootfs-installer/boards.d/orangepi_zero3 create mode 120000 alt-rootfs-installer/boards.d/orangepi_zero_plus create mode 120000 alt-rootfs-installer/boards.d/orangepi_zero_plus2 create mode 120000 alt-rootfs-installer/boards.d/pine64-lts create mode 120000 alt-rootfs-installer/boards.d/pine64_plus create mode 120000 alt-rootfs-installer/boards.d/pine64_star64 create mode 120000 alt-rootfs-installer/boards.d/pine_h64 create mode 120000 alt-rootfs-installer/boards.d/pinebook create mode 120000 alt-rootfs-installer/boards.d/pinebook-pro-rk3399 create mode 120000 alt-rootfs-installer/boards.d/pinephone create mode 120000 alt-rootfs-installer/boards.d/pinephone-pro-rk3399 create mode 120000 alt-rootfs-installer/boards.d/pinetab create mode 120000 alt-rootfs-installer/boards.d/pinetab2-rk3566 create mode 120000 alt-rootfs-installer/boards.d/powkiddy-x35s-rk3566 create mode 120000 alt-rootfs-installer/boards.d/powkiddy-x55-rk3566 create mode 120000 alt-rootfs-installer/boards.d/puma-rk3399 create mode 120000 alt-rootfs-installer/boards.d/px30-core-ctouch2-of10-px30 create mode 120000 alt-rootfs-installer/boards.d/px30-core-ctouch2-px30 create mode 120000 alt-rootfs-installer/boards.d/px30-core-edimm2.2-px30 create mode 120000 alt-rootfs-installer/boards.d/qnap-ts433-rk3568 create mode 120000 alt-rootfs-installer/boards.d/quartz64-a-rk3566 create mode 120000 alt-rootfs-installer/boards.d/quartz64-b-rk3566 create mode 120000 alt-rootfs-installer/boards.d/quartzpro64-rk3588 create mode 120000 alt-rootfs-installer/boards.d/radxa-cm3-io-rk3566 create mode 120000 alt-rootfs-installer/boards.d/radxa-e25-rk3568 create mode 120000 alt-rootfs-installer/boards.d/radxa-zero-3-rk3566 create mode 120000 alt-rootfs-installer/boards.d/repka_pi3 create mode 120000 alt-rootfs-installer/boards.d/repka_pi4 create mode 120000 alt-rootfs-installer/boards.d/ringneck-px30 create mode 120000 alt-rootfs-installer/boards.d/roc-cc-rk3328 create mode 120000 alt-rootfs-installer/boards.d/roc-pc-mezzanine-rk3399 create mode 120000 alt-rootfs-installer/boards.d/roc-pc-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rock-3a-rk3568 create mode 120000 alt-rootfs-installer/boards.d/rock-3b-rk3568 create mode 120000 alt-rootfs-installer/boards.d/rock-3c-rk3566 create mode 120000 alt-rootfs-installer/boards.d/rock-4c-plus-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rock-4se-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rock-5-itx-rk3588 create mode 120000 alt-rootfs-installer/boards.d/rock-5c-rk3588s create mode 120000 alt-rootfs-installer/boards.d/rock-pi-4-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rock-pi-4c-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rock-pi-e-rk3328 create mode 120000 alt-rootfs-installer/boards.d/rock-pi-e-v3-rk3328 create mode 120000 alt-rootfs-installer/boards.d/rock-pi-n10-rk3399pro create mode 120000 alt-rootfs-installer/boards.d/rock5a-rk3588s create mode 120000 alt-rootfs-installer/boards.d/rock5b-rk3588 create mode 120000 alt-rootfs-installer/boards.d/rock64-rk3328 create mode 120000 alt-rootfs-installer/boards.d/rock960-rk3399 create mode 120000 alt-rootfs-installer/boards.d/rockpro64-rk3399 create mode 120000 alt-rootfs-installer/boards.d/sifive_unleashed create mode 120000 alt-rootfs-installer/boards.d/sifive_unmatched create mode 120000 alt-rootfs-installer/boards.d/sige7-rk3588 create mode 120000 alt-rootfs-installer/boards.d/sopine_baseboard create mode 120000 alt-rootfs-installer/boards.d/soquartz-blade-rk3566 create mode 120000 alt-rootfs-installer/boards.d/soquartz-cm4-rk3566 create mode 120000 alt-rootfs-installer/boards.d/soquartz-model-a-rk3566 create mode 120000 alt-rootfs-installer/boards.d/starfive_visionfive2 create mode 120000 alt-rootfs-installer/boards.d/tanix_tx1 create mode 120000 alt-rootfs-installer/boards.d/tanix_tx6 create mode 120000 alt-rootfs-installer/boards.d/teres_i create mode 120000 alt-rootfs-installer/boards.d/tiger-rk3588 create mode 120000 alt-rootfs-installer/boards.d/toybrick-rk3588 create mode 120000 alt-rootfs-installer/boards.d/transpeed-8k618-t create mode 120000 alt-rootfs-installer/boards.d/turing-rk1-rk3588 create mode 120000 alt-rootfs-installer/boards.d/x96_mate create mode 100644 alt-rootfs-installer/functions create mode 100644 alt-rootfs-installer/log create mode 100644 alt-rootfs-installer/shell-config create mode 100644 alt-rootfs-installer/shell-error create mode 100644 alt-rootfs-installer/shell-terminfo create mode 100644 alt-rootfs-installer/socs.d/AllWinner-aarch64.sh create mode 100644 alt-rootfs-installer/socs.d/AllWinner-riscv64.sh create mode 100755 alt-rootfs-installer/socs.d/K1x-riscv64.sh create mode 100644 alt-rootfs-installer/socs.d/Rockchips-aarch64.sh create mode 100644 alt-rootfs-installer/socs.d/SiFive-riscv64.sh create mode 100644 alt-rootfs-installer/socs.d/StarFive-riscv64.sh create mode 100755 alt-rootfs-installer/socs.d/unknown-soc.sh diff --git a/alt-rootfs-installer/.gear/rules b/alt-rootfs-installer/.gear/rules new file mode 100644 index 0000000..f2bdd60 --- /dev/null +++ b/alt-rootfs-installer/.gear/rules @@ -0,0 +1,2 @@ +tar: alt-rootfs-installer-@version@:. +diff: alt-rootfs-installer-@version@:. . exclude=.gear exclude=alt-rootfs-installer.spec diff --git a/alt-rootfs-installer/.gear/tags/b087d31c15de7b47929a9ce5814e33ee9b984f72 b/alt-rootfs-installer/.gear/tags/b087d31c15de7b47929a9ce5814e33ee9b984f72 new file mode 100644 index 0000000..b89459b --- /dev/null +++ b/alt-rootfs-installer/.gear/tags/b087d31c15de7b47929a9ce5814e33ee9b984f72 @@ -0,0 +1,22 @@ +object 322b03501028628ec87b4a1decaecca51cf77f87 +type commit +tag alt-rootfs-installer-0.7.4 +tagger Anton Midyukov 1782716522 +0300 + +alt-rootfs-installer-0.7.4 +-----BEGIN PGP SIGNATURE----- + +iQIcBAABCAAGBQJqQhhrAAoJEE6hgREonSKV65wP/2NCgdTkr6UJtL9Orks47YsK +/4dEcsj67EktOATj1v1CD8b4iENA0blzFh1du1IWyDhMcReJsz35JqHg4W9Gjsxv +yEdr6yu7LaMB0ekGXTfQisp8+wWEASrr7eKaRhWKgeITL2IeCwtYiKrJcqihCDst +7tHLK2hWDgrGhNW08o/yNkj7PyvYHpLP4Le2qI2pDda9IeZmBI7HBDNNykhQdU8H +c420b6Wrd4/ULD35zN9WPASJvj5/uGxJj2QFduDaqVKViJVCnQAGgpC5szQaHWxc +RHHADzFB0pcXvzll/QxVAM+Zdey70j79PEwWVf0t+EoOP17x/35awYM8kcjEv9vq +402I/qZvulHf74WgxctnsxoQD+1qKsptT+lyEkejpJYsWgRP3167MuPugrYUUGzF +6v2iy2R/zvOuVGDvHkRY0wwOMeY0Je6hHrV1YGAck9GsvKm7Am3zblTgylshnEOx +1LaTjyblLC/rRRdqduqTZBbd5gEVp1Vw+858p9JXqq3D+cZZrGzhCpNv1pP+coIl +RKrKrYMWWCZ7a9lP5jESSc1wqMZwr5NMjcCCGH/lDXgv3l1Pj3BLlQAtU8BfJIfy +vaLRxmeDTTmuMEj2QQKkYFYA0hSG67ErOy5Q2ZEdzh3PRNzjGSPkv6qzV+5Qb8Tu +QsBngq88kZDLBYiq3r26 +=7Y2r +-----END PGP SIGNATURE----- diff --git a/alt-rootfs-installer/.gear/tags/list b/alt-rootfs-installer/.gear/tags/list new file mode 100644 index 0000000..18e2712 --- /dev/null +++ b/alt-rootfs-installer/.gear/tags/list @@ -0,0 +1 @@ +b087d31c15de7b47929a9ce5814e33ee9b984f72 alt-rootfs-installer-0.7.4 diff --git a/alt-rootfs-installer/.gear/upstream/remotes b/alt-rootfs-installer/.gear/upstream/remotes new file mode 100644 index 0000000..baa51f7 --- /dev/null +++ b/alt-rootfs-installer/.gear/upstream/remotes @@ -0,0 +1,3 @@ +[remote "upstream"] + url = https://pagure.io/arm-image-installer.git + fetch = +refs/heads/*:refs/remotes/upstream/* diff --git a/alt-rootfs-installer/AUTHORS b/alt-rootfs-installer/AUTHORS new file mode 100644 index 0000000..5038b7d --- /dev/null +++ b/alt-rootfs-installer/AUTHORS @@ -0,0 +1,10 @@ +Project authors alt-rootfs-installer: +Anton Midyukov +Nikita Ermakov + +Project authors arm-image-installer: +Paul Whalen +Peter Robinson +David Marlin +Marcin Juszkiewicz +Lee Jones diff --git a/alt-rootfs-installer/COPYING b/alt-rootfs-installer/COPYING new file mode 100644 index 0000000..14f5453 --- /dev/null +++ b/alt-rootfs-installer/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/alt-rootfs-installer/EXTRA_OPTIONS b/alt-rootfs-installer/EXTRA_OPTIONS new file mode 100644 index 0000000..c7853f8 --- /dev/null +++ b/alt-rootfs-installer/EXTRA_OPTIONS @@ -0,0 +1,18 @@ +#DEFAULT_KERNEL=6.12.33-6.12-alt1 +#FAST_BOOT=1 +#BOOT_TIMEOUT=0 +## path to directory with *.rpm +#RPM_INSTALL=/path/to/dirname +## path to file contain password hash +#ROOT_PASSWD=/path/to/hash_file +#USER_PASSWD=/path/to/hash_file +#USER_NAME=user +## use /etc/initrd.mk.oem in rootfs: +#INITRD_OEM=1 +#UBOOT=/path/to/external_uboot_directory +#ADDON=/path/to/addon.tar +#SYSCON=ttyS2,1500000n8 +## if one of the DTB_ options are used, the other two need to be set too +#DTB_FILE=/path/to/dtb_file +#DTB_VENDOR=vendor_name (e.g. rockchip) +#DTB_KVER=kernel.version (e.g. 6.12) diff --git a/alt-rootfs-installer/README b/alt-rootfs-installer/README new file mode 100644 index 0000000..75a0879 --- /dev/null +++ b/alt-rootfs-installer/README @@ -0,0 +1,18 @@ +Tools for writing rootfs archive +================================= + +alt-rootfs-installer +------------------- + +This script will automate the process of preparing an ALT Linux +rootfs archive for use with various hardware targets. + + - Write the selected archive rootfs to media (optional) + - customize media with platform specific U-Boot file(s) + - Update U-Boot for another Target + +To add additional support, create a code snippet file +(bash script) in the "boards.d" subdirectory with the commands +needed to write U-Boot for the target board. + +Usage: examine `alt-rootfs-installer --help` to get more information. diff --git a/alt-rootfs-installer/SUPPORTED-BOARDS b/alt-rootfs-installer/SUPPORTED-BOARDS new file mode 100644 index 0000000..250a3d9 --- /dev/null +++ b/alt-rootfs-installer/SUPPORTED-BOARDS @@ -0,0 +1,96 @@ +AllWinner Devices (aarch64): +a64-olinuxino orangepi_prime +a64-olinuxino-emmc orangepi_win +amarula_a64_relic orangepi_zero2 +anbernic_rg35xx_h700 orangepi_zero2w +bananapi_m2_plus_h5 orangepi_zero3 +bananapi_m64 orangepi_zero_plus +beelink_gs1 orangepi_zero_plus2 +emlid_neutis_n5_devboard pine64-lts +libretech_all_h3_cc_h5 pine64_plus +libretech_all_h3_it_h5 pinebook +libretech_all_h5_cc_h5 pine_h64 +lichee_rv pinephone +nanopi_a64 pinetab +nanopi_neo2 repka_pi3 +nanopi_neo_plus2 repka_pi4 +nanopi_r1s_h5 sopine_baseboard +nezha tanix_tx1 +oceanic_5205_5inmfd tanix_tx6 +orangepi_3 teres_i +orangepi_lite2 transpeed-8k618-t +orangepi_one_plus x96_mate +orangepi_pc2 + +AllWinner Devices (riscv64): +lichee_rv +nezha + +Rockchip Devices (aarch64): +anbernic-rg552-rk3399 orangepi-3b-rk3566 +anbernic-rgxx3-rk3566 orangepi-4-lts-rk3399 +atb-uspd20k orangepi-4-rk3399 +bpi-r2-pro-rk3568 orangepi-5-max-rk3588 +chromebook_bob orangepi-5-plus-rk3588 +chromebook_kevin orangepi-5-rk3588s +cm3588-nas-rk3588 orangepi-5-ultra-rk3588 +coolpi-4b-rk3588s orangepi-r1-plus-lts-rk3328 +coolpi-cm5-evb-rk3588 orangepi-r1-plus-rk3328 +coolpi-cm5-genbook-rk3588 orangepi-rk3399 +eaidk-610-rk3399 pinebook-pro-rk3399 +evb-px30 pinephone-pro-rk3399 +evb-rk3328 pinetab2-rk3566 +evb-rk3399 powkiddy-x35s-rk3566 +evb-rk3568 powkiddy-x55-rk3566 +evb-rk3588 puma-rk3399 +ficus-rk3399 px30-core-ctouch2-of10-px30 +firefly-px30 px30-core-ctouch2-px30 +firefly-rk3399 px30-core-edimm2.2-px30 +gameforce-ace-rk3588s qnap-ts433-rk3568 +generic-rk3568 quartz64-a-rk3566 +generic-rk3588 quartz64-b-rk3566 +jaguar-rk3588 quartzpro64-rk3588 +khadas-edge2-rk3588s radxa-cm3-io-rk3566 +khadas-edge-captain-rk3399 radxa-e25-rk3568 +khadas-edge-rk3399 radxa-zero-3-rk3566 +khadas-edge-v-rk3399 ringneck-px30 +lckfb-tspi-rk3566 roc-cc-rk3328 +leez-rk3399 rock-3a-rk3568 +lubancat-2-rk3568 rock-3b-rk3568 +nanopc-t4-rk3399 rock-3c-rk3566 +nanopc-t6-rk3588 rock-4c-plus-rk3399 +nanopi-m4-2gb-rk3399 rock-4se-rk3399 +nanopi-m4b-rk3399 rock5a-rk3588s +nanopi-m4-rk3399 rock5b-rk3588 +nanopi-neo4-rk3399 rock-5c-rk3588s +nanopi-r2c-plus-rk3328 rock-5-itx-rk3588 +nanopi-r2c-rk3328 rock64-rk3328 +nanopi-r2s-plus-rk3328 rock960-rk3399 +nanopi-r2s-rk3328 rock-pi-4c-rk3399 +nanopi-r3s-rk3566 rock-pi-4-rk3399 +nanopi-r4s-rk3399 rock-pi-e-rk3328 +nanopi-r5c-rk3568 rock-pi-e-v3-rk3328 +nanopi-r5s-rk3568 rock-pi-n10-rk3399pro +nanopi-r6c-rk3588s rockpro64-rk3399 +nanopi-r6s-rk3588s roc-pc-mezzanine-rk3399 +neu6a-io-rk3588 roc-pc-rk3399 +neu6b-io-rk3588 sige7-rk3588 +nova-rk3588s soquartz-blade-rk3566 +np-504a-rk3568 soquartz-cm4-rk3566 +odroid-go2 soquartz-model-a-rk3566 +odroid-m1-rk3568 tiger-rk3588 +odroid-m1s-rk3566 toybrick-rk3588 +odroid-m2-rk3588s turing-rk1-rk3588 + +SiFive Devices (riscv64): + sifive_unleashed + sifive_unmatched + +StarFive Devices (riscv64): + starfive_visionfive2 + pine64_star64 + +K1x Devices (riscv64): + orangepi-rv2 + bananapi-f3 + milkv-jupiter diff --git a/alt-rootfs-installer/alt-rootfs-installer b/alt-rootfs-installer/alt-rootfs-installer new file mode 100755 index 0000000..542b619 --- /dev/null +++ b/alt-rootfs-installer/alt-rootfs-installer @@ -0,0 +1,765 @@ +#!/bin/bash +# vim:sw=8:noet +# SPDX-License-Identifier: GPL-2.0-or-later +# +# rootfs installer for ALT Linux +# Current version +VERSION=0.7.4 + +# Variable +EXT4=0FC63DAF-8483-4772-8E79-3D69D8477DE4 +DEFAULT_EXT4_OPTIONS="-m 5 -b 4096 -i 8192 -I 256" +TMPROOT= +[ -n "$TMP" ] || TMP=/tmp +PROGNAME="${0##*/}" +unset ROOTPART_UID + +# one Mebibyte = 2^20 +MB=1048576 + +# usage message +usage() { + echo " +Usage: $PROGNAME --target=TARGET <--rootfs=ROOTFS | --image-in=IMAGE> <--media=DEVICE | --image-out=FILE> [options] + +Options: + --target TARGET - target board + --extra-options - path to file with extra options (see extra-options) + --efi - add EFI partition, set partition table gpt + --efi-mbr - add EFI partition, set partition table msdos + --bootpart - add boot partition + --root-fstype TYPE - specify root partition filesystem + --root-fs-opt OPTSTR - root filesystem options + --vnc 1 - enable vnc mode for alterator-setup + --vnc 0 - disable vnc mode for alterator-setup + + --rootfs ROOTFS - archive rootfs file name + --image-in IMAGE - image file name (img|img.xz) + + --media DEVICE - media device file (/dev/[sdX|mmcblkX]) + --image-out FILE - out image file + + --luks - encrypt root partition + --luks-opt OPTSTR - options for luks creation + + --addconsole - Add system serial console + + --image-size SIZE - size out image file (MiB) + --resize - Resize ROOT partition + --supported - List of supported hardware + --version - Display version and exit + --debug - Print debug info, pass it as first argument + --stdout - Don't use log file, put everything to stdout + --log=FILE - Log file (default $LOG_FILE) + -y - Assumes yes, will not wait for confirmation + +Example: $PROGNAME --rootfs regular-lxqt-20190213-aarch64.tar.xz --target orangepi_prime --media /dev/mmcblk0 + +Update U-Boot for another Target +Update to a new u-boot from a local host install. + +Example: $PROGNAME --target orangepi_prime --media /dev/mmcblk0 + +" +} + +pre_exit() { + local rc=$? + trap - EXIT + sync + + unmount_chroot + unmount_partition + + if [ -n "$IMAGE_OUT" -a -n "$MEDIA" ]; then + kpartx -d -s "$MEDIA" || { + sleep 10 + kpartx -d -s -v "$MEDIA" + } + losetup --detach "$MEDIA" + fi + exit $rc +} + +final_exit() { + printn 'Installation Complete!' + if [ -n "$IMAGE_OUT" ]; then + printn 'Image created successfully.' + else + printn 'Insert into your device and try boot.' + printn 'Good luck!!!' + fi + exit 0 +} + +DIR="$(dirname $0)" +. shell-error 2>/dev/null || . $DIR/shell-error 2>/dev/null +. shell-terminfo 2>/dev/null || . $DIR/shell-terminfo 2>/dev/null +. shell-config 2>/dev/null || . $DIR/shell-config 2>/dev/null + +# Set some global variables for the command directory, target board directory, +# and valid targets. +[ -d "${DIR}/boards.d" ] || + DIR=/usr/share/alt-rootfs-installer +[ -d "${DIR}/boards.d" ] || + fatal "error: directory boards.d not exist" +BOARDDIR="${DIR}/boards.d" +SOCSDIR="${DIR}/socs.d" + +# missing or wrongs arguments +[ $# -ge 1 ] && +TMPARGS="$(getopt -n "$0" -o hy -l addconsole,debug,help,\ +efi,efi-mbr,bootpart,root-fstype:,root-fs-opt:,target:,rootfs:,\ +media:,image-in:,image-out:,luks,luks-opt:,image-size:,resize,supported,\ +version,stdout,log:,vnc,\ +extra-options: -- "$@")" +if [ $? -ne 0 ]; then + usage >&2 + exit 1 +fi + +eval set -- "$TMPARGS" +# check the args +while :; do + case $1 in + --) + shift; break + ;; + --addconsole) + CONSOLE=1 + ;; + --debug) + set -x + ;; + -h|--help) + usage; exit 0 + ;; + --target) + shift; TARGET="$1" + ;; + --extra-options) + shift; EXTRA_OPTIONS="$1" + ;; + --efi) + EFI="1" + MEDIATABLE=gpt + ;; + --efi-mbr) + EFI="1" + MEDIATABLE=msdos + ;; + --luks-opt) + shift; LUKS_OPT="$1" + ;; + --luks) + LUKS="1" + ;; + --bootpart) + ADD_BOOTPART="1" + ;; + --root-fstype) + shift; ROOT_FSTYPE="$1" + ;; + --root-fs-opt) + shift; ROOT_FS_OPT="$1" + ;; + --vnc) + shift; VNC="$1" + ;; + --rootfs) + shift; ROOTFS="$1" + ;; + --image-in) + shift; IMAGE="$1" + ;; + --media) + shift; MEDIA="$1" + ;; + --image-out) + shift; IMAGE_OUT="$1" + ;; + --image-size) + shift; IMAGE_SIZE="$1" + ;; + --resize) + RESIZE="1" + ;; + --supported) + cat "$DIR/SUPPORTED-BOARDS" + exit 0 + ;; + --version) + echo "$PROGNAME-$VERSION" + exit 0 + ;; + --log) + shift + LOG_FILE="$(readlink -f "$1")" + ;; + --stdout) + LOG_MODE="con" + ;; + -y) + NOASK=1 + ;; + *) + echo "Invalid argument $1" + usage >&2 + exit 1 + ;; + esac + shift +done + +if [ -n "$TARGET" ]; then + # check board script target + if [ ! -s "$BOARDDIR/$TARGET" ]; then + fatal "error: $TARGET is not supported" + fi +fi + +if [ -z $ROOT_FSTYPE ]; then + ROOT_FSTYPE=ext4 +fi + +if [ -z "$ROOT_FS_OPT" ]; then + if [ "$ROOT_FSTYPE" = ext4 ]; then + ROOT_FS_OPT=$DEFAULT_EXT4_OPTIONS + fi +fi + +if [ $ROOT_FSTYPE = "f2fs" ]; then + # U-Boot doesn't support f2fs, so /boot + # with compatible filesystem is needed. + ADD_BOOTPART="1" + # Force overwrite existing filesystem + ROOT_FS_OPT=$ROOT_FS_OPT" -f" +fi + +if [ -n "$LUKS_OPT" ]; then + LUKS="1" +fi + +if [ -n "$LUKS" ]; then + # LUKS requires separate /boot partition + ADD_BOOTPART="1" +fi + +if [ -n "$EXTRA_OPTIONS" ]; then + [ -s "$EXTRA_OPTIONS" ] || fatal "error: file $EXTRA_OPTIONS does not exist!!!" + DEFAULT_KERNEL="$(shell_config_get "$EXTRA_OPTIONS" "DEFAULT_KERNEL")" + FAST_BOOT="$(shell_config_get "$EXTRA_OPTIONS" "FAST_BOOT")" + BOOT_TIMEOUT="$(shell_config_get "$EXTRA_OPTIONS" "BOOT_TIMEOUT")" + RPM_INSTALL="$(shell_config_get "$EXTRA_OPTIONS" "RPM_INSTALL")" + ROOT_PASSWD="$(shell_config_get "$EXTRA_OPTIONS" "ROOT_PASSWD")" + USER_PASSWD="$(shell_config_get "$EXTRA_OPTIONS" "USER_PASSWD")" + USER_NAME="$(shell_config_get "$EXTRA_OPTIONS" "USER_NAME")" + INITRD_OEM="$(shell_config_get "$EXTRA_OPTIONS" "INITRD_OEM")" + UBOOT="$(shell_config_get "$EXTRA_OPTIONS" "UBOOT")" + ADDON="$(shell_config_get "$EXTRA_OPTIONS" ADDON)" + SYSCON="$(shell_config_get "$EXTRA_OPTIONS" "SYSCON")" + DTB_FILE="$(shell_config_get "$EXTRA_OPTIONS" "DTB_FILE")" + DTB_VENDOR="$(shell_config_get "$EXTRA_OPTIONS" "DTB_VENDOR")" + DTB_KVER="$(shell_config_get "$EXTRA_OPTIONS" "DTB_KVER")" +fi + +# getting full PATH +[ -n "$ROOTFS" ] && ROOTFS_PATH="$(readlink -f "$ROOTFS")" +[ -n "$IMAGE" ] && IMAGE_PATH="$(readlink -f "$IMAGE")" +[ -n "$ROOT_PASSWD" ] && ROOT_PASSWD_PATH="$(readlink -f "$ROOT_PASSWD")" +[ -n "$USER_PASSWD" ] && USER_PASSWD_PATH="$(readlink -f "$USER_PASSWD")" +[ -n "$ADDON" ] && ADDON_PATH="$(readlink -f "$ADDON")" +[ -n "$UBOOT" ] && UBOOT_PATH="$(readlink -f "$UBOOT")" +[ -n "$RPM_INSTALL" ] && RPM_INSTALL_PATH="$(readlink -f "$RPM_INSTALL")" +[ -n "$DTB_FILE" ] && DTB_FILE_PATH="$(readlink -f "$DTB_FILE")" + +# checking files existing +if [ -n "$ROOTFS" ]; then + [ -f "$ROOTFS_PATH" ] || fatal "error: ROOTFS does not exist" + ROOTFS="$ROOTFS_PATH" +fi +if [ -n "$IMAGE" ]; then + [ -f "$IMAGE_PATH" ] || fatal "error: IMAGE does not exist" + IMAGE="$IMAGE_PATH" +fi +if [ -n "$ROOT_PASSWD" ]; then + [ -f "$ROOT_PASSWD_PATH" ] || fatal "error: file $ROOT_PASSWD does not exist" + ROOT_PASSWD="$ROOT_PASSWD_PATH" +fi +if [ -n "$USER_PASSWD" ]; then + [ -f "$USER_PASSWD_PATH" ] || fatal "error: file $USER_PASSWD does not exist" + USER_PASSWD="$USER_PASSWD_PATH" +fi +if [ -n "$ADDON" ]; then + [ -f "$ADDON_PATH" ] || fatal "error: file $ADDON does not exist" + ADDON="$ADDON_PATH" +fi +if [ -n "$UBOOT" ]; then + [ -d "$UBOOT" ] || fatal "error: u-boot directory $UBOOT does not exist" +fi +if [ -n "$RPM_INSTALL" ]; then + [ -d "$RPM_INSTALL" ] || fatal "error: rpm directory $RPM_INSTALL does not exist" +fi +if [ -n "$DTB_FILE" ]; then + [ -f "$DTB_FILE_PATH" ] || fatal "error: file $DTB_FILE does not exist" + DTB_FILE="$DTB_FILE_PATH" +fi + +# checking the entered value --image-size +if [ -n "${IMAGE_SIZE-}" ]; then + [[ "$IMAGE_SIZE" =~ [^0-9]+ ]] && fatal "error: bad image size" +fi + +# ensure sudo user +if [ "$(whoami)" != "root" ]; then + fatal "error: this script requires 'sudo' privileges in order to write to disk & mount media" +fi + +if [ -z "$IMAGE_OUT" -a -z "$MEDIA" ]; then + fatal "error: one of the options must be defined: --media or --image-out" +fi + +if [ -n "$IMAGE_OUT" -a -n "$MEDIA" ]; then + fatal "error: At the same time, mutually exclusive options are indicated: --media and --image-out" +fi + +if [ -n "$IMAGE" -a -n "$ROOTFS" ]; then + fatal "error: At the same time, mutually exclusive options are indicated: --image-in and --rootfs" +fi + +if [ -n "$IMAGE" -a -n "$IMAGE_OUT" ]; then + fatal "error: At the same time, mutually exclusive options are indicated: --image-in and --image-out" +fi + + +if [ -n "$MEDIA" ] && [[ "$(readlink -f /dev/root)" == "$MEDIA"* ]]; then + fatal "error: $MEDIA is a device contains a host system rootfs" +fi + +# rootfs exists +if [ -n "$ROOTFS" -a ! -f "$ROOTFS" ]; then + fatal "error: $ROOTFS not found! Please choose an existing rootfs" +fi + +# image exists +if [ -n "$IMAGE" -a ! -f "$IMAGE" ]; then + fatal "error: $IMAGE not found! Please choose an existing image" +fi + +# device exists +if [ -z "$IMAGE_OUT" -a ! -e "$MEDIA" ]; then + fatal "error: $MEDIA not found! Please choose an existing device" +fi + +# target board exists +if [ -n "$TARGET" -a ! -e "${BOARDDIR}/${TARGET}" ]; then + fatal "error: $TARGET is not a supported board" +fi + +if [ -n "$ADDON" ]; then + case "$ADDON" in + *.tar) ;; + *) fatal "error: $ADDON is not a tar archive!!!";; + esac + [ -s "$ADDON" ] || fatal "error: $ADDON does not exist!!!" +fi + +if [ -n "$DTB_FILE" ] || [ -n "$DTB_VENDOR" ] || [ -n "$DTB_KVER" ]; then + [ -z "$DTB_FILE" ] && fatal "error: DTB_FILE is unset" + [ -z "$DTB_VENDOR" ] && fatal "error: DTB_VENDOR is unset" + [ -z "$DTB_KVER" ] && fatal "error: DTB_KVER is unset" +fi + +# check image format +if [ -n "$IMAGE" ]; then + case "$IMAGE" in + *.img) + CAT='cat' + ;; + *.img.xz) + CAT='xzcat' + ;; + *) fatal "error: unknown image format" + ;; + esac + # NOTE: We assume there is no arch names containing '-' or '.' + ARCH="${IMAGE##*-}" + ARCH="${ARCH%%.*}" +fi + +# output current status of tar to /dev/tty every 512 records (5 Mb) +# with default blocking factor 20 (1 record = 20*512 bytes) +TAR='tar --checkpoint=500 --checkpoint-action=ttyout=%s:%{}T\r' +# definition of the rootfs archive format and ARCH +if [ -n "$ROOTFS" ]; then + case "$ROOTFS" in + *.tar) + TAR="$TAR -xf" + let "TAR_SIZE = $(stat -Lc %s "$ROOTFS") / $MB" + ;; + *.tar.gz) + TAR="$TAR -zxf" + let "TAR_SIZE = $(gzip --list "$ROOTFS" | awk 'END{print $2}') / $MB" + ;; + *.tar.xz) + TAR="$TAR -Jxf" + let "TAR_SIZE = $(xz --robot --list "$ROOTFS" | awk '/^totals/{print $5}') / $MB" + ;; + *) fatal "error: unknown rootfs archive format" + ;; + esac + # NOTE: We assume there is no arch names containing '-' or '.' + ARCH="${ROOTFS##*-}" + ARCH="${ARCH%%.*}" +fi + +case "$MEDIA" in + /dev/mmcblk*|/dev/loop*|/dev/nvme*) + partsuffix="p" + ;; + *) + unset partsuffix + ;; +esac + +### include logging +. $DIR/log + +log_init + +# Source common shell functions +. $DIR/functions + +# Source board specific shell script +if [ -n "$TARGET" ]; then + . "$BOARDDIR/$TARGET" +else + . "$SOCSDIR/unknown-soc.sh" +fi + +[ -z "$FAST_BOOT" ] || BOOT_TIMEOUT=0 + +# Add default system console +if [ -n "$CONSOLE" ] && [ -z "$SYSCON" ]; then + SYSCON=ttyS0,115200n8 +fi + +# Add EFI Partitions +if [ -n "$EFI" -a -n "$ROOTFS" ]; then + if [ -z "$FIRMPART_NUM" ]; then + FIRMPART_NUM="${ROOTPART_NUM}" + let ROOTPART_NUM=${FIRMPART_NUM}+1 + fi +fi + +# Add a boot partition +if [ -n "$ADD_BOOTPART" ]; then + if [ -z "$BOOTPART_NUM" ]; then + BOOTPART_NUM="${ROOTPART_NUM}" + let ROOTPART_NUM=${BOOTPART_NUM}+1 + fi +fi + +if [ -z "$ROOTFS" -a -z "$IMAGE" ]; then + find_partitions +fi + +# default size of partitions (MiB) +[ -z "$FIRMPART_NUM" ] || FIRMPART_SIZE=128 +[ -z "$BOOTPART_NUM" ] || BOOTPART_SIZE=512 + +change_partition + +# Image size calculation +if [ -n "$ROOTFS" -a -n "$IMAGE_OUT" ]; then + # Increase size by 10% which is reserved by FS, take into account i-node ratio and reserved 32Mb. + # Add 1 just in case. + IMAGE_SIZE_MIN="$(awk -vTS="$TAR_SIZE" -vM="$MB" 'BEGIN{ printf ("%d", ((TS+512+32)*(1+1024/8192)*1.1+1)) }')" + [ -z "$FIRMPART_SIZE" ] || let IMAGE_SIZE_MIN=$IMAGE_SIZE_MIN+$FIRMPART_SIZE + [ -z "$BOOTPART_SIZE" ] || let IMAGE_SIZE_MIN=$IMAGE_SIZE_MIN+$BOOTPART_SIZE + # Change image size + if [ -z "${IMAGE_SIZE-}" ] || [ "$IMAGE_SIZE_MIN" -ge "$IMAGE_SIZE" ]; then + IMAGE_SIZE="$IMAGE_SIZE_MIN" + fi + let "END_SECTOR = $IMAGE_SIZE - 1" + END_SECTOR="$END_SECTOR"MiB +fi + +# Last chance to back out +if [ -n "$IMAGE_OUT" -a -n "$IMAGE_SIZE" ]; then + printx 'Image out: '; printn "$IMAGE_OUT" green 20 + printx 'Image size: '; printn "$IMAGE_SIZE MiB" green 20 +else + printx 'Selected Media: '; printn "$MEDIA" green 20 +fi +# target hardware ARCH +if [ -n "$TARGET" ]; then + printx 'Target: '; printn "$TARGET" green 20 +fi +# rootfs if included +if [ -n "$ROOTFS" ]; then + printx 'Selected rootfs: '; printn "$ROOTFS" green 20 +fi +# image-in if included +if [ -n "$IMAGE" ]; then + printx 'Selected image: '; printn "$IMAGE" green 20 +fi +# addon +if [ -n "$ADDON" ]; then + printx 'Addon: '; printn "$ADDON" green 20 +fi +if [ -n "$UBOOT" ]; then + printx 'U-boot directory: '; printn "$UBOOT" green 20 +fi +if [ -n "$RPM_INSTALL" ]; then + printx 'RPM directory: '; printn "$RPM_INSTALL" green 20 +fi +if [ -n "$DTB_FILE" ]; then + printx 'DTB file: '; printn "$DTB_FILE" green 20 +fi +if [ -n "$DTB_VENDOR" ]; then + printx 'DTB vendor: '; printn "$DTB_VENDOR" green 20 +fi +if [ -n "$DTB_KVER" ]; then + printx 'DTB kernel version: '; printn "$DTB_KVER" green 20 +fi +if [ -n "$DEFAULT_KERNEL" ]; then + printx 'Default kernel: '; printn "$DEFAULT_KERNEL" green 20 +fi +# addconsole if included +if [ -n "$CONSOLE" ]; then + printx 'System console: '; printn "$SYSCON" green 20 +fi +if [ "$INITRD_OEM" = 1 ]; then + printx 'Initrd OEM config: '; printn "Enabled" green 20 +fi +if [ -n "$FAST_BOOT" ]; then + printx 'Fast boot: '; printn "Enabled" green 20 +fi +if [ -n "$BOOT_TIMEOUT" ]; then + printx 'Boot timeout: '; printn "$BOOT_TIMEOUT" green 20 +fi +if [ -n "$ROOT_PASSWD" ]; then + printx 'root password: '; printn "$ROOT_PASSWD" green 20 +fi +if [ -n "$USER_NAME" ] && [ -n "$USER_PASSWD" ]; then + printx 'User: '; printn "$USER_NAME" green 20 + printx 'User password: '; printn "$USER_PASSWD" green 20 +fi + +if [ -n "$LOG_FILE" ]; then + printx 'Log file: '; printn "$LOG_FILE" green 20 +fi + +case "$VNC" in + 1) + printx 'VNC: '; printn "enabled" green 20 + ;; + 0) + printx 'VNC: '; printn "disabled" red 20 + ;; +esac + +if [ -z "$IMAGE_OUT" ]; then + if [ -n "$IMAGE" -o -n "$ROOTFS" ]; then + printn "WARNING! ALL DATA WILL BE DESTROYED" red + else + printn "WARNING! BOOTLOADER WILL BE OVERWRITTEN" red + fi +fi + +if [ "$NOASK" != 1 ]; then + # Ask user before start + printn "Would you like to continue? [Yes/No] " bold + read PROCEED + case "$PROCEED" in + [Yy][Ee][Ss]) + ;; + *) + printn "User exit, no rootfs written." + exit 0 + ;; + esac +fi + +trap pre_exit EXIT HUP PIPE INT QUIT TERM + +# Check to make image file +if [ -n "$IMAGE_OUT" ]; then + MEDIA="$(losetup --find)" + [ -n "$MEDIA" ] || fatal_error "/dev/loop* is not allowed!!!" +fi + +# Prepare media +[ -z "${MEDIA-}" ] || prepare_media + +# Write image file to the media device +if [ -n "$IMAGE" ]; then + image_to_media +fi + +if [ -n "$ROOTFS" ]; then + [ -z "${IMAGE_OUT-}" ] || prepare_image + create_disklabel + create_partition + sync_partitions + format_partition + mount_partition + write_rootfs + setup_fstab + update_cmdline_txt +fi + +soc_write_bootloader + +# Setup boot flag +set_bootflag + +# Update boot configs +BOOTCONF="${TMPROOT-}/boot/extlinux/extlinux.conf" +if [ -s "$BOOTCONF" ]; then + # Change system console + if [ -n "$CONSOLE" ]; then + sed -i -e '/append/ s/[[:space:]]console=[a-zA-Z0-9,]*//g' \ + -e "/append/ s/$/ console=tty0 console=$SYSCON/g" \ + -e "/append/ s/ quiet//g" \ + "$BOOTCONF" + fi + # Change fast boot + if [ -n "$FAST_BOOT" ]; then + sed -i "/^prompt .*/d;s/^menu \(.*\)/menu \1\nprompt 0/" "$BOOTCONF" + fi + # Change menu timeout + if [ -n "$BOOT_TIMEOUT" ]; then + sed -i "/^timeout .*/d;s/^menu \(.*\)/menu \1\ntimeout $BOOT_TIMEOUT/" "$BOOTCONF" + fi +fi +BOOTCONF="${TMPROOT-}/boot/grub/grub.cfg" +if [ -s "$BOOTCONF" ]; then + if [ -n "$CONSOLE" ]; then + sed -i -e '/[[:space:]]linux/ s/[[:space:]]console=[a-zA-Z0-9,]*//g' \ + -e "/[[:space:]]linux/ s/$/ console=tty0 console=$SYSCON/g" \ + -e "/[[:space:]]linux/ s/ quiet//g" \ + "$BOOTCONF" + fi + # Change menu timeout + if [ -n "$BOOT_TIMEOUT" ]; then + sed -i "s/set timeout=.*/set timeout=$BOOT_TIMEOUT/" "$BOOTCONF" + fi +fi +BOOTCONF="${TMPROOT-}/etc/sysconfig/grub2" +if [ -s "$BOOTCONF" ]; then + if [ -n "$CONSOLE" ]; then + sed -i -e '/GRUB_CMDLINE_LINUX/ s/[[:space:]]console=[a-zA-Z0-9,]*//g' \ + -e "/GRUB_CMDLINE_LINUX/ s/'$/ console=tty0 console=$SYSCON'/g" \ + -e "/GRUB_CMDLINE_LINUX/ s/ quiet / /g;s/ quiet'/'/g" \ + "$BOOTCONF" + fi + # Change menu timeout + if [ -n "$BOOT_TIMEOUT" ]; then + shell_config_set "$BOOTCONF" GRUB_TIMEOUT "$BOOT_TIMEOUT" + fi +fi +unset BOOTCONF + +# Enable vnc mode for alterator-setup +ALTERATOR_SETUP_CONF=${TMPROOT-}/etc/alterator-setup/config +if [ -f "$ALTERATOR_SETUP_CONF" ]; then + case "$VNC" in + 1) + sed '/ALTERATOR_SETUP_VNC=/d' -i "$ALTERATOR_SETUP_CONF" + echo 'ALTERATOR_SETUP_VNC=1' >> "$ALTERATOR_SETUP_CONF" + ;; + 0) + sed '/^ALTERATOR_SETUP_VNC=/s/^/#/' -i "$ALTERATOR_SETUP_CONF" + ;; + esac +fi + +# extract addon.tar +if [ -n "$ADDON" ]; then + print_message "Extract archive $ADDON to rootfs..." + tar -x -C "$TMPROOT" -f "$ADDON" || + fatal_error "Extract $ADDON failed!!!" + print_done +fi + +# use /etc/initrd.mk.oem in rootfs +if [ "$INITRD_OEM" = 1 ]; then + print_message "Copying initrd.mk.oem to initrd.mk ..." + cp $TMPROOT/etc/initrd.mk{.oem,} + print_done +fi + +# mount chroot if needed +if [ -n "$RPM_INSTALL" ] || [ -n "$ROOT_PASSWD" ] || + [ -n "$USER_NAME" ] || [ -n "$USER_PASSWD" ] || + [ -n "$DEFAULT_KERNEL" ] || [ -n "$EFI" ]; then + print_message "Mount chroot ..." + mount_chroot || fatal_error "Mount chroot failed!!!" + print_done +fi + +# install additions packages +if [ -n "$RPM_INSTALL" ]; then + print_message "Install additions rpm packages ..." + rpm_install "$RPM_INSTALL" || + fatal_error "Failed install rpm packages!!!" + print_done +fi + +if [ -n "$DEFAULT_KERNEL" ]; then + print_message "Set default kernel: $DEFAULT_KERNEL ..." + exec_chroot installkernel --keep-initrd -u "$DEFAULT_KERNEL" || + fatal_error "Failed to set default kernel!!!" + print_done +fi + +if [ -n "$ROOT_PASSWD" ]; then + print_message "Set root password ..." + exec_chroot usermod -p "$(head -n1 "$ROOT_PASSWD")" "root" || + fatal_error "Failed to set root password!!!" + print_done +fi + +if [ -n "$USER_NAME" ] && [ -n "$USER_PASSWD" ]; then + print_message "Create user \"$USER_NAME\" ..." + exec_chroot useradd -m "$USER_NAME" || + fatal_error "Failed to add user \"${USER_NAME}\"!!!" + print_done + print_message "Set password for user \"$USER_NAME\" ..." + exec_chroot usermod -p "$(head -n1 "$USER_PASSWD")" "$USER_NAME" || + fatal_error "Failed to set $USER_NAME password!!!" + print_done +fi + +if [ -n "$DTB_FILE" ] && [ -n "$DTB_VENDOR" ] && [ -n "$DTB_KVER" ]; then + print_message "Install external dtb ..." + add_dtb || fatal_error "Failed to install vendor dtb!!!" + print_done +fi + +# grub-efi install +if [ -n "$EFI" ] && [ -n "$FIRMPART_NUM" ] && [ -f "$TMPROOT"/etc/sysconfig/grub2 ]; then + print_message "Trying grub-efi install..." + case "$(exec_chroot arch)" in + x86_64) exec_chroot grub-install --target=x86_64-efi --recheck --removable \ + --uefi-secure-boot || fatal_error "grub-install x86_64-efi failed!!!" + ;; + aarch64) exec_chroot grub-install --target=arm64-efi --recheck --removable \ + --uefi-secure-boot || fatal_error "grub-install arm64-efi failed!!!" + ;; + riscv64) exec_chroot grub-install --target=riscv64-efi --recheck --removable \ + --uefi-secure-boot || fatal_error "grub-install riscv64-efi failed!!!" + ;; + loongarch64) exec_chroot grub-install --target=loongarch64-efi --recheck --removable \ + --uefi-secure-boot || fatal_error "grub-install loongarch64-efi failed!!!" + ;; + *) fatal_error "Unknown ARCH!!!" + ;; + esac + exec_chroot update-grub || fatal_error "update-grub failed!!!" + print_done +fi + +final_exit diff --git a/alt-rootfs-installer/alt-rootfs-installer.spec b/alt-rootfs-installer/alt-rootfs-installer.spec new file mode 100644 index 0000000..4da50f2 --- /dev/null +++ b/alt-rootfs-installer/alt-rootfs-installer.spec @@ -0,0 +1,252 @@ +Name: alt-rootfs-installer +Version: 0.7.4 +Release: alt1 +Summary: Installer rootfs archive to any specified block device +License: GPL-2.0-or-later +Group: System/Configuration/Other +URL: https://altlinux.space/antohami/alt-rootfs-installer +VCS: https://altlinux.space/antohami/alt-rootfs-installer +BuildArch: noarch +Source: %name-%version.tar +Patch: %name-%version-%release.patch + +%description +Allows one to first select a source rootfs archive installer. The rootfs must be +containing File Systems with u-boot for target board. +This fork arm-image-installer. + +%prep +%setup +%autopatch -p1 + +%install +install -d %buildroot%_datadir/%name +install -d %buildroot%_datadir/%name/socs.d +cp -a socs.d/* %buildroot%_datadir/%name/socs.d/ +install -d %buildroot%_datadir/%name/boards.d +cp -a boards.d/* %buildroot%_datadir/%name/boards.d/ +install -pm 644 log functions EXTRA_OPTIONS SUPPORTED-BOARDS \ + %buildroot%_datadir/%name + +install -d %buildroot%_bindir +install -pm 0755 %name %buildroot%_bindir/ + +install -d %buildroot%_docdir/%name +install -pm 644 AUTHORS COPYING README SUPPORTED-BOARDS \ + %buildroot%_docdir/%name + +%files +%doc %_docdir/%name +%_bindir/* +%_datadir/%name/ + +%changelog +* Mon Jun 29 2026 Anton Midyukov 0.7.4-alt1 +- Refactoring find of partitions (thanks Egor Shestakov). +- Fix log to file (thanks Egor Shestakov). + +* Thu Mar 19 2026 Anton Midyukov 0.7.3-alt2 +- Add starfive_visionfive2 and pine64_star64 boards (thx Ilya Sorochan). + +* Thu Jan 15 2026 Anton Midyukov 0.7.3-alt1 +- fix: always create /boot partition with LUKS (thx ved@). +- option --luks-opt is sufficient for creating a LUKS partition (thx ved@). + +* Tue Jan 06 2026 Anton Midyukov 0.7.2-alt3 +- Update URL, add VCS tag. + +* Thu Dec 04 2025 Anton Midyukov 0.7.2-alt2 +- fix show current version +- Update supported boards for u-boot-rockhip 2025.10 +- Add DTB_FILE, DTB_VENDOR and DTB_KVER extra options + +* Mon Sep 22 2025 Anton Midyukov 0.7.2-alt1 +- Add --root-fstype and --root-fs-opt options + +* Fri Jul 25 2025 Anton Midyukov 0.7.1-alt2 +- Add powkiddy-x35s-rk3566 board + +* Mon Jul 21 2025 Anton Midyukov 0.7.1-alt1 +- Add install grub-efi +- socs.d/SiFive-riscv64.sh: fix override variable +- Update supported boards for u-boot-rockhip 2025.07 + +* Thu Jun 19 2025 Anton Midyukov 0.7.0-alt1 +- New version 0.7.0 +- Add --extra-options +- Remove outdated riscv64 board scripts + +* Wed Apr 23 2025 Anton Midyukov 0.6.3-alt3 +- Rockchips-aarch64.sh: set serial tty rate to 1500000 + +* Fri Mar 28 2025 Anton Midyukov 0.6.3-alt2 +- socs-utils: fix conditions for add boot part (Closes: 53651) + +* Mon Mar 24 2025 Anton Midyukov 0.6.3-alt1 +- Add New Platforms NP-504a board support (thx Daniil Gnusarev) + +* Fri Mar 21 2025 Anton Midyukov 0.6.2-alt1 +- Add board repka_pi4 (Closes: 51646) + +* Mon Mar 03 2025 Anton Midyukov 0.6.1-alt1 +- Add --bootpart and --luks options (thanks Egor Shestakov ved@) +- Drop Nvidia Jetson Nano support + +* Tue Jan 14 2025 Anton Midyukov 0.6.0-alt1 +- Rockchips-aarch64.sh: Improvements for support U-Boot of vendor +- Rockchips-aarch64.sh: add compressed u-boot images support (zstd) +- Update supported boards for u-boot-rockchip 2025.01 +- Drop support Sunxi armh and Raspberry Pi + +* Thu Jun 06 2024 Anton Midyukov 0.5.12-alt1 +- add anbernic-rg552-rk3399 support + +* Thu Apr 25 2024 Anton Midyukov 0.5.11-alt1 +- SUPPORTED-BOARDS: fix lists + +* Fri Apr 05 2024 Anton Midyukov 0.5.10-alt1 +- Update supported boards for u-boot 2024.04 +- socs-utils: rename function update_cmdline.txt -> update_cmdline_txt +- alt-rootfs-installer: don't include socs-utils ahead of time +- alt-rootfs-installer: don't include logging ahead of time +- spec: drop obsoletes/provides arm-rootfs-installer + +* Thu Jul 27 2023 Anton Midyukov 0.5.9-alt1 +- alt-rootfs-installer: set serial console for grub also, cleanup quiet +- Update list of supported boards for u-boot 2023.07 + +* Tue May 23 2023 Anton Midyukov 0.5.8-alt1 +- Add RBS Repka Pi 3 board support (thanks jqt4) + +* Sat Feb 18 2023 Anton Midyukov 0.5.7-alt1 +- Add Orangepi 4 support (Closes: 45187) + +* Fri Jan 20 2023 Anton Midyukov 0.5.6-alt1 +- add nvme support (Closes: 44408) +- socs-utils: fix clear_riscv64_bootloader_partition for /dev/mmcblkXpN +- socs-utils: use oflag=direct for dd when write image +- Update list of supported boards for u-boot 2023.01 + +* Sun Mar 13 2022 Anton Midyukov 0.5.5-alt1 +- jetson_nano-aarch64.sh: extract archive to /root +- fix include logging function for portable version + +* Wed Jan 26 2022 Anton Midyukov 0.5.4-alt1 +- Fix rewrite bootloader with GPT partition table +- Add AllWinner riscv64 support (nezha, lichee_rv) + +* Mon Jan 24 2022 Anton Midyukov 0.5.3-alt1 +- Add new targets sifive_unleashed, sifive_unmatched +- Update supported boards with u-boot 2022.01 +- Rockchips-aarch64.sh: add support u-boot-rockchip 2022.01 + +* Sat Dec 04 2021 Anton Midyukov 0.5.2-alt1 +- Add HiFive Unmatched support (thanks jqt4@) +- socs-utils: fix find_firmware_partition +- alt-rootfs-installer: add new option --vnc +- riscv64: enable CONSOLE by default +- enable vnc for HiFive-Unleashed-* +- Update supported boards with u-boot 2021.10 + +* Mon Jul 26 2021 Anton Midyukov 0.5.1-alt1 +- Prevent concurrent use of options --image-in and --image-out +- Fixed mounting ROOTPART when writing image +- Add option '--addconsole' +- Rockchips-aarch64.sh: use msdos partition table +- socs.d: Set START_SECTOR to 16 MiB for AllWinner and RPi +- Fixed output of the final message +- jetson_nano-aarch64.sh: require python2 +- not create symlink arm-rootfs-installer more + +* Fri Jun 11 2021 Anton Midyukov 0.5.0-alt2 +- copy SUPPORTED-BOARDS file to %_datadir/%name (Closes: 40209) + +* Mon Jun 07 2021 Anton Midyukov 0.5.0-alt1 +- Added new logging subsystem (thanks arei@) +- Update message output + +* Fri May 21 2021 Anton Midyukov 0.4.5-alt1 +- Fixed unmounting MEDIA, when writing image +- Fixed imposition info messages +- Add --efi-mbr option + +* Tue Mar 23 2021 Anton Midyukov 0.4.4-alt1 +- Fix HiFive Unleashed OpenSBI script (Thanks arei@) +- Update supported boards with u-boot 2021.01 +- Clean disklabel in prepare_media +- Fix GPT part table always +- mount FIRMPART to ROOTPART/boot/efi + +* Sun Dec 27 2020 Anton Midyukov 0.4.3-alt1 +- Fix resize root partition + +* Fri Nov 27 2020 Anton Midyukov 0.4.2-alt1 +- Fixed support newer u-boot for Rockchip +- Update supported boards +- Added HiFive Unleashed OpenSBI SoC (riscv64) support (Thanks arei@) +- Added --uefi option + +* Thu Sep 17 2020 Anton Midyukov 0.4.1-alt1 +- alt-rootfs-installer: Fix for empty $TMP +- rpi-aarch64.sh: Fix write bootloader on Raspberry Pi 4 + +* Tue Sep 01 2020 Anton Midyukov 0.4.0-alt1 +- Restructure code in the socs.d (Thanks arei@) +- Many fixes. + +* Wed May 27 2020 Anton Midyukov 0.3.4-alt1 +- Added support Raspberry Pi 4 on armh + +* Thu May 14 2020 Anton Midyukov 0.3.3-alt1 +- Fix typo + +* Mon Apr 13 2020 Anton Midyukov 0.3.2-alt1 +- Added resize option +- Replace LABEL to UUID /usr/share/u-boot/rpi_4/cmdline.txt +- Update supported boards (u-boot 2020.01) + +* Wed Nov 13 2019 Anton Midyukov 0.3.1.2-alt1 +- Simplified check for Raspberry Pi devices targets +- Add u-boot 2019.10 support +- Fix bbl-riscv64 (Thanks arei@) + +* Tue Oct 08 2019 Anton Midyukov 0.3.1.1-alt1 +- hot-fix for Nvidia Jetson Nano (unmount device) + +* Fri Oct 04 2019 Anton Midyukov 0.3.1-alt1 +- 0.3.1 +- make messages userfriendly more + +* Wed Sep 11 2019 Anton Midyukov 0.3.0-alt1 +- 0.3.0 +- Add the ability create images from tarball +- Add the ability write image to media +- Add support u-boot-*-201907 +- bug fixes and typos + +* Fri Aug 02 2019 Anton Midyukov 0.2.4.1-alt1 +- hot fix release +- change interpreter on /bin/bash + +* Mon Jul 22 2019 Anton Midyukov 0.2.4-alt1 +- 0.2.4 +- Add support Nvidia Jetson Nano +- Add support u-boot-sunxi-201907 + +* Wed Jun 26 2019 Anton Midyukov 0.2.3-alt1 +- 0.2.3 +- Simplified code, improved portability (thanks sem@ and arei@) + +* Thu Apr 18 2019 Anton Midyukov 0.2.1-alt1 +- 0.2.1 +- support u-boot-* 2019.04 + +* Fri Mar 29 2019 Anton Midyukov 0.2-alt0.1 +- 0.2-beta +- Renamed package arm-rootfs-installer to alt-rootfs-installer +- Add support riscv64 (thanks arei@) +- Update URL + +* Sun Feb 24 2019 Anton Midyukov 0.1-alt1 +- Initial build + diff --git a/alt-rootfs-installer/boards.d/a64-olinuxino b/alt-rootfs-installer/boards.d/a64-olinuxino new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/a64-olinuxino @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/a64-olinuxino-emmc b/alt-rootfs-installer/boards.d/a64-olinuxino-emmc new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/a64-olinuxino-emmc @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/amarula_a64_relic b/alt-rootfs-installer/boards.d/amarula_a64_relic new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/amarula_a64_relic @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/anbernic-rg552-rk3399 b/alt-rootfs-installer/boards.d/anbernic-rg552-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/anbernic-rg552-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/anbernic-rgxx3-rk3566 b/alt-rootfs-installer/boards.d/anbernic-rgxx3-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/anbernic-rgxx3-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/anbernic_rg35xx_h700 b/alt-rootfs-installer/boards.d/anbernic_rg35xx_h700 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/anbernic_rg35xx_h700 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/atb-uspd20k b/alt-rootfs-installer/boards.d/atb-uspd20k new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/atb-uspd20k @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/bananapi-f3 b/alt-rootfs-installer/boards.d/bananapi-f3 new file mode 120000 index 0000000..025c0d4 --- /dev/null +++ b/alt-rootfs-installer/boards.d/bananapi-f3 @@ -0,0 +1 @@ +../socs.d/K1x-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/bananapi_m2_plus_h5 b/alt-rootfs-installer/boards.d/bananapi_m2_plus_h5 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/bananapi_m2_plus_h5 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/bananapi_m64 b/alt-rootfs-installer/boards.d/bananapi_m64 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/bananapi_m64 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/beelink_gs1 b/alt-rootfs-installer/boards.d/beelink_gs1 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/beelink_gs1 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/bpi-r2-pro-rk3568 b/alt-rootfs-installer/boards.d/bpi-r2-pro-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/bpi-r2-pro-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/chromebook_bob b/alt-rootfs-installer/boards.d/chromebook_bob new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/chromebook_bob @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/chromebook_kevin b/alt-rootfs-installer/boards.d/chromebook_kevin new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/chromebook_kevin @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/cm3588-nas-rk3588 b/alt-rootfs-installer/boards.d/cm3588-nas-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/cm3588-nas-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/coolpi-4b-rk3588s b/alt-rootfs-installer/boards.d/coolpi-4b-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/coolpi-4b-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/coolpi-cm5-evb-rk3588 b/alt-rootfs-installer/boards.d/coolpi-cm5-evb-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/coolpi-cm5-evb-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/coolpi-cm5-genbook-rk3588 b/alt-rootfs-installer/boards.d/coolpi-cm5-genbook-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/coolpi-cm5-genbook-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/eaidk-610-rk3399 b/alt-rootfs-installer/boards.d/eaidk-610-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/eaidk-610-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/emlid_neutis_n5_devboard b/alt-rootfs-installer/boards.d/emlid_neutis_n5_devboard new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/emlid_neutis_n5_devboard @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/evb-px30 b/alt-rootfs-installer/boards.d/evb-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/evb-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/evb-rk3328 b/alt-rootfs-installer/boards.d/evb-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/evb-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/evb-rk3399 b/alt-rootfs-installer/boards.d/evb-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/evb-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/evb-rk3568 b/alt-rootfs-installer/boards.d/evb-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/evb-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/evb-rk3588 b/alt-rootfs-installer/boards.d/evb-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/evb-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/ficus-rk3399 b/alt-rootfs-installer/boards.d/ficus-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/ficus-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/firefly-px30 b/alt-rootfs-installer/boards.d/firefly-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/firefly-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/firefly-rk3399 b/alt-rootfs-installer/boards.d/firefly-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/firefly-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/gameforce-ace-rk3588s b/alt-rootfs-installer/boards.d/gameforce-ace-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/gameforce-ace-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/generic-rk3568 b/alt-rootfs-installer/boards.d/generic-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/generic-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/generic-rk3588 b/alt-rootfs-installer/boards.d/generic-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/generic-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/jaguar-rk3588 b/alt-rootfs-installer/boards.d/jaguar-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/jaguar-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/khadas-edge-captain-rk3399 b/alt-rootfs-installer/boards.d/khadas-edge-captain-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/khadas-edge-captain-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/khadas-edge-rk3399 b/alt-rootfs-installer/boards.d/khadas-edge-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/khadas-edge-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/khadas-edge-v-rk3399 b/alt-rootfs-installer/boards.d/khadas-edge-v-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/khadas-edge-v-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/khadas-edge2-rk3588s b/alt-rootfs-installer/boards.d/khadas-edge2-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/khadas-edge2-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/lckfb-tspi-rk3566 b/alt-rootfs-installer/boards.d/lckfb-tspi-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/lckfb-tspi-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/leez-rk3399 b/alt-rootfs-installer/boards.d/leez-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/leez-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/libretech_all_h3_cc_h5 b/alt-rootfs-installer/boards.d/libretech_all_h3_cc_h5 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/libretech_all_h3_cc_h5 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/libretech_all_h3_it_h5 b/alt-rootfs-installer/boards.d/libretech_all_h3_it_h5 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/libretech_all_h3_it_h5 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/libretech_all_h5_cc_h5 b/alt-rootfs-installer/boards.d/libretech_all_h5_cc_h5 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/libretech_all_h5_cc_h5 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/lichee_rv b/alt-rootfs-installer/boards.d/lichee_rv new file mode 120000 index 0000000..015b058 --- /dev/null +++ b/alt-rootfs-installer/boards.d/lichee_rv @@ -0,0 +1 @@ +../socs.d/AllWinner-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/lubancat-2-rk3568 b/alt-rootfs-installer/boards.d/lubancat-2-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/lubancat-2-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/milkv-jupiter b/alt-rootfs-installer/boards.d/milkv-jupiter new file mode 120000 index 0000000..025c0d4 --- /dev/null +++ b/alt-rootfs-installer/boards.d/milkv-jupiter @@ -0,0 +1 @@ +../socs.d/K1x-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopc-t4-rk3399 b/alt-rootfs-installer/boards.d/nanopc-t4-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopc-t4-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopc-t6-rk3588 b/alt-rootfs-installer/boards.d/nanopc-t6-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopc-t6-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-m4-2gb-rk3399 b/alt-rootfs-installer/boards.d/nanopi-m4-2gb-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-m4-2gb-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-m4-rk3399 b/alt-rootfs-installer/boards.d/nanopi-m4-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-m4-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-m4b-rk3399 b/alt-rootfs-installer/boards.d/nanopi-m4b-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-m4b-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-neo4-rk3399 b/alt-rootfs-installer/boards.d/nanopi-neo4-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-neo4-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r2c-plus-rk3328 b/alt-rootfs-installer/boards.d/nanopi-r2c-plus-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r2c-plus-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r2c-rk3328 b/alt-rootfs-installer/boards.d/nanopi-r2c-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r2c-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r2s-plus-rk3328 b/alt-rootfs-installer/boards.d/nanopi-r2s-plus-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r2s-plus-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r2s-rk3328 b/alt-rootfs-installer/boards.d/nanopi-r2s-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r2s-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r3s-rk3566 b/alt-rootfs-installer/boards.d/nanopi-r3s-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r3s-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r4s-rk3399 b/alt-rootfs-installer/boards.d/nanopi-r4s-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r4s-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r5c-rk3568 b/alt-rootfs-installer/boards.d/nanopi-r5c-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r5c-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r5s-rk3568 b/alt-rootfs-installer/boards.d/nanopi-r5s-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r5s-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r6c-rk3588s b/alt-rootfs-installer/boards.d/nanopi-r6c-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r6c-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi-r6s-rk3588s b/alt-rootfs-installer/boards.d/nanopi-r6s-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi-r6s-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi_a64 b/alt-rootfs-installer/boards.d/nanopi_a64 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi_a64 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi_neo2 b/alt-rootfs-installer/boards.d/nanopi_neo2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi_neo2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi_neo_plus2 b/alt-rootfs-installer/boards.d/nanopi_neo_plus2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi_neo_plus2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nanopi_r1s_h5 b/alt-rootfs-installer/boards.d/nanopi_r1s_h5 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nanopi_r1s_h5 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/neu6a-io-rk3588 b/alt-rootfs-installer/boards.d/neu6a-io-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/neu6a-io-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/neu6b-io-rk3588 b/alt-rootfs-installer/boards.d/neu6b-io-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/neu6b-io-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nezha b/alt-rootfs-installer/boards.d/nezha new file mode 120000 index 0000000..015b058 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nezha @@ -0,0 +1 @@ +../socs.d/AllWinner-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/nova-rk3588s b/alt-rootfs-installer/boards.d/nova-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/nova-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/np-504a-rk3568 b/alt-rootfs-installer/boards.d/np-504a-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/np-504a-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/oceanic_5205_5inmfd b/alt-rootfs-installer/boards.d/oceanic_5205_5inmfd new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/oceanic_5205_5inmfd @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/odroid-go2 b/alt-rootfs-installer/boards.d/odroid-go2 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/odroid-go2 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/odroid-m1-rk3568 b/alt-rootfs-installer/boards.d/odroid-m1-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/odroid-m1-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/odroid-m1s-rk3566 b/alt-rootfs-installer/boards.d/odroid-m1s-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/odroid-m1s-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/odroid-m2-rk3588s b/alt-rootfs-installer/boards.d/odroid-m2-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/odroid-m2-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-3b-rk3566 b/alt-rootfs-installer/boards.d/orangepi-3b-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-3b-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-4-lts-rk3399 b/alt-rootfs-installer/boards.d/orangepi-4-lts-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-4-lts-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-4-rk3399 b/alt-rootfs-installer/boards.d/orangepi-4-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-4-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-5-max-rk3588 b/alt-rootfs-installer/boards.d/orangepi-5-max-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-5-max-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-5-plus-rk3588 b/alt-rootfs-installer/boards.d/orangepi-5-plus-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-5-plus-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-5-rk3588s b/alt-rootfs-installer/boards.d/orangepi-5-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-5-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-5-ultra-rk3588 b/alt-rootfs-installer/boards.d/orangepi-5-ultra-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-5-ultra-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-r1-plus-lts-rk3328 b/alt-rootfs-installer/boards.d/orangepi-r1-plus-lts-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-r1-plus-lts-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-r1-plus-rk3328 b/alt-rootfs-installer/boards.d/orangepi-r1-plus-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-r1-plus-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-rk3399 b/alt-rootfs-installer/boards.d/orangepi-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi-rv2 b/alt-rootfs-installer/boards.d/orangepi-rv2 new file mode 120000 index 0000000..025c0d4 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi-rv2 @@ -0,0 +1 @@ +../socs.d/K1x-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_3 b/alt-rootfs-installer/boards.d/orangepi_3 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_3 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_lite2 b/alt-rootfs-installer/boards.d/orangepi_lite2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_lite2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_one_plus b/alt-rootfs-installer/boards.d/orangepi_one_plus new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_one_plus @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_pc2 b/alt-rootfs-installer/boards.d/orangepi_pc2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_pc2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_prime b/alt-rootfs-installer/boards.d/orangepi_prime new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_prime @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_win b/alt-rootfs-installer/boards.d/orangepi_win new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_win @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_zero2 b/alt-rootfs-installer/boards.d/orangepi_zero2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_zero2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_zero2w b/alt-rootfs-installer/boards.d/orangepi_zero2w new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_zero2w @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_zero3 b/alt-rootfs-installer/boards.d/orangepi_zero3 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_zero3 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_zero_plus b/alt-rootfs-installer/boards.d/orangepi_zero_plus new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_zero_plus @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/orangepi_zero_plus2 b/alt-rootfs-installer/boards.d/orangepi_zero_plus2 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/orangepi_zero_plus2 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pine64-lts b/alt-rootfs-installer/boards.d/pine64-lts new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pine64-lts @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pine64_plus b/alt-rootfs-installer/boards.d/pine64_plus new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pine64_plus @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pine64_star64 b/alt-rootfs-installer/boards.d/pine64_star64 new file mode 120000 index 0000000..9577752 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pine64_star64 @@ -0,0 +1 @@ +../socs.d/StarFive-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pine_h64 b/alt-rootfs-installer/boards.d/pine_h64 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pine_h64 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinebook b/alt-rootfs-installer/boards.d/pinebook new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinebook @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinebook-pro-rk3399 b/alt-rootfs-installer/boards.d/pinebook-pro-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinebook-pro-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinephone b/alt-rootfs-installer/boards.d/pinephone new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinephone @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinephone-pro-rk3399 b/alt-rootfs-installer/boards.d/pinephone-pro-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinephone-pro-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinetab b/alt-rootfs-installer/boards.d/pinetab new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinetab @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/pinetab2-rk3566 b/alt-rootfs-installer/boards.d/pinetab2-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/pinetab2-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/powkiddy-x35s-rk3566 b/alt-rootfs-installer/boards.d/powkiddy-x35s-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/powkiddy-x35s-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/powkiddy-x55-rk3566 b/alt-rootfs-installer/boards.d/powkiddy-x55-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/powkiddy-x55-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/puma-rk3399 b/alt-rootfs-installer/boards.d/puma-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/puma-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/px30-core-ctouch2-of10-px30 b/alt-rootfs-installer/boards.d/px30-core-ctouch2-of10-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/px30-core-ctouch2-of10-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/px30-core-ctouch2-px30 b/alt-rootfs-installer/boards.d/px30-core-ctouch2-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/px30-core-ctouch2-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/px30-core-edimm2.2-px30 b/alt-rootfs-installer/boards.d/px30-core-edimm2.2-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/px30-core-edimm2.2-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/qnap-ts433-rk3568 b/alt-rootfs-installer/boards.d/qnap-ts433-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/qnap-ts433-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/quartz64-a-rk3566 b/alt-rootfs-installer/boards.d/quartz64-a-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/quartz64-a-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/quartz64-b-rk3566 b/alt-rootfs-installer/boards.d/quartz64-b-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/quartz64-b-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/quartzpro64-rk3588 b/alt-rootfs-installer/boards.d/quartzpro64-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/quartzpro64-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/radxa-cm3-io-rk3566 b/alt-rootfs-installer/boards.d/radxa-cm3-io-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/radxa-cm3-io-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/radxa-e25-rk3568 b/alt-rootfs-installer/boards.d/radxa-e25-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/radxa-e25-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/radxa-zero-3-rk3566 b/alt-rootfs-installer/boards.d/radxa-zero-3-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/radxa-zero-3-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/repka_pi3 b/alt-rootfs-installer/boards.d/repka_pi3 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/repka_pi3 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/repka_pi4 b/alt-rootfs-installer/boards.d/repka_pi4 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/repka_pi4 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/ringneck-px30 b/alt-rootfs-installer/boards.d/ringneck-px30 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/ringneck-px30 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/roc-cc-rk3328 b/alt-rootfs-installer/boards.d/roc-cc-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/roc-cc-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/roc-pc-mezzanine-rk3399 b/alt-rootfs-installer/boards.d/roc-pc-mezzanine-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/roc-pc-mezzanine-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/roc-pc-rk3399 b/alt-rootfs-installer/boards.d/roc-pc-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/roc-pc-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-3a-rk3568 b/alt-rootfs-installer/boards.d/rock-3a-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-3a-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-3b-rk3568 b/alt-rootfs-installer/boards.d/rock-3b-rk3568 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-3b-rk3568 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-3c-rk3566 b/alt-rootfs-installer/boards.d/rock-3c-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-3c-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-4c-plus-rk3399 b/alt-rootfs-installer/boards.d/rock-4c-plus-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-4c-plus-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-4se-rk3399 b/alt-rootfs-installer/boards.d/rock-4se-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-4se-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-5-itx-rk3588 b/alt-rootfs-installer/boards.d/rock-5-itx-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-5-itx-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-5c-rk3588s b/alt-rootfs-installer/boards.d/rock-5c-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-5c-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-pi-4-rk3399 b/alt-rootfs-installer/boards.d/rock-pi-4-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-pi-4-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-pi-4c-rk3399 b/alt-rootfs-installer/boards.d/rock-pi-4c-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-pi-4c-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-pi-e-rk3328 b/alt-rootfs-installer/boards.d/rock-pi-e-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-pi-e-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-pi-e-v3-rk3328 b/alt-rootfs-installer/boards.d/rock-pi-e-v3-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-pi-e-v3-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock-pi-n10-rk3399pro b/alt-rootfs-installer/boards.d/rock-pi-n10-rk3399pro new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock-pi-n10-rk3399pro @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock5a-rk3588s b/alt-rootfs-installer/boards.d/rock5a-rk3588s new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock5a-rk3588s @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock5b-rk3588 b/alt-rootfs-installer/boards.d/rock5b-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock5b-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock64-rk3328 b/alt-rootfs-installer/boards.d/rock64-rk3328 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock64-rk3328 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rock960-rk3399 b/alt-rootfs-installer/boards.d/rock960-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rock960-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/rockpro64-rk3399 b/alt-rootfs-installer/boards.d/rockpro64-rk3399 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/rockpro64-rk3399 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/sifive_unleashed b/alt-rootfs-installer/boards.d/sifive_unleashed new file mode 120000 index 0000000..a132fa2 --- /dev/null +++ b/alt-rootfs-installer/boards.d/sifive_unleashed @@ -0,0 +1 @@ +../socs.d/SiFive-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/sifive_unmatched b/alt-rootfs-installer/boards.d/sifive_unmatched new file mode 120000 index 0000000..a132fa2 --- /dev/null +++ b/alt-rootfs-installer/boards.d/sifive_unmatched @@ -0,0 +1 @@ +../socs.d/SiFive-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/sige7-rk3588 b/alt-rootfs-installer/boards.d/sige7-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/sige7-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/sopine_baseboard b/alt-rootfs-installer/boards.d/sopine_baseboard new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/sopine_baseboard @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/soquartz-blade-rk3566 b/alt-rootfs-installer/boards.d/soquartz-blade-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/soquartz-blade-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/soquartz-cm4-rk3566 b/alt-rootfs-installer/boards.d/soquartz-cm4-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/soquartz-cm4-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/soquartz-model-a-rk3566 b/alt-rootfs-installer/boards.d/soquartz-model-a-rk3566 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/soquartz-model-a-rk3566 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/starfive_visionfive2 b/alt-rootfs-installer/boards.d/starfive_visionfive2 new file mode 120000 index 0000000..9577752 --- /dev/null +++ b/alt-rootfs-installer/boards.d/starfive_visionfive2 @@ -0,0 +1 @@ +../socs.d/StarFive-riscv64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/tanix_tx1 b/alt-rootfs-installer/boards.d/tanix_tx1 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/tanix_tx1 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/tanix_tx6 b/alt-rootfs-installer/boards.d/tanix_tx6 new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/tanix_tx6 @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/teres_i b/alt-rootfs-installer/boards.d/teres_i new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/teres_i @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/tiger-rk3588 b/alt-rootfs-installer/boards.d/tiger-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/tiger-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/toybrick-rk3588 b/alt-rootfs-installer/boards.d/toybrick-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/toybrick-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/transpeed-8k618-t b/alt-rootfs-installer/boards.d/transpeed-8k618-t new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/transpeed-8k618-t @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/turing-rk1-rk3588 b/alt-rootfs-installer/boards.d/turing-rk1-rk3588 new file mode 120000 index 0000000..fe19864 --- /dev/null +++ b/alt-rootfs-installer/boards.d/turing-rk1-rk3588 @@ -0,0 +1 @@ +../socs.d/Rockchips-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/boards.d/x96_mate b/alt-rootfs-installer/boards.d/x96_mate new file mode 120000 index 0000000..af4a639 --- /dev/null +++ b/alt-rootfs-installer/boards.d/x96_mate @@ -0,0 +1 @@ +../socs.d/AllWinner-aarch64.sh \ No newline at end of file diff --git a/alt-rootfs-installer/functions b/alt-rootfs-installer/functions new file mode 100644 index 0000000..5b12672 --- /dev/null +++ b/alt-rootfs-installer/functions @@ -0,0 +1,480 @@ +#!/bin/bash +# vim:sw=8:noet + +# Except TEGRA +prepare_image() { + print_message "Creating image $IMAGE_OUT..." + dd if=/dev/zero of="$IMAGE_OUT" bs="$MB" count="$IMAGE_SIZE" || + fatal_error "failed to create image $IMAGE_OUT" + sync + print_done + losetup "$MEDIA" "$IMAGE_OUT" +} + +prepare_media() { + umount ${MEDIA}* +} + +clean_disklabel() { + print_message "Clean old partitions table at $MEDIA..." + # Clear the first block (two 512-byte sectors for + # MBR and header, and 16KiB primary GPT Table): + dd if=/dev/zero of=$MEDIA bs=512 count=128 && + # Clear secondary GPT Table + dd if=/dev/zero of=$MEDIA bs=512 count=34 seek=$(($(blockdev --getsz $MEDIA) - 34)) || + fatal_error "failed clean old partitions table at $MEDIA!!!" + print_done +} + +clear_riscv64_bootloader_partition() { + print_message "Find and clear old partitions with BBL and FSBL..." + [ -n "$BBL" ] && [ -n "$FSBL" ] || + fatal_error "BBL and FSBL variables is not defined" + let 'START_SECTOR_RAW = START_SECTOR * 2048' # 1 sector = 512 Byte + local PART_NUMS=$(ls "$MEDIA"* |sed "s:$MEDIA::" |sed 's/^p//') + [ -n "$PART_NUMS" ] || fatal_error "$MEDIA not contain partitions" + local PART_NUM= + for PART_NUM in $PART_NUMS; do + FIND_PART_CODE=$(sgdisk -i "$PART_NUM" "$MEDIA" | + grep 'Partition GUID code:' | cut -d ' ' -f 4) + case "$FIND_PART_CODE" in + "$BBL"|"$FSBL") + sgdisk -d "$PART_NUM" "$MEDIA" + continue + ;; + esac + FIND_PART_START=$(sgdisk -i "$PART_NUM" "$MEDIA" | + grep 'First sector: ' | cut -d ' ' -f 3) + [ "$FIND_PART_START" -ge "$START_SECTOR_RAW" ] || + fatal_error "Partition $PART_NUM is in the bootloader zone" + done +} + +create_disklabel() { + clean_disklabel + print_message "Creating disklabel $MEDIALABEL at $MEDIA..." + parted -s "$MEDIA" mklabel "$MEDIATABLE" || + fatal_error "failed to create partitions table $MEDIATABLE" + print_done +} + +format_partition() { + if [ -n "$FIRMPART" ]; then + print_message "Formating firmware partition to FAT32..." + echo 'y' | mkfs.fat -F 32 $FIRMPART || + fatal_error "failed to format firmware partition" + sync + print_done + fi + if [ -n "$BOOTPART" ]; then + print_message "Formating "$BOOTPART" boot partition to ext4..." + echo 'y' | mkfs.ext4 "$BOOTPART" || + fatal_error "failed to format BOOT partition" + sync + print_done + fi + if [ -n "${LUKS-}" ]; then + cryptsetup_luks_format + cryptsetup_luks_open + fi + print_message "Formating "$ROOTPART" root partition to $ROOT_FSTYPE..." + echo 'y' | mkfs.$ROOT_FSTYPE $ROOT_FS_OPT "$ROOTPART" || + fatal_error "failed to format ROOT partition" + sync + print_done +} + +set_bootflag() { + if [ "$MEDIATABLE" = msdos ] && [ -n "$FIRMPART_NUM" ]; then + if [ -z "$EFI" ]; then + if [ -z "$BOOTPART_NUM" ]; then + print_message "Setting boot flag at root partition..." + parted -s "$MEDIA" set "$ROOTPART_NUM" boot on || + fatal_error "failed to set bootflag on root partition" + print_done + else + print_message "Setting boot flag at boot partition..." + parted -s "$MEDIA" set "$BOOTPART_NUM" boot on || + fatal_error "failed to set bootflag on boot partition" + print_done + fi + else + print_message "Unsetting boot flag at root partition..." + parted -s "$MEDIA" set "$ROOTPART_NUM" boot off || + fatal_error "failed to unset boot flag on root partition" + print_done + fi + fi + + if [ "$MEDIATABLE" = gpt ] && [ -n "$FIRMPART_NUM" ]; then + if [ -n "$EFI" ]; then + print_message "Setting esp flag on EFI partition..." + parted -s "$MEDIA" set "$FIRMPART_NUM" esp on || + fatal_error "failed to set esp flag on EFI partition" + print_done + print_message "Unsetting bootflag on root partition..." + parted -s "$MEDIA" set "$ROOTPART_NUM" legacy_boot off || + fatal_error "failed to unset boot flag on root partition" + print_done + else + print_message "Unsetting esp flag on EFI partition..." + parted -s "$MEDIA" set "$FIRMPART_NUM" esp off || + fatal_error "failed to unset esp flag on EFI partition" + print_done + print_message "Setting bootflag on root partition..." + parted -s "$MEDIA" set "$ROOTPART_NUM" legacy_boot on || + fatal_error "failed to set boot flag on root partition" + print_done + fi + fi +} + +create_partition() { + [ -n "${START_SECTOR}" ] || START_SECTOR=2 + if [ -n "$FIRMPART" ]; then + print_message "Creating firmware partition..." + let NEXT_START="$START_SECTOR+$FIRMPART_SIZE" + echo 'y' | parted -s -a optimal "$MEDIA" \ + mkpart primary fat32 ${START_SECTOR}MiB ${NEXT_START}MiB || + fatal_error "failed to create firmware partition" + sync + print_done + fi + if [ -n "$BOOTPART" ]; then + print_message "Creating boot partition..." + [ -n "$NEXT_START" ] && START_BOOT_SECTOR=$NEXT_START || + START_BOOT_SECTOR="$START_SECTOR" + let NEXT_START="$START_BOOT_SECTOR+$BOOTPART_SIZE" + echo 'y' | parted -s -a optimal "$MEDIA" \ + mkpart primary ext4 ${START_BOOT_SECTOR}MiB ${NEXT_START}MiB || + fatal_error "failed to create BOOT partition" + sync + print_done + fi + print_message "Creating root partition..." + [ -n "$END_SECTOR" ] || END_SECTOR=100% + [ -n "$NEXT_START" ] || NEXT_START="$START_SECTOR" + echo 'y' | parted -s -a optimal "$MEDIA" \ + mkpart primary "$NEXT_START"MiB "$END_SECTOR" || + fatal_error "failed to create ROOT partition" + sync + print_done + [ -z "${IMAGE_OUT-}" ] || finish_partitioning +} + +cryptsetup_luks_format() { + print_message "Formatting luks..." + local PREV_LOG_MODE=$LOG_MODE + LOG_MODE="con" + local LUKS_DEFAULT_OPTIONS="--batch-mode --verify-passphrase" + cryptsetup luksFormat $LUKS_DEFAULT_OPTIONS $LUKS_OPT $ROOTPART || + fatal_error "failed to encrypt root partition" + LOG_MODE=PREV_LOG_MODE + print_done +} + +cryptsetup_luks_open() { + print_message "Try to decrypt root partition..." + local UNIQUE_MAPPING_NAME="luks_$(basename $ROOTPART)" + cryptsetup open $ROOTPART $UNIQUE_MAPPING_NAME + ROOTPART="/dev/mapper/$UNIQUE_MAPPING_NAME" + LUKS_DEVICE_IS_OPEN="1" +} + +cryptsetup_luks_close() { + cryptsetup close $ROOTPART + LUKS_DEVICE_IS_OPEN= +} + +finish_partitioning() { + # Create device maps from partition tables + if [ -n "${IMAGE_OUT-}" ]; then + kpartx -a -s "$MEDIA" + ROOTPART="/dev/mapper/$(basename "$MEDIA")p$ROOTPART_NUM" + [ -n "$FIRMPART_NUM" ] && + FIRMPART="/dev/mapper/$(basename "$MEDIA")p$FIRMPART_NUM" + [ -n "$BOOTPART_NUM" ] && + BOOTPART="/dev/mapper/$(basename "$MEDIA")p$BOOTPART_NUM" + [ -n "$BBLPART_NUM" ] && + BBLPART="/dev/mapper/$(basename "$MEDIA")p$BBLPART_NUM" + fi +} + +# This function REQUIRES a path to the device and +# prints the path to root partition, if there is one. +# +# The presence of /etc/fstab has been taken as the +# main characteristic of the root partition. +# +find_root_partition() { + local TMPDEVROOT DEVNAME=$1 + TMPDEVROOT=$(mktemp -d --tmpdir devroot.XXXXXXXX) + [ -d "$TMPDEVROOT" ] || + fatal_error "Cannot create a temporary directory" + for d in "${DEVNAME}"?*; do + local TDIR=$(findmnt --noheading --output TARGET "$d") + if [ -z "$TDIR" ]; then + TDIR="${TMPDEVROOT}/${d##*/}" + mkdir "$TDIR" + mount -o ro $d "$TDIR" || + continue + fi + if [ -f "$TDIR/etc/fstab" ]; then + echo "$d" + break + fi + done + [ `ls "$TMPDEVROOT" | wc -l` -gt 0 ] && + umount "$TMPDEVROOT"/* + rm -rf "$TMPDEVROOT" +} + +# Takes a part number from the path to partition and prints it. +# +partnum() { + local PART=$1 + echo ${PART##${MEDIA}${partsuffix}} +} + +# Prints the path of device which specified by LABEL/UUID/path. +# +dev_by_spec() { + blkid --output device -t $1 +} + +# This function sets partitions' numbers and paths +# that are using everywhere in alt-rootfs-installer. +# +# Call it when precise partitions number are required. +# +find_partitions() { + ROOTPART=$(find_root_partition "$MEDIA") + ROOTPART_NUM=$(partnum "$ROOTPART") + local TDIR=$(findmnt --noheading --output TARGET "$ROOTPART") + local MOUNTED=0 + if [ ! -d "$TDIR" ]; then + TDIR=$(mktemp -d --tmpdir 'find_fstab.XXXXXXXX') + mount -o ro "$ROOTPART" "$TDIR" + MOUNTED=1 + fi + local FSTAB="$TDIR"/etc/fstab + + local BOOTSPEC=$(grep '/boot\s' "$FSTAB" | awk '{print $1}') + BOOTPART=$(dev_by_spec "$BOOTSPEC") + BOOTPART_NUM=$(partnum $BOOTPART) + + local FIRMSPEC=$(grep '/boot/efi\s' "$FSTAB" | awk '{print $1}') + FIRMPART=$(dev_by_spec "$FIRMSPEC") + FIRMPART_NUM=$(partnum $FIRMPART) + + if [ $MOUNTED = 1 ]; then + umount "$TDIR" + rm -rf "$TDIR" + fi +} + +change_partition() { + [ -n "$FIRMPART_NUM" ] && FIRMPART="${MEDIA}${partsuffix}${FIRMPART_NUM}" || + FIRMPART= + [ -n "$BOOTPART_NUM" ] && BOOTPART="${MEDIA}${partsuffix}${BOOTPART_NUM}" || + BOOTPART= + [ -n "$ROOTPART_NUM" ] && ROOTPART="${MEDIA}${partsuffix}${ROOTPART_NUM}" +} + +mount_partition() { + [ -n "${ROOTFS-}" ] || [ -z "${LUKS-}" ] || cryptsetup_luks_open + # Get UUID + ROOTPART_UID="$(blkid $ROOTPART | sed -E 's;.*\sUUID="([^"]*)".*;\1;')" + TMPROOT="$(mktemp -d --tmpdir 'rootpart.XXXXXXXX')" + [ -d "${TMPROOT-}" ] || + fatal_error "Can't create a temporary directory for rootfs" + print_message "Mounting root partition to the temporary directory..." + mount "$ROOTPART" "$TMPROOT" || + fatal_error "failed to mount $ROOTPART to $TMPROOT" + print_done + if [ -n "$BOOTPART" ]; then + BOOTPART_UID="$(blkid $BOOTPART |sed -E 's;.*\sUUID="([^"]*)".*;\1;')" + print_message "Mounting boot partition to the temporary directory..." + TMPBOOT="$TMPROOT/boot" + mkdir -p "$TMPBOOT" + [ -d "${TMPBOOT-}" ] || + fatal_error "Can't create a temporary directory for boot" + mount "$BOOTPART" "$TMPBOOT" || + fatal_error "failed to mount $BOOTPART to $TMPBOOT" + print_done + fi + if [ -n "$FIRMPART" ]; then + FIRMPART_UID="$(blkid $FIRMPART |sed -E 's;.*\sUUID="([^"]*)".*;\1;')" + print_message "Mounting firmware partition to the temporary directory..." + TMPFIRM="$TMPROOT/boot/efi" + mkdir -p "$TMPFIRM" + [ -d "${TMPFIRM-}" ] || + fatal_error "Can't create a temporary directory for firmware" + mount "$FIRMPART" "$TMPFIRM" || + fatal_error "failed to mount $FIRMPART to $TMPFIRM" + print_done + fi +} + +unmount_partition() { + if [ -n "$TMPFIRM" ] && [ -d "$TMPFIRM" ]; then + umount "$TMPFIRM" + fi + + if [ -n "$TMPBOOT" ] && [ -d "$TMPBOOT" ]; then + umount "$TMPBOOT" + rmdir "$TMPBOOT" + fi + + if [ -n "$TMPROOT" ] && [ -d "$TMPROOT" ]; then + umount "$TMPROOT" + rmdir "$TMPROOT" + fi + + if [ -n "$LUKS_DEVICE_IS_OPEN" ]; then + cryptsetup_luks_close + fi +} + +write_rootfs() { + if [ -n "${IMAGE_OUT-}" ]; then + print_message "Writing $ROOTFS rootfs to $IMAGE_OUT..." + else + print_message "Writing $ROOTFS rootfs to $MEDIA..." + fi + echo + $TAR "$ROOTFS" -C "$TMPROOT" || + fatal_error "failed to write rootfs" + sync + print_done +} + +setup_fstab() { + if [ -n "$ROOTPART_UID" ]; then + print_message "Updating fstab and extlinux.conf..." + grep -e '[[:space:]]/[[:space:]]' $TMPROOT/etc/fstab && + sed -i "s/LABEL=ROOT/UUID=$ROOTPART_UID/" "$TMPROOT"/etc/fstab || + echo "UUID=$ROOTPART_UID / $ROOT_FSTYPE relatime 1 1" >> "$TMPROOT/etc/fstab" + if [ -f "$TMPROOT/boot/extlinux/extlinux.conf" ]; then + sed -i "s/LABEL=ROOT/UUID=$ROOTPART_UID/" "$TMPROOT/boot/extlinux/extlinux.conf" + fi + if [ -n "$BOOTPART_UID" ]; then + mkdir -p "$TMPROOT/boot" + echo "UUID=$BOOTPART_UID /boot ext4 nodev,nosuid,noexec,relatime 1 2" >> "$TMPROOT/etc/fstab" + fi + if [ -n "$FIRMPART_UID" ]; then + mkdir -p "$TMPROOT/boot/efi" + echo "UUID=$FIRMPART_UID /boot/efi vfat umask=0,quiet,showexec,iocharset=utf8,codepage=866 1 2" >> "$TMPROOT/etc/fstab" + fi + print_done + fi +} + +sync_partitions() { + print_message "Informing kernel about partition table changes..." + partprobe "$MEDIA" || fatal_error "failed to partprobe $MEDIA" + sync + sleep 3 + print_done +} + +update_cmdline_txt() { + [ -f "$TMPROOT/usr/share/u-boot/rpi_4/cmdline.txt" ] && + RPI4_UBOOT=$TMPROOT/usr/share/u-boot/rpi_4/cmdline.txt + [ -f "$TMPROOT/usr/share/u-boot/rpi_4_32b/cmdline.txt" ] && + RPI4_UBOOT=$TMPROOT/usr/share/u-boot/rpi_4_32b/cmdline.txt + [ -f "$TMPROOT/boot/efi/cmdline.txt" ] && + RPI4_UBOOT=$TMPROOT/boot/efi/cmdline.txt + [ -n "${RPI4_UBOOT-}" ] && + sed -i "s/LABEL=ROOT/UUID=$ROOTPART_UID/" "$RPI4_UBOOT" +} + +image_to_media() { + print_message "Writing $IMAGE to $MEDIA..." + "$CAT" "$IMAGE" | + log_errtty dd of=$MEDIA bs=4M iflag=fullblock oflag=direct status=progress && + print_done || print_fail + sync + unset MEDIATABLE + yes | parted "${MEDIA}" print | grep gpt && MEDIATABLE="gpt" + yes | parted "${MEDIA}" print | grep msdos && MEDIATABLE="msdos" + partprobe "$MEDIA" + if [ "$MEDIATABLE" = "gpt" ]; then + sgdisk -g "$MEDIA" + fi + find_partitions + if [ "$RESIZE" = 1 ]; then + print_message "Resizing root partition $ROOTPART..." + parted -s "$MEDIA" resizepart "$ROOTPART_NUM" 100% && + resize2fs -f $ROOTPART || + fatal_error "root partition $ROOTPART resize failed!!!" + e2fsck -f $ROOTPART + print_done + fi + partprobe "$MEDIA" +} + +set_path_to_uboot() { + [ -n "$UBOOT" ] || UBOOT="${TMPROOT-}/usr/share/u-boot/$TARGET" +} + +mount_chroot() { + mount --bind /dev "${TMPROOT-}/dev" + mount --bind /dev/pts "${TMPROOT-}/dev/pts" + mount --bind /sys "${TMPROOT-}/sys" + mount --bind /proc "${TMPROOT-}/proc" + mount tmpfs -t tmpfs -o mode=755 "${TMPROOT-}/tmp" + chroot "${TMPROOT-}" /bin/true || + fatal_error "test chroot to rootfs failed!!!" +} + +unmount_chroot() { + ! mountpoint -q "${TMPROOT-}/tmp" || umount "${TMPROOT-}/tmp" + ! mountpoint -q "${TMPROOT-}/proc" || umount "${TMPROOT-}/proc" + ! mountpoint -q "${TMPROOT-}/sys" || umount "${TMPROOT-}/sys" + ! mountpoint -q "${TMPROOT-}/dev/pts" || umount "${TMPROOT-}/dev/pts" + ! mountpoint -q "${TMPROOT-}/dev" || umount "${TMPROOT-}/dev" +} + +exec_chroot() { + chroot "${TMPROOT-}" "$@" +} + +rpm_install() { + mkdir -p "${TMPROOT-}"/tmp/rpms && + cp "$1"/*.rpm "${TMPROOT-}"/tmp/rpms/ && + exec_chroot rpm -Uhv $(exec_chroot find /tmp/rpms -name '*.rpm') +} + +add_dtb() { + while read dtbdir; do + if basename "$dtbdir" | grep -qe "^$DTB_KVER"; then + print_message "Adding dtb to $(basename $dtbdir)..." + mkdir -p "$dtbdir"/"$DTB_VENDOR"/ + cp "$DTB_FILE" "$dtbdir"/"$DTB_VENDOR"/ + ! mountpoint -q "${TMPROOT-}/boot/efi" || + cp "$DTB_FILE" "${TMPROOT-}/boot/efi/" + found="yes" + fi + done < <(find "${TMPROOT-}"/boot/devicetree -maxdepth 1 -mindepth 1 -type d) + [ -z "$found" ] && fatal_error "Could not find any devicetree dirs for $DTB_KVER kernels" + unset found + print_done +} + +write_partition_blob() { + local name="$1" + local file="$2" + local of="$3" + local bs="${4-4M}" + + print_message "Writing $name for ${TARGET-}..." + local blob + blob="$(readlink -e "$file")" + [ -f "${blob-}" ] || fatal_error "${blob-} was not found" + [ -b "${of-}" ] || fatal_error "${of-} is not a block device or does not exist" + dd if="$blob" of="$of" bs="$bs" status=none conv=nocreat || \ + fatal_error "failed to write $name" + sync + print_done +} diff --git a/alt-rootfs-installer/log b/alt-rootfs-installer/log new file mode 100644 index 0000000..b0ebc31 --- /dev/null +++ b/alt-rootfs-installer/log @@ -0,0 +1,145 @@ +#!/bin/bash +# vim:sw=8:noet +# SPDX-License-Identifier: GPL-2.0+ +# +# Logging subsystem for alt-rootfs-installer. +# +# To initialize the subsystem use log_init() function. The subsystem works in +# two major modes "log" and "con". +# The first mode is "log", it outputs everything to the log file. It is +# still possible to output messages to stdout, but one should use function +# from this module to achieve that. +# The second mode is "con", it outputs everything to the terminal. In this +# mode it is also possible to redirect the output to a file. The module checks +# whether the file descriptor 1 is a terminal or not. That check was done to +# disable colors and column indentations to not clobber the output in the +# file. + +. shell-error 2>/dev/null +. shell-terminfo 2>/dev/null + +DEFAULT_LOG_FILE="$TMP/alt-rootfs-installer.log" + +[ -n "$LOG_MODE" ] || LOG_MODE="log" +[ "$LOG_MODE" = "log" -a -z "$LOG_FILE" ] && + LOG_FILE="$DEFAULT_LOG_FILE" +LOG_FD1=1 +LOG_FD2=2 + +# Print a message. This function is intended to be used with print_done() or +# print_fail() functions. +# +# Arguments: +# $1 -- a message to output +print_message() { + [ "$LOG_MODE" == "con" ] || echo "${1-}" + if [ -t "$LOG_FD1" ]; then + 1>&$LOG_FD1 color_text "* " magenta + 1>&$LOG_FD1 echo "${1-}" + else + 1>&$LOG_FD1 echo "* ${1-}" + fi + PRINT_TEXT_END=1 +} + +# Print text without a new line character. It is possible to change color +# and/or a column number to output. +# +# Arguments: +# $1 -- text to output +# $2 (optional) -- color ('-' to skip it) +# $3 (optional) -- a column number +printx() { + local col= + local color= + [ "$LOG_MODE" == "con" ] || echo -n "${1-}" + if [ -t "$LOG_FD1" ]; then + [ $# -gt 2 ] && col="$3" + [ $# -gt 1 ] && color="$2" + [ -n "$col" ] && 1>&$LOG_FD1 terminfo_col "$col" + [ "$color" == "-" ] && color= + 1>&$LOG_FD1 color_text "${1-}" "$color" + else + 1>&$LOG_FD1 echo -n "${1-}" + fi +} + +# Print text with a new line character. It is possible to change color +# and/or a column number to output. +# +# Arguments: +# $1 -- text to output +# $2 (optional) -- color ('-' to skip it) +# $3 (optional) -- a column number +printn() { + local col= + local color= + [ "$LOG_MODE" == "con" ] || echo "${1-}" + if [ -t "$LOG_FD1" ]; then + [ $# -gt 2 ] && col="$3" + [ $# -gt 1 ] && color="$2" + [ -n "$col" ] && 1>&$LOG_FD1 terminfo_col "$col" + [ "$color" == "-" ] && color= + 1>&$LOG_FD1 color_message "${1-}" "$color" + else + 1>&$LOG_FD1 echo "${1-}" + fi +} + +# Print [DONE] with a green color (in the case of terminal). +print_done() { + [ "$LOG_MODE" == "con" ] || echo "DONE" + if [ -t "$LOG_FD1" ]; then + 1>&$LOG_FD1 color_message "[DONE]" green + else + 1>&$LOG_FD1 echo "[DONE]" + fi + PRINT_TEXT_END= +} + +# Print [FAIL] with a red color (in the case of terminal). +print_fail() { + [ "$LOG_MODE" == "con" ] || echo "FAIL" + if [ -t "$LOG_FD1" ]; then + 1>&$LOG_FD1 color_message "[FAIL]" red + else + 1>&$LOG_FD1 echo "[FAIL]" + fi + PRINT_TEXT_END= +} + +# Print an error message and exit. +# +# Arguments: +# $1 -- an error message +fatal_error() { + [ -n "${PRINT_TEXT_END-}" ] && print_fail + [ "$LOG_MODE" == "con" ] || echo "Error: ${1-}" + if [ -t "$LOG_FD1" ]; then + 1>&$LOG_FD1 color_text "Error: " red + else + 1>&$LOG_FD1 echo -n "Error: " + fi + 1>&$LOG_FD1 2>&$LOG_FD2 fatal "${1-}" +} + +# Execute command and redirect stderr to /dev/tty +# $@ -- command and arguments to execute +log_errtty() { + 2>/dev/tty $@ +} + +# Initialize logging subsystem. +log_init() { + # Initialize shell-terminfo from libshell + terminfo_init + + if [ "$LOG_MODE" != "con" ]; then + # cleanup log file + if [ ! -d "${LOG_FILE%/*}" ]; then + fatal_error "can't locate directory ${LOG_FILE%/*} for log file" + fi + > "$LOG_FILE" + exec {LOG_FD1}>&1 {LOG_FD2}>&2 >"$LOG_FILE" 2>&1 + fi +} diff --git a/alt-rootfs-installer/shell-config b/alt-rootfs-installer/shell-config new file mode 100644 index 0000000..23243b3 --- /dev/null +++ b/alt-rootfs-installer/shell-config @@ -0,0 +1,91 @@ +#!/bin/sh -efu +### This file is covered by the GNU General Public License, +### which should be included with libshell as the file LICENSE. +### All copyright information are listed in the COPYING. + +if [ -z "${__included_shell_config-}" ]; then +__included_shell_config=1 + +. shell-error +. shell-quote + +__shell_config_comment='#' + +shell_config_get() +{ + [ "$#" -ge 2 ] && [ "$#" -le 3 ] || + fatal "Usage: shell_config_get file name [delim]" + local file="$1" name="$2" delim="${3-=}" + + [ -s "$file" ] || + return 0 + quote_sed_regexp_variable name "$name" + sed -n -e "s/^[[:space:]]*$name$delim//p" -- "$file" +} + +shell_config_set() +{ + [ "$#" -ge 3 ] && [ "$#" -le 5 ] || + fatal "Usage: shell_config_set file name value [read-delim [write-delim]]" + + local file="$1" name="$2" value="$3" r_delim="${4-=}" w_delim="${5-=}" + local n v nv='' created='' + + if [ ! -f "$file" ]; then + if [ ! -w "${file%/*}" ]; then + message "${file%/*}: not writable." + return 1 + fi + touch -- "$file" || + return 1 + created=1 + fi + + if [ -z "$created" ]; then + quote_sed_regexp_variable n "$name" + + if v="$(grep -m1 "^[[:space:]]*$n$r_delim" -- "$file" 2>/dev/null)"; then + if [ "${v#*$name$r_delim}" != "$value" ]; then + quote_sed_regexp_variable nv "$w_delim$value" + sed -i -e "s/^[[:space:]]*$n$r_delim.*/$n$nv/" -- "$file" + fi + return + fi + + if [ -n "${__shell_config_comment-}" ] && + v="$(grep -m1 "^[[:space:]]*${__shell_config_comment:-#}[[:space:]]*$n$r_delim" -- "$file" 2>/dev/null)"; then + quote_sed_regexp_variable v "$v" + quote_sed_regexp_variable nv "$w_delim$value" + sed -i -e "s/^$v\$/$n$nv/" -- "$file" + return + fi + fi + + printf '%s\n' "$name$w_delim$value" >> "$file" +} + +shell_config_del() +{ + [ "$#" -ge 2 ] && [ "$#" -le 3 ] || + fatal "Usage: shell_config_del file name [delim]" + local file="$1" name="$2" delim="${3-=}" + + [ -s "$file" ] || + return 0 + quote_sed_regexp_variable name "$name" + sed -i -e "/^[[:space:]]*$name$delim/d" -- "$file" +} + +shell_config_comment() +{ + [ "$#" -ge 2 ] && [ "$#" -le 3 ] || + fatal "Usage: shell_config_comment file name [delim]" + local file="$1" name="$2" delim="${3-=}" + + [ -s "$file" ] || + return 0 + quote_sed_regexp_variable name "$name" + sed -i -e "s/^[[:space:]]*$name$delim.*/${__shell_config_comment:-#}&/" -- "$file" +} + +fi #__included_shell_config diff --git a/alt-rootfs-installer/shell-error b/alt-rootfs-installer/shell-error new file mode 100644 index 0000000..95f7c18 --- /dev/null +++ b/alt-rootfs-installer/shell-error @@ -0,0 +1,41 @@ +#!/bin/sh -efu +### This file is covered by the GNU General Public License, +### which should be included with libshell as the file LICENSE. +### All copyright information are listed in the COPYING. + +if [ -z "${__included_shell_error-}" ]; then +__included_shell_error=1 + +PROG="${PROG:-${0##*/}}" + +message_syslog= +message_time= +message_time_format= +message() +{ + local arg='' prefix='' + if [ -n "$message_syslog" ]; then + [ ! -t 2 ] || arg=-s + logger $arg -t "$PROG" "$*" + return + fi + [ -z "$message_time" ] || + prefix="$(date +"${message_time_format:-[%Y-%m-%d %T]} " 2>/dev/null)" ||: + printf %s\\n "${prefix}$PROG: $*" >&2 +} + +fatal() +{ + message "$@" + exit 1 +} + +quiet="${quiet-}" +verbose="${verbose-}" +verbose() +{ + [ -n "$verbose" ] || return 0 + message "$@" +} + +fi #__included_shell_error diff --git a/alt-rootfs-installer/shell-terminfo b/alt-rootfs-installer/shell-terminfo new file mode 100644 index 0000000..7d221a6 --- /dev/null +++ b/alt-rootfs-installer/shell-terminfo @@ -0,0 +1,206 @@ +#!/bin/sh -efu +### This file is covered by the GNU General Public License, +### which should be included with libshell as the file LICENSE. +### All copyright information are listed in the COPYING. + +if [ -z "${__included_shell_terminfo-}" ]; then +__included_shell_terminfo=1 + +. shell-error + +COLUMNS=80 +LINES=25 + +color_black=7 +color_blue=7 +color_green=7 +color_cyan=7 +color_red=7 +color_magenta=7 +color_yellow=7 +color_white=7 + +__terminfo_setup_caps() +{ + set \ + setbg:setab \ + setbg:setb \ + setfg:setaf \ + setfg:setf \ + bold:bold \ + sitm:sitm \ + smul:smul \ + rev:rev \ + hpa:hpa \ + vpa:vpa \ + ritm:ritm \ + rmul:rmul \ + op:op \ + sgr0:sgr0 \ + ; + local cap_pair var cap + + for cap_pair; do + var="${cap_pair%:*}" + eval "__terminfo_cap_$var=''" + done + + for cap_pair; do + var="${cap_pair%:*}" + cap="${cap_pair#*:}" + eval " + __terminfo_cap_$var=\"\${__terminfo_cap_$var-}\"; + ! tput $cap >/dev/null 2>&1 || + __terminfo_cap_$var='$cap'; + [ -n \"\$__terminfo_cap_$var\" ] || + verbose \"Capability '$cap' is not defined for this terminal.\"" + done +} + +__terminfo_setup_colors() +{ + local order name i=0 + + [ "$__terminfo_cap_setfg" = 'setf' ] && + order='black blue green cyan red magenta yellow white' || + order='black red green yellow blue magenta cyan white' + + for name in $order; do + eval "color_$name=$i" + i=$(($i + 1)) + done +} + +### Usage: terminfo_init [force] +# shellcheck disable=SC2120 +terminfo_init() +{ + [ -z "${__terminfo_init-}" ] || [ "${1-}" = force ] || + return 0 + + type tput >/dev/null 2>&1 || + fatal "Unable to find \`tput' utility." + + [ -n "${TERM-}" ] || TERM=dumb + export TERM + + local cols rows + cols="$(tput cols)" && export COLUMNS="$cols" || return + rows="$(tput lines)" && export LINES="$rows" || return + + __terminfo_setup_caps + __terminfo_setup_colors + + __terminfo_init=1 +} + +### Usage: terminfo_color_pattern pattern +### +### Pattern format: [[type] [modificator] color] +### +### type := {foreground|background} or {fg|bg} +### modificator := {bold|italic|underline|reverse} or {b|i|u|rev} +### color := {black|blue|green|cyan|red|magenta|yellow|white} +terminfo_color_pattern() +{ + local c ctype='fg' color + local color_bg='' color_fg='' bold='' italic='' uline='' reverse='' + + for c in $2; do + case "$c" in + fg|foreground) + ctype='fg' + ;; + bg|background) + ctype='bg' + ;; + rev|reverse) + reverse=1 + ;; + b|bold) + bold=1 + ;; + i|italic) + italic=1 + ;; + u|underline) + uline=1 + ;; + black|blue|green|cyan|red|magenta|yellow|white) + eval "[ -z \"\${__terminfo_cap_set$ctype-}\" ] || color_$ctype=\"\$color_$c\"" + ;; + *) + fatal "Unknown color: $c" + ;; + esac + done + + case "$1" in + b|begin) + tput -S </dev/null | + grep 'First sector:' | tr -s ' ' | cut -d ' ' -f 3) + if [ -n "$PS" ] && [ "$PS" -ge "$RAW_START" ]; then + ROOTPART_NUM=$PART_NUM + break + fi + done + + ROOTPART="${MEDIA}${partsuffix-}${ROOTPART_NUM}" + + mount_partition + + TARGET=spacemit-k1x set_path_to_uboot + print_message "Searching for U-Boot files for ${TARGET-}..." + [ -d "$UBOOT" ] || fatal_error "U-Boot files for ${TARGET-} were not found" + print_done + + print_message "Searching for OpenSBI files for ${TARGET-}..." + OPENSBI="${TMPROOT-}/usr/share/opensbi-spacemit/k1x" + [ -d "$OPENSBI" ] || fatal_error "OpenSBI files for ${TARGET-} were not found" + print_done + + write_partition_blob "bootinfo" "$UBOOT/bootinfo_sd.bin" "$MEDIA" "1M" + + write_partition_blob "FSBL" "$UBOOT/FSBL.bin" "$FSBLPART" + + write_partition_blob "U-Boot environment" "$UBOOT/u-boot-env-default.bin" "$ENVPART" + + write_partition_blob "U-Boot" "$UBOOT/u-boot.itb" "$UBOOTPART" + + write_partition_blob "OpenSBI" "$OPENSBI/generic/firmware/fw_dynamic.itb" "$OPENSBIPART" +} diff --git a/alt-rootfs-installer/socs.d/Rockchips-aarch64.sh b/alt-rootfs-installer/socs.d/Rockchips-aarch64.sh new file mode 100644 index 0000000..fccd090 --- /dev/null +++ b/alt-rootfs-installer/socs.d/Rockchips-aarch64.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# vim:sw=8:noet + +MEDIATABLE=msdos +ROOTPART_NUM=1 +START_SECTOR=16 # MiB +[ -n "$SYSCON" ] || SYSCON=ttyS2,1500000n8 + +soc_write_bootloader() { + [ -n "$TMPROOT" ] || mount_partition + # Write U-Boot + set_path_to_uboot + local IDBSPL IDBLOADER FIT FIT_SEEK_FILE FIT_SEEK + UBOOT="$UBOOT/u-boot-rockchip.bin" + UBOOT_ZST="$UBOOT.zst" + IDBSPL="$UBOOT/idbspl.img" + IDBLOADER="$UBOOT/idbloader.img" + FIT="$UBOOT/u-boot.itb" + FIT_SEEK_FILE="$UBOOT/u-boot.itb.seek" + FIT_SEEK=16384 + + if [ -f "$UBOOT_ZST" ]; then + UBOOT="$UBOOT_ZST" + CAT="unzstd -c" + else + CAT=cat + fi + if [ -f "$UBOOT" ]; then + print_message "Writing u-boot-rockchip.bin..." + $CAT "$UBOOT" | dd of="$MEDIA" seek=64 || fatal_error "Error: Failed to write u-boot-rockchip.bin!!!" + sync + print_done + else + print_message "Warning: $UBOOT is missing. Try find idbspl.img..." + if [ -f "$IDBSPL" ]; then + print_message "Writing idbspl.img..." + dd if="$IDBSPL" of="$MEDIA" seek=64 || fatal_error "Error: Failed to write idbspl.img" + sync + print_done + else + print_message "Warning: idbspl.img is missing. Try find idbloader.img..." + if [ -f "$IDBLOADER" ]; then + print_message "Writing idbloader.img..." + dd if="$IDBLOADER" of="$MEDIA" seek=64 || fatal_error "Error: Failed to write idbloader.img" + sync + print_done + else + print_message "Warning: idbloader.img is missing. Try find and write u-boot.itb without first loader..." + fi + fi + [ -f "$FIT" ] || fatal_error "Error: u-boot.itb not found!!!" + print_message "Writing U-Boot FIT image..." + if [ -f "$FIT_SEEK_FILE" ]; then + FIT_SEEK="$(cat FIT_SEEK_FILE | head -n1)" + fi + dd if="$FIT" of="$MEDIA" seek="$FIT_SEEK" || fatal_error "Error: failed to write u-boot.itb!!!" + sync + print_done + fi +} diff --git a/alt-rootfs-installer/socs.d/SiFive-riscv64.sh b/alt-rootfs-installer/socs.d/SiFive-riscv64.sh new file mode 100644 index 0000000..dd42613 --- /dev/null +++ b/alt-rootfs-installer/socs.d/SiFive-riscv64.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# vim:sw=8:noet + +BBL=2E54B353-1271-4842-806F-E436D6AF6985 +FSBL=5B193300-FC78-40CD-8002-E86C45580B47 +SPL=$FSBL +UBOOT_CODE=$BBL + +MEDIATABLE=gpt +ROOTPART_NUM=1 +# ~1 MiB for U-Boot SPL +# ~4 MiB for OpenSBI + U-Boot +# + some overhead for future usage +START_SECTOR=34 # MiB +[ -n "$EFI" ] || BOOTFLAG=legacy_boot +[ -n "$VNC" ] || + case "$TARGET" in + sifive_unleashed) VNC=1;; + *) VNC=0;; + esac +CONSOLE=1 +[ -n "$SYSCON" ] || SYSCON=ttySIF0,115200n8 + +soc_write_bootloader() { + unmount_partition + [ -n "$ROOTFS" ] || clear_riscv64_bootloader_partition + + print_message "Creating partitions for U-Boot SPL and OpenSBI + U-Boot..." + LASTPART_NUM=$(sgdisk -p "$MEDIA" | tail -n1 | tr -s ' ' | cut -f 2 -d ' ') + let 'SPLPART_NUM = LASTPART_NUM + 1' + let 'UBOOTPART_NUM = LASTPART_NUM + 2' + sgdisk -a 1 \ + --new=$SPLPART_NUM:34:2081 --change-name=$SPLPART_NUM:spl \ + --typecode=$SPLPART_NUM:"$SPL" \ + --new=$UBOOTPART_NUM:2082:10273 --change-name=$UBOOTPART_NUM:uboot \ + --typecode=$UBOOTPART_NUM:"$UBOOT_CODE" \ + "$MEDIA" || + fatal_error "failed to create U-Boot SPL and OpenSBI + U-Boot partitions" + print_done + + sync_partitions + mount_partition + + set_path_to_uboot + print_message "Writing U-Boot SPL for ${TARGET-}..." + SPL_BLOB="$(readlink -e "$UBOOT/u-boot-spl.bin")" + [ -f "${SPL_BLOB-}" ] || fatal_error "${SPL_BLOB-} was not found" + SPLPART="${MEDIA}${partsuffix-}${SPLPART_NUM}" + [ -b "${SPLPART-}" ] || fatal_error "${SPLPART-} is not a block device or does not exist" + dd if="$SPL_BLOB" of="$SPLPART" bs=4M status=none || fatal_error "failed to write U-Boot SPL" + print_done + + print_message "Writing OpenSBI + U-Boot for ${TARGET-}..." + UBOOT_BLOB="$(readlink -e "$UBOOT/u-boot.itb")" + [ -f "${UBOOT_BLOB-}" ] || fatal_error "${UBOOT_BLOB-}} was not found" + UBOOTPART="${MEDIA}${partsuffix-}${UBOOTPART_NUM}" + [ -b "${UBOOTPART-}" ] || fatal_error "${UBOOTPART-} is not a block device or does not exist" + dd if="$UBOOT_BLOB" of="$UBOOTPART" bs=4M status=none || fatal_error "failed to write OpenSBI+U-Boot" + sync + print_done +} diff --git a/alt-rootfs-installer/socs.d/StarFive-riscv64.sh b/alt-rootfs-installer/socs.d/StarFive-riscv64.sh new file mode 100644 index 0000000..faae8d0 --- /dev/null +++ b/alt-rootfs-installer/socs.d/StarFive-riscv64.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# vim:sw=8:noet + +SPL_UID=2E54B353-1271-4842-806F-E436D6AF6985 +UBOOT_UID=BC13C2FF-59E6-4262-A352-B275FD6F7172 +FSBL=$SPL_UID +BBL=$UBOOT_UID + +MEDIATABLE=gpt +ROOTPART_NUM=1 +START_SECTOR=16 # MiB +CONSOLE=1 + +soc_write_bootloader() { + unmount_partition + [ -n "$ROOTFS" ] || clear_riscv64_bootloader_partition + + print_message "Creating partitions for U-Boot SPL and OpenSBI + U-Boot..." + sgdisk \ + --set-alignment=2 \ + --new=0:4096:8191 \ + --change-name=0:spl \ + --typecode=0:"$SPL_UID" \ + --new=0:8192:16383 \ + --change-name=0:uboot \ + --typecode=0:"$UBOOT_UID" \ + "$MEDIA" || + fatal_error "failed to create U-Boot SPL and OpenSBI + U-Boot partitions" + print_done + + print_message "Checking partition numbers..." + SPLPART_NUM="" UBOOTPART_NUM="" + local PART_NUMS=$(ls "$MEDIA"* |sed "s:$MEDIA::" |sed 's/^p//') + local PART_NUM + for PART_NUM in $PART_NUMS; do + FIND_PART_CODE=$(sgdisk -i "$PART_NUM" "$MEDIA" | + grep 'Partition GUID code:' | cut -d ' ' -f 4) + case "$FIND_PART_CODE" in + "$SPL_UID") SPLPART_NUM="$PART_NUM";; + "$UBOOT_UID") UBOOTPART_NUM="$PART_NUM";; + esac + done + if [[ "$UBOOTPART_NUM" != 2 && "$SPLPART_NUM" == 2 ]]; then + sgdisk --transpose=$SPLPART_NUM:$UBOOTPART_NUM "$MEDIA" || + fatal_error "failed to swap U-Boot SPL and OpenSBI + U-Boot partitions" + SPLPART_NUM=$UBOOTPART_NUM + UBOOTPART_NUM=2 + elif [[ "$UBOOTPART_NUM" != 2 && "$SPLPART_NUM" != 2 ]]; then + print_message "WARNING: Swap $UBOOTPART_NUM with 2-nd partition or else it won't boot!" + print_message " # sgdisk --transpose=2:$UBOOTPART_NUM \"$MEDIA\"" + fi + print_done + + sync_partitions + mount_partition + + print_message "Searching for U-Boot files..." + # All starfive boards use same binary + TARGET=starfive_visionfive2 set_path_to_uboot + SPL_BLOB="$(readlink -e "$UBOOT/u-boot-spl.bin.normal.out")" + [ -f "${SPL_BLOB-}" ] || fatal_error "${SPL_BLOB-} was not found" + UBOOT_BLOB="$(readlink -e "$UBOOT/u-boot.itb")" + [ -f "${UBOOT_BLOB-}" ] || fatal_error "${UBOOT_BLOB-}} was not found" + print_done + + print_message "Writing U-Boot SPL for ${TARGET-}..." + SPLPART="${MEDIA}${partsuffix-}${SPLPART_NUM}" + [ -b "${SPLPART-}" ] || fatal_error "${SPLPART-} is not a block device or does not exist" + dd if="$SPL_BLOB" of="$SPLPART" bs=4M status=none || fatal_error "failed to write U-Boot SPL" + sync + print_done + + print_message "Writing OpenSBI + U-Boot for ${TARGET-}..." + UBOOTPART="${MEDIA}${partsuffix-}${UBOOTPART_NUM}" + [ -b "${UBOOTPART-}" ] || fatal_error "${UBOOTPART-} is not a block device or does not exist" + dd if="$UBOOT_BLOB" of="$UBOOTPART" bs=4M status=none || fatal_error "failed to write OpenSBI+U-Boot" + sync + print_done +} diff --git a/alt-rootfs-installer/socs.d/unknown-soc.sh b/alt-rootfs-installer/socs.d/unknown-soc.sh new file mode 100755 index 0000000..c5fdebb --- /dev/null +++ b/alt-rootfs-installer/socs.d/unknown-soc.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# vim:sw=8:noet + +[ -n "${MEDIATABLE-}" ] || MEDIATABLE=msdos +ROOTPART_NUM=1 + +soc_write_bootloader() { + [ -n "$TMPROOT" ] || mount_partition +} -- cgit v1.2.3