[web] adding "device support" dev documentation

LEDE Commits lede-commits at lists.infradead.org
Tue Jul 12 11:36:24 PDT 2016


jow pushed a commit to web.git, branch master:
https://git.lede-project.org/?p=web.git;a=commitdiff;h=6a9a1014da2931eb14dfd9d414c39569e2b05b6c

commit 6a9a1014da2931eb14dfd9d414c39569e2b05b6c
Author: bobafetthotmail <starshipeleven at outlook.com>
AuthorDate: Thu Jun 16 15:55:39 2016 +0200

    adding "device support" dev documentation
---
 docs/development_new_device.txt | 42 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/docs/development_new_device.txt b/docs/development_new_device.txt
new file mode 100644
index 0000000..c2c9153
--- /dev/null
+++ b/docs/development_new_device.txt
@@ -0,0 +1,42 @@
+=== Adding a new device
+
+A good all-round advice would be to start by looking at recent commits about adding a new device, to see what files where changed and how.
+Many files try to be as self-explanatory as possible, most of the times just opening them will be enough to understand their function.
+
+
+This is a general map of where most important files are located:
+
+==== /target/linux/<arch_name>/base-files/etc/...
+This folder contains files and folders that will be integrated in the firmware's /etc folder.
+
+These are its subfolders and files:
+
+* **...board.d/** scripts for defining device-specific default hardware, like leds and network interfaces. 
+* **...hotplug.d/** scripts for defining device-specific actions to be done automatically on hotplugging of devices
+* **...init.d/** scripts for defining device-specific actions to be done automatically on boot
+* **...uci-defaults/** files for defining device-specific uci configuration defualts
+* **...diag.sh** defines what is the led to use for error codes for each board
+
+=== /target/linux/<arch_name>/base-files/lib/...
+This folder contains files and folders that will be integrated in the firmware's /lib folder.
+
+These are its subfolders and files:
+
+* **...<arch_name>.sh** human-readable full board name associated to script-safe board name
+* **...preinit/** common <arch_name> preinit startup scripts
+* **...upgrade/** common <arch_name> upgrade scripts
+
+=== /target/linux/<arch_name>/base-files/sbin 
+This folder contains files and folders that will be integrated in the firmware's /sbin folder, usually common <arch_name> sbin scripts and tools.
+
+==== /target/linux/<arch_name>/dts/ 
+Device tree source files, or dts for short.
+
+=== /target/linux/<arch_name>/image/
+Configuration needed to build device-specific flashable images.
+
+=== /target/linux/<arch_name>/<board_name>/ 
+Board-specific configuration.
+
+=== /target/linux/<arch_name>/modules.mk 
+Arch-specific kernel module config file for menuconfig 



More information about the lede-commits mailing list