- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are there any resources available for those who might wish to recompile the Linux kernel used on the Phi? Are there any tools in MPSS to help us recompile k1om Linux and/or boot it? I'm using MPSS 3.1.2.
I could hopefully hack my way through it, but I would hate to do so having missed some existing instructions or tools which could have made things easier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following procedure can be used to recompile the Intel Xeon Phi's 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 final note: 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"
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The information you want might be in the MPSS readme. Take a look at http://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss.
Regards
--
Taylor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This doesn't seem to be the case.
I've managed to rebuild from the sources provided, although I'm not at all confident that I'm using the same kernel configuration or version as the distributed version: the configuration you get (config-mic-knc-2.6.38) when you extract the sources doesn't seem to be up to date with the sources.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following procedure can be used to recompile the Intel Xeon Phi's 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 final note: 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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome, thanks. This is exactly what I was hoping for and very helpful. Without these instructions I ended up building a kernel with transparent hugepages disabled, which exacerbated my performance issues.
![](/skins/images/3CECF0550DB8BF54496C114A1FF06FE9/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page