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.

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:

  1. Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)

  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. 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

  4. Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
  5. 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:

To verify the download, follow these steps:

  1. Import the Mobian signing key from here. Once downloaded, the key can be imported with gpg --import mobian.gpg.

  2. Verify the signature with gpg --verify *.sha256sums.sig.

  3. If the signature is valid, check the other files with shasum -c *.sha256sums

  4. 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:

with $BLOCKDEVICE the blockdevice to flash, e.g. /dev/mmcblkX, /dev/sdX [in the case of jumpdrive], or /dev/disk/by-id/XXXXXX).

Example:

Method 1b: bmaptool with a local image file

You can also use bmaptool to flash a local image. Execute:

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:

Method 3: dd

To use dd, you need to unzip the image using:

Then flash with the following command:

(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:

  1. Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)

  2. Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
  3. 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:

  1. 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

  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. 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

  4. 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

  5. Copy the u-boot-rockchip-spi.bin file to the partition
  6. Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON

  7. Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)

  8. 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
  9. Set the SD boot switch on the adaptor to OFF
  10. 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:

  1. Format an SD card
  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. 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

  4. Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON

  5. Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)

  6. 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
  7. Set the SD boot switch on the adaptor to OFF
  8. Run these commands:
    • sf probe

    • sf erase 0 +10000


CategoryDebianOn