Skip to content

Linux Device Driver example re-writes against the latest Linux kernel

Notifications You must be signed in to change notification settings

keithnoguchi/ldd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Device Drivers in Action

CircleCI

LDD in action!

Drivers/Modules

Character Device Drivers

Debugging Primitive Test Modules

Concurrency Primitive Test Modules

Advanced Character Device Drivers

Time, Delays, and Deferred Work

Memory related modules

Build

$ make
make -C /lib/modules/5.0.6.1/build M=/home/kei/git/ldd modules
make[1]: Entering directory '/home/kei/src/linux-5.0.6'
  CC [M]  /home/kei/git/ldd/scull.o
  CC [M]  /home/kei/git/ldd/sleepy.o
  CC [M]  /home/kei/git/ldd/ldd.o
  CC [M]  /home/kei/git/ldd/sculld.o
  Building modules, stage 2.
  MODPOST 4 modules
  CC      /home/kei/git/ldd/ldd.mod.o
  LD [M]  /home/kei/git/ldd/ldd.ko
  CC      /home/kei/git/ldd/scull.mod.o
  LD [M]  /home/kei/git/ldd/scull.ko
  CC      /home/kei/git/ldd/sculld.mod.o
  LD [M]  /home/kei/git/ldd/sculld.ko
  CC      /home/kei/git/ldd/sleepy.mod.o
  LD [M]  /home/kei/git/ldd/sleepy.ko
make[1]: Leaving directory '/home/kei/src/linux-5.0.6'

Test

$ sudo make run_tests
make -C /lib/modules/5.0.6.1/build M=/home/kei/git/ldd modules_install
make[1]: Entering directory '/home/kei/src/linux-5.0.6'
  INSTALL /home/kei/git/ldd/ldd.ko
  INSTALL /home/kei/git/ldd/scull.ko
  INSTALL /home/kei/git/ldd/sculld.ko
  INSTALL /home/kei/git/ldd/sleepy.ko
  DEPMOD  5.0.6.1
make[1]: Leaving directory '/home/kei/src/linux-5.0.6'
for mod in scull sleepy ldd sculld; do modprobe $mod; done
make -C tests top_srcdir=/lib/modules/5.0.6.1/build OUTPUT=/home/kei/git/ldd/tests \
        CFLAGS="-I/lib/modules/5.0.6.1/build/tools/testing/selftests -I/home/kei/git/ldd" run_tests
make[1]: Entering directory '/home/kei/git/ldd/tests'
TAP version 13
selftests: tests: sculld_test
========================================
Pass 44 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..44
ok 1..1 selftests: tests: sculld_test [PASS]
selftests: tests: sleepy_test
========================================
Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..3
ok 1..2 selftests: tests: sleepy_test [PASS]
selftests: tests: ldd_test
========================================
Pass 2 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..2
ok 1..3 selftests: tests: ldd_test [PASS]
selftests: tests: scull_test
========================================
Pass 28 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..28
ok 1..4 selftests: tests: scull_test [PASS]
make[1]: Leaving directory '/home/kei/git/ldd/tests'

Cleanup

sudo make clean

Happy Hacking!

About

Linux Device Driver example re-writes against the latest Linux kernel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published