Buildroot for Zynthian?

Could you test this in a console?
sudo getent shadow root

if you could systemctl stop webconf and start /zynthian/zynthian-webconf/zynthian_webconf.sh (in sudo context), we see the error messages when you try to login

Here is what I get
root@zynthianos:/home/pi/zynthian-webconf# sudo getent shadow root
root:*:17499:0:99999:7:::

And output when running zynthian-webconf and using password “raspberry”:
root@zynthianos:/home/pi/zynthian-webconf# ZYNTHIAN_DIR=/zynthian ZYNTHIAN_CONFIG_DIR=/zynthian/config HOME=/root /zynthian/zynthian-webconf/zynthian_webconf.sh
/zynthian/config/zynthian_envars.sh: line 78: warning: command substitution: ignored null byte in input
/zynthian/config/zynthian_envars.sh: line 78: warning: command substitution: ignored null byte in input
DEBUG:root:CONFIG VAR: ZYNTHAIN_SETUP_APT_CLEAN=TRUE
DEBUG:root:CONFIG VAR: SOUNDCARD_CONFIG=dtoverlay=hifiberry-dacplus
DEBUG:root:CONFIG VAR: ZYNTHIAN_PLUGINS_DIR=/zynthian/zynthian-plugins
DEBUG:root:CONFIG VAR: ZYNTHIAN_WIRING_LAYOUT=PROTOTYPE-4
DEBUG:root:CONFIG VAR: ZYNTHIAN_TOUCHOSC=1
DEBUG:root:CONFIG VAR: ZYNTHIAN_MY_DATA_DIR=/zynthian/zynthian-my-data
DEBUG:root:CONFIG VAR: RBPI_VERSION=Raspberry Pi 3 Model B Rev 1.2
DEBUG:root:CONFIG VAR: CFLAGS=-mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_FONT_SIZE=10
DEBUG:root:CONFIG VAR: ZYNTHIAN_DATA_DIR=/zynthian/zynthian-data
DEBUG:root:CONFIG VAR: ZYNTHIAN_SW_DIR=/zynthian/zynthian-sw
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_COLOR_BG=#000000
DEBUG:root:CONFIG VAR: ZYNTHIAN_SYS_DIR=/zynthian/zynthian-sys
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_ENABLE_CURSOR=0
DEBUG:root:CONFIG VAR: CXXFLAGS=-mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_COLOR_PANEL_BG=#3a424d
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_FONT_FAMILY=Audiowide
DEBUG:root:CONFIG VAR: JACKD_OPTIONS=-P 70 -t 2000 -s -d alsa -d hw:0 -r 44100 -p 256 -n 2 -X raw
DEBUG:root:CONFIG VAR: DISPLAY_WIDTH=
DEBUG:root:CONFIG VAR: ZYNTHIAN_MY_PLUGINS_DIR=/zynthian/zynthian-my-plugins
DEBUG:root:CONFIG VAR: ZYNTHIAN_AUBIONOTES_OPTIONS=-O complex -t 0.5 -s -88 -p yinfft -l 0.5
DEBUG:root:CONFIG VAR: FRAMEBUFFER=/dev/fb1
DEBUG:root:CONFIG VAR: DISPLAY_CONFIG=dtoverlay=pitft28-resistive,rotate=90,speed=32000000,fps=20
DEBUG:root:CONFIG VAR: ZYNTHIAN_CONFIG_DIR=/zynthian/config
DEBUG:root:CONFIG VAR: SOUNDCARD_NAME=HifiBerry DAC+
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_COLOR_ON=#ff0000
DEBUG:root:CONFIG VAR: ZYNTHIAN_DIR=/zynthian
DEBUG:root:CONFIG VAR: LV2_PATH=/zynthian/zynthian-plugins/lv2:/zynthian/zynthian-my-plugins/lv2:/zynthian/zynthian-my-data/presets/lv2:/zynthian/zynthian-my-data/presets/lv2
DEBUG:root:CONFIG VAR: ZYNTHIAN_RECIPE_DIR=/zynthian/zynthian-sys/scripts/recipes
DEBUG:root:CONFIG VAR: DISPLAY_HEIGHT=
DEBUG:root:CONFIG VAR: ZYNTHIAN_AUBIONOTES=1
DEBUG:root:CONFIG VAR: ZYNTHIAN_WIRING_SWITCHES=
DEBUG:root:CONFIG VAR: ZYNTHIAN_SCRIPT_MIDI_PROFILE=/zynthian/zynthian-data/midi-profiles/default.sh
DEBUG:root:CONFIG VAR: MACHINE_HW_NAME=armv7l
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_DIR=/zynthian/zynthian-ui
DEBUG:root:CONFIG VAR: ZYNTHIAN_PLUGINS_SRC_DIR=/zynthian/zynthian-sw/plugins
DEBUG:root:CONFIG VAR: ZYNTHIAN_UI_COLOR_TX=#ffffff
DEBUG:root:CONFIG VAR: DISPLAY_NAME=PiTFT 2.8 Resistive
DEBUG:root:CONFIG VAR: ZYNTHIAN_WIRING_ENCODER_B=
DEBUG:root:CONFIG VAR: ZYNTHIAN_WIRING_ENCODER_A=
INFO:tornado.access:302 GET / (192.168.1.42) 58.10ms
INFO:tornado.access:200 GET /login?next=%2F (192.168.1.42) 34.37ms
INFO:tornado.access:200 POST /login?next=%2F (192.168.1.42) 16.67ms

