programming:start
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
programming:start [2020/08/06 15:47] – frank | programming:start [2023/10/25 14:18] (aktuell) – [Linux] frank | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Programmierung ====== | ||
+ | in diesem Abschnitt habe ich ein paar von mir häufig verwendete Code-Schnipsel hinterlegt. vielleicht ist der eine oder andere hilfreich ;) | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | [[.:bash]] | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | [[.:mysql]] | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | [[.: | ||
+ | ===== Batch ===== | ||
+ | ===== C/C++ ===== | ||
+ | |||
+ | ==== Makefile ==== | ||
+ | |||
+ | $(warning $$src is [${src}]) | ||
+ | |||
+ | string-manipulation: | ||
+ | |||
+ | https:// | ||
+ | ==== Linux ==== | ||
+ | |||
+ | === Fixes (für backports) === | ||
+ | |||
+ | Cc: stable@vger.kernel.org | ||
+ | |||
+ | in den Signed-Off-Bereich | ||
+ | |||
+ | Quelle: https:// | ||
+ | |||
+ | === debugging === | ||
+ | |||
+ | == Using dynamic debug == | ||
+ | |||
+ | Add options: | ||
+ | | ||
+ | CONFIG_DYNAMIC_DEBUG=y | ||
+ | CONFIG_DEBUG_FS=y | ||
+ | |||
+ | And enable it from userspace (here all for network drivers): | ||
+ | |||
+ | echo "file drivers/ | ||
+ | |||
+ | == Manual by adding new messages == | ||
+ | |||
+ | printk(KERN_ALERT " | ||
+ | |||
+ | dev_err(dev," | ||
+ | |||
+ | |||
+ | === cmdline === | ||
+ | |||
+ | < | ||
+ | //register params | ||
+ | static int startreg=-1; | ||
+ | module_param( startreg, int, S_IRUGO ); | ||
+ | static int regcount=10; | ||
+ | module_param( regcount, int, S_IRUGO ); | ||
+ | |||
+ | //look for module-name | ||
+ | static struct mdio_driver realtek_mdio_driver = { | ||
+ | .mdiodrv.driver = { | ||
+ | .name = " | ||
+ | |||
+ | //pass cmdline arguments | ||
+ | realtek-mdio.startreg=0x1300 realtek-mdio.regcount=50 | ||
+ | </ | ||
+ | |||
+ | * http:// | ||
+ | * https:// | ||
+ | |||
+ | === Links === | ||
+ | |||
+ | * [[https:// | ||
+ | * Patchwork | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * GIT: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ==== U-Boot ==== | ||
+ | |||
+ | === debugging === | ||
+ | |||
+ | #define DEBUG 1 | ||
+ | |||
+ | vor "# | ||
+ | |||
+ | debug("## | ||
+ | |||
+ | oder manuell (wird immer angezeigt): | ||
+ | |||
+ | printf(" | ||
+ | |||
+ | === Links === | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | ==== DTC ==== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | DTB dekompilieren: | ||
+ | |||
+ | sudo apt-get install device-tree-compiler | ||
+ | |||
+ | dtc -I dtb -O dts sun8i-h3-orangepi-pc.dtb -o / | ||
+ | less / | ||
+ | | ||
+ | # | ||
+ | dtc -I dtb -O dts ../ | ||
+ | | ||
+ | #aus sysfs | ||
+ | dtc -I fs -O dts / | ||
+ | |||
+ | === dtbs_check === | ||
+ | |||
+ | sudo apt install swig yamllint | ||
+ | |||
+ | pip3 install dtschema --upgrade | ||
+ | pip3 show dtschema | ||
+ | |||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make dt_binding_check DT_SCHEMA_FILES=Documentation/ | ||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig #dtbs_check need kernel-config | ||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make dtbs_check DT_SCHEMA_FILES=Documentation/ | ||
+ | ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make multi_v7_defconfig | ||
+ | ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs_check DT_SCHEMA_FILES=Documentation/ | ||
+ | | ||
+ | #maybe need to add dir to path | ||
+ | PATH=$PATH: | ||
+ | |||
+ | === DTS === | ||
+ | |||
+ | Mapping wifi Eeprom data to pcie slot: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | ===== CSS ===== | ||
+ | |||
+ | ===== HTML ===== | ||
programming/start.txt · Zuletzt geändert: 2023/10/25 14:18 von frank