Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| ru:docs:guide-developer:adding_new_device [2019/12/30 09:03] – [/target/linux/<arch_name>/base-files/sbin] mkobyakov | ru:docs:guide-developer:adding_new_device [2019/12/30 10:20] – [Testing images] mkobyakov | ||
|---|---|---|---|
| Line 59: | Line 59: | ||
| ==== / | ==== / | ||
| - | Device tree source files, or dts for short. | + | Исходные файлы дерева устройств, или сокращенно |
| - | //Certain architectures have the DTS directory deeper down. ARM devices, for example, typically have it located at '' | + | //Некоторые архитектуры имеют каталог |
| - | //If the DTS or DTSI file is already present in upstream | + | //Если файл |
| ==== / | ==== / | ||
| - | Configuration needed to build device-specific flashable images. | + | Конфигурация, |
| ==== / | ==== / | ||
| - | Board-specific configuration. | + | Конфигурация для конкретной платы. |
| ==== / | ==== / | ||
| - | Arch-specific kernel module config file for menuconfig | + | Arch- специфичный файл конфигурации ядра для менюконфиг |
| + | = = = = Создание нового устройства в make menuconfig | ||
| - | ==== Making new device appear in make menuconfig ==== | + | После редактирования файлов, указанных выше, вы должны ввести команду |
| - | + | ||
| - | After edit the files above, you need to touch the makefiles | + | |
| touch target/ | touch target/ | ||
| - | ===== Patches | + | ===== Патчи |
| - | The patches-* | + | Подкаталоги |
| - | All patches should be named 'NNN-lowercase_shortname.patch' and sorted into the following categories: | + | Все патчи должны быть названы |
| - | **0xx** - upstream backports\\ | + | **0xx** - бэкпортов вверх |
| - | **1xx** - code awaiting upstream merge\\ | + | **1xx** - код, ожидающий слияния в восходящем потоке\\ |
| - | **2xx** - kernel build / config | + | **2xx* * - патчи для сборки ядра |
| - | **3xx** - architecture specific patches\\ | + | **3xx* * - патчи, специфичные для архитектуры\\ |
| - | **4xx** - mtd related patches | + | **4xx* * - патчи, связанные с mtd (подсистема и драйверы)\\ |
| - | **5xx** - filesystem related patches\\ | + | ****5xx* * - патчи, связанные с файловой системой\\ |
| - | **6xx** - generic network patches\\ | + | **6xx* * - общие сетевые патчи\\ |
| - | **7xx** - network | + | **7xx* * - патчи сетевых |
| - | **8xx** - other drivers\\ | + | **8xx** - другие драйверы\\ |
| - | **9xx** - uncategorized other patches\\ | + | **9xx* * - другие патчи без категорий\\ |
| <WRAP center round tip 80%> | <WRAP center round tip 80%> | ||
| - | All patches must be written in a way that they are potentially upstreamable, meaning: | + | Все патчи должны быть написаны таким образом, чтобы они были потенциально доступны для распространения, |
| - they must contain a **proper subject** | - they must contain a **proper subject** | ||
| Line 105: | Line 104: | ||
| </ | </ | ||
| - | ===== Testing images | + | = = = = = Тестирование изображений |
| - | Test firmware images without writing them to flash by using ramdisk images. | + | Тестовые изображения прошивки без записи их в Flash при использовании RAMDisk изображений. |
| - | In **make menuconfig** | + | В * * make menuconfig * * выберите |
| - | + | ||
| - | This will create an image with kernel + initramfs, that will have **initramfs** in the name. The resulting image can be loaded in the device through the bootloader' | + | |
| + | Это создаст образ с ядром + initramfs, который будет иметь **initramfs** в имени. Полученный образ может быть загружен в устройство через функцию bootloader tftp и должен загрузиться в приглашение, | ||
| ===== Tips and tricks ===== | ===== Tips and tricks ===== | ||
| ==== Getting a shell on the target device ==== | ==== Getting a shell on the target device ==== | ||
| Line 144: | Line 142: | ||
| With [[https:// | With [[https:// | ||
| - | ==== Collecting relevant data ==== | + | = = = = Сбор соответствующих данных |
| - | On [[https:// | + | На [[https:// |
| - | Typically one can use the following commands: | + | Обычно можно использовать следующие команды: |
| <code bash> | <code bash> | ||
| Line 164: | Line 162: | ||
| </ | </ | ||
| - | **Note 1:** Often the log buffer is to small and the earliest messages may be missing from the information retrieved with '' | + | ** Примечание |
| - | + | ||
| - | **Note 2:** [[http:// | + | |
| - | Another useful tool for getting information for setting LEDs might be [[https://github.com/jclehner/gpiodump-mt7620|gpiodump]], a MT7620 GPIOMODE register dumper (RAMIPS). | + | ** Примечание 2:* * [[http://lxr.free-electrons.com/source/Documentation/ |
| + | Еще одним полезным инструментом для получения информации для настройки светодиодов может быть [[https:// | ||
| ==== Getting collected data from a device ==== | ==== Getting collected data from a device ==== | ||
| Because of the limited space, common file transfer utilities such as rsync/ | Because of the limited space, common file transfer utilities such as rsync/ | ||