BTW line 78 is

model=cat /sys/firmware/devicetree/base/model 2>/dev/null

your root account doesn’t have a password?
Please set one and try again.

The default root password in our system is raspberry.

root@zynthian:~# cat /sys/firmware/devicetree/base/model 2>/dev/null
Raspberry Pi 3 Model B Rev 1.2root@zynthian:~#

what is the output in your system and if null, do you know the command to get the same output?

  1. Ok, when I set a password with passwd it works and I can login. In Raspbian there is no password by default. I can make “zynthianos” (how I am calling the CustomPiOS build for now) set one. Guess that means another build soon.
  2. I also get the same output. it seems to give that error only when saving it in to a variable.

I thought, we were zynthianos :slight_smile:

1 Like

Hi @guysoft!

FYI, Minibian distro comes “out-the-box” with a root account configured with “raspbian” as password. There are no “normal user” accounts by default.

Zynthian setup scripts and software works with this premise: root user is the only user and everything run as root.

For an embbeded real-time system like zynthian, this is very convenient and simplifies everything :wink:

Regards,

It seems like some plugins were failing.

How are you testing the image? By default PiTFT display is pre-configured, so you have to reconfigure the display using the webconf tool.

AFAIK, there is no PiTFT compilation. PiTFT drivers are precompiled an ready to use.
Could you copy the lines with this error? I can’t find it in the build log you linked. It seems incomplete.

I see a lot of errors related to “chown” command. Is it because of the lacking of a root account?

Regards … and thanks!! :wink:

Good news - when setting the sound card right AND adding a root password MOD-UI works.

My misstake , it was pffft:
http://gnethomelinux.com:8080/job/ZynthianOS/13/parsed_console/
You can see all 15 errors highlighted here.

make[1]: *** [src/avtk/CMakeFiles/avtk.dir/all] Error 2

and:

make[1]: *** [tap_rotspeak.so] Error 1

There is also a:

/bin/mv: cannot stat '/root/.lv2/*': No such file or directory

This means we nearly got it right, and the next build with the root password might actually be usable.

Reguarding minibian and root password -
There is a good reason to add a user which is not root, beyond the security. For example, chromium-browser will not run as root, its hard-coded.
However, I don’t want to tell you how to run the project, we could also make a minibian variant. CustomPiOS supports making variants which can use different base images. For example anything that uses Armbian.

I would prefer a sudo user instead of root as well.
webconf needs to be a sudoer though.

