Welcome to the Linux Foundation Forum!

A simple shell script that checks minimal requirement to compile Linux kernel

kaiwong
kaiwong Posts: 1
edited May 2020 in LFD103 Class Forum

I have just learnt about shell and lfd103, and I write this script to check minimal requirement.

How to use?

  1. Download the script from my gist.
  2. chmod +x checklinuxbuildminimalrequirement.sh
  3. ./ checklinuxbuildminimalrequirement.sh

Comments

  • coop
    coop Posts: 915

    Nice idea. However, I'm not sure how you generated the list of requirements and I know some are missing, such as the elf and ssl development utilities which are needed for kernel compilation, and you certainly don't need pcmciautils since I don't think anyone has needed a PCMCIA card for a long time. The file "Documentation/CHANGES" lists requirements but tends to be out of date. You could use the ready-for.sh script at https://training.linuxfoundation.org/cm/prep page and run it as in ./ready-for.sh --install LFD420 (LFD420 is a kernel devel course) and probably you'll get what you need. However, if you really want to know for learning purposes exactly what you need that is somewhat of a sledgehammer

  • ozlevi
    ozlevi Posts: 7
    edited January 27

    @coop said:
    Nice idea. However, I'm not sure how you generated the list of requirements and I know some are missing, such as the elf and ssl development utilities which are needed for kernel compilation, and you certainly don't need pcmciautils since I don't think anyone has needed a PCMCIA card for a long time. The file "Documentation/CHANGES" lists requirements but tends to be out of date. You could use the ready-for.sh script at https://training.linuxfoundation.org/cm/prep page and run it as in ./ready-for.sh --install LFD420 (LFD420 is a kernel devel course) and probably you'll get what you need. However, if you really want to know for learning purposes exactly what you need that is somewhat of a sledgehammer

    While taking the "A Beginner's Guide to Linux Kernel Development (LFD103)" course. think that your comment should be mentioned in "Chapter 5 - Configuring Your Development System."

    in the "Minimal requirements to compile the Kernel" page: "https://www.kernel.org/doc/html/latest/process/changes.html" there should be a command that includes all the packages, which will make it easier to validate your workspace.

    For Debain:
    sudo apt-get install pahole util-linux kmod e2fsprogs jfsutils reiserfsprogs xfsprogs squashfs-tools btrfs-progs pcmciautils quota ppp mount procps udev grub-legacy iptables openssl libssl-dev bc cpio tar

    the mcelog isn't working for me.

  • ozlevi
    ozlevi Posts: 7

    @ShuahKhanLF > @ozlevi said:

    @coop said:
    Nice idea. However, I'm not sure how you generated the list of requirements and I know some are missing, such as the elf and ssl development utilities which are needed for kernel compilation, and you certainly don't need pcmciautils since I don't think anyone has needed a PCMCIA card for a long time. The file "Documentation/CHANGES" lists requirements but tends to be out of date. You could use the ready-for.sh script at https://training.linuxfoundation.org/cm/prep page and run it as in ./ready-for.sh --install LFD420 (LFD420 is a kernel devel course) and probably you'll get what you need. However, if you really want to know for learning purposes exactly what you need that is somewhat of a sledgehammer

    While taking the "A Beginner's Guide to Linux Kernel Development (LFD103)" course. think that your comment should be mentioned in "Chapter 5 - Configuring Your Development System."

    in the "Minimal requirements to compile the Kernel" page: "https://www.kernel.org/doc/html/latest/process/changes.html" there should be a command that includes all the packages, which will make it easier to validate your workspace.

    For Debain:
    sudo apt-get install pahole util-linux kmod e2fsprogs jfsutils reiserfsprogs xfsprogs squashfs-tools btrfs-progs pcmciautils quota ppp mount procps udev grub-legacy iptables openssl libssl-dev bc cpio tar

    the mcelog isn't working for me.

    @ShuahKhanLF

  • ozlevi
    ozlevi Posts: 7

    +libelf-dev

Categories

Upcoming Training