BeagleBox: SGX integration progress


I'm back from vacation and have been working on integrating Robert Nelson's SGX patchset into the beaglebox build.  These patches implement the sgx kernel drivers for the beagleboard found in the OMAP35x_Graphics_SDK package for linux.  This allows building the SGX kernel modules with the rest of the kernel build instead of having to add an external step mapped over the sdk build process.   I'm pulling from Robert's private repository currently because the main launchpad site doesn't make it easy to pull files without using the Web interface (wget doesn't work, for example, in scripted pre-configured form).  You should check with Robert to get permission to use his private repository.

Robert was kind enough to point out his patches to me while I was on vacation and I've been working to integrate them into the BeagleBox build since I got back.  The patches need to be applied in a specific order and one of the patches – the one that enables building in the kernel – needs to be hacked to match the version of the kernel being used.  The hacks place the SGX mods – which are all stored in the staging directory – into the correct place in the kconfig and Makefile.  Since the staging directory changes often, this is has to be done to match a specific kernel tree. I also had to rename Robert's files so that they had high enough prefix numbers to be applied after the patches from psp SDK, which is where the baseline kernel comes from that can actually support the SGX drivers.  In this way the process of gathering all patches and applying them at one time works properly using quilt.

The order of the patches and my modified version of the build enabling patch are not yet in the BeagleBox CVS but will be soon.  I need to create an updated kernel config file first.  Up to this point I've been using the omap3_beagle_defconfig default kernel configuration for the BeagleBoard.  But with these SGX patches I needed to run the default config and then run menuconfig to enable the OMAP2/3 dss support, which in turn was required in order to even see the SGX drivers under the staging menu. I may need to modify the build patch once more to remove a dependency on modules since I prefer all drivers to be built into the kernel to simplify user interaction and the boot process.  I'll change this later if I find that some drivers cause the boot to fail unless the driver is loaded as a module late in the boot process.

So now I have to save a custom kernel config for use with the SGX-enabled kernel build for BeagleBox.  Fortunately the build process already supports use of a custom kernel config.  All I need to do is create it and point the build config at it.

This, of course, only gets the drivers in place.  It doesn't touch the issue of getting the user space libraries and tools into the root filesystem.  That's the next step.  At some point I should ask Robert how he's generating these patches (he already has updated them for the just released 4.0.x SGX SDK, but we're not using that one in BeagleBox) just in case I need to build them manually myself someday.

But at least I know how to do all this now.  I don't know if this actually boots, yet.  Still waiting on a royalties check from a book I wrote before I can (finally) place the order for my board.  But the time grows near when I can begin actually playing with the board and not just the software build….

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.