Deviceinfo reference

From postmarketOS
Jump to: navigation, search

Most of the variables in deviceinfo have self-explanatory names and are used both when you are building postmarketOS and during runtime (it is available at /etc/deviceinfo).

All variables start with deviceinfo_ in the file - this is omitted here to save space.

device

Variable Description Possibles values
format_version Used to distinguish between different versions of this file. 0
name Device model (e.g. Google Nexus 5)
manufacturer Device manufacturer (e.g. LG)
date Release date of the device
keyboard The device has a hardware keyboard. true, false
nonfree Components of the device, that only run with closed source firmware. We have to do more research on this topic and specify a list of possible values, for now all devices have ???? here. ????
dtb Name of the device tree blob file. This will be necessary for the Mainline kernel; see also #91. This can be left blank during initial porting.
modules_initfs Kernel modules to include in the initramfs image. Note: modules to be loaded after the initramfs can be specified like in a modules-load.conf (example).
external_disk Does the device have an sdcard or other external storage medium? true, false
external_disk_install Allow installing to sdcard true, false
flash_methods Method used to flash the device (more info)
arch Device architecture, must be supported by Alpine Linux armhf, aarch64
dev_touchscreen Path to the touchscreen device (needed for initramfs on-screen-keyboard, more info) e.g. /dev/input/event3
dev_keyboard Path to the keyboard device, if your device has any (needed for initramfs password unlocking) e.g. /dev/input/event1
msm_refresher Enable msm-fb-refresher for devices that only implement double buffering (graphics). true,false(default)
swap_size_recommended Set recommended swap file size for device. If unset, no swap file will be created for the device. Integer, in MB.

flash

These are used for flashing and booting the device, and most of them are fastboot specific. Here is a guide on how to get these values for a specific Android device (by extracting the boot.img)

Variable Description Possible values
flash_offset_kernel Kernel offset used for flashing
flash_offset_ramdisk Ramdisk offset used for flashing
flash_offset_second Used for flashing
flash_offset_tags Used for flashing
flash_offset_base Used for flashing Default: 0x10000000
flash_pagesize Page size Usually 2048
flash_sparse Set this to true if your device expects a sparse system image flashed
flash_fastboot_vendor_id Set this to your vendor id if fastboot requires the -i argument to work on your device
flash_fastboot_max_size Set this if the fastboot required by your device has an upper limit to the size of system images it will flash. Size, in MB
kernel_cmdline Kernel command line
generate_bootimg Set this to true for fastboot device, so the mkinitfs command will generate a boot.img file after creating the initfs. Add mkbootimg as dependency to your device's APKBUILD! true, false
bootimg_qcdt Append dtb file to boot.img (more info)
generate_legacy_uboot_initfs For the N900, we use a legacy version of the uboot bootloader right now. When setting this variable to true, the initramfs will generate an uboot legacy compatible initramfs file. Modern versions of uboot can load regular initramfs files. true, false
heimdall_partition_kernel Only relevant for heimdall flash methods, the partition where the kernel or boot.img will be stored. default: "KERNEL"
heimdall_partition_initfs Only relevant for the heimdall-isorec flash method, the partition where the initramfs will be stored. default: "RECOVERY"
heimdall_partition_system Only relevant for heimdall flash methods, the partition where the system image will be stored (see also: partition-layout). default: "SYSTEM"

weston

We used to duplicate options from the weston.ini, but we stopped that. [1] If you need to set weston specific options from your device (such as the output backend or the keymap), please add a weston.ini file to your aport [2].
Variable Description Possibles values
weston_pixman_type (optional) Use it as a workaround for issue #54. mostly "2" for ARGB, all values

splash

Variable Description Possibles values
screen_width The width of the display 800, 720, 1440... anything really
screen_height The height of the display 1280, 2560... other