Changes

Jump to navigation Jump to search
5,756 bytes added ,  07:55, 3 October 2020
no edit summary
Most of the variables in <code>deviceinfo</code> have self-explanatory names and are used both when you are building postmarketOS (edit at <code>.local/var/pmbootstrap/cache_git/pmaports/device/your_device_name/deviceinfo</code> before flashing, and during runtime (it is available at <code>/etc/deviceinfo</code>).if edited before flashing, be sure to rebuild the file with <code>pmbootstrap install</code>
All variables start with <code>deviceinfo_</code> in the file - this is omitted here to save space.
|-
| <code>name</code>
| Device model (| e.g. <code>Google Nexus 5Nokia N900</code>)|
|-
| <code>manufacturer</code>
| Device manufacturer (| e.g. <code>LGNokia</code>)|
|-
| <code>codename</code>
| Device codename (| e.g. <code>lgnokia-n900</code> |-hammerhead| <code>year</code>)|Release year of the device| e.g. <code>2012</code>
|-
| <code>datechassis</code>| Release date The computer case of the your device({{MR|1933}})|e.g. <code>handset</code> for phones, <code>watch</code> ([https://www.freedesktop.org/software/systemd/man/machine-info.html all values])
|-
| <code>true</code>, <code>false</code>
|-
| <code>nonfreedtb</code>| Components Name of the [[Glossary#dtb|device, that tree blob]] file (only run with closed source firmwareused on mainline kernels). We have to do more research on this topic and specify a list of possible values, for now all devices have See the option <code>????append_dtb</code> hereon how this is used.| e.g. <code>allwinner/sun50i-a64-pine64-lts</code> or <code>????qcom-msm8974-lge-nexus5-hammerhead</code>
|-
| <code>dtbappend_dtb</code>| Name of Set to <code>true</code> if the [[Glossary#<code>dtb|device tree blob]] file. This will </code> should be necessary for appended to the [[Mainline Linux kernel]]; see also [https:image, if set to false the <code>dtb</code> will be copied to the <code>/github.comboot</postmarketOS/pmbootstrap/issues/91 #91]. This can be left blank during initial portingcode> partition instead.({{MR|387|pmaports}})|<code>true</code>, <code>false</code>
|-
| <code>modules_initfs</code>
| Kernel modules to include in the initramfs image. Modules ext4 and usb_f_rndis should not be included in this list, they are always added to the initramfs image if they were built as module ({{MR|673|pmaports}}). Note: modules to be loaded ''after'' the initramfs can be specified like in a <code>modules-load.conf</code> ([https://github.com/postmarketOS/pmbootstrap/tree/master/aports/device/device-samsung-i9070 example]).
|
| <code>arch</code>
| Device architecture, must be supported by Alpine Linux
| <code>armhf</code>, <code>armv7</code>, <code>aarch64</code>, <code>x86</code>, <code>x86_64</code>
|-
| <code>dev_touchscreen</code>
| Path to the touchscreen device (needed for initramfs on-screen-keyboardonly necessary if not automatically detected, [[deviceinfo_dev_touchscreen|more info]])
| e.g. <code>/dev/input/event3</code>
|-
| e.g. <code>1.094563 -0.020949 -34.586121 0.009427 -1.148506 503.816956</code>
|-
| <code>dev_keyboardkeymaps</code>| Path to Lists keymap options that are available for this device, this will be shown as options in the keyboard devicepmbootstrap init command, if your device has any (needed for initramfs password unlocking)this will be passed to Alpine's setup-keymap command| e.g. <code>us/devrx51_us ch/inputrx51_ch it/event1rx51_it</code>
|-
| <code>swap_size_recommended</code>
| Do not wait up to 10 seconds until a framebuffer device shows up and do not try to configure it ({{MR|44|pmaports}}).
| <code>true</code>, <code>false</code>
|-
| <code>initfs_compression</code>
| Command used to compress initramfs image (see {{MR|334|pmaports}}, {{issue|237|pmaports}})
| default: <code>'gzip -1'</code>
|-
| <code>getty</code>
| Configure a getty on boot. Creates an entry in <code>/etc/inittab</code>
| <code><port>;<baudrate></code><br />e.g. <code>ttyS0;115200</code><br />default: not set
|}
| <code>flash_offset_base</code>
| Used for flashing
| Defaultdefault: <code>0x10000000</code>
|-
| <code>flash_pagesize</code>
| Page size
| Usually usually <code>2048</code>
|-
| <code>flash_sparse</code>
| Set this to true if your device expects a [https://github.com/postmarketOS/pmbootstrap/wiki/Troubleshooting#invalid-sparse-file-format-at-header-magi sparse system image] flashed
|
|-
| <code>flash_fastboot_vendor_id</code>
| Set this to your vendor id if fastboot requires the <code>-i</code> argument to work on your device
|
|-
| <code>flash_fastboot_max_size</code>
| 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
|-
| <code>kernel_cmdline</code>
|-
| <code>bootimg_dtb_second</code>
| Place the <code>dtb</code> in the "second" area of the Android boot image. See {{MR|700|pmaports}} for details.
| <code>true, false</code>
|-
 
|-
| <code>bootimg_append_seandroidenforce</code>
| Append <code>SEANDROIDENFORCE</code> file to <code>boot.img</code> See {{MR|1000|pmaports}} for details.
| <code>true, false</code>
|-
 
| <code>generate_bootimg</code>
| Set this to true for fastboot device, so the <code>mkinitfs</code> command will generate a <code>boot.img</code> file after creating the <code>initfs</code>. Add <code>mkbootimg</code> as dependency to your device's APKBUILD!
| For the [https://github.com/postmarketOS/pmbootstrap/wiki/nokia-rx51-%28Nokia-N900%29 N900], we use a legacy version of the [https://en.wikipedia.org/wiki/Das_U-Boot 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.
| <code>true, false</code>
|-
 
| <code>legacy_uboot_load_address</code>
| Set a custom load address for the legacy uboot initfs (see {{MR|578|pmaports}}, only makes sense in combination with <code>generate_legacy_uboot_initfs</code>).
| default: <code>80008000</code>
|-
 
<!-- FASTBOOT -->
| <code>flash_fastboot_partition_kernel</code>
| Only relevant for [[Deviceinfo_flash_methods|fastboot]] flash methods, the partition where the kernel or boot.img will be stored ({{MR|1741}}).
| default: <code>"boot"</code>
|-
| <code>flash_fastboot_partition_system</code>
| Only relevant for [[Deviceinfo_flash_methods|fastboot]] flash methods, the partition where the system image will be stored (see also: [[partition-layout]]).
| default: <code>"system"</code>
|-
| <code>flash_fastboot_partition_vbmeta</code>
| For [[Android_Verified_Boot_(AVB)|AVB]] devices: set vbmeta partition to be flashed with a custom vbmeta.img which has verity flag disabled ({{MR|1885}}).
| partition name, e.g. <code>vbmeta</code>
|-
| <code>flash_fastboot_max_size</code>
| 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
|-
<!-- HEIMDALL --> | <code>heimdall_partition_kernelflash_heimdall_partition_kernel</code>
| Only relevant for [[Deviceinfo_flash_methods|heimdall]] flash methods, the partition where the kernel or boot.img will be stored.
| default: <code>"KERNEL"</code>
|-
| <code>heimdall_partition_initfsflash_heimdall_partition_initfs</code>
| Only relevant for the [[Deviceinfo_flash_methods#heimdall-isorec|heimdall-isorec]] flash method, the partition where the initramfs will be stored.
| default: <code>"RECOVERY"</code>
|-
| <code>heimdall_partition_systemflash_heimdall_partition_system</code>
| Only relevant for [[Deviceinfo_flash_methods|heimdall]] flash methods, the partition where the system image will be stored (see also: [[partition-layout]]).
| default: <code>"SYSTEM"</code>
|-
| <code>flash_heimdall_partition_vbmeta</code>
| For [[Android_Verified_Boot_(AVB)|AVB]] devices: set vbmeta partition to be flashed with a custom vbmeta.img which has verity flag disabled ({{MR|1936}}, {{MR|1885}}).
| partition name, e.g. <code>VBMETA</code>
|-
 
| <code>boot_filesystem</code>
| Sets the filesystem used for the /boot partition containing initramfs-extra
| default: <code>"ext4"</code>, <code>"fat16"</code>, <code>"fat32"</code>
|-
| <code>rootfs_image_sector_size</code>
| Some devices made after 2016 with UFS storage use 4096 byte sectors and therefore need this option to boot. Read {{MR|1725}} for details.
| default: <code>512</code>
|-
| <code>sd_embed_firmware</code>
| A comma-separated list of binary:offset (where binary is under /usr/share) ({{MR|1739}})
| e.g. <code>firmware/librem5dev/u-boot.bin:33,firmware/librem5dev/m4.bin:2</code>
|-
| <code>sd_embed_firmware_step_size</code>
| The number of bytes for each increment of the offset specified in the <code>sd_embed_firmware</code>
| default: <code>1024</code>
|-
| <code>partition_blacklist</code>
| A comma-separated list of partitions that should not be flashed, because they brick the device. There are only very few devices where it is necessary (e.g. [[Ouya_(ouya-ouya)|Ouya]]). {{MR|1759}}
| e.g. <code>boot,recovery</code>
|-
| <code>boot_part_start</code>
| Number of sectors from the start of the drive to place the boot partition. Some devices may need this increased, if their bootloader takes up more space (like the Librem 5). ({{MR|1856}})
| default: <code>2048</code>
|}
| The height of the display
| 1280, 2560... other
|-
| <code>framebuffer_landscape</code>
| Rotate framebuffer output by 270° ({{MR|530|pmaports}}, {{MR|546|pmaports}})
| <code>true</code>, <code>false</code> (default)
|}
 
== usb ==
 
Change how the target device shows up when connected with USB to a host PC. {{MR|706|pmaports}} added support for these variables in the mkinitfs script, when using the configfs network method.
 
{| class="wikitable sortable"
! Variable
! Description
! Default
|-
| <code>usb_idVendor</code>
| Vendor ID
| <code>0x18D1</code> ("Google Inc.")
|-
| <code>usb_idProduct</code>
| Product ID
| <code>0xD001</code> ("Nexus 4 (fastboot)")
|-
| <code>usb_serialnumber</code>
| Device's serial number string
| <code>postmarketOS</code>
|-
| <code>usb_rndis_function</code>
| Name of the rndis function, which may be different in some downstream kernels. The function is always located in <code>/config/usb_gadget/g1/functions/</code>
| <code>rndis.usb0</code>
|}
The correct IDs can be seen in <code>init.*.usb.rc</code> of Android/TWRP sources for that device (or directly in rootfs, boot into twrp and see)OR plug in device running stock Android/TWRP and watch dmesg for things like<pre>[ 3.939519] usb 1-2.4: New USB device found, idVendor=2717, idProduct=ff40, bcdDevice= 4.14[ 3.939521] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3[ 3.939521] usb 1-2.4: Product: MI 9[ 3.939522] usb 1-2.4: Manufacturer: Xiaomi</pre>== Obsolete Options options ==
=== weston ===
* <code>weston_pixman_type</code>: used to be a Weston specific workaround for the "red screen bug" ({{github|54}}): we patched Weston to accept a <code>--pixman-type</code> argument to override the framebuffer mode that the kernel driver reports. However, this patch was quickly incompatible with future changes in Weston, and it is not as good as [[Troubleshooting:display#My_screen_is_red.21|patching the kernel to report the right framebuffer mode]], so it was removed ({{issue|136|pmaports}}).
* Various options from [https://manpages.debian.org/unstable/weston/weston.ini.5.en.html weston.ini] used to be duplicated, but this was removed in {{github|739}}. 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 pmaport ([https://github.com/postmarketOS/pmbootstrap/blob/e7dfe9b9041f0c2ec94295df16afeeec1d9bafd8/aports/device/device-nokia-rx51/APKBUILD#L66-L70 example]).
=== Device ===
* <code>nonfree</code>: Components of the device, that only run with closed source firmware. This is now legacy due to nobody uses it. ({{issue|438|pmaports}})
* <code>dev_keyboard</code>: Originally intended to point osk-sdl to the hardware keyboard, but was never used. (It should detect hardware keyboards automatically...)
 
=== Flash ===
* <code>flash_fastboot_vendor_id</code>: fastboot used to have a <code>-i</code> option, but this was removed ({{issue|1830}}). Since we only had one device using this and nobody to verify if the option is really needed with this device, we decided to remove it. If you are interested in bringing it back, please create a new issue.
== See also ==
* [[Device specific package]]
 
[[Category:Technical Reference]]
34

edits

Navigation menu