How to install a Linux image
flipper os can be installed on many rockchip rk3576 based boards, including commercially available ones this page explains rockchip’s maskrom mode and boot priority logic, and provides installation guides as well as a list of boards supported by flipper os rockchip maskrom mode the rockchip rk3576 supports a special maskrom mode that allows writing to the onboard storage drives connected to the chip (spi/emmc/ufs flash chips) via usb in this mode, only a dedicated maskrom usb port of the rk3576 is used the code implementing maskrom mode on the rk3576 is stored in the chip’s internal rom (read only memory) during manufacturing and cannot be erased or modified by the user as a result, the ability to restore the device’s operating system is always preserved, provided the hardware is not damaged switching into maskrom mode varies across boards, so on the supported boards docid 5zr6i3iehbjbwmr3n9bd page you will find the method for entering maskrom mode and the usb port used in maskrom mode for each supported board board boot priority the rk3576 chip can be configured with one of several boot priority lists for onboard storage drives this list can contain up to two items (for example, emmc flash and an sd card) the boot priority is determined by the voltage on the rk3576 saradc vin0 boot pin, which is set using a resistor divider on the board and can also be pulled to ground via an onboard button or switch to trigger maskrom mode after power on, the rk3576 reads the voltage on the saradc vin0 boot pin to determine the boot priority list and to check if maskrom mode has been requested if not, it attempts to boot from the first storage drive in the priority list if no valid rockchip compatible bootloader signature is found on that device, it proceeds to the second storage device if no bootloader signature is found there either, the rk3576 enters maskrom mode and waits for commands from a pc via the maskrom usb interface the table below lists all supported boot priority lists (referred to by rockchip as boot modes) for the rk3576, along with the corresponding resistor combinations and adc values for each mode on the supported boards docid 5zr6i3iehbjbwmr3n9bd page you will find the boot priority, the method for switching to maskrom mode, and the maskrom usb port for each supported board how to install the os there are two main ways to install an operating system on the board writing an image to an sd card docid\ okmny6rizqvmrbxhb6k4h and inserting it into the device writing an image to the onboard storage drive docid\ okmny6rizqvmrbxhb6k4h via usb (in maskrom mode) please note that the rk3576 boots from storage drives according to its boot priority list, as described in the board boot priority docid\ okmny6rizqvmrbxhb6k4h section if you need the rk3576 to skip booting from the onboard storage drive that already contains a bootable os, you can erase it in maskrom mode docid\ okmny6rizqvmrbxhb6k4h writing to an sd card use an sd card with a capacity of 8 gb or larger the sd card will be erased during the os writing process download or build an os image use debian 512 \[target name] build \[build id] img gz , where the target name identifies your board available target names are listed on the supported boards docid 5zr6i3iehbjbwmr3n9bd page connect the microsd card to your pc using a card reader install and run balenaetcher https //etcher balena io/ on your pc go to flash from file and select the img gz image file go to select target and choose your sd card click flash! when the process finishes, remove the sd card from your pc and insert it into your rk3576 based board reboot the board writing to the onboard storage drive the recommended tools for flashing boards in maskrom mode have only been tested on linux (debian) and macos windows instructions will be available later step 1 install the flashing tools install the required dependencies on debian sudo apt update && sudo apt install y git curl build essential pkg config libusb 1 0 0 dev on macos brew install libusb install the rust compiler and cargo package manager curl https //sh rustup rs ssf | sh reopen the terminal build the rockusb tool cargo install branch switch storage git https //github com/collabora/rockchiprs git example rockusb features=nusb rockusb step 2 prepare the os image and enter maskrom mode to complete this step, you need to know your board’s target name, the usb port used in maskrom mode, and how to enter maskrom mode this information is available on the supported boards docid 5zr6i3iehbjbwmr3n9bd page for your specific board download docid\ isvwirz7zz0je7grahigs or build an os image locally docid\ tem3oaprttfsdvuinbejc you need the bootloader image for your board (the build system places it here /u boot/\[target name]/rk3576 spl loader v bin ) the compressed full disk image debian \[block size] \[target name] build \[build id] img gz and the corresponding bmap file, which specifies which parts of the image are used block size is 512 for emmc and 4096 for ufs connect the board to your pc via its maskrom usb port put the board into maskrom mode docid\ okmny6rizqvmrbxhb6k4h step 3 flash the os image list connected devices in maskrom mode rockusb list if no devices are listed, check the usb connection, make sure the correct usb port is being used, re enter maskrom mode, and run the command again load the bootloader into rk3576 ram rockusb download boot \[path to rk3576 loader bin] select the storage drive you want to use rockusb change storage x where x can be 1 — emmc; 7 — nand; 8 — spi nand; 9 — spi nor; 10 — ufs or sata; 11 — nvme write the os image to the storage drive rockusb write bmap \[path to the os image file for your board] reboot the rk3576 rockusb reset device erasing the onboard storage drive to erase the onboard storage drive, follow steps 1 and 2 from the writing to the onboard storage drive docid\ okmny6rizqvmrbxhb6k4h instructions, excluding the os image prepare step then perform the following steps list connected devices in maskrom mode rockusb list if no devices are listed, check the usb connection, make sure the correct usb port is being used, re enter maskrom mode, and run the command again load the bootloader into rk3576 ram rockusb download boot \[path to rk3576 spl loader bin] select the storage drive to erase rockusb change storage x where x can be 1 — emmc; 7 — nand; 8 — spi nand; 9 — spi nor; 10 — ufs or sata; 11 — nvme erase the storage drive rockusb erase flash reboot the rk3576 rockusb reset device
Have a question?
Our support team and an awesome community will get you an answer in a flash. Please leave your questions in English.
To ask a question or participate in discussions, you'll need to authenticate first.