On Tue, Nov 22, 2011 at 11:35 PM, Jeff Krasky
>> Ok. I guess the EtherCAT stuff is not open-source, unfortunately.
> This is what I am working with:
>> What you should do is create a Buildroot package
> Ok, this is where it becomes new for me. Is this the "only way" or the
> "most convenient" way, or the "simplest way" for someone not that
> with BuildRoot?
I would say it's both.
Below is an example package .mk file for a kernel module. It uses the
GENTARGETS infrastructure to explicitly specify the commands that
should be executed when building and installing.
Depending on the organization of EtherCAT, it may be a good idea to
create two packages: one for the application and one for the kernel
modules. It will probably make the .mk files a tad simpler.
FOOMODULE_VERSION = 0.1.2
FOOMODULE_SOURCE = foomodule-$(FOOMODULE_VERSION).tar.gz
FOOMODULE_SITE = http://yoursite
FOOMODULE_DEPENDENCIES = linux
FOOMODULE_INSTALL_MOD_DIR = foo
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) \
$(eval $(call GENTARGETS))
Documentation on adding packages is available here:
If the EtherCAT application uses autotools (i.e. when it has files
like configure.in, configure.ac, Makefile.in, Makefile.am) then you
can use the AUTOTOOLS infrastructure for that part. The modules should
be done with GENTARGETS.