summaryrefslogtreecommitdiffstats
diff options
authorMcgrof <anonymous.contributor@example.org>2014-11-17 18:48:18 +0000
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2024-10-04 15:47:33 -0400
commitf3c850da4d69ae926c4eebd91f491188b57be9a4 (patch)
tree9087d9262c7bb1bd2217ec8386ca62f5acb8b3bc
parent9ed9652b658517840e3d7921cc65dc2680db1cdb (diff)
downloadbackports-f3c850da4d69ae926c4eebd91f491188b57be9a4.tar.gz
Created page with " The backports project makes release of two types of '''packages''' which provides device drivers from future versions of Linux usable on older Linux kernel releases. <h2>Rel..."
-rw-r--r--wiki/Documentation_packaging.mediawiki77
1 files changed, 77 insertions, 0 deletions
diff --git a/wiki/Documentation_packaging.mediawiki b/wiki/Documentation_packaging.mediawiki
new file mode 100644
index 0000000..a7096b6
--- /dev/null
+++ b/wiki/Documentation_packaging.mediawiki
@@ -0,0 +1,77 @@
+---
+title: Documentation/packaging
+---
+
+
+The backports project makes release of two types of '''packages''' which provides device drivers from future versions of Linux usable on older Linux kernel releases.
+
+<h2>Release types</h2>
+
+Both daily snapshots based on [http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git linux-next], and stable releases based [http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git Linux's stable releases] are provided. Always use the latest ''stable'' available release unless you need a feature / fix only currently available on the linux-next based release. A backports-3.x release means device drivers from the Linux v3.x release have been taken, backported and made available for you to use on any kernel version prior to the release version.
+
+<h2>Usage guide</h2>
+
+Building backports follows the same build mechanism as building the Linux kernel.
+
+<pre>
+# as a user
+make menuconfig
+make -j4
+# as root
+make install
+# reboot and enjoy
+</pre>
+
+Its understood users may not know how to configure the backports package, just like they may not know how to configure the Linux kernel, so a short cut is provided with default configuration files that can be used to only build their drivers / subsystems of interest. You can also just query the regular help menu.
+
+<pre>
+make help
+make defconfig-help
+</pre>
+
+If you use this option just use the 'make defconf-option' in replacement for ''make menuconfig'' above. For example to compile all wifi drivers:
+
+<pre>
+# as a user
+make defconfig-wifi
+make -j4
+# as root
+make install
+</pre>
+
+Note that there are only default configuration files written for a few drivers while the project actually backports a lot of device drivers, the reason we have default configuration files for a few drivers is simply because developer have provided a default config options for them. What we really need is a 'make localmodconfig' support but that will take a while given that it involves mapping older kernel configs to newer kernel configs (which likely would be welcomed upstream as well).
+
+<h2>Cross compiling</h2>
+
+To cross compile:
+
+ set -a
+ CROSS_COMPILE=${CROSS_COMPILE}
+ ARCH=${TARGET_CPU}
+ KLIB_BUILD=${DEV_PATH}/${LINUX_DIR}
+ KLIB=${TARGET_ROOT_ON_HOST}
+ set +a
+ make oldconfig # menuconfig worked here too
+ make
+ make install
+
+The 'make install' target isn't currently sane for cross-builds due to the bacport_firmware_install script not respecting prefixes. For now you can comment out that script few others like initrd updates, from being run out of the Makefiles.
+
+<h2>Cross compile with Freescale's LTIB</h2>
+
+To get backports happy in LTIB, use UNSPOOF/SPOOF_PATH to switch between host and cross environment. Example <i>Build</i> section in backports.spec
+
+ %Build
+ export PATH=$UNSPOOF_PATH
+
+ make menuconfig prefix=%{_prefix} \
+ CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \
+ ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \
+ KLIB_BUILD=${TOP}/rpm/BUILD/linux
+
+ export PATH=$SPOOF_PATH
+
+ make prefix=%{_prefix} \
+ CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \
+ ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \
+ KLIB_BUILD=${TOP}/rpm/BUILD/linux \ No newline at end of file