<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The following procedure is in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929954#M14556</link>
    <description>&lt;P&gt;The following procedure is exactly that used within Intel to compile the Intel Xeon Phi's Linux kernel; I'll describe it in terms of the upcoming 3.2 release and then how 3.1 diverges so that this response remains useful longer.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Assuming that you've installed MPSS (&lt;/SPAN&gt;mpss-sdk-k1om-*.x86_64.rpm&amp;nbsp;specifically) and have&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;obtained mpss-src-3.2.tar from the MPSS release site:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
tar -xf mpss-src-3.2.tar
tar -xf mpss-3.2/src/linux-2.6.38+mpss3.2.tar.bz2
. /opt/mpss/3.2/environment-setup-k1om-mpss-linux  # [1]
cd linux-2.6.38+mpss3.2/
cp /opt/mpss/3.2/sysroots/k1om-mpss-linux/boot/config-2.6.38.8+mpss3.2 .config  # [2]
make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux-  # [3]&lt;/PRE&gt;

&lt;P&gt;I recommend adding an appropriate amount of parallelism to [3] with e.g. “-j16”, as that significantly reduces how long it takes to complete.&lt;/P&gt;

&lt;P&gt;For 3.1, replace [2] with the following (which works equally well on 3.2), since I'm unsure of where a pre-generated file can be found in that version:&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
MPSS_KCONFIGS="k1om mic-min mic-mpss"
sed -r `echo ${MPSS_KCONFIGS} | sed -e 's:\S\+:arch/x86/configs/&amp;amp;.uconfig:g'` \
    -e '1 i # KCONFIGS: '"${MPSS_KCONFIGS}" \
    -e 's:.*\b(CONFIG_INITRAMFS_SOURCE)\b.*:\1="":' \
    &amp;gt; .config.all
make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux- \
    KCONFIG_ALLCONFIG=.config.all allnoconfig -j1&lt;/PRE&gt;

&lt;P&gt;A few additional notes:&lt;/P&gt;

&lt;P&gt;First, w&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;hile [1] sets up the environment to facilitate cross-building userspace software for Xeon Phi, particularly when that software has not been autotool-ized, the only part that’s&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="font-size: 1em; line-height: 1.5;"&gt;actually necessary&lt;/EM&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;in order to build the kernel is modifying the PATH environment variable:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
PATH="$PATH:/opt/mpss/3.2/sysroots/x86_64-mpsssdk-linux/usr/bin/k1om-mpss-linux"&lt;/PRE&gt;

&lt;P&gt;Second, despite its suggestive name,&amp;nbsp;config-mic-knc-2.6.38 is unfortunately &lt;EM&gt;not&lt;/EM&gt;, in fact, the kernel .config used for the bzImage included in MPSS.&lt;/P&gt;

&lt;P&gt;Finally, when using the kernel Makefile's “menuconfig”&amp;nbsp;or “xconfig”&amp;nbsp;targets, be careful to also specify “ARCH=k1om”—not doing so can result in a .config that is a broken hybrid of x86_64 and k1om.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2014 20:14:40 GMT</pubDate>
    <dc:creator>Evan_P_Intel</dc:creator>
    <dc:date>2014-03-04T20:14:40Z</dc:date>
    <item>
      <title>Rebuilding uOS bzimage</title>
      <link>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929953#M14555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to rebuild the bzimage of the uOS to gain some insight as to how the device works, in addition to the System Programmer's Guide. Unfortunately, I couldn't find any docs as to how to rebuild uOS exactly.&lt;/P&gt;

&lt;P&gt;Immediately, I'm trying to solve the problem where the DMA engine is uninitialized in "ready" state. I'm going to use this for an extended DMA API I'm working on at PathScale: &lt;A href="https://github.com/pathscale/intel_xeon_phi_kernel_driver"&gt;https://github.com/pathscale/intel_xeon_phi_kernel_driver&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here's how far I got building the uOS:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;
# tar xfj linux-2.6.38+mpss3.1.tar.bz2
# cd linux-2.6.38+mpss3.1
# cp config-mic-knc-2.6.38 .config
# sed -r -e 's@.*CONFIG_CROSS_COMPILE=.*@CONFIG_CROSS_COMPILE=\"/usr/linux-k1om-4.7/bin/x86_64-k1om-linux-\"@' -i .config
## make menuconfig -- manually remove initrd path
# make ARCH="k1om"&lt;/PRE&gt;

&lt;P&gt;This gave me an image that doesn't boot:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;
# /etc/init.d/mpss stop
# echo "boot:linux:/root/bzImage-vanilla" &amp;gt; /sys/class/mic/mic0/state
# tail /var/log/messages
Feb 27 09:48:29 phi01 kernel: mic0: Transition from state ready to booting
Feb 27 09:48:29 phi01 kernel: mic image: /root/offload/mpss_kernels/bzImage-vanilla
Feb 27 09:48:29 phi01 kernel: MIC 0 Booting
Feb 27 09:48:34 phi01 kernel: Waiting for MIC 0 boot 5
Feb 27 09:48:39 phi01 kernel: Waiting for MIC 0 boot 10
Feb 27 09:48:44 phi01 kernel: Waiting for MIC 0 boot 15
Feb 27 09:48:49 phi01 kernel: Waiting for MIC 0 boot 20
...
Feb 27 09:53:29 phi01 kernel: Waiting for MIC 0 boot 300&lt;/PRE&gt;

&lt;P&gt;Am I missing something apart from the initrd? Where can I obtain it?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 18:57:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929953#M14555</guid>
      <dc:creator>rhn</dc:creator>
      <dc:date>2014-02-27T18:57:41Z</dc:date>
    </item>
    <item>
      <title>The following procedure is</title>
      <link>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929954#M14556</link>
      <description>&lt;P&gt;The following procedure is exactly that used within Intel to compile the Intel Xeon Phi's Linux kernel; I'll describe it in terms of the upcoming 3.2 release and then how 3.1 diverges so that this response remains useful longer.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Assuming that you've installed MPSS (&lt;/SPAN&gt;mpss-sdk-k1om-*.x86_64.rpm&amp;nbsp;specifically) and have&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;obtained mpss-src-3.2.tar from the MPSS release site:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
tar -xf mpss-src-3.2.tar
tar -xf mpss-3.2/src/linux-2.6.38+mpss3.2.tar.bz2
. /opt/mpss/3.2/environment-setup-k1om-mpss-linux  # [1]
cd linux-2.6.38+mpss3.2/
cp /opt/mpss/3.2/sysroots/k1om-mpss-linux/boot/config-2.6.38.8+mpss3.2 .config  # [2]
make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux-  # [3]&lt;/PRE&gt;

&lt;P&gt;I recommend adding an appropriate amount of parallelism to [3] with e.g. “-j16”, as that significantly reduces how long it takes to complete.&lt;/P&gt;

&lt;P&gt;For 3.1, replace [2] with the following (which works equally well on 3.2), since I'm unsure of where a pre-generated file can be found in that version:&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
MPSS_KCONFIGS="k1om mic-min mic-mpss"
sed -r `echo ${MPSS_KCONFIGS} | sed -e 's:\S\+:arch/x86/configs/&amp;amp;.uconfig:g'` \
    -e '1 i # KCONFIGS: '"${MPSS_KCONFIGS}" \
    -e 's:.*\b(CONFIG_INITRAMFS_SOURCE)\b.*:\1="":' \
    &amp;gt; .config.all
make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux- \
    KCONFIG_ALLCONFIG=.config.all allnoconfig -j1&lt;/PRE&gt;

&lt;P&gt;A few additional notes:&lt;/P&gt;

&lt;P&gt;First, w&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;hile [1] sets up the environment to facilitate cross-building userspace software for Xeon Phi, particularly when that software has not been autotool-ized, the only part that’s&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="font-size: 1em; line-height: 1.5;"&gt;actually necessary&lt;/EM&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;in order to build the kernel is modifying the PATH environment variable:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;" style="font-size: 13px;"&gt;
PATH="$PATH:/opt/mpss/3.2/sysroots/x86_64-mpsssdk-linux/usr/bin/k1om-mpss-linux"&lt;/PRE&gt;

&lt;P&gt;Second, despite its suggestive name,&amp;nbsp;config-mic-knc-2.6.38 is unfortunately &lt;EM&gt;not&lt;/EM&gt;, in fact, the kernel .config used for the bzImage included in MPSS.&lt;/P&gt;

&lt;P&gt;Finally, when using the kernel Makefile's “menuconfig”&amp;nbsp;or “xconfig”&amp;nbsp;targets, be careful to also specify “ARCH=k1om”—not doing so can result in a .config that is a broken hybrid of x86_64 and k1om.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 20:14:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929954#M14556</guid>
      <dc:creator>Evan_P_Intel</dc:creator>
      <dc:date>2014-03-04T20:14:40Z</dc:date>
    </item>
    <item>
      <title>Thanks, that's going to help</title>
      <link>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929955#M14557</link>
      <description>&lt;P&gt;Thanks, that's going to help me a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 20:52:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Rebuilding-uOS-bzimage/m-p/929955#M14557</guid>
      <dc:creator>rhn</dc:creator>
      <dc:date>2014-03-04T20:52:23Z</dc:date>
    </item>
  </channel>
</rss>

