Fork of Mobian's recipes to add RISC-V support for the DC-ROMA Pad II tablet. Upstream: https://salsa.debian.org/Mobian-team/mobian-recipes https://spacecruft.org/mobian/mobian-recipes
Find a file
2024-10-20 10:16:39 -06:00
.gitlab-ci gitlab-ci: add job rules to only act on changed files 2024-01-22 15:38:17 +01:00
devices Add draft for riscv64 Deepcomputing ROMA Pad II device 2024-10-20 10:05:12 -06:00
include include: packages-base: install systemd-repart 2024-10-18 12:41:51 +02:00
overlays Use mobian-archive-keyring package 2024-06-18 06:58:03 +02:00
scripts scripts: drop experimental from apt sources 2024-08-28 16:06:02 +02:00
.gitignore Add miniramfs 2021-06-12 00:05:20 +02:00
.gitlab-ci.yml gitlab-ci: build generic qcom image 2024-01-22 14:56:39 +01:00
build.sh Add roma-pad-ii device to build script 2024-10-20 10:16:39 -06:00
image.yaml add btrfs-progs when building a system w/ btrfs 2024-03-29 12:35:26 +00:00
installer.yaml Various partition-related cleanups 2023-05-16 16:48:45 +02:00
installfs.yaml Use mobian-archive-keyring package 2024-06-18 06:58:03 +02:00
LICENSE Initial commit 2020-05-07 20:09:01 +02:00
README.md Apply 1 suggestion(s) to 1 file(s) 2024-08-31 05:58:00 +00:00
rootfs-device.yaml recipes: use non-free-firmware instead of non-free 2023-02-02 10:20:28 +01:00
rootfs.yaml rootfs: use apt action for installing the Mobian keyring 2024-07-10 21:35:00 +02:00

mobian-recipes

A set of debos recipes for building a debian-based image for mobile phones, initially targetting Pine64's PinePhone.

Prebuilt images are available here.

The default user is mobian with password 1234.

Build

To build the image, you need to have debos and bmaptool. On a Debian-based system, install these dependencies by typing the following command in a terminal:

sudo apt install debos bmap-tools xz-utils

If you want to build an image for a Qualcomm-based device, additional packages are required, which you can install with the following command:

sudo apt install android-sdk-libsparse-utils yq

Building with disk encryption support will also require the package cryptsetup to be installed on your host.

Do note that we recommend using Debian 12 (Bookworm) as previous versions didn't include the yq package.

Similarly, if you want to use F2FS for the root filesystem (which isn't such a good idea, as it has been known to cause corruption in the past), you'll need to install f2fs-tools as well.

The build system will cache and re-use it's output files. To create a fresh build remove *.tar.gz, *.sqfs and *.img before starting the build.

If your system isn't debian-based (or if you choose to install debos without using apt, which is a terrible idea), please make sure you also install the following required packages:

  • debootstrap
  • qemu-system-x86
  • qemu-user-static
  • binfmt-support
  • squashfs-tools-ng (only required for generating installer images)

Then simply browse to the mobian-recipes folder and execute ./build.sh.

You can use ./build.sh -d to use the docker version of debos.

Building QEMU image

You can build a QEMU x86_64 image by adding the -t amd64 flag to build.sh

The resulting files are raw images. You can start qemu like so:

qemu-system-x86_64 -drive format=raw,file=<imagefile.img> -enable-kvm \
    -cpu host -vga virtio -m 2048 -smp cores=4 \
    -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd

UEFI firmware files are available in Debian thanks to the OVMF package. Comprehensive explanation about firmware files can be found at OVMF project's repository.

You may also want to convert the raw image to qcow2 format and resize it like this:

qemu-img convert -f raw -O qcow2 <raw_image.img> <qcow_image.qcow2>
qemu-img resize -f qcow2 <qcow_image.qcow2> +20G

Install

Insert a MicroSD card into your computer, and type the following command:

sudo bmaptool copy <image> /dev/<sdcard>

or:

sudo dd if=<image> of=/dev/<sdcard> bs=1M

Note: Make sure to use your actual SD card device, such as mmcblk0 instead of <sdcard>.

CAUTION: This will format the SD card and erase all its contents!!!

Contributing

If you want to help with this project, please have a look at the roadmap and open issues.

In case you need more information, feel free to get in touch with the developers on #mobian:matrix.org.

License

This software is licensed under the terms of the GNU General Public License, version 3.