Page 2 of 2

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 7:23
by rajadey150@gmail.com
Sir i am not concern about the code but the process i wanted to know because in the mention process i followed i am getting this

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.
# ls -l /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi
_demo_test
ls: /root/luckfox_retinaface_facenet_spi_demo/luckfox_retinaface_facenet_spi_demo_test: No such file or directory


And my code is this


#!/bin/sh

case $1 in
start)
echo "Starting..."
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
echo "Started."
;;

stop)
echo "Stopping..."
echo "Stopped."
;;

*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 7:43
by rajadey150@gmail.com
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

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 8:01
by Eng38
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.

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 8:25
by rajadey150@gmail.com
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?

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 8:41
by Eng38
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

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 9:21
by rajadey150@gmail.com
# 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

Re: During Power On , the rockchip should run my code

Posted: 2024-06-15 9:37
by Eng38
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