make a simple device driver

Russell Haley russ.haley at gmail.com
Mon Jul 6 05:45:03 UTC 2015


Hello again,

I'm still waiting to get my hands on my hummingboard but I started to
look into device drivers by following the handbook. I have done the
following on a source listing for CURRENT:

1) Created folder called echo_driver under /usr/src/sys/dev
2) Created new file called echo_driver.c with the code pasted from
this handbook page:
  https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-char.html
3) created a make file with these contents:

SRCS=    echo_driver.c
KMOD=    echo_driver

.include <bsd.kmod.mk>

as per the Handbook
https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-kld.html

when I run make under /usr/src/sys/dev/echo_driver I get the following error:

make: don't know how to make auto.obj.mk. Stop

make: stopped in /usr/src/sys/dev/echo_driver


I tried drilling through the makefile dependencies as best as I
understood it and saw that
/usr/src/share/mk contains the BSD make files (good to know!) and in
the file auto.obj.mk is the first file in Makefile.


Any help would be great.

Thanks,

Russ


More information about the freebsd-arm mailing list