From 6a9a1014da2931eb14dfd9d414c39569e2b05b6c Mon Sep 17 00:00:00 2001 From: bobafetthotmail Date: Thu, 16 Jun 2016 15:55:39 +0200 Subject: [PATCH] adding "device support" dev documentation --- docs/development_new_device.txt | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/development_new_device.txt 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//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//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: + +* **....sh** human-readable full board name associated to script-safe board name +* **...preinit/** common preinit startup scripts +* **...upgrade/** common upgrade scripts + +=== /target/linux//base-files/sbin +This folder contains files and folders that will be integrated in the firmware's /sbin folder, usually common sbin scripts and tools. + +==== /target/linux//dts/ +Device tree source files, or dts for short. + +=== /target/linux//image/ +Configuration needed to build device-specific flashable images. + +=== /target/linux/// +Board-specific configuration. + +=== /target/linux//modules.mk +Arch-specific kernel module config file for menuconfig -- 2.30.2