raspberrypi / userland

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.
BSD 3-Clause "New" or "Revised" License
2.05k stars 1.09k forks source link

hello_pi #589

Open ShorTie8 opened 5 years ago

ShorTie8 commented 5 years ago

Is it posible to build userland without hello_pi ?? Like a -DHELLO_PI=OFF maybe or something ??

It's like 31.7 of the 34.4 which is built.

6by9 commented 5 years ago

hello_pi isn't built by default, you have to add ALL_APPS for it to build at all. https://github.com/raspberrypi/userland/blob/master/host_applications/linux/CMakeLists.txt#L21

ShorTie8 commented 5 years ago

Sorry, Don't know what you mean by 'add ALL_APTS ?? grep -r 'ALL_APPS' sources/rpi-userland sources/rpi-userland/userland-master/host_applications/linux/CMakeLists.txt:if(ALL_APPS)

And if I rem it out, it still gets installed. if(ALL_APPS) add_subdirectory(apps/vcdbg) add_subdirectory(libs/elftoolchain) rem# add_subdirectory(apps/smct) add_subdirectory(apps/edid_parser) rem# add_subdirectory(apps/hello_pi) endif()

It's just a whole bunch of examples that are not needed. note: rem# is really just #

6by9 commented 5 years ago

Take a clean userland tree, and run ./buildme. It does NOT build hello_pi if you look within the build subdirectory.

To build hello_pi directly from userland you need to invoke cmake manually via

cd build/raspberry/release
cmake -DCMAKE_BUILD_TYPE=release -DARM64=OFF -DALL_APPS=ON ../../..
make

which will actually error out as a couple of other libraries and apps are not present in userland (vcdbg, elftoolchain, and edid_parser). Alternatively you invoke rebuld.sh

It does copy the source files to /opt/vc/src, and that includes a 30MB sample H264 file. If you felt like writing the relevant CMake option to omit that, then PRs are welcome. It's not a high priority to fix.