pastebin - collaborative debugging tool
rovema.kpaste.net RSS


Build Debian kernel manually from source
Posted by Anonymous on Thu 10th Mar 2022 11:51
raw | new post
view followups (newest first): Build Debian kernel manually from source by Anonymous
modification of post by Anonymous (view diff)

  1. #!/usr/bin/ksh93
  2.  
  3. #
  4. # Build Debian RT kernel from source,
  5. # and retain the kernel build including source and *.o
  6. # files so we can build custom kernel modules from
  7. # that
  8. #
  9.  
  10. set -o xtrace
  11. set -o errexit
  12.  
  13. integer num_cpus=$(getconf '_NPROCESSORS_CONF')
  14.  
  15. # mkdir try5 && cd try5/                                                   
  16.  
  17. tar xf /usr/src/linux-source-5.10.tar.xz
  18.  
  19. cd linux-source-5.10
  20.  
  21. unxz </usr/src/linux-patch-5.10-rt.patch.xz | patch -p1
  22.  
  23. cp /usr/src/linux-config-5.10/config.amd64_rt_amd64.xz .
  24. unxz config.amd64_rt_amd64.xz
  25.  
  26. # copy config and make kernel build accept it without
  27. # jumping to the $ make menu # menu
  28. cp config.amd64_rt_amd64 .config
  29. make oldconfig <'/dev/null'
  30.  
  31. make clean
  32.  
  33. time nice -n 19 make -j$((num_cpus*2)) deb-pkg 2>&1 | tee -a buildlog.log
  34.  
  35. print '#### Finished!!'
  36. # EOF.

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at