Saturday, January 11, 2014

Modified raspberrypi-vc

The builds are successful (rpmbuild and mock) but not until koji. I built the packages natively using pi. As for the koji build, I get the error

FAILED: ActionNotAllowed: policy violation (build_from_srpm)

Will check back into it to overcome the error.

Here are the link to my source rpm and the specfile.

Source rpm
Spec File


Wednesday, January 8, 2014

Firmware and Userland packages

As of the moment, I have successfully made 2 spec files. One is for the firmware and the other for the userland. The firmware contains just the firmware that was originally obtained from raspberrypi-vc and the userland spec file contains all the libraries from raspverrpi-vc. Here are the links to the file.

All of them was build successfully and installed.

Link -> This is the folder that contains the binaries and src rpm of both userland and firmware.

*1st things first, make sure to put the sources from specfiles to the designated SOURCES directory.

Monday, January 6, 2014

Modified raspberrypi-vc package (Links to the rpms)

These are the files that was build by the modified spec file of raspberrypi-vc. The link to the spec file is located to my previous blog.

RPM links:

SourceRPM
raspberrypi-vc-demo-source
raspberrypi-vc-firmware
raspberrypi-vc-libs
raspberrypi-vc-libs-devel
raspberrypi-vc-static
raspberrypi-vc-utils

RPMlint info

Errors were found during the rpmlint process but the error was inherited from the unmodified raspberrypi-vc package(errors were exactly the same), so I did not change anything as I want Chris' input if what I have done is correct.

Saturday, January 4, 2014

Modifying raspberrypi-vc package(spec file)

My previous blog talked about making a new package the raspberrypi-userland. The process was pretty much straightforward but a lot of the files from the raspberrypi-vc package will conflict to it. So, I decided to just modify the raspberrypi-vc package as is.

Here's what I've done.

First, I got the source code of the raspberrypi-vc package from koji then get the source tarball from firmware. I ran the rpmbuild process to the specfile from koji and see what files were made. I found out that the whole building process was building the directory /opt/vc that will include the necessary libraries. On the other hand, the raspberrypi-userland I made, had the same goal, which was making the directory /opt/vc with exactly the same files from raspberrypi-vc. The only difference between the two is that the raspberrypi-userland included a build script and in a sense it was building from source while the other was not.

After finding out what both spec files build, I tried to combine the lines from raspberrypi-userland specfile to the raspberrypi-vc specfile. In this process we need the source files from firmware and userland and extract them to the BUILD folder so that the specfile will look into those directories in order to get the necessary files to build.

Now, the raspberry-vc specfile is now getting the files from the source(userland) instead of its own(firmware). In this sense, I have accomplished the goal to build the package from source. I just need Chris' input if this is the one( or the way) he wanted it to be. I hope it does.


Links to my specs.

raspberrypi-vc SPEC
raspberrypi-userland SPEC


Saturday, December 21, 2013

Raspberrypi-userland

 Building a new package called raspberrypi-userland package. The files are located in this site.

RPM BUILDING

With the help of Adam Pensrose's spec file I mange to create a spec file with global commands. The build was successful and there were no errors encountered.

RPM LINT

Using rpmlint command, I checked for errors and found a couple. I fixed them and did the packaging process again.

ARCH

The architecture that I am building it on is on f17, for my next blog I will build the package in the arm architecture (Pi).

Files and Links
Spec file
Source RPM (tar.gz)








Sunday, December 15, 2013

Raspberrypi-vc Packaging (Final Release)

Changing the package 'raspberrypi-vc' to build from source is very complicated (for me). As I reach the deadline, here's what I tried to accomplish and the challenges I faced:

1.) I always look the original spec file from agreene and I would say, at first I did not understand most of what was there. Because of that, I did not know how to start my project (I thought it was a simple 'kind-of-a-lab' project but it isn't) which is a problem. I did talk with Chris and told me to start off from scratch and so I did but then I got stuck.

2.) As I build the package from a skeleton spec with everything almost empty, I looked everywhere for a make file or anything with a script (python mostly) just to be able to build it but there was none. I looked at almost all of the packages in the project and everything includes a make file or something to put in the %build section and it makes it really easier. As for mine, I found none for raspberrypi-vc package except when I looked inside the hello_pi directory(I found the rebuild.sh, a python script). It shed some light but I faced another challenge.

3.)  I edited the spec file to include the rebuild.sh and I got errors that says some files where missing. I addressed the issue by editing the makefile through the specfile and adding the specific directory on where to find it (I put this in %build section sed -i -e '1iSDKSTAGE=/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp\' Makefile.include). The file could not be found issue is fixed but again another issue came up.

4.)  The next issue that came up, and probably the one thing holding me is:
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libGLESv2.so when searching for -lGLESv2
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libEGL.so when searching for -lEGL
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libopenmaxil.so when searching for -lopenmaxil
/usr/bin/ld: cannot find -lopenmaxil
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libbcm_host.so when searching for -lbcm_host
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvcos.so when searching for -lvcos
/usr/bin/ld: cannot find -lvcos
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvchiq_arm.so when searching for -lvchiq_arm
/usr/bin/ld: cannot find -lvchiq_arm
collect2: error: ld returned 1 exit status
make: *** [hello_teapot.bin] Error 1
rm models.o video.o triangle.o
make: Leaving directory `/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/src/hello_pi/hello_teapot'
error: Bad exit status from /var/tmp/rpm-tmp.zjVMmP (%build)

This goes on to every file that the make file compiles.

5.) Building from source on the Pi is very slow that's why most of my building was done on a PC. Maybe my sd card was not fast enough but that being said, I tried it on Pi and still, it does not build properly.

Thoughts:
Overall I would still say that building packages is very interesting. It gives you quite a skill to look for errors and find solutions. It is like a job of a QA Analyst so that the software does not or have less bugs. Also, talking to other people in the community for help is one thing you can develop on this project. I could have talked to more people and I might have found solutions to this but I got caught up with other projects and practicals (my fault anyway). The project has taught me to prioritize and plan things carefully in order to not be caught by the deadlines. It is a very important skill not only in school but also on other places like work. As I end, everything what I have done in this course is worth it. From the communications lab (and every lab) until the project. Chris is a very good teacher and I would recommend IT students to get him as your instructor in any subject he is teaching.

Files:
Source RPM
Spec File
(I copied the header information from the original spec file)

Links:
My Project
Github Source Files

Saturday, December 14, 2013

Raspberrypi-vc Packaging

As I go back on finding the errors from my previous blog, I found out what was causing it. The Makefile.include did not provide any directory on where to point out the necessary files so fixed it by adding a manual entry on the specfile to have it point to the appropriate directory.

%build
cd hardfp/opt/vc/src/hello_pi
sed -i -e '1iSDKSTAGE=/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp\' Makefile.include
./rebuild.sh


And then when I tried to do rpmbuild -ba I got new errors that I could not figure out yet what's causing it.

Error:
jpeg.c:361:171: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
cc -o hello_jpeg.bin -Wl,--whole-archive jpeg.o -lilclient -L/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -L../libs/ilclient -L../libs/vgfont -Wl,--no-whole-archive -rdynamic
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libGLESv2.so when searching for -lGLESv2
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libEGL.so when searching for -lEGL
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libopenmaxil.so when searching for -lopenmaxil
/usr/bin/ld: cannot find -lopenmaxil
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libbcm_host.so when searching for -lbcm_host
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvcos.so when searching for -lvcos
/usr/bin/ld: cannot find -lvcos
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvchiq_arm.so when searching for -lvchiq_arm
/usr/bin/ld: cannot find -lvchiq_arm
collect2: error: ld returned 1 exit status
make: *** [hello_jpeg.bin] Error 1





Searching for further fixes until next post.

PS. I may not able to finish this project up to release 0.3. The packaging process is very complicated and I have never touched the makefiles before.