To add initial support for one device, you need to add four files at a minimum. For example:
Platform/Xiaomi/sm7150/FdtBlob_compat/surya.dtb
Platform/Xiaomi/sm7150/surya.dsc
Platform/Xiaomi/sm7150/surya.fdf.inc
configs/devices/surya.conf
This commit is a good example:
https://github.com/edk2-porting/edk2-msm/commit/51ad92c9316d06a11d408ba1f772d1549d9e79b0#diff-c133a6213efa8c5ea674455b7f88751cf4afce9d6be452ac59d23c6b4da84127
This file should be located at Platform/${VENDOR_NAME}/${SOC_PLATFORM_L}/FdtBlob_compat/
It was retrieved from /sys/firmware/fdt
in the prerequisite step.
This is the EDK II Platform Description file. We usually define values specific to one device here. So, as you can see, you need to modify some lines according to your own device:
PLATFORM_NAME
: codename of your device
DEVICE_DXE_FV_COMPONENTS
: path to your .fdf.inc
file
PcdMipiFrameBufferWidth
: width of screen resolution
PcdMipiFrameBufferHeight
: height of screen resolution
PcdGuiDefaultDPI
: the DPI of your screen
PcdDeviceVendor
, PcdDeviceProduct
and PcdDeviceCodeName
It defines files that are specific to this device, like some drivers, ACPI Tables and mainline device tree blob.
You can leave this file empty if you really don’t know what to do. Your device will still boot.
ButtonsDxe will be the most common driver to be placed here. You may have to patch it to have working buttons in UEFI.
TODO: explain how to patch it
You don’t need to care about it, at least for now
This is required if you need the Mass Storage function provided by the built-in mainline Linux kernel.
Some SoC has a file named xxxxxx-generic-msd.dtb
. You can try using that file.
It defines values used by the build script.
BOOTIMG_OS_PATCH_LEVEL
and BOOTIMG_OS_VERSION
can be found when unpacking boot image in the prerequisite step.