Last active
March 1, 2017 11:17
-
-
Save cpegel/b1a28522c4a741ab4578 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extract linux-3.16 to $linux | |
# extract rtai-4.1 to $rtai | |
# have .config ready at $config | |
# patch kernel | |
cd $linux | |
patch -p1 < $rtai/base/arch/x86/patches/hal-linux-3.16-x86-3.patch | |
# configure kernel | |
cp $config .config | |
make oldconfig # press enter for every question | |
make menuconfig # set local version to something like "-rtai-4.1" | |
# disable module versioning support | |
# compile kernel | |
make # make sure to use gcc < 5 for linux-3.16 | |
# install kernel and modules | |
make install # or just copy bzImage where you need it | |
# e.g. /boot/vmlinuz-linux-3.16-rtai-4.1 | |
# we will refer to this path as $kernelimage | |
make modules_install | |
# create initramfs if necessary (depends on your linux distribution) | |
# for archlinux: | |
mkinitcpio -k $kernelimage -c /etc/mkinitcpio.conf -g /boot/initramfs-3.16-rtai-4.1.img | |
# configure boot loader and reboot with rtai-4.1 kernel | |
# you might need to run depmod -a after the first boot | |
# and reboot to get all modules to load correctly | |
# build and install rtai | |
cd $rtai | |
make menuconfig # make sure the path to linux source tree is correct | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment