Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCD Display build error #13

Open
Smiggel opened this issue Sep 17, 2022 · 20 comments
Open

LCD Display build error #13

Smiggel opened this issue Sep 17, 2022 · 20 comments

Comments

@Smiggel
Copy link

Smiggel commented Sep 17, 2022

I tried to make the build for the LCD display, after setting up RaspberryPi OS. However, after the make command I get the following error:

make -C /lib/modules/uname -r/build M=/home/pi/pibox-os/st7789_module modules
make[1]: *** /lib/modules/5.15.61-v8+/build: No such file or directory. Stop.
make: *** [Makefile:6: default] Error 2

Does anyone here know how to fix it? The fan driver instructions worked fine.

@HBDE-work
Copy link

Hi
installing
raspberrypi-kernel-headers
did make run successful, but i still have a problem with the next steps, because
/lib/modules/5.15.61-v8+/kernel/drivers/staging/fbtft/fb_st7789v.ko
is not found.

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

Same here. I cannot even get he LCD to turn on. Lot of stuff is missing and the instructions are not clear at all. Just want the LCD to show the stats like it does normally with the default PiBox installation.

From what I can see is that a docker container is collecting the info a displaying it. But can not find out how.

Hopefully they can post some instructions to make it actually work.

@HBDE-work
Copy link

HBDE-work commented Sep 21, 2022

For the moment being, it looks to me this is a problem because newer Kernel switched to compressed Modules (.ko.xz instead of .ko)

modprobe can find the driver for fb_st7789v so it definetly exists!

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

Not sure how that all works. 🙂 All my attempts so far failed. Hoped the instructions would work, like the fan instructions.

@HBDE-work
Copy link

HBDE-work commented Sep 21, 2022

Sadly i cannot solve it by now,
in Short:
i used this command instead:

# Clone PiBox OS repo
git clone https://github.com/kubesail/pibox-os.git

# Enable Display Driver
pushd pibox-os/st7789_module
make
mv /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.ko.xz /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.BACK
mv fb_st7789v.ko /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.ko
popd
dtc --warning no-unit_address_vs_reg -I dts -O dtb -o /boot/overlays/drm-minipitft13.dtbo pibox-os/overlays/minipitft13-overlay.dts
cat <<EOF >> /boot/config.txt
dtoverlay=spi0-1cs
dtoverlay=dwc2,dr_mode=host
hdmi_force_hotplug=1
dtoverlay=drm-minipitft13,rotate=0,fps=60
EOF

Which ran fine. I assumend that something should be displayed then, but screen was still black/no backlight.
Running
curl -s https://raw.githubusercontent.com/kubesail/pibox-os/main/setup.sh | sudo bash
did not help either, and by looking inside the bash script i'd assumed that it shouldnt, because it does hardly do things without k3s/rancher installed. Correct me here if im wrong please!

On further investigation i followed adafruits steps from
Guide

I shortly realized Adafruit postet about Kernel Issues on the next page, so i tried pinning the Firmware to an older version with Adafruits proved script, This bricked my OS, so please dont follow!

Sadly i cannot put more time into this for now, so i hope Kubesail will provide more open information, too.

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

You are right. I see a lot of things being dependend on k3s as well. Seems most doesn't work without it. I have the same problem as you, that the display nor the backlight will turn on. The driver doesn't seem to work.

Tried de adafruit guide as well as a backup. But I had trouble with the python scripts as well.

So far the hardware is ok. Though I am extremely dissapointed with the instructions. Bought the box in the hope that the instructions would work it and would be more easy to enable the display. Thanks for your help so far, @PhavourFlavour

@HBDE-work
Copy link

@Smiggel Maybe this helps you for your usecase at least:

I made the display work completely in python through adafruits very easy to understand and nearly copyNpaste solution.
It displays something like this:
image
Source: https://learn.adafruit.com/adafruit-mini-pitft-135x240-color-tft-add-on-for-raspberry-pi/python-usage

Just follow AdaFruits steps from here + next side.

For me thats basically enough and i like the simplicity even more, even though it adds a little bit of cpu usage.

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

Thanks. Will have a look at it.

@pastudan
Copy link
Contributor

because it does hardly do things without k3s/rancher installed. Correct me here if im wrong please!

Hi @PhavourFlavour, the display code actually does not depend on k3s or any container system running at all. It is a single binary you can download from here https://github.com/kubesail/pibox-framebuffer/releases/tag/v20. You can run it manually or start at boot by adding it as a service.

You can do a tiny bit of customization by making requests to this service, as documented here: https://github.com/kubesail/pibox-framebuffer

