LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-23-2017, 11:30 PM   #1
mkitby
LQ Newbie
 
Registered: Jan 2017
Posts: 1

Rep: Reputation: Disabled
How to get a custom minimal kernel configuration


Hello,

I need to get a minimal kernel runing on an embedded hardware. the machine cpu is NXP i.MX7, it should support,
I2C
USB device for micro SD Card MSD mode
micro SD card, FAT file system
4.7 LCD with LCDIF
power management
video camera with MIPI DSI
matrix keypad
GPIO
ADC
PWM

The system is set up to run qt program after power up. So I want to get a clean and minimal kernel configuration, only includes above sutffs, no network, no wifi, no bluetooth, etc, just keep the kernel as small as possible.

Can anyone having the same experience how to make it.
 
Old 01-24-2017, 01:41 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
1) Download your kernel.
2) Unpack it in your home directory.
3) Go into the linux-x.y.z directory.
4) Run make defconfig to get a starting file for your configuration.
5) Run make menuconfig
6) Browse the menus and remove what you don't want. A lot of the stuff you mention will be in the drivers section. Use the very good built-in help to determine what is safe to remove.
7) Run make.
8) As root, run make modules_install and copy the bzImage in the arch/your_architecture tree into /boot.
 
Old 01-24-2017, 02:10 AM   #3
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
lspci -v

on terminal to check, what PCI hardware support you need.
 
Old 01-24-2017, 02:11 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
additionally build all of your required modules into the kernel (so do not use loadable modules if not needed).
 
Old 01-24-2017, 02:38 AM   #5
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Does your hardware have sound support?

I yes, then you should build the sound support (ALSA) as module.

Last edited by Keruskerfuerst; 01-24-2017 at 09:29 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up custom CentOS minimal ISO 007stealth Linux - Newbie 3 10-03-2013 07:21 AM
minimal list of RPMS to create own custom linux JD Nimavat Linux - Kernel 10 05-02-2013 07:25 PM
GUI net configuration not working with custom liquorix kernel but does with ifconfig aabmass Linux - General 0 03-28-2012 09:51 PM
Custom Minimal Distro for Older Laptop usul.the.mouse Linux - General 1 03-31-2009 11:23 AM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration