DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware. The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware. If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware. |
Contents
Support
If something isn't working for you, you can get in contact with Mobian developers and the Mobian community in various ways. All of them are listed here.
What does not work
Mobian does not support Wi-Fi on the ?PineTab2 yet on the latest images, because the driver is not supported. This is non-issue and it is not related to Mobian. No support for this issue will be given in the Mobian community.
Installation
This document guides the user how to install Mobian on their ?PineTab2, an open source tablet designed by Pine64 to run Linux distributions
Note: Mobian requires a handful of packages that are not part of Debian at the time of writing (2023-06).
Prerequisites
U-Boot is required to boot the images. If you have the factory image installed and updated to the latest version, you can boot Mobian from an SD card without installing U-Boot. If you want to install Mobian to the EMMC, you will have to install U-Boot to the SPI.
Installing U-Boot to the SPI
Warning: Flashing the SPI flash memory is a dangerous procedure because the SPI has the highest boot priority. Any bug or faulty installation in the SPI can prevent the device from booting, which means that there is a high risk of getting locked out of the device. The only way of restoring from that state is using a specialized UART adapter, which can disable the SPI flash memory at boot, as explained in the recovering the SPI section. DO NOT FLASH THE SPI unless you are an experienced developer with access to the UART adapter and you have confirmed that the adapter is functional.
To install U-Boot to your ?PineTab2's SPI, follow these steps:
Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)
Download the U-Boot build for the PineTab2 and extract the zip file.
Verify the integrity of the u-boot-rockchip-spi.bin file by running this command and checking for an "OK" (you have to be in same directory as the file): echo "41768fd15c1df7e329040b742e575b9fea82e2cfc676c77dd5fc1da0c49f7947 u-boot-rockchip-spi.bin" | sha256sum --check
- Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
Run this command: sudo flashcp -v -p u-boot-rockchip-spi.bin /dev/mtd0
Obtain the image
Pre-built Mobian images for the ?PineTab2 can be downloaded from this link. Installer images are available in the same location. Same images and installers are available both under folders pinetab2 and rockchip of https://images.mobian.org. Effective 2024-01-25, pinephonepro and pinetab2 images have been replaced by rockchip ones: please refer to rockchip images for newer images targeting these devices.
Verifying the images
Mobian images come with multiple files:
*.img.xz: The flashable image.
*.img.bmap: The bmaptool input for the image. (See Method 1a below.)
*.sha256sum: A shasum file of SHA-256 hashes of the image file.
*.sha256sum.sig: A detached signature for the sha256sum file.
To verify the download, follow these steps:
Import the Mobian signing key from here. Once downloaded, the key can be imported with gpg --import mobian.gpg.
Verify the signature with gpg --verify *.sha256sums.sig.
If the signature is valid, check the other files with shasum -c *.sha256sums
If this prints OK for all files, the download is verified successfully.
Flash the image
In order to flash the Mobian image, you need to identify the device attached to target. Be careful not to write to the wrong device! Replace the "X" in /dev/mmcblkX or /dev/sdX or use the /dev/disk/by-id/ file.
Be advised that the first boot will take longer due to the automatic resizing of the filesystem.
Installation to eMMC
As the PineTab2 is not supported by JumpDrive or Tow-Boot the option to install to the eMMC is by booting the installer from an SD card.
Method 1a: bmaptool via URL
bmaptool is a comfortable means to flash your image. It handles sparse files, so it can be considerably faster than plain dd. It also handles both .bmap and .xz files and can download them directly from an URL. Execute:
sudo bmaptool copy https://images.mobian.org/rockchip/CHANGEME $BLOCKDEVICE
with $BLOCKDEVICE the blockdevice to flash, e.g. /dev/mmcblkX, /dev/sdX [in the case of jumpdrive], or /dev/disk/by-id/XXXXXX).
Example:
sudo bmaptool copy https://images.mobian.org/rockchip/weekly/mobian-rockchip-phosh-20250112.img.xz /dev/disk/by-id/mmc-SU16G_0x1d6654fd
Method 1b: bmaptool with a local image file
You can also use bmaptool to flash a local image. Execute:
sudo bmaptool copy $IMAGE $BLOCKDEVICE
with $IMAGE, the path to the compressed or uncompressed image file and with $BLOCKDEVICE the blockdevice to flash, e.g. /dev/mmcblkX, /dev/sdX [in the case of jumpdrive], or /dev/disk/by-id/XXXXXX).
Example:
sudo bmaptool copy mobian-rockchip-phosh-20250112.img.xz /dev/disk/by-id/mmc-SU16G_0x1d6654fd
Method 3: dd
To use dd, you need to unzip the image using:
unxz mobian-rockchip-phosh-YYYYMMDD.img.xz
Then flash with the following command:
sudo dd bs=64k if=mobian-rockchip-phosh-YYYYMMDD.img of=/dev/mmcblkX status=progress
(the status= option will display some progress while flashing, dd is awfully silent otherwise)
Default pin and password
The default user is mobian and has the password: 1234. The password is also used as PIN on the unlock screen.
The root user is locked by default.
You should change the user password - please see ?changing password about the right way to do so. If you want to access your phone via ssh, you need to ?set it up to do so.
Automatic resizing of your filesystem on first boot
After flashing the image and booting for the first time, Mobian will resize the root filesystem to take all possible space on the disk. This can take a while and will only happen on first boot. So grab a ${DRINK_OF_CHOICE} and be patient.
Uninstalling U-Boot from the SPI
Warning: If you uninstall U-Boot from the SPI, Mobian will no longer boot on your ?PineTab2.
If you would like to uninstall U-Boot from your ?PineTab2's SPI, follow these steps:
Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)
- Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
Run this command: sudo flash_erase /dev/mtd0 0 16
Recovering the SPI
If you installed U-Boot to the SPI and you cannot boot your ?PineTab2, you can recovery the SPI, by using the debug adaptor that came with the device and an SD card, and either reinstalling U-Boot the SPI or uninstalling U-Boot from it.
Reinstalling U-Boot to the SPI
To install U-Boot to the SPI by using the debug adaptor that came with the device and an SD card, follow these steps:
Format an SD card and run this command, replacing /dev/mmcblk0 with the path to your SD card: sudo parted /dev/mmcblk0 mkpart ext4 16MB 100% && sudo mkfs.ext4 /dev/mmcblk0p1
Download the U-Boot build for the PineTab2 and extract the zip file.
Verify the integrity of the u-boot-rockchip-spi.bin file by running this command and checking for an "OK" (you have to be in same directory as the file): echo "41768fd15c1df7e329040b742e575b9fea82e2cfc676c77dd5fc1da0c49f7947 u-boot-rockchip-spi.bin" | sha256sum --check
Run this command, replacing /dev/mmcblk0 with the path to your SD card (you have to be in same directory as the file): sudo dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=32k seek=1 conv=fsync
- Copy the u-boot-rockchip-spi.bin file to the partition
Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON
Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)
- Press the power button to boot the device into the U-Boot that is on the SD card, then press a key to interrupt the boot process
- Set the SD boot switch on the adaptor to OFF
- Run these commands:
sf probe
load mmc 1:1 10000000 u-boot-rockchip-spi.bin
sf update $fileaddr 0 $filesize
Uninstalling U-Boot from the SPI
Warning: If you uninstall U-Boot from the SPI, Mobian will no longer boot on your ?PineTab2.
To uninstall U-Boot from the SPI by using the debug adaptor that came with the device and an SD card, follow these steps:
- Format an SD card
Download the U-Boot build for the PineTab2 and extract the zip file.
Run this command, replacing /dev/mmcblk0 with the path to your SD card (you have to be in same directory as the file): sudo dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=32k seek=1 conv=fsync
Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON
Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)
- Press the power button to boot the device into the U-Boot that is on the SD card, then press a key to interrupt the boot process
- Set the SD boot switch on the adaptor to OFF
- Run these commands:
sf probe
sf erase 0 +10000