diff --git a/README.md b/README.md index 550ab99..963c3d1 100644 --- a/README.md +++ b/README.md @@ -121,54 +121,54 @@ Run a `make oldconfig` with the newest version - Configure environment ```bash -export VERSION=3.17 -export ARCH=arm -export ARTIFACTS=artifacts -``` + export VERSION=3.17 + export ARCH=arm + export ARTIFACTS=artifacts + ``` - Download archive via web ```bash -wget https://kernel.org/pub/linux/kernel/v3.x/linux-$VERSION.tar.xz && tar xf linux-$VERSION.tar.xz + wget https://kernel.org/pub/linux/kernel/v3.x/linux-$VERSION.tar.xz && tar xf linux-$VERSION.tar.xz ``` or via git ```bash -git clone -b v$VERSION --single-branch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-$VERSION -``` + git clone -b v$VERSION --single-branch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-$VERSION + ``` - Generate a base `.config` file by building it ``` -make ARCH=arm mvebu_v7_defconfig -``` + make ARCH=arm mvebu_v7_defconfig + ``` or by fetching our one ``` -wget -O .config https://raw.githubusercontent.com/scaleway/kernel-tools/master/$VERSION/.config -``` + wget -O .config https://raw.githubusercontent.com/scaleway/kernel-tools/master/$VERSION/.config + ``` - Tune the .config ```bash -make ARCH=arm menuconfig -# ... configure using console interface -``` + make ARCH=arm menuconfig + # ... configure using console interface + ``` - Building kernel and modules ```bash -make -j $(echo `nproc` ' * 2' | bc) uImage modules LOADADDR=0x8000 -``` + make -j $(echo `nproc` ' * 2' | bc) uImage modules LOADADDR=0x8000 + ``` - Export the artifacts (kernel, header, modules) to `$ARTIFACTS` directory ```bash -mkdir -p $ARTIFACTS -cp arch/arm/boot/uImage $ARTIFACTS/ -cp System.map $ARTIFACTS/ -cp .config $ARTIFACTS/ -make headers_install INSTALL_HDR_PATH=$ARTIFACTS/ > /dev/null -find $ARTIFACTS/include -name ".install" -or -name "..install.cmd" -delete -make modules_install INSTALL_MOD_PATH=$ARTIFACTS/ > /dev/null -rm -rf $ARTIFACTS/modules && \ + mkdir -p $ARTIFACTS + cp arch/arm/boot/uImage $ARTIFACTS/ + cp System.map $ARTIFACTS/ + cp .config $ARTIFACTS/ + make headers_install INSTALL_HDR_PATH=$ARTIFACTS/ > /dev/null + find $ARTIFACTS/include -name ".install" -or -name "..install.cmd" -delete + make modules_install INSTALL_MOD_PATH=$ARTIFACTS/ > /dev/null + rm -rf $ARTIFACTS/modules && \ mv $ARTIFACTS/lib/modules $ARTIFACTS && \ rmdir $ARTIFACTS/lib && \ rm $ARTIFACTS/modules/*/source $ARTIFACTS/modules/*/build -``` + ``` ### Minimal configuration for C1 servers