linux uart driver

Norman Feske norman.feske at ...1...
Thu Feb 16 10:48:00 CET 2017


Hi Prashanth,

> I'm exploring writing a simple uart driver for linux in order
> to get terminal_mux working on linux.  When I disable the linux spec
> check in terminal_mux.run, the build always picks up:
> 
>   Program drivers/uart/spec/x86/uart_drv
> 
> even though I created a drivers/uart/spec/linux/
> 
> and changed drivers/uart/spec/linux/target.mk to read
> 
>  REQUIRES = linux
> 
> and the etc/specs.conf in the build directory to read:
> 
>  SPECS += linux x86_64
> 
> I'd like to know how I can get the build to say
> 
>   Program drivers/uart/spec/linux/uart_drv

I suspect that the build system actually picks up and builds both
targets because each of them meets the SPECS as defined for the build
directory. The problem is that the targets are named the same. So the
symlink in '<build-dir>/bin' is overwriten by the target last visited.
To check this assumption, you may have a look at the content of the
build locations for the two drivers in question:

  <build-dir>/drivers/uart/spec/linux
  <build-dir>/drivers/uart/spec/x86

I presume that each of those locations contains the respective executable.

The best way to solve the ambiguity would be to give your driver a
distinct name, e.g., by adding the following line in your
'spec/linux/target.mk' file:

  TARGET = linux_uart_drv

Now, both drivers should appear in the bin/ directory side by side.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list