Difference between revisions of "KernelDriverProgrammingCourse2015/PreparationDay2"

From RevSpace
Jump to navigation Jump to search
(Created page with "=== Introduction === For the second day of this course we will actually be building our own kernel and work on writing our first own driver. This builds on top of the Kerne...")
 
(Preparation)
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
and work on writing our first own driver. This builds on top of the
 
and work on writing our first own driver. This builds on top of the
 
[[KernelDriverProgrammingCourse2015/Preparations | preparations]] and
 
[[KernelDriverProgrammingCourse2015/Preparations | preparations]] and
[[KernelDriverProgrammingCourse2015/OutlineDay1 | activitiers] from the
+
[[KernelDriverProgrammingCourse2015/OutlineDay1 | activities]] from the
 
first course day.
 
first course day.
  
 
=== Preparation ===
 
=== Preparation ===
  
If you've not done so already first walk through the [[KernelDriverProgrammingCourse2015/Preparations | preparations from day 1].
+
If you've not done so already first walk through the [[KernelDriverProgrammingCourse2015/Preparations | preparations from day 1]].
  
 
Since building a kernel from scratch can take a long time, it is a good idea to build the kernel beforehand:
 
Since building a kernel from scratch can take a long time, it is a good idea to build the kernel beforehand:
Line 17: Line 17:
 
cd linux
 
cd linux
  
1) Update your kernel tree to my latest sunxi-wip branch
+
2) Update your kernel tree to my latest sunxi-wip branch
  
git remote update
+
  git remote update
git checkout -B sunxi-wip jwrdegoede/sunxi-wip
+
  git checkout -B sunxi-wip origin/sunxi-wip
  
2) Make sure that you've the latest kernel configuration:
+
3) Make sure that you've the latest kernel configuration:
  
 
   wget https://fedorapeople.org/~jwrdegoede/kernel-driver-programming/kernel-config
 
   wget https://fedorapeople.org/~jwrdegoede/kernel-driver-programming/kernel-config
 
   mv kernel-config .config
 
   mv kernel-config .config
  
3) And build the kernel
+
4) And build the kernel
  
 
   make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- oldconfig
 
   make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- oldconfig

Latest revision as of 20:14, 5 August 2015

Introduction

For the second day of this course we will actually be building our own kernel and work on writing our first own driver. This builds on top of the preparations and activities from the first course day.

Preparation

If you've not done so already first walk through the preparations from day 1.

Since building a kernel from scratch can take a long time, it is a good idea to build the kernel beforehand:

1) cd into the linux directory:

cd linux

2) Update your kernel tree to my latest sunxi-wip branch

 git remote update
 git checkout -B sunxi-wip origin/sunxi-wip

3) Make sure that you've the latest kernel configuration:

 wget https://fedorapeople.org/~jwrdegoede/kernel-driver-programming/kernel-config
 mv kernel-config .config

4) And build the kernel

 make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- oldconfig
 make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- zImage dtbs

This will take a while, once this is done (assuming there are no errors), you are all set for the second day of the course.

Back to KernelDriverProgrammingCourse2015