Open artur-rs opened 1 week ago
It seems like a Yocto recipe adding problem, not a problem related to any servers. Previously we held DTS scripts in meta-dts
, that allowed for quick private script injections. Now we use a separate repo for DTS scripts (dasharo/dts-scripts
), and therefore the recipe for it has been changed, that made it more difficult to add some private stuff.
There are two ways to handle this issue:
I could help with this exact problem - help to integrate the script. In this case, I need the information, what is the script purpose, what are the dependencies, how it should be installed, etc..
Or I could add recipe integration guide similar to the one from Zarhus.
To keep it as similar as it was previously you could:
dts-scripts
repoSRC_URI
and SRCREV
to point to your changesProbably easiest and fastest change. You could even keep your dts-scripts
changes locally and use git:///path/to/repo;branch=custom_branch;protocol=file
Another way would be to either add your custom script to meta-dts/meta-dts-distro/recipes-dts/dts-scripts/dts-scripts/custom_script
and in do_install
inject call to this script with e.g. sed.
You can also inject whole file with sed e.g. sed -i '/^while/r custom_script' dts
to inject contents of custom_script
into dts after matched pattern in this case it's line starting with while
or before matched pattern sed -i '/^while/e cat custom_script' dts
(just replace with correct paths in do_install
)
Our you can do it inside meta-dts
:
dts-scripts
directory and add your script:λ mkdir meta-dts-distro/recipes-dts/dts-scripts/dts-scripts
λ vim meta-dts-distro/recipes-dts/dts-scripts/dts-scripts/your-script.sh
dts-scripts
so it will install your script:--- a/meta-dts-distro/recipes-dts/dts-scripts/dts-scripts_git.bb
+++ b/meta-dts-distro/recipes-dts/dts-scripts/dts-scripts_git.bb
@@ -2,13 +2,18 @@ SUMMARY = "Dasharo Tools Suite scripts."
HOMEPAGE = "https://github.com/Dasharo/dts-scripts"
SECTION = "tools"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSES/Apache-2.0.txt;md5=c846ebb396f8b174b10ded4771514fcc"
PV = "0.1+git${SRCPV}"
-SRC_URI = "git://github.com/Dasharo/dts-scripts;protocol=https;branch=main"
+SRC_URI = " \
+ git://github.com/Dasharo/dts-scripts;protocol=https;branch=main \
+ file://your-script.sh \
+ "
SRCREV = "895365d29902aaed17ed30cba1dd2944821f7218"
S = "${WORKDIR}/git"
@@ -35,4 +40,9 @@ do_compile[noexec] = "1"
do_install () {
oe_runmake install DESTDIR="${D}"
+
+ install -d ${D}/script/destination/directory
+ install -m 755 ${WORKDIR}/your-script.sh ${D}/script/destination/directory
}
+
+FILES:${PN}:append = " /script/destination/directory"
@wessel-novacustom check whether these guides will help you.
@DaniilKl mention that your way won't run a script during system start
mention that your way won't run a script during system start
I see I missed that part, yep, my guide only for adding script into FS, not for running it on start up.
mention that your way won't run a script during system start
I see I missed that part, yep, my guide only for adding script into FS, not for running it on start up.
@wessel-novacustom, I could do that. But I need some information:
@wessel-novacustom, I could do that. But I need some information:
1. What the script will do? 2. What are the dependencies for the script? 3. At what moment you want to start your script?
I need to build DTS myself and it should check if autostart.sh
in whatever folder is available. I should be able to include the autostart.sh
in a folder that you specify. You can test it with something like echo Hello world! && pause 10
to check if it is working correctly.
In case it autostart.sh is available, it should execute that script. Otherwise, it should open the DTS main menu as usual.
I should fill the contents of autostart.sh
myself as I would like to have that in my own control.
DTS version
Question text
Forwarded request: