{"id":739,"date":"2010-09-27T09:15:14","date_gmt":"2010-09-27T16:15:14","guid":{"rendered":"http:\/\/www.graphics-muse.org\/wp\/?p=739"},"modified":"2010-09-27T09:15:14","modified_gmt":"2010-09-27T16:15:14","slug":"beaglebox-sgx-integration-progress","status":"publish","type":"post","link":"https:\/\/www.graphics-muse.org\/wp\/?p=739","title":{"rendered":"BeagleBox: SGX integration progress"},"content":{"rendered":"<p>I&#8217;m back from vacation and have been working on integrating <a href=\"http:\/\/bazaar.launchpad.net\/~beagleboard-kernel\/%2Bjunk\/2.6-stable\/files\/head:\/patches\/sgx\/\">Robert Nelson&#8217;s SGX patchset<\/a> into the BeagleBox build.\u00a0 These patches implement the SGX kernel drivers for the BeagleBoard found in the <a href=\"http:\/\/software-dl.ti.com\/dsps\/dsps_public_sw\/sdo_sb\/targetcontent\/gfxsdk\/\">OMAP35x_Graphics_SDK<\/a> package for Linux.\u00a0 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.\u00a0\u00a0 I&#8217;m pulling from Robert&#8217;s private repository currently because the main Launchpad site doesn&#8217;t make it easy to pull files without using the Web interface (wget doesn&#8217;t work, for example, in scripted pre-configured form).\u00a0 You should check with Robert to get permission to use his private repository.<\/p>\n<p>Robert was kind enough to point out his patches to me while I was on vacation and I&#8217;ve been working to integrate them into the BeagleBox build since I got back.\u00a0 The patches need to be applied in a specific order and one of the patches &#8211; the one that enables building in the kernel &#8211; needs to be hacked to match the version of the kernel being used.\u00a0 The hacks place the SGX mods &#8211; which are all stored in the staging directory &#8211; into the correct place in the Kconfig and Makefile.\u00a0 Since the staging directory changes often, this is has to be done to match a specific kernel tree. I also had to rename Robert&#8217;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.\u00a0 In this way the process of gathering all patches and applying them at one time works properly using <em>quilt<\/em>.<\/p>\n<p>The order of the patches and my modified version of the build enabling patch are not yet in the <a href=\"http:\/\/sourceforge.net\/projects\/beaglebox\/develop\/\">BeagleBox CVS<\/a> but will be soon.\u00a0 I need to create an updated kernel config file first.\u00a0 Up to this point I&#8217;ve been using the <em>omap3_beagle_defconfig<\/em> default kernel configuration for the BeagleBoard.\u00a0 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.\u00a0 I&#8217;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.<\/p>\n<p>So now I have to save a custom kernel config for use with the SGX-enabled kernel build for BeagleBox.\u00a0 Fortunately the build process already supports use of a custom kernel config.\u00a0 All I need to do is create it and point the build config at it.<\/p>\n<p>This, of course, only gets the drivers in place.\u00a0 It doesn&#8217;t touch the issue of getting the user space libraries and tools into the root filesystem.\u00a0 That&#8217;s the next step.\u00a0 At some point I should ask Robert how he&#8217;s generating these patches (he already has updated them for the just released 4.0.x SGX SDK, but we&#8217;re not using that one in BeagleBox) just in case I need to build them manually myself someday.<\/p>\n<p>But at least I know how to do all this now.\u00a0 I don&#8217;t know if this actually boots, yet.\u00a0 Still waiting on a royalties check from a book I wrote before I can (finally) place the order for my board.\u00a0 But the time grows near when I can begin actually playing with the board and not just the software build&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m back from vacation and have been working on integrating Robert Nelson&#8217;s SGX patchset into the BeagleBox build.\u00a0 These patches implement the SGX kernel drivers for the BeagleBoard found in the OMAP35x_Graphics_SDK package for Linux.\u00a0 This allows building the SGX kernel modules with the rest of the kernel build instead of having to add an [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[390,8],"tags":[376,381,399,402,422,619,415,411,413,393],"class_list":{"0":"post-739","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-beaglebox-hardware","7":"category-hardware","8":"tag-beagleboard","9":"tag-beaglebox","10":"tag-bui","11":"tag-kernel-driver","12":"tag-launchpad","13":"tag-linux","14":"tag-psp","15":"tag-root-filesystem","16":"tag-sdk","17":"tag-sgx","18":"czr-hentry"},"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pe9t8-bV","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=739"}],"version-history":[{"count":1,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions"}],"predecessor-version":[{"id":740,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/739\/revisions\/740"}],"wp:attachment":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}