|
|
(32 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| | | {{#cargo_query: |
| === How to create a device tree by forking device-tree. === | | tables=Devices |
| | | |fields=CONCAT( '[[', _pageName, '|',Manufacturer,' ',Name,']]' )=Device,Codename,Architecture,StatusUsbnet=USB Net,StatusFlashing=Flashing,StatusTouch=Touch,StatusScreen=Screen,StatusWifi=Wifi,StatusFde=FDE,StatusBattery=Battery,Status3d=3D,StatusAccel=IMU,StatusAudio=Audio,StatusBluetooth=Bluetooth,StatusCamera=Camera,StatusGps=GPS,StatusMobiledata=Mobile Data,StatusOtg=USB-OTG,StatusKeyboard=Keyboard |
| Once you found the device tree that work on your device.Then you can start to making a device tree fro your device by forking other device.
| | |order by=Devices.Manufacturer, Devices.Name |
| | | |format=table |
| 0. Grub the kernel
| | |limit=9999 |
| | | |where= Devices.Manufacturer = "Samsung" and Devices.StatusStylus = "Y" |
| | | |more results text= |
| 1. Let say for example <code> meson-gxl-s905w-tx3-mini.dtb </code> in <code> /boot </code> mostly work for your device. Then
| | }} |
| | |
| <source> cp -rf arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts arch/arm64/boot/dts/amlogic/meson-gxl-s905w-<-your-device-codename->.dts</source>
| |
| | |
| | |
| 2. Rebranding
| |
| | |
| In the step we goona add some device info to the tree (like the code name of it , the name of it,etc)
| |
| | |
| You should saw a line that in your device :
| |
| | |
| | |
| | |
| <source>
| |
| compatible = "oranth,tx3-mini", "amlogic,s905w", "amlogic,meson-gxl";
| |
| </source>
| |
| | |
| change it to
| |
| | |
| <source>
| |
| | |
| compatible = "<--manufacturer-name-->,<-device-code-name-without-manufacturer-name-->", "amlogic,s905w", "amlogic,meson-gxl";
| |
| | |
| </source>
| |
| | |
| | |
| | |
| You also should saw a line that in your device :
| |
| | |
| | |
| <source>model = "Oranth Tanix TX3 Mini";</source>
| |
| | |
| Change it to
| |
| | |
| | |
| <source>model = "your device name";</source>
| |
| | |
| If you saw something like this
| |
| <source>
| |
| | |
| sound {
| |
| compatible = "amlogic,gx-sound-card";
| |
| model = "S905X-P212";
| |
| | |
| </source>
| |
| | |
| | |
| in your device tree, | |
| Then change it to something like this
| |
| | |
| <source>
| |
| | |
| sound {
| |
| compatible = "amlogic,gx-sound-card";
| |
| model = "<-your-device-code-name-in-upcase->";
| |
| | |
| </source>
| |
| | |
| | |
| 3 . Add your device specify thing to your device like leds .
| |
| | |
| | |
| 4. Edit linux/arch/arm64/boot/dts/amlogic/Makefile in the kernel to make the kernel compile your tree
| |
| | |
| Add to this line to linux/arch/arm64/boot/dts/amlogic/Makefile
| |
| | |
| <source>
| |
| dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb</source>
| |
| | |
| | |
| | |
| 5. Compile the kernel like how you normally would.
| |