UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer shustik
Observer
1,249 Views
Registered: ‎07-14-2017

init script and udev rules at Petalinux 2018.1

Jump to solution

Hello!

I have Zedboard with petalinux build.

1. I would like to setup ethernet connection after startup. I've created install application (petalinux-create -t apps --template install -n myapp-init --enable), changed myapp.bb:

INITSCRIPT_NAME = "myapp-init"
INITSCRIPT_PARAMS = "start 99 S ."
But my app starts too early and I get:
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Hello PetaLinux World
Start ethernet
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

How can I change start time for my initial application? What should I do to reach success?

2. I have 2 custom PL IP's. I want to use uio driver to communicate with them. I made udev rule to change symlink for my IP. How can I add my udev rule to rootfs?

Thank you in advance!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer shustik
Observer
1,281 Views
Registered: ‎07-14-2017

Re: init script and udev rules at Petalinux 2018.1

Jump to solution

petalinux-create -t apps --template install -n 95-local.rules --enable

Then correct 95-local.rules.bb:

S = "${WORKDIR}"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
do_install() {
         install -d ${D}/${sysconfdir}/udev/rules.d
         install -m 0755 ${S}/95-local.rules ${D}/${sysconfdir}/udev/rules.d
}
FILES_${PN} += "${sysconfdir}/*"

Write down your udev rules to file 95-local.rules. For me it works. :)

View solution in original post

0 Kudos
2 Replies
Highlighted
Observer shustik
Observer
1,282 Views
Registered: ‎07-14-2017

Re: init script and udev rules at Petalinux 2018.1

Jump to solution

petalinux-create -t apps --template install -n 95-local.rules --enable

Then correct 95-local.rules.bb:

S = "${WORKDIR}"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
do_install() {
         install -d ${D}/${sysconfdir}/udev/rules.d
         install -m 0755 ${S}/95-local.rules ${D}/${sysconfdir}/udev/rules.d
}
FILES_${PN} += "${sysconfdir}/*"

Write down your udev rules to file 95-local.rules. For me it works. :)

View solution in original post

0 Kudos
Observer shustik
Observer
1,185 Views
Registered: ‎07-14-2017

Re: init script and udev rules at Petalinux 2018.1

Jump to solution

1. Change myapp-init.bb file:

INITSCRIPT_PARAMS = "start 87 5 ."

so script will be copied at rc5.d and start at runlevel 5. Is it correct?

0 Kudos