Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:add.new.device [2020/07/20 01:16] – [Adding new device support] adrianschmutzlerdocs:guide-developer:add.new.device [2022/03/23 12:00] (current) – adding filename for scripts, so that when users post their result they will be able to refer a specific output associated with which script aterik
Line 44: Line 44:
 To speed up testing all GPIOs one by one you can use following bash script. Please note you have to follow LEDs state and console output. If the USB LED turns on and the last console message is ''[GPIO12] Trying value 0'' it means USB LED uses GPIO 12 and is active low. To speed up testing all GPIOs one by one you can use following bash script. Please note you have to follow LEDs state and console output. If the USB LED turns on and the last console message is ''[GPIO12] Trying value 0'' it means USB LED uses GPIO 12 and is active low.
  
-<code>#!/bin/sh+<file bash gpio-test.sh>#!/bin/sh
 GPIOCHIP=0 GPIOCHIP=0
 BASE=$(cat /sys/class/gpio/gpiochip${GPIOCHIP}/base) BASE=$(cat /sys/class/gpio/gpiochip${GPIOCHIP}/base)
Line 66: Line 66:
  }  }
  gpio=$((gpio+1))  gpio=$((gpio+1))
-done</code>+done 
 +</file> 
 +  * Save the above content as a file ''gpio-test.sh'' & then transfer inside router's ''/tmp'' directory, or copy above content & paste inside ''vi'' editor in router & save as ''gpio-test.sh'' file. 
 +  * to make it executable, run: ''chmod +x /tmp/gpio-test.sh''
  
 ==== GPIO buttons ==== ==== GPIO buttons ====
Line 78: Line 81:
 For dumping GPIO values following script can be used: For dumping GPIO values following script can be used:
  
-<code>#!/bin/sh+<file bash gpio-dump.sh>#!/bin/sh
 GPIOCHIP=0 GPIOCHIP=0
 BASE=$(cat /sys/class/gpio/gpiochip${GPIOCHIP}/base) BASE=$(cat /sys/class/gpio/gpiochip${GPIOCHIP}/base)
Line 92: Line 95:
  }  }
  gpio=$((gpio+1))  gpio=$((gpio+1))
-done</code>+done 
 +</file> 
 +  * Save the above content as a file ''gpio-dump.sh'' & then transfer inside router's ''/tmp'' directory, or copy above content & paste inside ''vi'' editor in router & save as ''gpio-dump.sh'' file 
 +  * to make it executable, run: ''chmod +x /tmp/gpio-dump.sh''
  
 If GPIO value changes from 1 to 0 while pressing the button, it's active low. Otherwise it's active high. If GPIO value changes from 1 to 0 while pressing the button, it's active low. Otherwise it's active high.
Line 120: Line 126:
 For creating the OpenWrt firmware your [[docs:techref:hardware:soc:soc.broadcom.bcm63xx|bcm63xx]] device, you can follow the following steps: For creating the OpenWrt firmware your [[docs:techref:hardware:soc:soc.broadcom.bcm63xx|bcm63xx]] device, you can follow the following steps:
  
-  - Obtain the [[docs:guide-developer:build-system:start|source and follow the compile procedure]] with the make menuconfig as last step.+  - Obtain the [[docs:guide-developer:toolchain:start|source and follow the compile procedure]] with the make menuconfig as last step.
   - During **menuconfig** select the correct target system.   - During **menuconfig** select the correct target system.
   - Next generate the board_bcm963xx.c file for the selected platform with all board parameters execute the following command: \\ <code>make kernel_menuconfig</code>   - Next generate the board_bcm963xx.c file for the selected platform with all board parameters execute the following command: \\ <code>make kernel_menuconfig</code>
Line 151: Line 157:
  &board_DV2020,  &board_DV2020,
 </code> </code>
-  - Finish the [[docs:guide-developer:build-system:start|compile instructions]] according the procedure from the make step.+  - Finish the [[docs:guide-developer:toolchain:start|compile instructions]] according the procedure from the make step.
  
 ==== Ramips Platform ==== ==== Ramips Platform ====
  • Last modified: 2020/07/20 01:16
  • by adrianschmutzler