I tried automatic startup script described in this page.
The startup script worked correctly.
After that, I wanted to remove the startup script.
So, I change the Makefile in <PETALINUX_PROJECT_DIR>/components/apps/<APP>/ to that of original one (without installing startup script).
However, the image still start the previously set startup script.
How can I remove the once-set-startup script, which may be located at /etc/rc5.d/S99mystartup. I tried petalinux-build -c rootfs/myapp clean, but it didn't work.
In order to remove the startup script, following procedures worked
1. set the Makefile in the <PETALINUX_PROJECT_DIR>/components/apps/<APP>/ to the original one
2. petalinux-build -x distclean
However it takes longer time in the step.3.