Let me know if this helps. If you need more control, the Python scripts are probably the way to go for now. We're working on adding more documentation as quick as possible, but there's only 2 of us and we are trying to get all existing orders shipped first. Thanks for your patience :)

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

@pastudan Can you explain how to install the binary for the display and run it on startup? So far I have not even been able to enable the LCD and the backlight with the instructions (https://docs.kubesail.com/guides/pibox/os/). Those instructions don't work with Raspberry Pi OS.

I would like the display to show the stats, like it does on the pibox os installation.

@erulabs
Copy link
Contributor

erulabs commented Sep 21, 2022

Heya @Smiggel

Is the command that is failing in the instructions just:

mv /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.ko /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.BACK

? That command backs up the existing driver, which is installed on pibox-os but not if you're using something custom. You can simply skip that step, since there is no existing driver to backup. Continue on with the rest of the instructions and you should be good to go. The driver and the go-binary should be all you need.

We will for sure make this easier, and improve the docs soon - just as a tiny bit of defense of us - we're a team of two people and you are using an unsupported, custom setup. That said, we appreciate your patience!

@Smiggel
Copy link
Author

Smiggel commented Sep 21, 2022

Heya @Smiggel

Is the command that is failing in the instructions just:

mv /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.ko /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.BACK

? That command backs up the existing driver, which is installed on pibox-os but not if you're using something custom. You can simply skip that step, since there is no existing driver to backup. Continue on with the rest of the instructions and you should be good to go. The driver and the go-binary should be all you need.

We will for sure make this easier, and improve the docs soon - just as a tiny bit of defense of us - we're a team of two people and you are using an unsupported, custom setup. That said, we appreciate your patience!

Yeah, that’s the command that is failing. I tried to continue with the rest of the instructions, but I could not get it to work. Perhaps will try it again soon. Hopefully I can make it work. :-)

@pastudan
Copy link
Contributor

@Smiggel can you try running this script?

curl https://raw.githubusercontent.com/kubesail/pibox-os/main/update-framebuffer.sh | sudo bash

@Smiggel
Copy link
Author

Smiggel commented Sep 22, 2022

Ah that seems to work for the most part. Excellent.

The script can only not see the SSD installed. It says there is none installed at the moment. But CPU, Memory and Ethernet are working. :-)

@Smiggel
Copy link
Author

Smiggel commented Sep 26, 2022

Is there any way for the drive usage to be loaded on the display as well? Like stated before, the SSD is now not seen.

@pastudan
Copy link
Contributor

Hey @Smiggel, the code looks at /var/lib/rancher mountpoint for this info. Others have been able to symlink to that location, but if you wait for us to test and release the next version, then that option is configurable.

@Smiggel
Copy link
Author

Smiggel commented Sep 27, 2022

Hey @Smiggel, the code looks at /var/lib/rancher mountpoint for this info. Others have been able to symlink to that location, but if you wait for us to test and release the next version, then that option is configurable.

Oh great. Configurable would make it easier for me, as I have no clue wat rancher is. :-)

edit: I also have no rancher in the /var/lib/ dir. maybe because of the clean Raspberry Pi OS install.

@friscoMad
Copy link

You can also change the mount prefix using env vars,
I was succeful modifying /etc/systemd/system/pibox-framebuffer.service with any editor and adding the Environment to override the default prefix:

[Service]
Environment=DISK_MOUNT_PREFIX=/mnt/
ExecStart=/opt/kubesail/pibox-framebuffer

After that you only need to do:

systemctl daemon-reload
service pibox-framebuffer restart

To reload the config and restart the service.

@Smiggel
Copy link
Author

Smiggel commented Sep 30, 2022

You can also change the mount prefix using env vars, I was succeful modifying /etc/systemd/system/pibox-framebuffer.service with any editor and adding the Environment to override the default prefix:

[Service]
Environment=DISK_MOUNT_PREFIX=/mnt/
ExecStart=/opt/kubesail/pibox-framebuffer

After that you only need to do:

systemctl daemon-reload
service pibox-framebuffer restart

To reload the config and restart the service.

Thank you for the instructions. It seems that my /mnt/ is empty. At least there is nothing mounted to it. I tried different paths, that I can use in OMV to access my data in the terminal, but they have not effect. Message of no SSD installed remains.

Edit: The mount dir on OMV is /srv and there is where I also see my SSD Id. When I use /srv/dev-disk-by-uuid-xxxx (replaced the string) or /dev/sda1 it says not SSD configured.
Tried it with a symlink from /mnt/ssd to the drive. I can access it through the terminal. So the symlink works. However, still the same message on the LCD.

@Smiggel
Copy link
Author

Smiggel commented Oct 24, 2022

Anyone else have an idea? Still haven't got the HDD space visible on the LCD. :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants