01-09-2018 03:09 PM - edited 01-09-2018 03:19 PM
I'm following "Steps for Application Auto Run at Startup" in UG1144 (2017.4) and I am not getting the link being made into the rcS.d directory. The script is there in /etc/init.d/
Is this working for other people?
01-18-2018 06:54 AM
I moved udev from rcS.d to rc5.d and now I can boot without a PL in QSPI. I have a bit.bin in my image.ub and it is loaded in rc.5 before udev. The boot no longer hangs.
Just letting people know what I had to do in case there was anyone else needing the same thing.
01-09-2018 04:53 PM
Hi mark@bish.net,
I don't see any problem with 2017.4 Can you post your loadPL content?
test-init.bb content
# # This file is the test-init recipe. # SUMMARY = "Simple test-init application" SECTION = "PETALINUX/apps" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = "file://test-init \ " inherit update-rc.d INITSCRIPT_NAME = "test-init" INITSCRIPT_PARAMS = "start 99 S ." S = "${WORKDIR}" do_install() { install -d ${D}${sysconfdir}/init.d install -m 0755 ${S}/test-init ${D}${sysconfdir}/init.d/test-init } FILES_${PN} += "${sysconfdir}/*"
test-init content
#!/bin/sh DAEMON=/usr/bin/test start () { echo " Starting test" start-stop-daemon -S -o --background -x $DAEMON } stop () { echo " Stoping test" start-stop-daemon -K -x $DAEMON } restart() { stop start } [ -e $DAEMON ] || exit 1 case "$1" in start) start; ;; stop) stop; ;; restart) restart; ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit $?
01-10-2018 06:27 AM
I put the same script you have into my recipe and still no luck. Is petalinux/Yocto trying to use the update-rc.d that is native to the host?
I am using Debian. And I have copied update-rc.d into /opt/pkg/petalinux/2017.4/tools/linux-i386/petalinux/bin/ just in case it was looking for it.
01-10-2018 12:16 PM
Hi mark@bish.net,
This is not native to host. You don't need to add any packages to petalinux installer.
Their is a recipe for this https://github.com/openembedded/openembedded-core/blob/morty/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb.
Also you can try updating manually like this.
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# update-rc.d test-init defaults System startup links for /etc/init.d/test-init already exist. root@xilinx-zcu102-zu9-es2-rev1_0-2017:~#
01-10-2018 12:30 PM
If I don't need to add it, any advice on debugging why it isn't working then?
01-10-2018 12:37 PM
@sandeepg Also, is there a way I change the init levels of scripts in /etc/rcS.d/ I want to move S05modutils.sh to S15modutils.sh
01-10-2018 06:28 PM - edited 01-10-2018 06:29 PM
Hi mark@bish.net,
You can override in modutils-initscripts.bbappend as shown below.
$ mkdir -p <plnx-proj-root>/project-spec/meta-user/recipes-kernel/modutils-initscripts/ $ touch <plnx-proj-root>/project-spec/meta-user/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend
# Add this content INITSCRIPT_PARAMS = "start 15 S ."
01-10-2018 06:47 PM
@sandeepg Thank you for that.
Also, is there a way to get past udev when booting into a zynq system that doesn't have a PL loaded by either uboot or the FSBL.
I'm using a dts for the PL I am eventually going to load after I boot. This dts has some AXI GPIOs defined for PL that will be loaded after I boot. I have narrowed it down to "udevadm settle" in the udev bootscript, which doesn't return if the PL hasn't been programmed. I am assuming I can program the PL before the udev script starts and things will just work.
Any ideas?
01-12-2018 03:15 PM
Hi mark@bish.net,
I would suggest not to use this flow.
01-18-2018 06:54 AM
I moved udev from rcS.d to rc5.d and now I can boot without a PL in QSPI. I have a bit.bin in my image.ub and it is loaded in rc.5 before udev. The boot no longer hangs.
Just letting people know what I had to do in case there was anyone else needing the same thing.
10-31-2018 02:36 PM
I know this isn't directly tied to what you listed as the solution but I came across this post when having a problem very similar to what you described in the opening post. I also followed the "Steps for Application Auto Run at Startup" from p60 of UG1144, saw my script in /etc/init.d and did not see it run.
After a lot of trial and error I found that everything worked when I made sure I used all lowercase letters for my application names. I only thought of this when comparing your code with mine and the Xilinx example in UG1144. I suspect your app would work if named "loadpl" instead of "loadPL."
I hope this saves someone else some time!
Jim