### Example extlinux.conf Configuration Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/boot.md A sample configuration file for defining boot entries. Unsupported directives are ignored by lk2nd. ```text timeout 1 menu title Boot the OS default MyOS # Bootloader should pick the DT label MyOS linux /vmlinuz initrd /initramfs fdtdir /dtbs append earlycon console=ttyMSM0,115200 ``` -------------------------------- ### Build lk2nd from Source Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Steps to install dependencies and compile lk2nd for specific Qualcomm SoC targets. ```bash # Install build requirements (Debian/Ubuntu) sudo apt install gcc-arm-none-eabi device-tree-compiler libfdt-dev python3 # Build for MSM8916 devices (e.g., Samsung Galaxy A3, Xiaomi Redmi 2) make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8916 # Build for MSM8974 devices (e.g., OnePlus One, Nexus 5) make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8974 # Build for MSM8953 devices (e.g., Xiaomi Mi A1, Motorola G5 Plus) make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8953 # Output image location ls build-lk2nd-msm8916/lk2nd.img ``` -------------------------------- ### Root Node Example Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md The root node contains information for the previous bootloader, typically including msm-id and board-id. lk2nd generally does not use this data. ```dts / { qcom,msm-id = ; qcom,board-id = <0xCE08FF01 1>, <0xCE08FF01 3>, <0xCE08FF01 7>; }; ``` -------------------------------- ### lk2nd Kernel Command Line Arguments Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Configure lk2nd boot behavior using specific kernel command line arguments. These arguments are passed from the OS being booted. Examples include enabling simplefb, ramoops, and spin table configuration. ```ini # extlinux.conf with lk2nd-specific arguments label mainline linux /vmlinuz initrd /initramfs fdtdir /dtbs append earlycon console=ttyMSM0,115200 lk2nd.pass-simplefb=xrgb8888,autorefresh,relocate lk2nd.pass-ramoops # Available lk2nd cmdline arguments: # # lk2nd.pass-simplefb - Add simplefb node to device tree # lk2nd.pass-simplefb=autorefresh - Enable display autorefresh for command mode panels # lk2nd.pass-simplefb=xrgb8888 - Set display mode to XRGB8888 # lk2nd.pass-simplefb=rgb565 - Set display mode to RGB565 # lk2nd.pass-simplefb=relocate - Relocate framebuffer to safe region # lk2nd.pass-simplefb=xrgb8888,autorefresh,relocate - Combine options # # lk2nd.pass-ramoops - Add ramoops node to device tree # lk2nd.pass-ramoops=zap - Clear ramoops region before booting # # lk2nd.spin-table=force - Force spintable even if PSCI available ``` -------------------------------- ### Remap Keys using GPIO Keys in lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Remap keys for menu navigation when default keys are unavailable. This example unmaps KEY_VOLUMEUP and re-maps it to KEY_POWER. ```dts gpio-keys { compatible = "gpio-keys"; /* HACK: map KEY_VOLUMEUP to non-existent button so the actual * Volume Up button will successfully re-map to KEY_POWER below. */ volume-up-unmap { lk2nd,code = ; gpios = <&pmic_pon 0 0>; }; /* * Remap Volume Up to KEY_POWER to allow selecting menu items as * there is no power button present on the device. * Use Volume Down to navigate the menu and Volume Up to select. */ volume-up { lk2nd,code = ; gpios = <&tlmm 85 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; }; ``` -------------------------------- ### Boot via Fastboot Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/boot.md Use the fastboot interface to boot an OS image over USB. ```bash fastboot boot boot.img ``` -------------------------------- ### Create and Flash Android Boot Image Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Use mkbootimg to create a standard Android boot image and fastboot to flash or boot it. lk2nd automatically applies a 512K offset when flashing. ```bash mkbootimg \ --kernel zImage \ --ramdisk initramfs.cpio.gz \ --cmdline "console=ttyMSM0,115200 earlycon" \ --base 0x80000000 \ --pagesize 2048 \ --output boot.img ``` ```bash fastboot flash boot boot.img ``` ```bash fastboot boot boot.img ``` -------------------------------- ### Configure Boot Options with extlinux.conf Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt lk2nd supports extlinux.conf for boot configuration, similar to U-Boot. The file must be on an ext2 partition at /extlinux/extlinux.conf. It allows specifying kernel, initrd, DTB, and kernel command line arguments. ```ini # /extlinux/extlinux.conf # lk2nd searches partitions >16MiB and the boot partition (with 512K offset) timeout 1 menu title Boot the OS default postmarketos label postmarketos linux /vmlinuz initrd /initramfs fdtdir /dtbs append earlycon console=ttyMSM0,115200 lk2nd.pass-simplefb label recovery linux /vmlinuz-recovery initrd /initramfs-recovery fdt /dtbs/qcom-msm8916-samsung-a3u-eur.dtb append earlycon console=ttyMSM0,115200 rescue # Supported commands: # label - Start new boot entry # default - Set default boot label # linux - Kernel image path (alt: kernel) # initrd - Initramfs path # fdt - Device tree path (alt: devicetree) # fdtdir - Auto-find device tree directory (alt: devicetreedir) # append - Kernel command line # fdtoverlays - Space-separated DT overlay list (alt: devicetree-overlay) ``` -------------------------------- ### Configure lk2nd Build Options Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Compile-time flags for customizing debugging, versioning, and signing of the boot image. ```bash # Enable verbose logging to display (useful for debugging) make TOOLCHAIN_PREFIX=arm-none-eabi- DEBUG=2 DEBUG_FBCON=1 lk2nd-msm8916 # Force boot into fastboot menu (for development) make TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_FORCE_FASTBOOT=1 lk2nd-msm8916 # Override version string (for packaging) make TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_VERSION="1.0.0-custom" lk2nd-msm8916 # Add delay before fastboot boot (for UART debugging) make TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_FASTBOOT_DELAY=5000 lk2nd-msm8916 # Build only specific device tree files make TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_DTBS="msm8916-samsung-a3" lk2nd-msm8916 # Sign the boot image for AVB1 (Android Verified Boot) make TOOLCHAIN_PREFIX=arm-none-eabi- SIGN_BOOTIMG=1 lk2nd-msm8916 # Sign with custom keys (X.509 PEM cert and PKCS#8 key) make TOOLCHAIN_PREFIX=arm-none-eabi- SIGN_BOOTIMG=1 \ BOOTIMG_CERT=/path/to/cert.pem \ BOOTIMG_KEY=/path/to/key.pk8 \ lk2nd-msm8916 ``` -------------------------------- ### Configure GPIO Keys Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Define or remap physical buttons for navigation and boot menu interaction. ```c #include #include &lk2nd { device { // Standard GPIO key configuration gpio-keys { compatible = "gpio-keys"; volume-down { lk2nd,code = ; gpios = <&tlmm 81 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; volume-up { lk2nd,code = ; gpios = <&tlmm 85 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; home { lk2nd,code = ; gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; }; }; }; // Remap Volume Up to Power key (for devices without power button) &lk2nd { device { // Custom key hint for boot menu lk2nd,menu-key-strings = "Volume Down", "Volume Up"; gpio-keys { compatible = "gpio-keys"; // Unmap original Volume Up to non-existent GPIO volume-up-unmap { lk2nd,code = ; gpios = <&pmic_pon 0 0>; }; // Remap actual Volume Up button to Power key for menu selection volume-up { lk2nd,code = ; gpios = <&tlmm 85 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; }; }; }; ``` -------------------------------- ### Build Target Mapping and Compilation Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Maps lk2nd build targets to supported Qualcomm SoCs and provides the command to initiate a build. ```bash # Build target to SoC mapping: # # lk2nd-msm8916 -> MSM8916, MSM8939, MSM8929, MSM8936, APQ8016, etc. # lk2nd-msm8909 -> MSM8909, MDM9209, MDM9609, APQ8009 # lk2nd-msm8226 -> MSM8226, MSM8926, MSM8626, APQ8026, etc. # lk2nd-msm8610 -> MSM8610, MSM8212, MSM8110 # lk2nd-msm8952 -> MSM8952, MSM8956, MSM8976, MSM8937, MSM8917 # lk2nd-msm8953 -> MSM8953, APQ8053 # lk2nd-msm8960 -> MSM8960, MSM8930, APQ8064, MSM8660 # lk2nd-msm8974 -> MSM8974, MSM8674, APQ8074 # lk2nd-msm8994 -> MSM8994, MSM8992, APQ8094 # lk2nd-msm8996 -> MSM8996, APQ8096 # lk2nd-msm8660 -> MSM8660 # lk2nd-apq8084 -> APQ8084 # lk2nd-mdm9607 -> MDM9607 # lk2nd-mdm9640 -> MDM9640 # Check your device's SoC and use the corresponding target make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8916 ``` -------------------------------- ### Flash Actual Boot Image Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md This command flashes the main boot image, ensuring it's offset by 512 KiB to avoid overwriting lk2nd. ```bash fastboot flash boot boot.img ``` -------------------------------- ### Build lk2nd image Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/building.md Execute the make command to build the lk2nd image for a specific SoC target. ```bash $ make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msmXXXX ``` -------------------------------- ### Execute Fastboot OEM Commands Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Standard and custom OEM commands for device debugging, memory inspection, and state management. ```bash # Enter fastboot mode: Press Volume Down while booting # Enter recovery mode: Press Volume Up while booting # Flash an operating system boot image (with 512K offset to preserve lk2nd) fastboot flash boot boot.img # Update lk2nd itself fastboot flash lk2nd lk2nd.img # Boot an image without flashing fastboot boot boot.img # Get lk2nd debug log fastboot oem log && fastboot get_staged output.txt # Or output directly to terminal fastboot oem log && fastboot get_staged /dev/stdout # Stage and retrieve device tree blob fastboot oem dtb && fastboot get_staged dtb.bin # Take a screenshot of the bootloader display fastboot oem screenshot && fastboot get_staged screenshot.bin # Reboot into EDL (Emergency Download) mode fastboot oem reboot-edl # Debug commands - dump CPUID registers fastboot oem debug cpuid # Debug commands - read/write memory (peek/poke) fastboot oem debug readl 0x01234000 # Read 32-bit value fastboot oem debug writel 0x01234000 0xDEADBEEF # Write 32-bit value # Dump regulator states fastboot oem debug spmi-regulators # List available OEM commands fastboot oem help ``` -------------------------------- ### Flash lk2nd.img using Fastboot Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md Use this command to flash the lk2nd bootloader image onto the boot partition via fastboot. ```bash fastboot flash boot lk2nd.img ``` -------------------------------- ### Workaround for Fastboot Partition Size Error Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md If encountering 'fastboot: error: Couldn't parse partition size '0x'', try these alternative flashing methods. ```bash fastboot flash:raw boot lk2nd.img ``` ```bash fastboot boot lk2nd.img fastboot flash lk2nd lk2nd.img ``` -------------------------------- ### Configure Display Panel Selection Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Set up automatic panel detection using compatible strings or ADC ranges for Sony devices. ```c // Standard panel configuration &lk2nd { device { panel { compatible = "wingtech,wt88047-panel", "lk2nd,panel"; qcom,mdss_dsi_r69431_720p_video { compatible = "wingtech,sharp-r69431"; }; qcom,mdss_dsi_nt35521_720p_video { compatible = "wingtech,auo-nt35521"; }; qcom,mdss_dsi_otm1285a_720p_video { compatible = "wingtech,boe-otm1285a"; }; }; }; }; // Sony devices using lcdid_adc ranges &lk2nd { device { panel { compatible = "sony,aries-panel", "lk2nd,panel"; novatek_jdi_720p_cmd { compatible = "sony,novatek-jdi-720p-cmd"; sony,lcd-id-adc = <0x109618 0x12c898>; // min, max ADC range }; novatek_sharp_720p_cmd { compatible = "sony,novatek-sharp-720p-cmd"; sony,lcd-id-adc = <0x562e8 0x65130>; }; }; }; }; ``` -------------------------------- ### Configure Special Device Options Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Sets navigation hints, SD card slot mapping, and downstream compatibility IDs for specific hardware. ```c &lk2nd { // Smartwatch with single button navigation watch { model = "LG G Watch R"; compatible = "lg,lenok"; // Enable single key navigation (short/long press) lk2nd,single-key-navigation; // Custom menu navigation hint lk2nd,menu-key-strings = "Short Press", "Long Press"; }; // Device with non-standard SD card slot device { model = "Some MSM8974 Device"; compatible = "vendor,device"; // SD card on slot 3 instead of default slot 2 lk2nd,sd-mmc = <&sdhc3>; // Available: sdhc2, sdhc3 }; // Override MSM/board ID for downstream kernel compatibility downstream-compat { model = "Device with custom IDs"; qcom,msm-id = ; qcom,board-id = <0xCE08FF01 1>; }; }; ``` -------------------------------- ### Configure lk2nd Device Matching Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Define device identification rules using bootloader versions, device names, command line substrings, or display panel detection. ```c &lk2nd { a3lte { model = "Samsung Galaxy A3 (SM-A300F)"; lk2nd,match-bootloader = "A300F*"; }; }; // Match by device name (android.device= cmdline argument) &lk2nd { victara { model = "Motorola Moto X 2014"; lk2nd,match-device = "victara"; }; }; // Match by any cmdline substring &lk2nd { lenok { model = "LG G Watch R"; lk2nd,match-cmdline = "*lenok*"; }; }; // Match by detected display panel &lk2nd { device { model = "Xiaomi Redmi 2"; lk2nd,match-panel; panel { compatible = "wingtech,wt88047-panel", "lk2nd,panel"; qcom,mdss_dsi_r69431_720p_video { compatible = "wingtech,sharp-r69431"; }; qcom,mdss_dsi_nt35521_720p_video { compatible = "wingtech,auo-nt35521"; }; }; }; }; ``` -------------------------------- ### Flash lk2nd.img using EDL Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md Flash the lk2nd bootloader image using the Emergency Download (EDL) mode. ```bash edl w boot lk2nd.img ``` -------------------------------- ### Match Cmdline Property Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md This property checks the entire command line for a match against a given expression, similar to 'match-bootloader' but broader in scope. ```dts lk2nd,match-cmdline = "*lenok*"; ``` -------------------------------- ### Customize lk2nd Menu Navigation Key Hint Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Customize the hint shown in the lk2nd boot menu for re-mapped keys. Specify strings for navigation and selection. ```dts lk2nd,menu-key-strings = "Volume Down", "Volume Up"; ``` -------------------------------- ### Match Device Property Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md This property matches the 'android.device=' argument from the previous bootloader's command line with a specified device name. ```dts lk2nd,match-device = "victara"; ``` -------------------------------- ### Device Tree Configuration for lk2nd Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Configure per-device settings in lk2nd device tree source files (.dts). Each device node specifies model, compatible strings, and device-specific properties, including matching by bootloader version. ```c // lk2nd/device/dts/msm8916/msm8916-samsung-a3u-eur.dts #include #include / { // Root node: information for stock bootloader qcom,msm-id = ; qcom,board-id = <0xCE08FF01 1>, <0xCE08FF01 3>, <0xCE08FF01 7>; }; &lk2nd { // Single device in this DT file a3lte { model = "Samsung Galaxy A3 (SM-A300F)"; compatible = "samsung,a3u-eur", "samsung,a3"; lk2nd,dtb-files = "msm8916-samsung-a3u-eur"; // Match device by bootloader version string lk2nd,match-bootloader = "A300F*"; }; }; // Multiple devices sharing one DT file &lk2nd { a3lte { model = "Samsung Galaxy A3 (SM-A300F)"; compatible = "samsung,a3u-eur"; lk2nd,match-bootloader = "A300F*"; lk2nd,dtb-files = "msm8916-samsung-a3u-eur"; }; a5lte { model = "Samsung Galaxy A5 (SM-A500F)"; compatible = "samsung,a5u-eur"; lk2nd,match-bootloader = "A500F*"; lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; }; }; // Single device with properties at lk2nd level &lk2nd { model = "Huawei Y635-L01"; compatible = "huawei,y635"; lk2nd,dtb-files = "msm8916-huawei-y635"; }; ``` -------------------------------- ### Configure GPIO and Regulator Drivers Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Defines GPIO-based LEDs and fixed/LDO regulators within the lk2nd device tree node. ```c #include #include &lk2nd { device { // GPIO LED control (mainly for lk1st) gpio-leds { compatible = "gpio-leds"; red { gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; default-state = "on"; }; green { gpios = <&tlmm 4 GPIO_ACTIVE_HIGH> default-state = "off"; }; blue { gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; // Fixed regulator for panel/backlight power regulator-backlight { compatible = "regulator-fixed"; gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>; }; regulator-panel { compatible = "regulator-fixed"; gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; }; // LDO regulator enable regulator-l11 { compatible = "regulator-ldo"; id = ; }; }; }; ``` -------------------------------- ### Flash lk2nd to Device Source: https://context7.com/msm8916-mainline/lk2nd/llms.txt Commands to flash the lk2nd image using various device-specific interfaces. ```bash # Flash using Fastboot (most Android devices) fastboot flash boot lk2nd.img # Flash using Heimdall (Samsung devices) heimdall flash --BOOT lk2nd.img # Flash using EDL (Emergency Download mode) edl w boot lk2nd.img # Workaround for partition size parsing errors fastboot flash:raw boot lk2nd.img # Or boot first, then flash fastboot boot lk2nd.img fastboot flash lk2nd lk2nd.img ``` -------------------------------- ### Device Node with Model and Compatible Properties Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Every device node should specify its marketing name in the 'model' property and a list of compatible values. The 'lk2nd,dtb-files' property can list possible device-tree names for the device. ```dts gt58lte { model = "Samsung Galaxy Tab A 8.0 (LTE, SM-T355)"; compatible = "samsung,gt58lte", "samsung,gt58"; lk2nd,dtb-files = "msm8916-samsung-gt58"; }; ``` -------------------------------- ### Build lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md General command to build lk2nd for a specific MSM target using a specified toolchain prefix. Refer to building.md for more details. ```bash make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msmXXXX ``` -------------------------------- ### Flash lk2nd.img using Heimdall Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md Flash the lk2nd bootloader image using the heimdall tool, commonly used for Samsung devices. ```bash heimdall flash --BOOT lk2nd.img ``` -------------------------------- ### Match Panel Property Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md When no suitable command-line parameter is available for matching, this property can be used with a list of possible display panels to determine the device. ```dts lk2nd,match-panel; panel { /* ... */ }; ``` -------------------------------- ### Retrieve lk2nd Log File Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md Use these fastboot commands to retrieve a log file from lk2nd for debugging purposes. The output can be directed to a file or standard output. ```bash fastboot oem log && fastboot get_staged ``` -------------------------------- ### Match Bootloader Property Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md This property allows lk2nd to match the 'android.bootloader=' argument from the previous bootloader's command line with a specified expression. ```dts lk2nd,match-bootloader = "A300F*"; ``` -------------------------------- ### Panel Selection with Compatible Values Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md This section lists possible display panels and their compatible values. lk2nd can patch the device-tree to insert the compatible value for the detected display. ```dts panel { compatible = "wingtech,wt88047-panel", "lk2nd,panel"; qcom,mdss_dsi_r69431_720p_video { compatible = "wingtech,sharp-r69431"; }; qcom,mdss_dsi_nt35521_720p_video { compatible = "wingtech,auo-nt35521"; }; /* ... */ }; ``` -------------------------------- ### Configure GPIO LEDs in lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Configure GPIO LEDs in lk2nd. Supports 'gpios' and 'default-state'. Primarily for lk1st compatibility and debugging. ```dts gpio-leds { compatible = "gpio-leds"; red { gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; default-state = "on"; }; green { gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; ``` -------------------------------- ### Update lk2nd Directly Source: https://github.com/msm8916-mainline/lk2nd/blob/main/README.md Update the lk2nd bootloader itself by flashing 'lk2nd.img' from within the lk2nd fastboot interface. ```bash fastboot flash lk2nd lk2nd.img ``` -------------------------------- ### Policy Definitions (set-policy) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Specifies policy definitions (set-policy), including the root policy. ```APIDOC ## Policy Definitions (set-policy) ### Description Specifies policy definitions (set-policy). ### Parameters - **set-policy** (integer) - Identifier for the policy. ### Example ``` set-policy 0 : set-policy-root ``` ``` -------------------------------- ### Content Type Definitions (set-ctype) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Provides a comprehensive list of content type definitions (set-ctype) used in various transaction and security contexts. ```APIDOC ## Content Type Definitions (set-ctype) ### Description Provides a comprehensive list of content type definitions (set-ctype). ### Parameters - **set-ctype** (integer) - Identifier for the content type. ### Example ``` set-ctype 0 : setct-PANData set-ctype 1 : setct-PANToken ``` ``` -------------------------------- ### Configure Fixed Regulator in lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Configure a fixed regulator in lk2nd, primarily for panel and backlight power. Supports 'gpios'. Useful for lk1st consistency. ```dts regulator-backlight { compatible = "regulator-fixed"; gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>; }; ``` -------------------------------- ### Certificate Extension Definitions (setCext) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Details certificate extensions (setCext) used for various certificate attributes and capabilities. ```APIDOC ## Certificate Extension Definitions (setCext) ### Description Details certificate extensions (setCext) used for various certificate attributes and capabilities. ### Parameters - **setCext** (integer) - Identifier for the certificate extension. ### Example ``` set-certExt 0 : setCext-hashedRoot set-certExt 1 : setCext-certType ``` ``` -------------------------------- ### Configure GPIO Keys for lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Define GPIO keys for lk2nd, overriding default keymaps. Supports custom keycodes using 'lk2nd,code' and GPIO mapping. ```dts gpio-keys { compatible = "gpio-keys"; volume-down { lk2nd,code = ; gpios = <&tlmm 81 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; home { lk2nd,code = ; gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; }; ``` -------------------------------- ### X.500 Directory Services Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines structures and attributes related to X.500 directory services. ```APIDOC ## X.500 Directory Services ### Description Defines structures and attributes related to X.500 directory services. ### Endpoints - `X500` (ID: 2 5): directory services (X.500) - `X509` (ID: 4) - `CN` (ID: 3): commonName - `SN` (ID: 4): surname - `serialNumber` (ID: 5) - `C` (ID: 6): countryName - `L` (ID: 7): localityName - `ST` (ID: 8): stateOrProvinceName - `street` (ID: 9): streetAddress - `O` (ID: 10): organizationName - `OU` (ID: 11): organizationalUnitName - `title` (ID: 12): title - `description` (ID: 13) - `searchGuide` (ID: 14) - `businessCategory` (ID: 15) - `postalAddress` (ID: 16) - `postalCode` (ID: 17) - `postOfficeBox` (ID: 18) - `physicalDeliveryOfficeName` (ID: 19) - `telephoneNumber` (ID: 20) - `telexNumber` (ID: 21) - `teletexTerminalIdentifier` (ID: 22) - `facsimileTelephoneNumber` (ID: 23) - `x121Address` (ID: 24) - `internationaliSDNNumber` (ID: 25) - `registeredAddress` (ID: 26) - `destinationIndicator` (ID: 27) - `preferredDeliveryMethod` (ID: 28) - `presentationAddress` (ID: 29) - `supportedApplicationContext` (ID: 30) - `member` (ID: 31) - `owner` (ID: 32) - `roleOccupant` (ID: 33) - `seeAlso` (ID: 34) - `userPassword` (ID: 35) - `userCertificate` (ID: 36) - `cACertificate` (ID: 37) - `authorityRevocationList` (ID: 38) - `certificateRevocationList` (ID: 39) - `crossCertificatePair` (ID: 40) - `name` (ID: 41): name - `GN` (ID: 42): givenName - `initials` (ID: 43): initials - `generationQualifier` (ID: 44) - `x500UniqueIdentifier` (ID: 45) - `dnQualifier` (ID: 46): dnQualifier - `enhancedSearchGuide` (ID: 47) - `protocolInformation` (ID: 48) - `distinguishedName` (ID: 49) - `uniqueMember` (ID: 50) - `houseIdentifier` (ID: 51) - `supportedAlgorithms` (ID: 52) - `deltaRevocationList` (ID: 53) - `dmdName` (ID: 54) - `pseudonym` (ID: 65) - `role` (ID: 72): role - `X500algorithms` (ID: 8): directory services - algorithms - `RSA` (ID: 1 1): rsa - `RSA-MDC2` (ID: 3 100): mdc2WithRSA - `MDC2` (ID: 3 101): mdc2 - `id-ce` (ID: 29) - `subjectDirectoryAttributes` (ID: 9): X509v3 Subject Directory Attributes - `subjectKeyIdentifier` (ID: 14): X509v3 Subject Key Identifier - `keyUsage` (ID: 15): X509v3 Key Usage - `privateKeyUsagePeriod` (ID: 16): X509v3 Private Key Usage Period - `subjectAltName` (ID: 17): X509v3 Subject Alternative Name - `issuerAltName` (ID: 18): X509v3 Issuer Alternative Name - `basicConstraints` (ID: 19): X509v3 Basic Constraints - `crlNumber` (ID: 20): X509v3 CRL Number - `CRLReason` (ID: 21): X509v3 CRL Reason Code - `invalidityDate` (ID: 24): Invalidity Date - `deltaCRL` (ID: 27): X509v3 Delta CRL Indicator - `issuingDistributionPoint` (ID: 28) ``` -------------------------------- ### Attribute Definitions (setAttr) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines general attributes (setAttr) such as certificate types, payment gateway capabilities, and token types. ```APIDOC ## Attribute Definitions (setAttr) ### Description Defines general attributes (setAttr). ### Parameters - **setAttr** (integer) - Identifier for the attribute. ### Example ``` set-attr 0 : setAttr-Cert set-attr 1 : setAttr-PGWYcap : payment gateway capabilities ``` ``` -------------------------------- ### Specific Attribute Definitions Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Provides specific definitions for attributes like Certificate attributes, Token Types, and Issuer Capabilities. ```APIDOC ## Specific Attribute Definitions ### Description Provides specific definitions for attributes. ### Parameters - **setAttr-Cert** (integer) - Identifier for Certificate attributes. - **setAttr-TokenType** (integer) - Identifier for Token Type attributes. - **setAttr-IssCap** (integer) - Identifier for Issuer Capability attributes. ### Example ``` setAttr-Cert 0 : set-rootKeyThumb setAttr-TokenType 1 : setAttr-Token-EMV setAttr-IssCap 3 : setAttr-IssCap-CVM ``` ``` -------------------------------- ### Access Descriptors (ad) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines various access descriptors used for certificate extensions. ```APIDOC ## Access Descriptors (ad) ### Description Defines various access descriptors used for certificate extensions. ### Endpoints - `ad-OCSP` (ID: 1): OCSP - `ad-ca-issuers` (ID: 2): CA Issuers - `ad-timeStamping` (ID: 3): AD Time Stamping - `ad-dvcs` (ID: 4): AD DVCS - `caRepository` (ID: 5): CA Repository ``` -------------------------------- ### PKIX OCSP Definitions Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines components and types related to the Online Certificate Status Protocol (OCSP). ```APIDOC ## PKIX OCSP Definitions ### Description Defines components and types related to the Online Certificate Status Protocol (OCSP). ### Endpoints - `basicOCSPResponse` (ID: 1): Basic OCSP Response - `Nonce` (ID: 2): OCSP Nonce - `CrlID` (ID: 3): OCSP CRL ID - `acceptableResponses` (ID: 4): Acceptable OCSP Responses - `noCheck` (ID: 5): OCSP No Check - `archiveCutoff` (ID: 6): OCSP Archive Cutoff - `serviceLocator` (ID: 7): OCSP Service Locator - `extendedStatus` (ID: 8): Extended OCSP Status - `valid` (ID: 9) - `path` (ID: 10) - `trustRoot` (ID: 11): Trust Root ``` -------------------------------- ### Configure LDO Regulator in lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Configure an LDO regulator in lk2nd. This driver is simple and only enables the selected regulator using its ID. ```dts #include regulator-l11 { compatible = "regulator-ldo"; id = ; }; ``` -------------------------------- ### Single-Key Navigation Property Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Enables a single-key navigation scheme for devices with only one physical button, utilizing short and long presses for different actions. ```dts lk2nd,single-key-navigation; ``` -------------------------------- ### Message Extension Definitions (set-msgExt) Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines message extensions (set-msgExt) used for various cryptographic and authentication purposes. ```APIDOC ## Message Extension Definitions (set-msgExt) ### Description Defines message extensions (set-msgExt) used for various cryptographic and authentication purposes. ### Parameters - **set-msgExt** (integer) - Identifier for the message extension. ### Example ``` set-msgExt 1 : setext-genCrypt : generic cryptogram set-msgExt 3 : setext-miAuth : merchant initiated auth ``` ``` -------------------------------- ### Algorithm Identifiers Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Lists various algorithm identifiers used in cryptographic operations. ```APIDOC ## Algorithm Identifiers ### Description Lists various algorithm identifiers used in cryptographic operations. ### Endpoints - `algorithm` (ID: 1 3 14 3 2): algorithm - `RSA-NP-MD5` (ID: 3): md5WithRSA - `DES-ECB` (ID: 6): des-ecb - `DES-CBC` (ID: 7): des-cbc - `DES-OFB` (ID: 8): des-ofb - `DES-CFB` (ID: 9): des-cfb - `rsaSignature` (ID: 11) - `DSA-old` (ID: 12): dsaEncryption-old - `DSA-SHA` (ID: 13): dsaWithSHA - `RSA-SHA` (ID: 15): shaWithRSAEncryption - `DES-EDE` (ID: 17): des-ede - `DES-EDE3` (ID: 17): des-ede3 - `DES-EDE-CBC` (ID: 17): des-ede-cbc - `DES-EDE-CFB` (ID: 17): des-ede-cfb - `DES-EDE3-CFB` (ID: 17): des-ede3-cfb - `DES-EDE-OFB` (ID: 17): des-ede-ofb - `DES-EDE3-OFB` (ID: 17): des-ede3-ofb - `DESX-CBC` (ID: 17): desx-cbc - `SHA` (ID: 18): sha - `SHA1` (ID: 26): sha1 - `DSA-SHA1-old` (ID: 27): dsaWithSHA1-old - `RSA-SHA1-2` (ID: 29): sha1WithRSA - `RIPEMD160` (ID: 1 3 36 3 2): ripemd160 - `RSA-RIPEMD160` (ID: 1 3 36 3 3 1 2): ripemd160WithRSA - `SXNetID` (ID: 1 3 101 1 4 1): Strong Extranet ID ``` -------------------------------- ### ID Set Definitions Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Details the various types of identifier sets (id-set) and their specific meanings, including content types, message extensions, and certificate extensions. ```APIDOC ## ID Set Definitions ### Description Details the various types of identifier sets (id-set) and their specific meanings. ### Parameters - **id-set** (integer) - Identifier for the set. - **set-ctype** (string) - Content types within the set. - **set-msgExt** (string) - Message extensions within the set. - **set-attr** (string) - Attributes within the set. - **set-policy** (string) - Policy information within the set. - **set-certExt** (string) - Certificate extensions within the set. ### Example ``` id-set 0 : set-ctype : content types id-set 1 : set-msgExt : message extensions ``` ``` -------------------------------- ### Specify SD MMC Card Slot in lk2nd Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md Configure the SD MMC card slot for lk2nd if it differs from the default. This is applicable to platforms like msm8974 and is required for SD card boot. ```dts lk2nd,sd-mmc = <&sdhc3>; ``` -------------------------------- ### lk2nd Node with Device Subnodes Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md The lk2nd node contains device-specific information. Each supported device is listed in a dedicated subnode. If only one device is supported, its information can be placed directly in the top-level lk2nd node. ```dts &lk2nd { a3lte { model = "Samsung Galaxy A3 (SM-A300F)"; /* ... */ }; gt58lte { /* ... */ }; }; ``` ```dts &lk2nd { model = "Huawei Y635-L01"; /* ... */ }; ``` -------------------------------- ### Sony Panel Selection with lcd-id-adc Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md For some Sony devices, panel selection is based on the 'sony,lcd-id-adc' property, which defines a range of values to identify the panel. ```dts panel { compatible = "sony,aries-panel", "lk2nd,panel"; novatek_jdi_720p_cmd { compatible = "sony,novatek-jdi-720p-cmd"; sony,lcd-id-adc = <0x109618 0x12c898>; }; novatek_sharp_720p_cmd { compatible = "sony,novatek-sharp-720p-cmd"; sony,lcd-id-adc = <0x562e8 0x65130>; }; }; ``` -------------------------------- ### Pilot Attribute Types Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Defines various pilot attribute types used within the system, including organizational status, mail preferences, and security-related attributes. ```APIDOC ## Pilot Attribute Types ### Description Defines various pilot attribute types used within the system. ### Parameters - **pilotAttributeType** (integer) - Description of the attribute type. ### Example ``` pilotAttributeType 45 : : organizationalStatus pilotAttributeType 46 : : janetMailbox ``` ``` -------------------------------- ### MSM-ID and Board-ID Override Source: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md This allows overriding the autodetected msm-id and board-id for the downstream kernel. These values will be used by lk2nd instead of attempting to detect them. ```dts qcom,msm-id = ; qcom,board-id = <0xCE08FF01 1>; ``` -------------------------------- ### International Organizations Source: https://github.com/msm8916-mainline/lk2nd/blob/main/lib/openssl/crypto/objects/objects.txt Lists international organizations and their associated identifiers, such as Secure Electronic Transactions. ```APIDOC ## International Organizations ### Description Lists international organizations and their associated identifiers. ### Parameters - **international-organizations** (integer) - Identifier for the organization. - **id-set** (string) - Type of identifier set. ### Example ``` international-organizations 42 : id-set : Secure Electronic Transactions ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.