summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-devtools
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>2019-08-06 15:21:12 -0700
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2019-12-09 11:03:47 -0800
commit85c3280ea500fbed13a4935c4c11f729acc2b3c2 (patch)
tree1646ee5be7813e87fedcf358bee5c20fdf22dae2 /meta-xilinx-bsp/recipes-devtools
parente5328b13ea1d343824b222db78e6ff582c498c04 (diff)
downloadmeta-xilinx-85c3280ea500fbed13a4935c4c11f729acc2b3c2.tar.gz
run-postinsts: Pass the output of the scripts run to kmsg
The run-postinsts scripts are meant to run during the first boot of the device. At boot time, though, some resources are not available(e.g. STDOUT), hence why applications that run at this point need to be correctly daemonized, if, for some reason a script that runs is not able to start as a daemon, proper behavior cannot be guaranteed. For some unknown reason to me at this point, the console behaves differenly on our devices depending on the chosen boot mode, for example, when using sdboot, scripts that echo something during boot show the messages properly on the boot log, but when using jtag as boot mode, this does not happen and the messages are not shown. One of such cases happens with update-alternatives, which expects STDOUT to be present, and if it fails to get a possible output file descriptor it exits ungracefully, causing the run-postinsts script to exit itself. Pass the the kmsg character device as the output for the scripts run by the run-postinsts script, not only to be able to print out the output of such script to the boot log, but also to pass a valid file descriptor to the scripts so they behave properly. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/recipes-devtools')
-rw-r--r--meta-xilinx-bsp/recipes-devtools/run-postinsts/run-postinsts_%.bbappend7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-xilinx-bsp/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
new file mode 100644
index 00000000..3923fa2d
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
@@ -0,0 +1,7 @@
1# Update-alternatives is not able to find stdout when using JTAG boot mode on
2# our devices, exits ungracefully without performing the required work (symbolic
3# linking), pass kmsg to it as output to achieve proper behavior.
4
5do_install_append(){
6 sed -i "s/sh -c \$i \$append_log/sh -c \$i > \/dev\/kmsg/" ${D}${sbindir}/run-postinsts
7}