Skip to content

vgonisanz/rpi-mske

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

************************************
Raspberry PI Most Stupid Kernel Ever 
************************************

A simple kernel from scratch is something that I've always wanted to do.
This not pretend to be something big but big enough to undertand how a lot of stuff really works.
Because I have a Raspberry Pi model B this is the target platform.

= HOW TO COMPILE =

You need to install arm crosscompiler arm-none-eabi-gcc package to be able to compile the sources.

$ mkdir build
$ cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=/absolute_path_to/rpi-mske/toolchain/toolchain-arm-none-eabi-rpi.cmake ..
$ make

Binary kernel.img file should be created.

= HOW TO DEPLOY IN THE TARGET =

There are two methods to be able to deploy built kernel in the target.

== Manually ==

Generated kernel.img is the image you have to use as your kernel image.

Create a sdcard with a fat partition and add the files included in sd_boot directory.
Add kernel.img to the partition too.

== Create_sdcard script ==

There is a script in tools directory that allows you to generate a bootable sdcard. Invoke it without params shows script's help.

$ sudo ./create_sdcard.sh 

Usage: ./create_sdcard.sh -k <kernel_img_file> -d <sdcard_device>

So, if your device is /dev/sdb the following command will generate the bootable sdcard.

$ ./create_sdcard.sh -k ../build/kernel.img -d /dev/sdb

Boot your pi connected with ftdi cable to gpio and use minicom or other terminal program to view boot process.

Enjoy!

About

Raspberry Pi Most Stupid Kernel Ever

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.3%
  • C++ 6.2%
  • Assembly 5.0%
  • CMake 4.5%