mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Cindy Gold <cindy@conduant.com>
Subject: Re: [ptxdist] Using PTXDist to build out-of-tree drivers
Date: Thu, 21 Aug 2014 09:00:47 +0200	[thread overview]
Message-ID: <201408210900.47319.jbe@pengutronix.de> (raw)
In-Reply-To: <CABTmKQvvBZoQ+XD1A_v1hqWyqN7rTG9rW8x23ziTVD9FBwXH5Q@mail.gmail.com>

Hi Cindy,

On Wednesday 20 August 2014 18:30:57 Cindy Gold wrote:
> Sorry, I guess I am not being clear. I have PTXdist installed here:
>
> /usr/local/lib/ptxdist-2013.12.0
>
> Under that directory, there is indeed a "rules" sub-directory.
>
> The Application Note from this link:
>
> http://pengutronix.com/software/ptxdist/appnotes/AppNote_kernel_driver.pdf
>
> under the "Preparations" section says this:
>
> project$ cp <ptxdist-installdir>/rules/templates/kernel/Makefile
> local_src/module-template
>
> project$ cp <ptxdist-installdir>/rules/templates/kernel/*.c
> local_src/module-template

Oh, yes indeed, it is outdated.

> There is no sub-directory called "kernel" under the rules directory in my
> directory /usr/local/lib/ptxdist-2013.12.0/rules.  There are a variety of
> other sub-directories but not one called "kernel". So, it would seem that
> the documentation may perhaps be out of date. My questions are:
>
>    --If the App Note is out of date, is there a newer version available?

Seems I have to re-write it ;)
Alternatively you can read the PTXdist Guru documentation [1], section 4.2.

>   -- If there is not a newer version available, then can you tell me what
> should be updated?

Here we go. Use this way instead:

[jbe@host]> /usr/local/lib/ptxdist-2013.12.0/bin/ptxdist newpackage

usage: 'ptxdist newpackage <type>', where type is:

  host                     create package for development host
  target                   create package for embedded target
  cross                    create cross development package
  klibc                    create package for initramfs built against klibc

  src-autoconf-lib         create autotoolized library
  src-autoconf-prog        create autotoolized binary
  src-autoconf-proglib     create autotoolized binary+library
  src-cmake-prog           create cmake binary
  src-qmake-prog           create qmake binary
  src-linux-driver         create a linux kernel driver
  src-make-prog            create a plain makefile binary
  src-stellaris            create stellaris firmware
  font                     create a font package
  file                     create package to install existing files
  kernel                   create package for an extra kernel
  barebox                  create package for an extra barebox
  image-tgz                create package for a tgz image
  image-genimage           create package for a genimage image

[jbe@host]> /usr/local/lib/ptxdist-2013.12.0/bin/ptxdist newpackage src-linux-driver

ptxdist: creating a new 'src-linux-driver' package:

ptxdist: enter package name...........: mydriver
ptxdist: enter version number.........: 1
ptxdist: enter package author.........: Juergen Borleis <jbe@pengutronix.de>
ptxdist: enter package section........: project_specific

generating rules/mydriver.make
generating rules/mydriver.in

local_src/mydriver-1 does not exist, create? [Y/n] Y
./
./@name@.c
./wizard.sh
./Makefile

Then enable this new package in your menuconfig, modify the file in
"local_src/mydriver-1/mydriver.c", build your rootfs with "ptxdist go".

Happy hacking,
Juergen

[1] http://www.pengutronix.de/oselas/bsp/pengutronix/download/OSELAS.BSP-Pengutronix-Generic-arm-Quickstart.pdf
-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2014-08-21  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 20:51 Cindy Gold
2014-08-20  8:24 ` Marc Kleine-Budde
2014-08-20 16:30   ` Cindy Gold
2014-08-21  7:00     ` Juergen Borleis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201408210900.47319.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=cindy@conduant.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox