Making CBC userhook0

6 replies [Last post]
Evan
Title: NooBot+
Joined: 07/21/2010
Posts:
BotPoints: 22
User offline. Last seen 9 years 48 weeks ago.

I was trying to make a slightly modified CBC userhook0 using the current source at https://github.com/kipr/cbc but am running into a bit of trouble. I followed the instructions in the Readme.markdown and I believe I successfully installed the necessary software on Ubuntu 10.10; however, when I run the make command, I get an error when line 26 of the Makefile is reached https://github.com/kipr/cbc/blob/master/Makefile. The error is that the directory, /mnt/kiss/qt/bin/qmake, cannot be located, which makes sense because this appears to be a file path for the cbc. The path to to the QT Embedded folder is assigned to a variable on the first line of the makefile.

Do I need to change the path assigned to QTEMBEDDED_QMAKE before building the firmware?

Thanks!

-Evan Wilson
Hampton High School

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 7 years 18 weeks ago.

Hey Evan,

Matt made some scripts which will setup the paths for you. They're at https://github.com/matthewbot/CBCBuildScripts

Once you run these, you should be able to build the CBC firmware (you shouldn't even need to follow the setup instructions on the KIPR GitHub).

Let me know if this helps.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

Evan
Title: NooBot+
Joined: 07/21/2010
Posts:
BotPoints: 22
User offline. Last seen 9 years 48 weeks ago.

Thanks Jeremy. Matt's script seems to have worked; I'm not getting that error anymore. That really streamlines the installation process. However, now I'm running into another error and I'm having trouble figuring it out. Here's the message http://pastebin.com/btJ6kDDZ. It looks like the microdia.ko file was never generated. I don't know much about the process but after looking around, microdia's make file said it would output the microdia.ko file but it isn't there. Any guesses?

Thanks,

-Evan Wilson
Hampton High School

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 7 years 18 weeks ago.

Hmm... I don't remember getting that error. If it's trying to build microdia.ko, maybe it can't find the kernel headers. I don't remember exactly how to setup the kernel stuff, but a quick shortcut would be to copy microdia.ko from an official userhook0 into the directory on your computer where it's supposed to be. (Unless of course you want to modify the microdia driver.) If you want to compile the kernel, the Chumby wiki has some info on that.

Let us know if you have any luck.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

Evan
Title: NooBot+
Joined: 07/21/2010
Posts:
BotPoints: 22
User offline. Last seen 9 years 48 weeks ago.

So I tried instead to build the nhs version at https://github.com/JeremyRand/cbc and after a few tries was successful. A few hints are not to have a space anywhere in the file path of the source because at some point there is a cd command without quotes, I can't remember where it is. Also, make sure filesystem/upgrade/make-userhook0.pl has permissions to run as an executable file.

This brings me back to my earlier error when building KIPRs version of the firmware. I am not sure why microdia.ko, which should at some point during the build be at kernel/microdia/microdia.ko, is not created. I also realized that rt73.ko, which should be at filesystem/vfat/files/rt73.ko is not there. At the moment, I haven't had time to troubleshoot this more but I did take Jeremy's suggestion and copied the microdia.ko from filesystem/vfat/files/microdia.ko from the source of the nhs mod after building it (this is where the file is after building the userhook0) and placed it in kernel/microdia/microdia.ko of the KIPR source. I also copied filesystem/vfat/files/rt73.ko from the nhs source after building to filesystem/vfat/files/rt73.ko of the KIPR source. After these steps, I was successfully able to build the userhook0 from the KIPR source; however, I haven't tried installing it on the CBC yet.

Jeremy - I was comparing KIPR and the nhs source on Github, specifically the kernel/microdia directory. Every file in the KIPR source was updated on January 27, 2011. I noticed that most of the files in the nhs source are the same ones as in the KIPR source, also updated on January 27, 2011. Then when I looked at the changes made for the January 27, 2011 commit, the modified files included the files that did not say were updated in the nhs source. It looks like both sources are basically identical so I think the microdia.ko file created when building the nhs version should be the same as should be made while building the KIPR version. Does this sound right? I just want to get as close to the actual KIPR version as possible for the kernel files.

Thanks,

-Evan Wilson
Hampton High School

Evan
Title: NooBot+
Joined: 07/21/2010
Posts:
BotPoints: 22
User offline. Last seen 9 years 48 weeks ago.

Sorry, slight edit to my above post. The NHS source already has both the microdia.ko and rt73.ko files in filesystem/vfat/files before building, KIPR's source does not.

-Evan Wilson
Hampton High School

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 7 years 18 weeks ago.

Yeah, KIPR merged in a lot of the NHS files this year. I haven't extensively tested their version, but I'm not surprised they failed to include 2 of our files... we weren't consulted about the merge or even notified, so the fact that they missed something while trying to copy our changes isn't really a big shocker. You might want to e-mail KIPR and let them now that they're missing those files. Good to hear you got it working though. rt73.ko and microdia.ko should be the same in both versions; we haven't touched the microdia driver and I think KIPR's rt73 driver is an exact copy of ours.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS