- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
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: https://github.com/pathscale/intel_xeon_phi_kernel_driver
Here's how far I got building the uOS:
# 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"
This gave me an image that doesn't boot:
# /etc/init.d/mpss stop # echo "boot:linux:/root/bzImage-vanilla" > /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
Am I missing something apart from the initrd? Where can I obtain it?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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. Assuming that you've installed MPSS (mpss-sdk-k1om-*.x86_64.rpm specifically) and have obtained mpss-src-3.2.tar from the MPSS release site:
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]
I recommend adding an appropriate amount of parallelism to [3] with e.g. “-j16”, as that significantly reduces how long it takes to complete.
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:
MPSS_KCONFIGS="k1om mic-min mic-mpss" sed -r `echo ${MPSS_KCONFIGS} | sed -e 's:\S\+:arch/x86/configs/&.uconfig:g'` \ -e '1 i # KCONFIGS: '"${MPSS_KCONFIGS}" \ -e 's:.*\b(CONFIG_INITRAMFS_SOURCE)\b.*:\1="":' \ > .config.all make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux- \ KCONFIG_ALLCONFIG=.config.all allnoconfig -j1
A few additional notes:
First, while [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 actually necessary in order to build the kernel is modifying the PATH environment variable:
PATH="$PATH:/opt/mpss/3.2/sysroots/x86_64-mpsssdk-linux/usr/bin/k1om-mpss-linux"
Second, despite its suggestive name, config-mic-knc-2.6.38 is unfortunately not, in fact, the kernel .config used for the bzImage included in MPSS.
Finally, when using the kernel Makefile's “menuconfig” or “xconfig” 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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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. Assuming that you've installed MPSS (mpss-sdk-k1om-*.x86_64.rpm specifically) and have obtained mpss-src-3.2.tar from the MPSS release site:
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]
I recommend adding an appropriate amount of parallelism to [3] with e.g. “-j16”, as that significantly reduces how long it takes to complete.
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:
MPSS_KCONFIGS="k1om mic-min mic-mpss" sed -r `echo ${MPSS_KCONFIGS} | sed -e 's:\S\+:arch/x86/configs/&.uconfig:g'` \ -e '1 i # KCONFIGS: '"${MPSS_KCONFIGS}" \ -e 's:.*\b(CONFIG_INITRAMFS_SOURCE)\b.*:\1="":' \ > .config.all make ARCH=k1om CROSS_COMPILE=k1om-mpss-linux- \ KCONFIG_ALLCONFIG=.config.all allnoconfig -j1
A few additional notes:
First, while [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 actually necessary in order to build the kernel is modifying the PATH environment variable:
PATH="$PATH:/opt/mpss/3.2/sysroots/x86_64-mpsssdk-linux/usr/bin/k1om-mpss-linux"
Second, despite its suggestive name, config-mic-knc-2.6.38 is unfortunately not, in fact, the kernel .config used for the bzImage included in MPSS.
Finally, when using the kernel Makefile's “menuconfig” or “xconfig” 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that's going to help me a lot.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page