PDA

View Full Version : [VU+ Duo4K] Error build image (at bootlogo)



-M-
06-03-19, 18:17
I'm new with OpenViX and have been able to build it. However not on first try, I got a problem. Bash extension is used in the openvix-bootlogo.bb file. The script code from the bb files are used in sh-scripts, not bash-scripts. So for example on Ubuntu, the script will fail if bash extension is used.

I solved it by this:

diff --git a/meta-oe/recipes-distros/openvix/image/openvix-bootlogo.bb b/meta-oe/recipes-distros/openvix/image/openvix-bootlogo.bb
index b09d557dc..73da8a526 100644
--- a/meta-oe/recipes-distros/openvix/image/openvix-bootlogo.bb
+++ b/meta-oe/recipes-distros/openvix/image/openvix-bootlogo.bb
@@ -67,9 +67,9 @@ do_install_append_vuduo2() {
inherit deploy
do_deploy() {
TEST=${MACHINEBUILD}
- if [[ ${TEST:0:2} == "tm" ]]; then
+ if [[ $( echo $TEST | awk '{ string=substr($0, 1, 2); print string; }' ) == "tm" ]]; then
install -m 0644 tm-splash.bmp ${DEPLOYDIR}/${BOOTLOGO_FILENAME}
- elif [[ ${TEST:0:2} == "iq" ]]; then
+ elif [[ $( echo $TEST | awk '{ string=substr($0, 1, 2); print string; }' ) == "iq" ]]; then
install -m 0644 iqon-splash.bmp ${DEPLOYDIR}/${BOOTLOGO_FILENAME}
elif [ -e splash.bin ]; then
install -m 0644 splash.bin ${DEPLOYDIR}/${BOOTLOGO_FILENAME}

twol
06-03-19, 18:59
I assume that as well installing all the programs you have done this step??
sudo dpkg-reconfigure dash
When asked: Install dash as /bin/sh?
select "NO"

I build all the time you don‘t have to modify teh bb‘s

-M-
06-03-19, 20:02
Excuse me, but that is an ugly workaround. You shouldn't force users to make changes in the operating system. In sh scripts you need to follow the rules that apply for many operating systems. The scripts are sh scripts and of course all code should follow the rules for sh scripts. It shouldn't be any bash extension code in sh scripts.

It would be different if it would have been bash scripts, but it isn't.

PS. By the way, where can I find information about building OpenViX?

twol
06-03-19, 21:03
If you are building thats what every image builder does - and I mean EVERY image so if you want to be different you will have to change an awful lot!
There is a standard setup for Ubuntu that defines the tools and little things like above.
I am short of time today.... but this is a good starter (see bottom of page) although obviously distro is openvix for the build.
https://github.com/openatv/enigma2

bbbuk
06-03-19, 22:41
I'm with @Twol on this, I also build generally without an issue based on guide in link above (obviously use openvix instead of openatv as twol mentioned).

-M-
07-03-19, 11:05
I have seen that instructions and is close to how I have done.

Please can you explain why a separate user account is used?

Changing core settings in the operating system is not good - that is my opinion. You wrote "awful lot", do you really mean it is so many faults in the code?? It sounds scary, maybe OpenViX isn't for me. Quality and stability is of high value for me.

The build system using sh scripts, so of course I think it should follow the rules.

PS. If it is a fact that it is a lot of code push in with bash extension. Maybe you can consider to switch over to bash scripts (instead of sh scripts). I don't know how the organisation is, but I think such decision needs to be agreed on by many people.

abu baniaz
07-03-19, 11:14
Even for PLI, the same thing has to be done for deconfigure. You posted in a thread that links to it already, but see here

http://users.telenet.be/spstefansp/openpliubuntu.html


You don't have to create a separate user account.

If you want to submit changes to make things better, please feel free to do so. But bear in mind we tend to merge code to/from PLI, so changes should be compatible in both images as far as possible.

-M-
07-03-19, 11:20
OpenPLi is easy to build and I you don't need to do a lot of things, that it seems to be in the above link. If I remember right it is a wiki for OpenPLi build. OpenPLi actually built without any fauilt at all for me, on first try,

Here is a quote from "OpenEmbedded User Manual" regarding bitbake recipe:

8.2 Syntax of recipes
When describing a list of actions to take, shell syntax is used (as if you were writing a shell script).
You should ensure that your script works with a generic sh and not require any bash (or other shell)
specific functionality. The same applies to various system utilities (sed, grep, awk etc) that you may
wish to use. If in doubt you should check with multiple implementations - including those from
busybox.

PS. You find the document in the build-enviroment folder, or https://github.com/oe-alliance/build-enviroment/blob/4.2/usermanual.pdf

abu baniaz
07-03-19, 11:35
People have had to do the deconfigure dash from a very long time. You have made a valid point. Please submit a pull request for the required change.

twol
07-03-19, 12:33
OpenPLi is easy to build and I you don't need to do a lot of things, that it seems to be in the above link. If I remember right it is a wiki for OpenPLi build. OpenPLi actually built without any fauilt at all for me, on first try,

Here is a quote from "OpenEmbedded User Manual" regarding bitbake recipe:

PS. You find the document in the build-enviroment folder, or https://github.com/oe-alliance/build-enviroment/blob/4.2/usermanual.pdf
The link was just an information pointer and not something that has to be followed to the letter.
Whether you build OpenPli or any of the OE-A images the process is the same .. and as simple. If you can build OpenPli you can build any of the other images

birdman
07-03-19, 12:43
Please can you explain why a separate user account is used?It isn't. You shouldn't use the root account though (but then you should never use the root account to build anything).


Changing core settings in the operating system is not good - that is my opinion.You don't need to. If this is a reference to requiring /bin/sh to be a symlink to bash then that is because some authors of components of the build fail to write their scripts correctly. All they would need to do is start the script with #!/bin/bash, but they don't).
But that's not a core setting.


PS. If it is a fact that it is a lot of code push in with bash extension. Maybe you can consider to switch over to bash scripts (instead of sh scripts). I don't know how the organisation is, but I think such decision needs to be agreed on by many people.The author of any script is free to set what interpreter is required. It would be nice if everyone took the trouble to set it correctly, but life isn't perfect.