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

FYI: Raspberry Pi doesn't seem to be able to install helloSystem desktop #342

Open
TriVoxel opened this issue Feb 28, 2022 · 9 comments
Open

Comments

@TriVoxel
Copy link

I can compile many of the programs such as Filer, but it ultimately end up being unable to install certain components due to missing dependencies and such. It's either an issue with the installation steps provided in the docs, or it's an issue with the software itself. My money's on bad/incomplete documentation as some steps seem to be out of order.

I will elaborate with more details once I can test again. This may take a few days. I need to install a stable desktop like KDE so I can record my screen to show the full process.

@probonopd
Copy link
Member

Probably incomplete documentation. Please do post details if you can. Thanks!

@TriVoxel
Copy link
Author

TriVoxel commented Mar 1, 2022

Probably incomplete documentation. Please do post details if you can. Thanks!

When I have time, I'll write up an install script to do all this configuration automatically. That way, it will be easier for users to test and give feedback.

In the mean time, I think you should invest in an RPi4 with 4 GB or even better, 8 GB of RAM. They are very capable systems, however unusable with a tiny amount of RAM. I'd also suggest a cheap SSD if you want to not burn through SD cards and maybe use SWAP features. I'd say they compare to a mid-range laptop from between 2015-2016.

They can easily edit video with Kdenlive and run loads of audio tracks in something like LMMS. I can also run code IDEs like VSC and QT Creator as well as browse with Firefox. It works well with Linux and BSD. From my own testing, I can tell you the CPU is quite capable and snappy and graphics acceleration is good enough for 1080p (and in some cases 4K) video playback and rendering rudimentary 3D graphics like Nintendo 64, Super TuxKart, AssaultCube, and Cube 2 Sauerbraten. The RAM is the major bottleneck in desktop environments.

@TriVoxel
Copy link
Author

TriVoxel commented Mar 3, 2022

Small update: the code for this automated script will wind up here: https://gitlab.com/trivoxel-utils/helloraspberry

@bitboss-ca
Copy link

I have been working through the documentation for Raspberry Pi using an RPi 3B. Here are some notes:

  1. I would like a MicroSD card of at least 16GB in size as a requirement.
  2. There are required packages missing. For example: sysutils/kf5-baloo
  3. Starting fluxbox before building components seems like a bad idea because it consumes a fair amount of RAM needed for compiling core components.
  4. I'm not sure what the ./launch command is for when compiling the launch core component. It doesn't seem to do anything except throw an error. I was still able to compile and install it.
  5. I needed to add some swap space to be able to compile some core components.
  6. Ultimately, I am now stuck at the following build/install error for the QtPlugin core component.
root@generic:~/QtPlugin/build # cmake ..
-- Qt5 plugin directory:/usr/local/lib/qt5/plugins
CMake Warning (dev) at /usr/local/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/local/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  styleplugin/CMakeLists.txt:15 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Qt5 plugin directory:/usr/local/lib/qt5/plugins
-- Configuring done
-- Generating done
-- Build files have been written to: /root/QtPlugin/build
root@generic:~/QtPlugin/build # make -j4
[  3%] Automatic MOC for target panda-qtplugin
[  7%] Automatic MOC for target pstyleplugin
[  7%] Built target pstyleplugin_autogen
[  7%] Built target panda-qtplugin_autogen
Consolidate compiler generated dependencies of target pstyleplugin
[ 40%] Built target pstyleplugin
Consolidate compiler generated dependencies of target panda-qtplugin
[100%] Built target panda-qtplugin
root@generic:~/QtPlugin/build # make install
[  3%] Automatic MOC for target panda-qtplugin
[  3%] Built target panda-qtplugin_autogen
[ 62%] Built target panda-qtplugin
[ 66%] Automatic MOC for target pstyleplugin
[ 66%] Built target pstyleplugin_autogen
[100%] Built target pstyleplugin
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/lib/qt5/plugins/platformthemes/libpanda-qtplugin.so
-- Up-to-date: /usr/local/lib/qt5/plugins/styles/libpstyleplugin.so
CMake Error at styleplugin/cmake_install.cmake:69 (file):
  file INSTALL cannot find "/root/QtPlugin/styleplugin/../sounds/ping.wav":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:43 (include)


*** Error code 1

Stop.
make: stopped in /root/QtPlugin/build

I will update the docs if you like, but I'll need some hints on how to get past my current error.

@probonopd
Copy link
Member

probonopd commented Feb 26, 2023

Sorry to hear that you're experiencing difficulties with building helloDesktop for Raspberry Pi. It's great that you're taking notes and keeping track of your progress, that can be very helpful for troubleshooting and future reference.