I guess, CustomPiOS will be the next base.
When all engines, especially Pianoteq are ported.

I think the best way for now would be to try and replicate what there is on stretch. Then start thinking about changing behavor. Bahavor changes can effect users directly and might get some upset.

In OctoPi we disabled passwordless sudo. There is a talk on why there if you want to read more about it:


You can also set specific files to run as sudo. I actually use that for the setup of the build.
Looks like this:

guy@Golem2:~$ sudo cat /etc/sudoers.d/zynthianos 
jenkins ALL=(root) NOPASSWD: /usr/local/bin/zynthianos

Anyway, waiting to upload the next image which will have a root password. And hopefully usable but with minor things to fix.

Hi @guysoft & @mheidt!

The first SD images of zynthian used the “pi” user and used “sudo” all the time, but after thinking about it, i realized that things will be simpler if everything runs as root. And it really is :wink:

Think about it. Zynthian is not a public server. It’s not constantly exposed to Internet. It’s an embbeded system and using root as the only user has sense and simplifies everything.

If you want to expose your Zynthian, you should change the password. That’s all.
Anyway, in the worst case, if your zynthian is rooted, you burn a new SD and choose a decent password :wink:

Moreover, MOD people runs everything as root in its device, so mod-ui and mod-host must be executed as root …

Of course, i would like to hear your arguments for using a “multi-user” approach :wink:

Regards,

Ok, latest image.
DId all the hostname and password fixes, also remvoed the realtime kernel for now, its now a variant.
So you can build either from the stretch light distro, or from the realtime kernel disro.

http://unofficialpi.org/Distros/ZynthianOS/nightly/2018-02-14_2017-11-29-zynthianos-stretch-lite-0.1.zip
md5:
http://unofficialpi.org/Distros/ZynthianOS/nightly/2018-02-14_2017-11-29-zynthianos-stretch-lite-0.1.zip.md5

Build log:
http://gnethomelinux.com:8080/job/ZynthianOS/19/parsed_console/

Would appreciate people testing and reporting if it works.
I looked with qemu and got a strange behavior. it kept restarting the webconf. Image attachedScreenshot_20180215_160259.
I am also using at home one of the earlier builds with a realtime kernel, and using it for FX for my electric violin :slight_smile:

Sorry - I currently have not much time to check this… perhaps at weekend…

Ok,
I can also build a realtime kernel version if anyone wants to try. I mostly found that the minute you switch jack service on it lags a lot with anything related to wifi. Perhaps there is a way around that. But its amazing latency for my electric violin - Really should measure it out.

We could also open this to more adventurous users outside the staff thread.

Ok, seem to have figured out why its rebooting. The python returns “illegal instruction”. Not sure if its a configuration issue or the qemu kernel issue. I have a feeling its the latter.

Could you stop the service and run the zynthian_webconf.sh manually?
It should show log messages.

I did that, it does not get as far as the imports in the python code. I found that tornado spikes it, but also some stuff at the bottom, could not track it down.
I think there must either be something compiled there exclusively for arm7 in a way that does not work on the qemu kernel.
Anyway posted a question there: https://github.com/dhruvvyas90/qemu-rpi-kernel/issues/49

OK! Let’s open this thread to all the community … no reason to keep it closed :wink:

Ok, finally, all lv2 plugins have been fixed, in most cases by sending PRs to the projects themselves, which means they are less likely to break again.
And finally, we have a build that I see nothing that is broken in it. So now We need testers.
What is left before we release this image?

http://unofficialpi.org/Distros/ZynthianOS/nightly/2018-02-23_2017-11-29-zynthianos-stretch-lite-0.1.zip

md5:
http://unofficialpi.org/Distros/ZynthianOS/nightly/2018-02-23_2017-11-29-zynthianos-stretch-lite-0.1.zip.md5

Will note we will probably build again once more because Gina from OctoPi just pushed a bunch of fixes to the build system that should go in it.

2 Likes