gufmar

Members
  • Content Count

    17
  • Joined

  • Last visited


Reputation Activity

  1. Like
    gufmar reacted to Hijax in customize-image with (crontab) autostart script   
    Hi,
     
    My experiences with crontab @reboot is that I dropped that solution in favor of systemd services.
    To give you basic idea here comes a excerpt of code I put into the customize-image.sh script:
     
    cat <<EOT >|/usr/local/bin/usb3-memory-size.sh #!/bin/bash echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb exit 0 EOT chmod +x /usr/local/bin/usb3-memory-size.sh cat <<EOT >|/lib/systemd/system/usb3-memory-size.service [Unit] Description=USB3 memory sizer Before=basic.target After=sysinit.target local-fs.target DefaultDependencies=no [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/bash -c "/usr/local/bin/usb3-memory-size.sh" [Install] WantedBy=basic.target EOT systemctl enable usb3-memory-size.service It creates a new service that corrects the kernel setting for USB3 camera.
    This works perfectly fine.
     
    When such a service shall be triggered depends on your configuration. Look at the line of [Unit] section, explicitly before/after lines.
    For example you can force such a service to start after login prompt pops up.
     
     
  2. Like
    gufmar reacted to martinayotte in rockpi4 - 5.1.0-rockchip64 - leds   
    I've committed fixes for Rockchip SPI overlays in DEV branch, I've got SPI2 working on my RockPi4B ...
     
    EDIT: Tested also on my OPi-RK3399 and RockPro64 ...
    EDIT2: beware, it seems that any speed lower than 10MHz is not allowed ...
  3. Like
    gufmar got a reaction from lanefu in User Space IO is Python 3 and Java 8 bindings for user space GPIO, SPI, I2C, PWM and Serial interfaces   
    Sorry to jump in on this only now (because I only started some weeks ago in trying to bring some gpio-spi stuff to work.
    This general SBC library approach looks very interesting to me, and I wonder how experienced GPIO/HW/SW technicians see it? Would it deserve more attention? Or had it some drawbacks because it can't be so low level and direct as device tree, libmraa ecc... ?
     
    I saw the request to post issues on the github repo, but I believe this is not an issue but more a request for better understanding.
  4. Like
    gufmar got a reaction from chwe in Rock PI 4   
    perfect solution. works fine. thank you!
     
    For thus who try to C&P the above clock-frequency string: Attention it contains non-standard space chars after the number. So compiling to dtb fil fail with an error. Better use
     
    clock-frequency = <400000>;  
  5. Like
    gufmar reacted to martinayotte in Rock PI 4   
    The normal way to install is to do "dpkg -i device-tree-compiler_1.4.7-3_arm64.deb" ...
    It should be done within the DT using "clock-frequency = <400000>;" in the i2c node, nearby the "status"