Regarding your notes:

  • I have experienced slowdowns when using microSD cards with FreeBSD on the Raspberry Pi. The reason for this is unclear, but switching to a USB3 SSD provided a huge speed boost for me. Likely a USB3 USB stick would do the same, and possibly even using the same microSD card through a USB3 card reader rather than the slot built into the Raspberry Pi (measurements on this need to be done).

  • If you're missing required packages, you need to install them using pkg. Pull requests regarding the documentation would be welcome. You can see exactly which packages are needed by inspecting the build log at https://github.com/helloSystem/helloDesktop. Speaking of which, nowadays it is probably a more convenient way to build helloDesktop components to build them using the FreeBSD Ports tree there. I had started documenting this, but the documentation never got finished. I am including my notes below for your reference; maybe you can use it go make a great pull request for the documentation. That would be very helpful, as I am currently busy with other development tasks.

  • Using swap is a good idea. See below.

  • The launch command is an integral component of helloDesktop; it is used for launching applications, opening documents, etc. You need it in order for helloDesktop to function properly.

  • The build error for the QtPlugin is most likely because you didn't tell git to fetch the git submodules? git submodule update --init --recursive shoud do the trick. Let me know if it doesn't.

If you're still having trouble with your project, don't hesitate to reach out for help or consult additional resources. Good luck!


Unfinished notes for Raspberry Pi

CPU is idling around but the system is still very sluggish, the problem seems to be disk I/O? Hence use USB3 SSD for now. Also for swap which is needed to compile things.

https://download.freebsd.org/ftp/snapshots/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20221110-689a9368eb6-259127.img.xz

unxz FreeBSD-*.img.xz

Right-click, "Write to Medium". Choose USB SSD.

Use config.txt with speed optimizations from RoboNuggie:

[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin
hdmi_safe=0
framebuffer_width=1920
framebuffer_height=1080
disable_overscan=1

[pi4]
armstub=armstub8-gic.bin
arm_boost=1
gpu_mem=64
over_voltage-6
force_turbo=1
arm_freq=2147
gpu_freq=750

Boot. Needs a GOOD power supply, ideally the original.

Find on the network with nmap -sn 192.168.0.0/24.

ssh [email protected]

su # password: root

sysrc powerd_enable="YES"   
/etc/rc.d/powerd restart

# FIXME: avahi has INSANE dependencies, including adwaita-icon-theme

pkg install -y mDNSResponder nano

# Enable swap, needed to compile larger programs
# https://people.freebsd.org/~blackend/en_US.ISO8859-1/books/handbook/adding-swap-space.html
sudo su
truncate -s 2G /usr/swap0
chmod 0600 /usr/swap0
echo 'swapfile="/usr/swap0"' >> /etc/rc.conf
mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
# TODO: How  to persist this across reboots?

# Speed up boot
echo 'autoboot_delay="0"'  >> /etc/rc.conf

# Get ports tree; this is needed for figuring out the dependencies
# of the helloDesktop ports
pkg install -y git
git clone https://git.freebsd.org/ports.git /usr/ports --depth=1

# Get the
git clone https://github.com/helloSystem/helloDesktop
cd helloDesktop
sh -ex build.sh

cat > cat /usr/local/etc/pkg/repos/helloDesktop.conf <\\EOF
helloDesktop: {
        url: "file:///home/freebsd/helloDesktop/${ABI}",
        mirror_type: "srv",
        enabled: yes,
        priority: 100
}
EOF

# Just for testing, uninstall all our packages
pkg remove -y 'hellodesktop-*'

# And install them again
pkg install -y hellodesktop

pkg install -y xorg-minimal kwinft xf86-video-scfb

echo "exec dbus-run-session kwin_x11" > ~/.xinitrc
echo "launch Menu &" >> ~/.xinitrc
echo "launch Filer &" >> ~/.xinitrc

service dbus enable # needed?
service dbus start # needed?

@bitboss-ca
Copy link

@probonopd,

First of all, no apologies necessary! This is an awesome project and I will assist as much as I am able.

Your suggestion to checkout the submodules of QtPlugin worked, thanks.

As for the rest, I'll continue to compile notes and contribute when I have a complete picture.

Thanks.

@bitboss-ca
Copy link

bitboss-ca commented Mar 13, 2023

Update:

Now I'm getting these when trying to build multiple hellosystem components:

# cd build/
# cmake ..
CMake Error at /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package):
  Could not find a configuration file for package "Qt5Core" that is
  compatible with requested version "5.15.8".

  The following configuration files were considered but not accepted:

    /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake, version: 5.15.7

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
  /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  CMakeLists.txt:16 (find_package)

Also, when I try to startx i get no desktop and when I killall Xorg I see this on the screen.

PXL_20230313_024013360 MP

Finally, just to clarify one of my original questions...

The RPI documentation has this list of commands for the launch component...

Screen Shot 2023-03-12 at 8 55 31 PM

What I don't understand is why there would be this command:

# ./launch

What is the purpose of running ./launch from the current directory before installing it?

Thanks.

@probonopd
Copy link
Member

I think that line is a leftover mistake and can be left away.

@probonopd
Copy link
Member

How come your Qt is older than 5.15.8?
https://www.freshports.org/devel/qt5-core/

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

3 participants