Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Rosen <jeremy.rosen@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Raspaudio : how to use buildroot as a git submodule
Date: Mon, 10 Mar 2014 10:00:37 +0100 (CET)	[thread overview]
Message-ID: <1612641374.11268842.1394442036999.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <1436673405.11266711.1394440215222.JavaMail.root@openwide.fr>

Hello everybody

For some time I have been looking into how to integrate buildroot in a project
where buildroot would be the engine to provide the filesystem building 
infrastructure but where the main repository would not be a clone of the 
buildroot project. The idea is to try to separate cleanly what is meant to
go upstream from what is not and still be able to use git to properly save
the data that is closely linked to the project

I have now reached a point where things "simply works" and I can show my work
to the bigger buildroot community.


I will first introduce the project itself, then i'll discuss how to create
your own project based on that infrastructure and then I'll discuss what
could be upstreamed from the project and how


So, with no further delay, let's introduce Raspaudio.

Raspaudio is a small project that builds a filesystem for the raspberry pi
which allows you to easily stream audio content from the pulseaudio server
on your desktop to the audio output of the raspberry pi. Compile the 
filesystem, plug the raspberry, configure the PC, you're done.

Details on these steps can be found at 

http://openwide-ingenierie.github.io/raspaudio/

I won't go further than that in the project, the idea is that this is a
"finished" buildroot project. you clone it, you compile it, you install
it.

   $ git clone --recursive git at github.com:Openwide-Ingenierie/raspaudio.git
   $ cd raspaudio
   $ make


HOW TO REUSE THE RASPAUDIO INFRASTRUCTURE

The whole point of raspaudio is to test the buildroot infrastructure and 
provide an example that is reusable for other projects. If you want to 
make a similar project, here is how to do it

  $ mkdir new_project
  $ cd new_project
  $ git init
  $ git submodule add git://git.buildroot.net/buildroot buildroot
  $ wget https://raw.github.com/Openwide-Ingenierie/raspaudio/master/Makefile
  $ touch Config.in
  $ touch external.mk
  $ echo "output/" > .gitignore
  $ echo "dl/" >> .gitignore

Change the field PROJECT_NAME in the Makefile to the name of your project

  $ git add Makefile external.mk Config.in .gitignore
  $ git commit -m"Project infrastructure"

You can now configure your project in the usual buildroot way. For example :

  $ make raspberrypi_defconfig
  $ make menuconfig

A file named $(PROJECT_NAME)_defconfig will appear. Add this project to git
You can now work with your project in the usual way and all the important
information will be saved in git.

I tried to make the whole thing as close to the buildroot way as possible, 
all Makefile targets should work properly and most infrasturcture variables
(DL_DIR, BR2_EXTERNAL...) are set for you. This is here to help you quickly 
have the infrastructure in place to deploy your own projects based on buildroot.


WHERE TO GO FROM HERE

The main thing I have noticed is that I have been developing post-build scripts
that are completely generic and could easily be reused. It would be nice to 
upstream these scripts (in particular, the script that automatically adds the 
public key of the user doing the build to the authorized keys on the target)

I am also developing an external Config.in that allows generating 
/etc/network/interfaces via menuconfig. This would also be nice to upstream,
maybe in a "contrib" subdirectory.

Next, the Makefile of raspaudio (which is the core of the 
reusable infrastructure) could also be kept by buildroot. This would bring
all the good sides of upstreaming (up to date with buildroot, not lost
in a third party website etc...) I'd like that to happen but I can understand 
if this is not the direction the project wants to go.

Last but not least, I am not a Makefile expert. I did things the way I was 
able to, but I'm sure there are better ways to do that. So feel free to
suggest a better way to integrate stuff


    Regards

    J?r?my Rosen

fight key loggers : write some perl using vim


Open Wide Ingenierie

23, rue Daviel
75013 Paris - France
www.openwide.fr

       reply	other threads:[~2014-03-10  9:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1436673405.11266711.1394440215222.JavaMail.root@openwide.fr>
2014-03-10  9:00 ` Jeremy Rosen [this message]
2014-03-10 15:30   ` [Buildroot] Raspaudio : how to use buildroot as a git submodule Alvaro Gamez
2014-03-10 15:38     ` Jeremy Rosen
2014-09-26  9:00       ` Alvaro Gamez
2014-09-26 11:56         ` Jeremy Rosen
2014-10-01  9:11           ` Alvaro Gamez
2014-10-01 12:58             ` Jeremy Rosen
2014-10-01 14:08               ` Jeremy Rosen
2014-10-01 14:18                 ` Alvaro Gamez
2014-10-01 14:37                   ` Jeremy Rosen
2014-10-02  9:53                     ` Alvaro Gamez
2014-10-02 10:10                       ` Jeremy Rosen
2014-10-03  8:03                         ` Jeremy Rosen
2014-10-08  8:19                           ` Alvaro Gamez
2014-10-08 10:11                             ` Jeremy Rosen
2014-10-15 17:42                               ` Arnout Vandecappelle
2014-10-16  8:18                                 ` Jeremy Rosen

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=1612641374.11268842.1394442036999.JavaMail.root@openwide.fr \
    --to=jeremy.rosen@openwide.fr \
    --cc=buildroot@busybox.net \
    /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