During Power On , the rockchip should run my code

  • RkLunch-stop.sh
    # cd luckfox_retinaface_facenet_spi_demo
    # chmod a+x luckfox_retinaface_facenet_spi_demo_test
    # ./luckfox_retinaface_facenet_spi_demo_test ./model/RetinaFace.rknn ./model/mob
    ilefacenet.rknn /mnt/sdcard


    this my command that should execute during autostartup
    My code-S90face

    #!/bin/sh

    case $1 in
    start)
    RkLunch-stop.sh
    chmod a+x/root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test ./model/RetinaFace.rknn ./model/mobilefacenet.rknn /mnt/sdcard
    stop)
    echo "stop"
    ;;
    *)
    exit 1
    ;;
    esac


    and output


    Starting...
    Stop Application ...
    killall: rkipc: no process killed
    killall: udhcpc: no process killed
    rkipc exit
    ls: /oem/usr/etc/init.d/S??*: No such file or directory
    chmod: /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test: No such file or directory
    /etc/init.d/S90face: line 8: /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test: not found
    Started.
    Please suggest where i am wrong or the issue
  • According to the prompt, you need to make sure that the /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test file does exist and the path is correct.
  • bin rockchip_test
    dev root
    etc run
    lib sbin
    luckfox_retinaface_facenet_spi_demo sys
    media tmp
    mnt userdata
    oem usr
    opt var
    proc
    # cd luckfox_retinaface_facenet_spi_demo
    # ls
    lib
    luckfox_retinaface_facenet_spi_demo_test
    model
    this my directory
    to run my code i need,
    RkLunch-stop.sh
    cd luckfox_retinaface_facenet_spi_demo
    # chmod a+x luckfox_retinaface_facenet_spi_demo_test
    # ./luckfox_retinaface_facenet_spi_demo_test ./model/RetinaFace.rknn ./model/mob
    ilefacenet.rknn /mnt/sdcard
    so what should be my corresponding code?
  • It seems that your luckfox_retinaface_facenet_spi_demo is not in the root directory, but is saved in the root directory. The corresponding code segment in the script should be changed to:

    Code: Select all

    RkLunch-stop.sh
    chmod a+x /luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test
    /luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test /luckfox_retinaface_facenet_spi_demo/model/RetinaFace.rknn /luckfox_retinaface_facenet_spi_demo/model/mobilefacenet.rknn /mnt/sdcard
    
  • # ls
    S01seedrng S20linkmount S50telnet S91smb
    S01syslogd S20urandom S50usbdevice S99python
    S02klogd S21appinit S90_auto_reboot rcK
    S02sysctl S40network S90face rcS
    S10udev S50sshd S90usb0config
    what is the priority command for this?
    because after enter /etc/init.d/S90face start it is working but it should start after power up
  • Pay attention to modifying the script permissions and observe the printed information after booting to ensure that the script is successfully run. Refer to the tutorial:
    https://wiki.luckfox.com/Luckfox-Pico/L ... E%E7%BD%AE