3 === Adding a new device
5 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.
6 Many files try to be as self-explanatory as possible, most of the times just opening them will be enough to understand their function.
9 This is a general map of where most important files are located:
11 ==== /target/linux/<arch_name>/base-files/etc/...
12 This folder contains files and folders that will be integrated in the firmware's /etc folder.
14 These are its subfolders and files:
16 * **...board.d/** scripts for defining device-specific default hardware, like leds and network interfaces.
17 * **...hotplug.d/** scripts for defining device-specific actions to be done automatically on hotplugging of devices
18 * **...init.d/** scripts for defining device-specific actions to be done automatically on boot
19 * **...uci-defaults/** files for defining device-specific uci configuration defualts
20 * **...diag.sh** defines what is the led to use for error codes for each board
22 === /target/linux/<arch_name>/base-files/lib/...
23 This folder contains files and folders that will be integrated in the firmware's /lib folder.
25 These are its subfolders and files:
27 * **...<arch_name>.sh** human-readable full board name associated to script-safe board name
28 * **...preinit/** common <arch_name> preinit startup scripts
29 * **...upgrade/** common <arch_name> upgrade scripts
31 === /target/linux/<arch_name>/base-files/sbin
32 This folder contains files and folders that will be integrated in the firmware's /sbin folder, usually common <arch_name> sbin scripts and tools.
34 ==== /target/linux/<arch_name>/dts/
35 Device tree source files, or dts for short.
37 === /target/linux/<arch_name>/image/
38 Configuration needed to build device-specific flashable images.
40 === /target/linux/<arch_name>/<board_name>/
41 Board-specific configuration.
43 === /target/linux/<arch_name>/modules.mk
44 Arch-specific kernel module config file for menuconfig