forked from Xilinx/XRT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CR-1142391 - Programming xclbin immediately after xbutil reset fails …
…on V70/VCK5000 (Xilinx#7150) * CR-1142391 - Programming xclbin immediately after xbutil reset fails on V70/VCK5000 Signed-off-by: rbramand <[email protected]> * Add new service to do initialization tasks > Added init-apu service for doing initialization tasks > This service also creates softkernel user which is used to run skd. > Added changes to decide order in which services run > init-apu -> skd -> apu-boot Signed-off-by: rbramand <[email protected]> * Add missing softkernel user Signed-off-by: rbramand <[email protected]> * Fix comments Signed-off-by: rbramand <[email protected]> Signed-off-by: rbramand <[email protected]>
- Loading branch information
1 parent
ef9b739
commit db6a4dc
Showing
7 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
#!/bin/sh | ||
if [ -e /sys/bus/platform/devices/rpu-channel/ready ]; then | ||
echo 1 > /sys/bus/platform/devices/rpu-channel/ready | ||
# Add softkernel user for PS kernel daemon to run as | ||
useradd softkernel | ||
# Work-around for AIE as it defaults root access only | ||
chmod 666 /dev/aie0 | ||
# Create default xrt.ini | ||
echo "# xrt.ini generated by apu-boot script" > /usr/bin/xrt.ini | ||
echo "[Runtime]" >> /usr/bin/xrt.ini | ||
echo "verbosity=5" >> /usr/bin/xrt.ini | ||
echo "runtime_log=syslog" >> /usr/bin/xrt.ini | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[Unit] | ||
Description=apu-boot | ||
After=skd.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/apu-boot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# Add softkernel user to run PS kernel Daemon | ||
useradd softkernel | ||
|
||
# Work-around for AIE as it defaults root access only | ||
chmod 666 /dev/aie0 | ||
# Create default xrt.ini | ||
echo "# xrt.ini generated by apu-boot script" > /usr/bin/xrt.ini | ||
echo "[Runtime]" >> /usr/bin/xrt.ini | ||
echo "verbosity=5" >> /usr/bin/xrt.ini | ||
echo "runtime_log=syslog" >> /usr/bin/xrt.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
SUMMARY = "Init apu service" | ||
SECTION = "PETALINUX/apps" | ||
LICENSE = "MIT" | ||
|
||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
|
||
SRC_URI = "file://init-apu file://init-apu.service " | ||
|
||
S = "${WORKDIR}" | ||
|
||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
|
||
inherit update-rc.d systemd | ||
|
||
INITSCRIPT_NAME = "init-apu" | ||
INITSCRIPT_PARAMS = "start 99 S ." | ||
|
||
SYSTEMD_PACKAGES = "${PN}" | ||
SYSTEMD_SERVICE:${PN} = "init-apu.service" | ||
SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
|
||
do_install() { | ||
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
install -d ${D}${sysconfdir}/init.d/ | ||
install -m 0755 ${WORKDIR}/init-apu ${D}${sysconfdir}/init.d/ | ||
fi | ||
|
||
install -d ${D}${bindir} | ||
install -m 0755 ${WORKDIR}/init-apu ${D}${bindir}/ | ||
install -d ${D}${systemd_system_unitdir} | ||
install -m 0644 ${WORKDIR}/init-apu.service ${D}${systemd_system_unitdir} | ||
} | ||
|
||
FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/*', '', d)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=APU init Daemon | ||
|
||
[Service] | ||
ExecStart=/usr/bin/init-apu | ||
StandardOutput=journal+console | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[Unit] | ||
Description=Soft Kernel Daemon | ||
After=apu-boot.service | ||
After=init-apu.service | ||
|
||
[Service] | ||
Type=forking | ||
|