kernel_build
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| kernel_build [2025/01/21 23:01] – ounsatn | kernel_build [2025/01/21 23:45] (current) – ounsatn | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| Extract kernel source 5.15 with | Extract kernel source 5.15 with | ||
| < | < | ||
| + | |||
| + | it will create a folder linux-5.15, this is what i call __**source tree**__ ( or kernel source ) | ||
| {{http:// | {{http:// | ||
| - | |||
| - | |||
| - | |||
| - | |||
| Line 52: | Line 50: | ||
| </ | </ | ||
| - | apply dos2unix on each patches and in folder patches ( extracted from patches-5.15.86-rt56) | + | You should have something like this : |
| - | < | + | |
| + | {{http:// | ||
| + | |||
| + | |||
| + | apply dos2unix on each patches, and in folder patches ( extracted from patches-5.15.86-rt56) | ||
| + | < | ||
| + | cd patches | ||
| dos2unix *.patch </ | dos2unix *.patch </ | ||
| - | Go to kernel | + | __Go to kernel |
| Line 67: | Line 71: | ||
| </ | </ | ||
| - | now you have 5.15.89-rt56 | + | Order is : 5.15.86, Rtpatch 5.15.86-rt56 , 5.15.86-87 , 5.15.87-88 , 5.15.88-89 |
| + | Now we have 5.15.89-rt56 8-) | ||
| - | go to source tree folder : | + | |
| + | __stay in source tree folder :__ | ||
| Change localversion in file localversion-rt | Change localversion in file localversion-rt | ||
| < | < | ||
| + | {{http:// | ||
| + | |||
| Get kernel config from AkaiForce kernel : this file is named config.gz and we can find it in /proc/ (on AKF ) | Get kernel config from AkaiForce kernel : this file is named config.gz and we can find it in /proc/ (on AKF ) | ||
| - | gunzip | + | unzip the file with gunzip |
| < | < | ||
| - | It gives a config | + | It gives a file named " |
| - | Copy this file in source tree with .config name. | + | Copy this file in source tree folder as **".config" |
| - | + | go to source tree folder | |
| - | go to source tree to build menuconfig | + | |
| < | < | ||
| + | {{http:// | ||
| - | .config taken from force changed feature like : | ||
| - | - General Setup / Local version string, now it's empty (let it empty ) | + | .config taken from force has features like : |
| - | - General Setup / Preemption model => Fully Preemptible Kernel ( Real-Time ) : this give the rt56. | + | |
| + | - General Setup / Local version string, now it's empty (let it empty ) | ||
| + | |||
| + | - General Setup / Preemption model => Fully Preemptible Kernel ( Real-Time ) : this give the rt features. | ||
| this option is only available after patching with rt56 patch. | this option is only available after patching with rt56 patch. | ||
| + | |||
| + | ( and of course other features ...) | ||
| + | |||
| + | |||
| + | {{http:// | ||
| + | {{http:// | ||
| + | {{http:// | ||
| + | |||
| - | As we have the kernel configuration, | + | As we have the kernel configuration, |
| - | To test kernel, i will compile a module which is not there by default , I will do it with " | + | To test kernel |
| - | It's in : DeviceDrivers | + | It's in : DeviceDrivers >> Input device support >> Joystick Interface |
| Just put a M like below , then save & Exit menuconfig | Just put a M like below , then save & Exit menuconfig | ||
| - | Now when your back in source tree type | + | {{http:// |
| + | |||
| + | |||
| + | Now when your back in source tree folder | ||
| < | < | ||
| - | then go to your module folder in source tree. | + | {{http:// |
| - | For joystick it's in / | + | |
| + | Then go to your module folder in source tree. | ||
| + | For joystick | ||
| and launch : | and launch : | ||
| - | < | ||
| - | Make detect | + | < |
| + | syntax is : make -C < | ||
| + | |||
| + | so i do : | ||
| + | ~/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | {{http:// | ||
| + | |||
| + | |||
| + | Make detects that you have checked | ||
| + | |||
| + | |||
| + | {{http:// | ||
| Then you have your module. | Then you have your module. | ||
| + | |||
| you can check version in module with command | you can check version in module with command | ||
| < | < | ||
| + | {{http:// | ||
| Now it's time to copy module on your force. | Now it's time to copy module on your force. | ||
| + | |||
| On AKF : | On AKF : | ||
| + | |||
| remount / partition in rw : | remount / partition in rw : | ||
| + | |||
| < | < | ||
| + | |||
| copy module file to / | copy module file to / | ||
| - | Each time i copy a module, i try to respect the source tree path, so if you don't have drivers/ | + | Each time i copy a module, i try to respect the source tree path, so if you don't have **drivers/ |
| - | then do command depmod | + | then do command depmod |
| < | < | ||
| + | Issue command lsmod to see current loaded modules : | ||
| + | |||
| + | {{http:// | ||
| + | |||
| + | do modprobe joydev | ||
| + | |||
| + | Issue it again, tadaaaa it's there. | ||
| + | {{http:// | ||
kernel_build.1737496912.txt.gz · Last modified: 2025/01/21 23:01 by ounsatn