* [Buildroot] equivalent of a 'make modules' @ 2011-11-22 20:51 Jeff Krasky 2011-11-22 22:04 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-22 20:51 UTC (permalink / raw) To: buildroot Hello, I am working with another program that builds itself against the kernel. I am using BuildRoot for making the kernel and filesystem. It is believed that the next step would be to do something like a "make modules" command so that the kernel and filesystem can be rebuilt with this other program's information in it. In Buildroot, where I normally do the 'make' command, I tried 'make modules' and got this message: "No rule to make target 'modules'. Stop." Is there an equivalent? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111122/44bd57ee/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 20:51 [Buildroot] equivalent of a 'make modules' Jeff Krasky @ 2011-11-22 22:04 ` Thomas Petazzoni 2011-11-22 22:11 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-22 22:04 UTC (permalink / raw) To: buildroot Le Tue, 22 Nov 2011 14:51:53 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > I am working with another program that builds itself against the > kernel. I am using BuildRoot for making the kernel and filesystem. > It is believed that the next step would be to do something like a > "make modules" command so that the kernel and filesystem can be > rebuilt with this other program's information in it. Can you expand on what this program is ? With your information, it's a bit hard to understand what you're trying to achieve, and therefore to give you possible solutions. > In Buildroot, where I normally do the 'make' command, I tried 'make > modules' and got this message: 'modules' is a target of the Linux build system. Buildroot has different targets, because Buildroot does a different job than the Linux build system. We really need more information about what your program is, how it relates to the kernel build process, etc. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 22:04 ` Thomas Petazzoni @ 2011-11-22 22:11 ` Jeff Krasky 2011-11-22 22:29 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-22 22:11 UTC (permalink / raw) To: buildroot >> I am working with another program that builds itself against the >> kernel. I am using BuildRoot for making the kernel and filesystem. >> It is believed that the next step would be to do something like a >> "make modules" command so that the kernel and filesystem can be >> rebuilt with this other program's information in it. > >Can you expand on what this program is ? EtherCAT. I think it should have some kernel modules, be built against the kernel source, etc. A command like 'make modules_install install' can be part of building for Linux PC. Generally what I am doing is building EtherCAT and pointing it to the buildroot directory for the kernel sources. Then when EtherCAT build finishes, I go back into BuildRoot and run make and the filesystem has been updated. But when I try and run, I get a modules not found error. So the thought is I need to do a make install type of command. Thanks, Jeff ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 22:11 ` Jeff Krasky @ 2011-11-22 22:29 ` Thomas Petazzoni 2011-11-22 22:35 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-22 22:29 UTC (permalink / raw) To: buildroot Le Tue, 22 Nov 2011 16:11:45 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > EtherCAT. I think it should have some kernel modules, be built > against the kernel source, etc. A command like 'make modules_install > install' can be part of building for Linux PC. > > Generally what I am doing is building EtherCAT and pointing it to the > buildroot directory for the kernel sources. Then when EtherCAT build > finishes, I go back into BuildRoot and run make and the filesystem > has been updated. > > But when I try and run, I get a modules not found error. So the > thought is I need to do a make install type of command. Ok. I guess the EtherCAT stuff is not open-source, unfortunately. What you should do is create a Buildroot package that builds EtherCAT against the Linux kernel built by Buildroot. Within a package, you can access the location of the built kernel tree using the $(LINUX_DIR) variable. Remember to depend on the "linux" package to make sure it is built before your "ethercat" package. I would happily help you with more details, but without access to the EtherCAT source code, it's going to be a bit difficult. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 22:29 ` Thomas Petazzoni @ 2011-11-22 22:35 ` Jeff Krasky 2011-11-23 7:19 ` Thomas De Schampheleire 2011-11-23 8:25 ` [Buildroot] equivalent of a 'make modules' Thomas Petazzoni 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-22 22:35 UTC (permalink / raw) To: buildroot > Ok. I guess the EtherCAT stuff is not open-source, unfortunately. This is what I am working with: http://www.etherlab.org/en/ethercat/index.php > 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 familiar with BuildRoot? Thanks, Jeff ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 22:35 ` Jeff Krasky @ 2011-11-23 7:19 ` Thomas De Schampheleire 2011-11-23 21:38 ` [Buildroot] LIBFOO_SITE in .mk file Jeff Krasky 2011-11-23 8:25 ` [Buildroot] equivalent of a 'make modules' Thomas Petazzoni 1 sibling, 1 reply; 81+ messages in thread From: Thomas De Schampheleire @ 2011-11-23 7:19 UTC (permalink / raw) To: buildroot On Tue, Nov 22, 2011 at 11:35 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> Ok. I guess the EtherCAT stuff is not open-source, unfortunately. > > This is what I am working with: > > http://www.etherlab.org/en/ethercat/index.php > > >> 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 familiar > 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 define FOOMODULE_BUILD_CMDS $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules endef define FOOMODULE_INSTALL_TARGET_CMDS $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) \ INSTALL_MOD_STRIP=1 \ INSTALL_MOD_DIR=$(FOOMODULE_INSTALL_MOD_DIR) \ modules_install endef define FOOMODULE_UNINSTALL_TARGET_CMDS rm -rf $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/$(FOOMODULE_INSTALL_MOD_DIR) endef $(eval $(call GENTARGETS)) Documentation on adding packages is available here: http://buildroot.uclibc.org/buildroot.html#add_packages 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. Best regards, Thomas ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-23 7:19 ` Thomas De Schampheleire @ 2011-11-23 21:38 ` Jeff Krasky 2011-11-23 22:43 ` Jeff Krasky 2011-11-24 8:15 ` Thomas De Schampheleire 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-23 21:38 UTC (permalink / raw) To: buildroot According to the documentation for making the .mk file (http://buildroot.uclibc.org/buildroot.html#autotools-tutorial), what is the syntax for specifying a local (hard drive location) of the .bz2 file? LIBFOO_SITE = http://www.foosoftware.org/download Is the example given. Can I just do something like LIBFOO_SITE = /home/libfoo.tar.bz2 ? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-23 21:38 ` [Buildroot] LIBFOO_SITE in .mk file Jeff Krasky @ 2011-11-23 22:43 ` Jeff Krasky 2011-11-24 8:15 ` Thomas De Schampheleire 1 sibling, 0 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-23 22:43 UTC (permalink / raw) To: buildroot In addition to the previous email (about LIBFOO) I followed the instructions for making a package subdirectory (I called it EtherCAT), made a Config.in file for it, added 'source "package/EtherCAT/Config.in"' to package/Config.in and made the EtherCAT.mk file. I then ran 'make menuconfig' again and selected ethercat. Now when I 'make', I get this error. I will post the Config.in and EtherCAT.mk below. user1 at linux-0mmn:~/buildroot-2011.05> make /usr/bin/make -j2 HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig make[1]: Entering directory `/home/user1/buildroot-2011.05' KCONFIG_AUTOCONFIG=/home/user1/buildroot-2011.05/output/build/buildroot-conf ig/auto.conf KCONFIG_AUTOHEADER=/home/user1/buildroot-2011.05/output/build/buildroot-conf ig/autoconf.h KCONFIG_TRISTATE=/home/user1/buildroot-2011.05/output/build/buildroot-config /tristate.config BUILDROOT_CONFIG=/home/user1/buildroot-2011.05/.config /home/user1/buildroot-2011.05/output/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]: Leaving directory `/home/user1/buildroot-2011.05' >>> ethercat 1.0 Downloading /home/user1/Desktop/EtherCAT4Atmel/etherlabmaster-4adb56c4198d.tar.bz2: Scheme missing. >>> ethercat 1.0 Extracting bzcat: Can't open input file /home/user1/buildroot-2011.05/dl/etherlabmaster-4adb56c4198d.tar.bz2: No such file or directory. tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors make: *** [/home/user1/buildroot-2011.05/output/build/ethercat-1.0/.stamp_extracted] Error 2 user1 at linux-0mmn:~/buildroot-2011.05> The code originally came in as a .bz2 file. I unzipped it into a .tar file, then extracted it. I then used the .tar file to convert it back to bz2 using bzip2 shell command. Now it is not recognized? I get the same type of error if I put it back as a tar file and use gzip to make a .gz extension. Thoughts? Here are the files: Config.in -------------------------------------------------------- config BR2_PACKAGE_ETHERCAT bool "ethercat" help Tries to build EtherCAT into the Linux image. EtherCAT.mk ---------------------------------------------------------- ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-4adb56c4198d.tar.gz ETHERCAT_SITE = /home/user1/Desktop/EtherCAT4Atmel ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic #####LIBFOO_DEPENDENCIES = libglib2 host-pkg-config $(eval $(call AUTOTARGETS,package,ethercat)) -----Original Message----- From: buildroot-bounces@busybox.net [mailto:buildroot-bounces at busybox.net] On Behalf Of Jeff Krasky Sent: Wednesday, November 23, 2011 3:39 PM To: buildroot at busybox.net Subject: [Buildroot] LIBFOO_SITE in .mk file According to the documentation for making the .mk file (http://buildroot.uclibc.org/buildroot.html#autotools-tutorial), what is the syntax for specifying a local (hard drive location) of the .bz2 file? LIBFOO_SITE = http://www.foosoftware.org/download Is the example given. Can I just do something like LIBFOO_SITE = /home/libfoo.tar.bz2 ? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-23 21:38 ` [Buildroot] LIBFOO_SITE in .mk file Jeff Krasky 2011-11-23 22:43 ` Jeff Krasky @ 2011-11-24 8:15 ` Thomas De Schampheleire 2011-11-28 15:07 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Thomas De Schampheleire @ 2011-11-24 8:15 UTC (permalink / raw) To: buildroot On Wed, Nov 23, 2011 at 10:38 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: > According to the documentation for making the .mk file > (http://buildroot.uclibc.org/buildroot.html#autotools-tutorial), what is the > syntax for specifying a local (hard drive location) of the .bz2 file? > > LIBFOO_SITE = http://www.foosoftware.org/download > > Is the example given. ?Can I just do something like > > LIBFOO_SITE = /home/libfoo.tar.bz2 You can use LIBFOO_SITE = file:///home/libfoo.tar.bz2 (note the three slashes; two from the scheme, the third one for an absolute path) Note that using file:// will not really help other people, except if they have access to the same filesystem. You may consider using an http/ftp server, or an scp url. Best regards, Thomas ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-24 8:15 ` Thomas De Schampheleire @ 2011-11-28 15:07 ` Jeff Krasky 2011-11-28 15:11 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 15:07 UTC (permalink / raw) To: buildroot > You can use > > LIBFOO_SITE = file:///home/libfoo.tar.bz2 > > (note the three slashes; two from the scheme, the third one for an > absolute path) One issue now is that 'make' in Buildroot doesn't seem to find this file and put it in the download directory. Here is EtherCAT.mk: ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster.tar.bz2 ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic #####LIBFOO_DEPENDENCIES = libglib2 host-pkg-config $(eval $(call AUTOTARGETS,package,ethercat)) So you can see that the file is at /home/user1/Desktop/EtherCAT4Atmel/ etherlabmaster.tar.bz2 Now this is the message from 'make' in Buildroot: user1 at linux-0mmn:~/buildroot-2011.05> make >>> ethercat 1.0 Extracting bzcat: Can't open input file /home/user1/buildroot-2011.05/dl/etherlabmaster.tar.bz2: No such file or directory. tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors make: *** [/home/user1/buildroot-2011.05/output/build/ethercat-1.0/.stamp_extracted] Error 2 user1 at linux-0mmn:~/buildroot-2011.05> So it looks like it never copies /home/user1/Desktop/EtherCAT4Atmel/ etherlabmaster.tar.bz2 over to the buildroot-2011.05/dl/ directory. When I manually inspect buildroot-2011.05/dl/ I do not see the file there. Why isn't it getting copied over to dl/ ? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 15:07 ` Jeff Krasky @ 2011-11-28 15:11 ` Thomas Petazzoni 2011-11-28 15:19 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-28 15:11 UTC (permalink / raw) To: buildroot Le Mon, 28 Nov 2011 09:07:54 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel This looks like a directory name and not a file. You have two choices for building from local sources : * The 'file' method, where ETHERCAT_SITE needs to be a tarball location * The 'local' method, where ETHERCAT_SITE needs to be a directory But since ETHERCAT is available online, you really should be doing something like : ETHERCAT_SITE = http://somesite.com/sometarball.tar.gz Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 15:11 ` Thomas Petazzoni @ 2011-11-28 15:19 ` Jeff Krasky 2011-11-28 15:54 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 15:19 UTC (permalink / raw) To: buildroot > > ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel > > This looks like a directory name and not a file. My understanding from the tutorial at http://buildroot.uclibc.org/buildroot.html#add_packages was that ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel specifies the path (whether it is http or filesystem) and ETHERCAT_SOURCE = etherlabmaster.tar.bz2 specifies the file name. Then I thought Buildroot would put ETHERCAT_SITE + ETHERCAT_SOURCE to come up with the location of the file. This is not correct? I edited the .mk file to put the entire path in ETHERCAT_SITE, like ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ etherlabmaster.tar.bz2 but it still didn't find it. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 15:19 ` Jeff Krasky @ 2011-11-28 15:54 ` Thomas Petazzoni 2011-11-28 16:14 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-28 15:54 UTC (permalink / raw) To: buildroot Le Mon, 28 Nov 2011 09:19:29 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > My understanding from the tutorial at > http://buildroot.uclibc.org/buildroot.html#add_packages was that > > ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel > > specifies the path (whether it is http or filesystem) > > and > > ETHERCAT_SOURCE = etherlabmaster.tar.bz2 > > specifies the file name. > > Then I thought Buildroot would put ETHERCAT_SITE + ETHERCAT_SOURCE to come > up with the location of the file. This is not correct? Woops, you're right, my bad. The manual is obvisouly correct. You should use : ETHERCAT_VERSION = 3.3 ETHERCAT_SITE = http://foobar.com/somewhere/ ETHERCAT_SOURCE = ethercat-$(ETHERCAT_VERSION).tar.bz2 > ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ > etherlabmaster.tar.bz2 Why are you using a local directory ? You *really* should be using a tarball available from http or ftp so that you can later contribute your package to Buildroot. Thanks, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 15:54 ` Thomas Petazzoni @ 2011-11-28 16:14 ` Jeff Krasky 2011-11-28 17:39 ` Michael S. Zick ` (2 more replies) 0 siblings, 3 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 16:14 UTC (permalink / raw) To: buildroot > Woops, you're right, my bad. The manual is obvisouly correct. > > You should use : > > ETHERCAT_VERSION = 3.3 > ETHERCAT_SITE = http://foobar.com/somewhere/ > ETHERCAT_SOURCE = ethercat-$(ETHERCAT_VERSION).tar.bz2 > > Why are you using a local directory ? You *really* should be using a > tarball available from http or ftp so that you can later contribute > your package to Buildroot. Because I don't want just the default source of EtherCAT built into the Linux image. Lets say I want to modify something in the examples directory of EtherCAT. For instance, I had to modify the sample code and rebuild. So what I want is this "rebuilt" version of EtherCAT, with customized example code, as part of the Linux image. If I point at the EtherCAT website, that won't be the correct version. The EtherCAT examples development will occur on the same machine that Buildroot is on, hence why I like the local filesystem solution. So any thoughts on why it is not finding the file? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 16:14 ` Jeff Krasky @ 2011-11-28 17:39 ` Michael S. Zick 2011-11-28 18:50 ` Jeff Krasky 2011-11-28 18:55 ` Quotient Remainder 2011-11-29 7:31 ` Thomas Petazzoni 2 siblings, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-11-28 17:39 UTC (permalink / raw) To: buildroot On Mon November 28 2011, Jeff Krasky wrote: > > Woops, you're right, my bad. The manual is obvisouly correct. > > > > You should use : > > > > ETHERCAT_VERSION = 3.3 > > ETHERCAT_SITE = http://foobar.com/somewhere/ > > ETHERCAT_SOURCE = ethercat-$(ETHERCAT_VERSION).tar.bz2 > > > > Why are you using a local directory ? You *really* should be using a > > tarball available from http or ftp so that you can later contribute > > your package to Buildroot. > > Because I don't want just the default source of EtherCAT built into the > Linux image. Lets say I want to modify something in the examples directory > of EtherCAT. For instance, I had to modify the sample code and rebuild. So > what I want is this "rebuilt" version of EtherCAT, with customized example > code, as part of the Linux image. If I point at the EtherCAT website, that > won't be the correct version. The EtherCAT examples development will occur > on the same machine that Buildroot is on, hence why I like the local > filesystem solution. > The typical way to handle that is to create a patch of the difference between your local version and the download version; Then let the build system apply the patch. > So any thoughts on why it is not finding the file? > Try a "make clean" then try again. The missing file was reported to be the downloaded (*/dl/* directory) the system may have that marked as already downloaded. Mike > Thanks. > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 17:39 ` Michael S. Zick @ 2011-11-28 18:50 ` Jeff Krasky 2011-11-28 19:24 ` Michael S. Zick 2011-11-29 7:35 ` Thomas Petazzoni 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 18:50 UTC (permalink / raw) To: buildroot > Try a "make clean" then try again. > The missing file was reported to be the downloaded (*/dl/* directory) > the system may have that marked as already downloaded. >>> ethercat 1.0 Downloading file:///home/user1/Desktop/EtherCAT4Atmel//etherlabmaster.tar.bz2: Unsupported scheme "file". >>> ethercat 1.0 Extracting bzcat: Can't open input file /home/user1/buildroot-2011.05/dl/etherlabmaster.tar.bz2: No such file or directory. tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors make: *** [/home/user1/buildroot-2011.05/output/build/ethercat-1.0/.stamp_extracted] Error 2 user1 at linux-0mmn:~/buildroot-2011.05> I did the 'make clean' and now it appears like it doesn't like the "file://" part of things. Has anyone done it like this? The website for EtherCAT doesn't point directly at a .bz2 file and so I can't do the http:// method. Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 18:50 ` Jeff Krasky @ 2011-11-28 19:24 ` Michael S. Zick 2011-11-28 19:33 ` Jeff Krasky 2011-11-29 7:35 ` Thomas Petazzoni 1 sibling, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-11-28 19:24 UTC (permalink / raw) To: buildroot On Mon November 28 2011, Jeff Krasky wrote: > > Try a "make clean" then try again. > > The missing file was reported to be the downloaded (*/dl/* directory) > > the system may have that marked as already downloaded. > > >>> ethercat 1.0 Downloading > file:///home/user1/Desktop/EtherCAT4Atmel//etherlabmaster.tar.bz2: > Unsupported scheme "file". > >>> ethercat 1.0 Extracting > bzcat: Can't open input file > /home/user1/buildroot-2011.05/dl/etherlabmaster.tar.bz2: No such file or > directory. > tar: This does not look like a tar archive > tar: Exiting with failure status due to previous errors > make: *** > [/home/user1/buildroot-2011.05/output/build/ethercat-1.0/.stamp_extracted] > Error 2 > user1 at linux-0mmn:~/buildroot-2011.05> > > > I did the 'make clean' and now it appears like it doesn't like the "file://" Try: "file:///" > part of things. Has anyone done it like this? The website for EtherCAT > doesn't point directly at a .bz2 file and so I can't do the http:// method. > Check me on this - see if I am following your description - The site: http://etherlab.org/en/components.php Has a multiple component download file: http://etherlab.org/download/bundle/etherlab-bundle-1.4.tar.bz2 That should be your download site and download package name. Inside the bundle, it has directory trees of (among other things): etherlab-bundle-1.6/2_rtal/linux-2.6.24.7.tar.bz2 etherlab-bundle-1.6/2_rtal/rtal-3.6.2.tar.bz2 etherlab-bundle-1.6/3_ethercat-1.4.0.tar.bz2 etherlab-bundle-1.6/5_etherlab/etherlab-1.2-rc4.tar.gz etherlab-bundle-1.6/8_examples/example.mdl etherlab-bundle-1.6/8_examples/example.sml ...... and you want to extract, patch, and build __some__ of the contained archives (or, for examples, some of the files).... Although I haven't done this myself, I do recall reading on the M.L. here that there is a way in Buildroot to define a "custom extract" (or download) step (or script?) - That should be able to handle such an ugly package structure. I think all it has to do is download the bundle of archives, open just the outer bundle and mark each of the contained archives as having been downloaded. I __think__. With the contained archives now downloaded (by extracting from the containing package) the BR system should be able to return to running the "extract,..." steps of each of the make files for each contained archive. If that is what you need to do - one of the experts on the Buildroot infrastructure needs to chime in with a "how to" here. ;-) Mike > Thanks. > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 19:24 ` Michael S. Zick @ 2011-11-28 19:33 ` Jeff Krasky 2011-11-28 21:14 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 19:33 UTC (permalink / raw) To: buildroot > Try: > "file:///" Sorry, I meant to imply I had the 3 slashes, with the 3rd one being for the path. So I've been using "file:///" all along, I just wrote "file://" since that is the "scheme" part. > Check me on this - see if I am following your description - > The site: > http://etherlab.org/en/components.php > > Has a multiple component download file: > http://etherlab.org/download/bundle/etherlab-bundle-1.4.tar.bz2 That's the correct site, but not the version. The latest tries to take you to sourceforge for a download. And navigating there didn't work too well. If the "file" versus "http" was the problem, I could try working on that. But it seems like something else is the issue for now. Somehow this thinks it already put the file in dl/ and it hasn't. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 19:33 ` Jeff Krasky @ 2011-11-28 21:14 ` Jeff Krasky 2011-11-28 22:15 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 21:14 UTC (permalink / raw) To: buildroot It looks like the possible methods for getting it are: wget svn git bzr and none of those seem to apply to wanting to use a local copy. So instead I just did this: cp etherlabmaster-1.0.tar.bz2 /home/user1/buildroot-2011.05/dl/ to get it in the dl/ directory. Can anyone see a problem with this? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 21:14 ` Jeff Krasky @ 2011-11-28 22:15 ` Jeff Krasky 2011-11-29 7:37 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 22:15 UTC (permalink / raw) To: buildroot > cp etherlabmaster-1.0.tar.bz2 /home/user1/buildroot-2011.05/dl/ > > to get it in the dl/ directory. In addition to anyone seeing a problem with this, now when I run the program: /etc/init.d/ethercat start I get a message like this: Starting EtherCAT master devel modprobe: module ec_master not found in modules.d ep failed This error message is what got me started down the path of adding the package in Buildroot. I used to build EtherCAT outside of Buildroot and then that build process would put EtherCAT in the linux image. But I'd get this error, so the suggestion was made to make the EtherCAT build part of Buildroot. Somehow the kernel needs to be told of this module. The Buildroot process must not be doing a 'make install'? Or is there a command I should run on the board itself once Linux is running? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 22:15 ` Jeff Krasky @ 2011-11-29 7:37 ` Thomas Petazzoni 2011-11-29 14:28 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-29 7:37 UTC (permalink / raw) To: buildroot Le Mon, 28 Nov 2011 16:15:02 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > This error message is what got me started down the path of adding the > package in Buildroot. I used to build EtherCAT outside of Buildroot > and then that build process would put EtherCAT in the linux image. > But I'd get this error, so the suggestion was made to make the > EtherCAT build part of Buildroot. Somehow the kernel needs to be > told of this module. The Buildroot process must not be doing a 'make > install'? Or is there a command I should run on the board itself > once Linux is running? It depends on : * what your ethercat.mk file looks like (could you post it on the list ?) * how the EtherCAT build system works Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 7:37 ` Thomas Petazzoni @ 2011-11-29 14:28 ` Jeff Krasky 2011-11-29 14:36 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-29 14:28 UTC (permalink / raw) To: buildroot > > This error message is what got me started down the path of adding the > > package in Buildroot. I used to build EtherCAT outside of Buildroot > > and then that build process would put EtherCAT in the linux image. > > But I'd get this error, so the suggestion was made to make the > > EtherCAT build part of Buildroot. Somehow the kernel needs to be > > told of this module. The Buildroot process must not be doing a 'make > > install'? Or is there a command I should run on the board itself > > once Linux is running? > > It depends on : > > * what your ethercat.mk file looks like (could you post it on the > list ?) > * how the EtherCAT build system works EtherCAT.mk: ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic #####LIBFOO_DEPENDENCIES = libglib2 host-pkg-config $(eval $(call AUTOTARGETS,package,ethercat)) Regarding how the EtherCAT build system works, how do I answer this for you? Are there some Makefiles that would explain it? Some other file I can post that will explain it? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 14:28 ` Jeff Krasky @ 2011-11-29 14:36 ` Thomas Petazzoni 2011-11-29 14:43 ` Jeff Krasky 2011-11-29 14:54 ` [Buildroot] LIBFOO_SITE in .mk file Michael S. Zick 0 siblings, 2 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-29 14:36 UTC (permalink / raw) To: buildroot Le Tue, 29 Nov 2011 08:28:56 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > ############################################################# > # > # EtherCAT > # > ############################################################# > ETHERCAT_VERSION = 1.0 > ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 > ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ > ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ That will work, but you still seem to not understand how to do this properly. I've already explained in the past e-mails. You should do ETHERCAT_SITE = http://www.ethercat.org/somedirectory/ And then if you really need to hack EtherCAT locally, use the source override feature. > Regarding how the EtherCAT build system works, how do I answer this for you? > Are there some Makefiles that would explain it? Some other file I can post > that will explain it? I'll try to look at the EtherCAT build system, but I'm quite busy at the moment. The INSTALL file has some details, but to build within Buildroot, probably quite a few environment variables have to be passed. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 14:36 ` Thomas Petazzoni @ 2011-11-29 14:43 ` Jeff Krasky 2011-11-29 21:43 ` Jeff Krasky 2011-11-29 14:54 ` [Buildroot] LIBFOO_SITE in .mk file Michael S. Zick 1 sibling, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-29 14:43 UTC (permalink / raw) To: buildroot > I'll try to look at the EtherCAT build system, but I'm quite busy at > the moment. The INSTALL file has some details, but to build within > Buildroot, probably quite a few environment variables have to be passed. Here are the contents of the INSTALL file: ---------------------------------------------------------------------------- --- This is the INSTALL file of the IgH EtherCAT Master. $Id$ vim: set spelllang=en spell tw=78 ---------------------------------------------------------------------------- --- Building and installing ======================= The complete build and installation procedure is described in the respective section of the documentation available from http://etherlab.org/en/ethercat. ---------------------------------------------------------------------------- --- For the impatient: The procedure mainly consists of calling $ ./boostrap # to create the configure script, if downloaded from the repo $ ./configure $ make all modules ... and as root: # make modules_install install # depmod ... and linking the init script and copying the sysconfig file from $PREFIX/etc to the appropriate locations and customizing the sysconfig file. # ln -s ${PREFIX}/etc/init.d/ethercat /etc/init.d/ethercat # cp ${PREFIX}/etc/sysconfig/ethercat /etc/sysconfig/ethercat # vi /etc/sysconfig/ethercat Make sure, that the 'udev' package is installed, to automatically create the EtherCAT character devices. The character devices will be created with mode 0660 and group root by default. If you want to give normal users reading access, create a udev rule like this: # echo KERNEL==\"EtherCAT[0-9]*\", MODE=\"0664\" > /etc/udev/rules.d/99-EtherCAT.rules Now you can start the EtherCAT master: # /etc/init.d/ethercat start Have a look at the examples/ subdirectory for some application examples. Have fun! ---------------------------------------------------------------------------- --- ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 14:43 ` Jeff Krasky @ 2011-11-29 21:43 ` Jeff Krasky 2011-11-29 22:42 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-29 21:43 UTC (permalink / raw) To: buildroot The message I get is "Starting EtherCAT master devel modprobe: module ec_master not found in modules.d ep failed" and I think the problem is with module dependencies. On the Linux PC, in /lib/modules/<source> there is an 'ethercat' subdirectory. On the Linux built for the board, there is not. This is probably the problem. Now when installing on Linux PC, the instructions mention doing: make modules_install install depmod and so perhaps I need to do the 'depmod' in Buildroot somehow? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 21:43 ` Jeff Krasky @ 2011-11-29 22:42 ` Jeff Krasky 2011-11-30 15:59 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-29 22:42 UTC (permalink / raw) To: buildroot > On the Linux PC, in /lib/modules/<source> there is an 'ethercat' > subdirectory. On the Linux built for the board, there is not. This is > probably the problem. Also, since this directory isn't there, it means that /lib/modules/<source>/ethercat/master/ec_master.ko isn't present. So perhaps the 'make modules_install install' command is what would do this? If so, how do I run it? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 22:42 ` Jeff Krasky @ 2011-11-30 15:59 ` Jeff Krasky 2011-11-30 16:04 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 15:59 UTC (permalink / raw) To: buildroot > /lib/modules/<source>/ethercat/master/ec_master.ko > > isn't present. If anyone can just help for a second, I have narrowed this down more. I found out that "ethercat's 'make modules_install' just calls the kernel's make -C <kernel_dir> modules_install which in turn installs the modules where it seems fit". Since this is what needs to be done, can someone mention how to do it in Buildroot? Maybe I need the Makefile for Generic Packages, not the autotools-based packages makefile? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 15:59 ` Jeff Krasky @ 2011-11-30 16:04 ` Thomas Petazzoni 2011-11-30 16:20 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-30 16:04 UTC (permalink / raw) To: buildroot Le Wed, 30 Nov 2011 09:59:24 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > Since this is what needs to be done, can someone mention how to do it in > Buildroot? Maybe I need the Makefile for Generic Packages, not the > autotools-based packages makefile? You'll need to pass the INSTALL_MOD_PATH environment variable, but also the ARCH= and CROSS_COMPILE variable. The easiest way is probably to use $(LINUX_MAKE_FLAGS) variable defined in linux/linux.mk. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:04 ` Thomas Petazzoni @ 2011-11-30 16:20 ` Jeff Krasky 2011-11-30 16:33 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 16:20 UTC (permalink / raw) To: buildroot > > Since this is what needs to be done, can someone mention how to do it in > > Buildroot? Maybe I need the Makefile for Generic Packages, not the > > autotools-based packages makefile? > > You'll need to pass the INSTALL_MOD_PATH environment variable, but also > the ARCH= and CROSS_COMPILE variable. The easiest way is probably to use > $(LINUX_MAKE_FLAGS) variable defined in linux/linux.mk. Thank you so much for the reply. I just checked and I don't see "LINUX_MAKE_FLAGS" in buildroot-2011.05/linux/linux.mk. Maybe that's in the 2011.11 version? But, are you saying that I could still use the autotools-based makefile and just add INSTALL_MOD_PATH, ARCH, and CROSS_COMPILE? I have it running now, but the build takes a while, so if this is wrong can you tell me? ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic #####LIBFOO_DEPENDENCIES = libglib2 host-pkg-config #####ETHERCAT_MAKE_OPT = INSTALL_MOD_DIR="ethercat" modules_install ETHERCAT_INSTALL_MOD_PATH = /lib/modules/2.6.33/ethercat ETHERCAT_ARCH = arm ETHERCAT_CROSS_COMPILE = arm-unknown-linux-uclibcgnueabi- $(eval $(call AUTOTARGETS,package,ethercat)) ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:20 ` Jeff Krasky @ 2011-11-30 16:33 ` Thomas Petazzoni 2011-11-30 16:38 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-30 16:33 UTC (permalink / raw) To: buildroot Le Wed, 30 Nov 2011 10:20:41 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > Thank you so much for the reply. I just checked and I don't see > "LINUX_MAKE_FLAGS" in buildroot-2011.05/linux/linux.mk. Maybe that's in the > 2011.11 version? But, are you saying that I could still use the > autotools-based makefile and just add INSTALL_MOD_PATH, ARCH, and > CROSS_COMPILE? I have it running now, but the build takes a while, so if > this is wrong can you tell me? It is wrong. > ############################################################# > # > # EtherCAT > # > ############################################################# > ETHERCAT_VERSION = 1.0 > ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 > ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ > ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ > ETHERCAT_INSTALL_STAGING = YES > ETHERCAT_INSTALL_TARGET = YES > ETHERCAT_CONF_OPT = --enable-generic > #####LIBFOO_DEPENDENCIES = libglib2 host-pkg-config > #####ETHERCAT_MAKE_OPT = INSTALL_MOD_DIR="ethercat" modules_install > ETHERCAT_INSTALL_MOD_PATH = /lib/modules/2.6.33/ethercat > ETHERCAT_ARCH = arm > ETHERCAT_CROSS_COMPILE = arm-unknown-linux-uclibcgnueabi- Those are not Buildroot variables, but Kbuild variables, that you must pass when running the modules_install. The fact that EtherCAT contains kernel modules makes it not completely straightforward to package. Do you need it right now ? I might be interested in helping package EtherCAT, but I don't have much time at the moment. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:33 ` Thomas Petazzoni @ 2011-11-30 16:38 ` Jeff Krasky 2011-11-30 16:49 ` Michael S. Zick 2011-11-30 17:48 ` Thomas De Schampheleire 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 16:38 UTC (permalink / raw) To: buildroot > Those are not Buildroot variables, but Kbuild variables, that you must > pass when running the modules_install. The fact that EtherCAT contains > kernel modules makes it not completely straightforward to package. At what point is modules_install being run? > Do you need it right now ? I might be interested in helping package > EtherCAT, but I don't have much time at the moment. Time is very short, yes. Anything you can do to help is definitely appreciated. Like, for now, can you say more about running modules_install and passing parameters to it? Thank you very much, again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:38 ` Jeff Krasky @ 2011-11-30 16:49 ` Michael S. Zick 2011-11-30 16:57 ` Jeff Krasky 2011-11-30 17:48 ` Thomas De Schampheleire 1 sibling, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-11-30 16:49 UTC (permalink / raw) To: buildroot On Wed November 30 2011, Jeff Krasky wrote: > > Those are not Buildroot variables, but Kbuild variables, that you must > > pass when running the modules_install. The fact that EtherCAT contains > > kernel modules makes it not completely straightforward to package. > > At what point is modules_install being run? > > > Do you need it right now ? I might be interested in helping package > > EtherCAT, but I don't have much time at the moment. > > Time is very short, yes. Anything you can do to help is definitely > appreciated. Like, for now, can you say more about running modules_install > and passing parameters to it? > Would a worked example help? This package patches the kernel and builds the related software: http://git.buildroot.net/buildroot/commit/?id=956d4ab0f501c44f977297d8faac95afa43f3082 Mike > Thank you very much, again. > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:49 ` Michael S. Zick @ 2011-11-30 16:57 ` Jeff Krasky 2011-11-30 17:08 ` Michael S. Zick 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 16:57 UTC (permalink / raw) To: buildroot > Would a worked example help? > This package patches the kernel and builds the related software: >http://git.buildroot.net/buildroot/commit/?id=956d4ab0f501c44f977297d8faac9 5afa43f3082 Thanks. I'm going over that now. I see two .mk files. Is that what needs to be changed? In other words, this helps and I can try things, but I'm not completely sure what to look at in this patch. Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:57 ` Jeff Krasky @ 2011-11-30 17:08 ` Michael S. Zick 0 siblings, 0 replies; 81+ messages in thread From: Michael S. Zick @ 2011-11-30 17:08 UTC (permalink / raw) To: buildroot On Wed November 30 2011, Jeff Krasky wrote: > > Would a worked example help? > > This package patches the kernel and builds the related software: > >http://git.buildroot.net/buildroot/commit/?id=956d4ab0f501c44f977297d8faac9 > 5afa43f3082 > > > Thanks. I'm going over that now. I see two .mk files. Is that what needs > to be changed? In other words, this helps and I can try things, but I'm not > completely sure what to look at in this patch. > I do not know either. There where a number of changes made to that package since it was first added at the above link. Better if you downloaded 2011.11-rc3 tar-ball and look at that package as it exists today in the Buildroot sources. Mike > Thanks again. > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 16:38 ` Jeff Krasky 2011-11-30 16:49 ` Michael S. Zick @ 2011-11-30 17:48 ` Thomas De Schampheleire 2011-11-30 17:58 ` Thomas Petazzoni 2011-11-30 18:11 ` Jeff Krasky 1 sibling, 2 replies; 81+ messages in thread From: Thomas De Schampheleire @ 2011-11-30 17:48 UTC (permalink / raw) To: buildroot Jeff, On Wed, Nov 30, 2011 at 5:38 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> Those are not Buildroot variables, but Kbuild variables, that you must >> pass when running the modules_install. The fact that EtherCAT contains >> kernel modules makes it not completely straightforward to package. > > At what point is modules_install being run? > >> Do you need it right now ? I might be interested in helping package >> EtherCAT, but I don't have much time at the moment. > > Time is very short, yes. ?Anything you can do to help is definitely > appreciated. ?Like, for now, can you say more about running modules_install > and passing parameters to it? > Since your ethercat is actually containing two things, being an application *and* a kernel module, you should treat it as such. In my opinion, you should either: * create two different packages, one for ethercat and one for the ethercat driver. Each would have a .mk file in a package/* directory. * create one .mk file, but with two different sets of build rules, one for the application and one for the driver. You can make sure that one depends on the other so that they're always built together. If the application is autotools-based, you can use the AUTOTOOLS infrastructure. For the driver I suggest the GENTARGETS one (see below). * create one .mk file, with one set of build rules, that combine the build steps for the application and for the kernel. With regards to the kernel driver part, I have already given you an example set of build rules in one of your other threads, see http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/35273 Do you understand how these build rules work? Did you try them? Building this with older versions of buildroot is perfectly possible, if you have to stick with older versions for some reason. (if you are free to update, I'd suggest you do). Do keep in mind that in previous versions of buildroot, the LINUX_ prefix was called LINUX26_, so for example LINUX_MAKE_FLAGS needs to be renamed to LINUX26_MAKE_FLAGS, likewise with LINUX_DIR. I hope this helps. If you still have questions, I suggest you provide us with your current.mk file and the problems (e.g. build errors) you still experience with it. Please take some time to provide detailed information, this will allow you to get more relevant responses from the list. Best regards, Thomas ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 17:48 ` Thomas De Schampheleire @ 2011-11-30 17:58 ` Thomas Petazzoni 2011-11-30 18:11 ` Jeff Krasky 1 sibling, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-30 17:58 UTC (permalink / raw) To: buildroot Le Wed, 30 Nov 2011 18:48:13 +0100, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > * create two different packages, one for ethercat and one for the > ethercat driver. Each would have a .mk file in a package/* directory. I don't agree here. This will make it hard to keep both things in sync. The build system of EtherCAT seems to integrate both the build of the kernel-space parts and the user-space parts, and it's probably doable inside a single package. > * create one .mk file, but with two different sets of build rules, one > for the application and one for the driver. You can make sure that one > depends on the other so that they're always built together. If the > application is autotools-based, you can use the AUTOTOOLS > infrastructure. For the driver I suggest the GENTARGETS one (see > below). I haven't had the time to look closely, but it seems like the autotools-based build system triggers the build of the kernel parts. At least, the kernel part is described by a Kbuild.in file that needs to be processed by autoconf before being able to build the kernel side part. So definitely, the userspace parts and kernelspace parts are related in terms of build system. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 17:48 ` Thomas De Schampheleire 2011-11-30 17:58 ` Thomas Petazzoni @ 2011-11-30 18:11 ` Jeff Krasky 2011-11-30 19:31 ` Jeff Krasky 2011-11-30 19:44 ` Thomas De Schampheleire 1 sibling, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 18:11 UTC (permalink / raw) To: buildroot > * create one .mk file, with one set of build rules, that combine the > build steps for the application and for the kernel. I'll try this one first. Here is the latest EtherCAT.mk: ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic ETHERCAT_DEPENDENCIES = linux ETHERCAT_INSTALL_MOD_DIR = ethercat #####ETHERCAT_INSTALL_MOD_PATH define ETHERCAT_BUILD_CMDS $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) modules endef define ETHERCAT_INSTALL_TARGET_CMDS $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) \ INSTALL_MOD_STRIP=1 \ INSTALL_MOD_DIR=$(ETHERCAT_INSTALL_MOD_DIR) \ modules_install endef define ETHERCAT_UNINSTALL_TARGET_CMDS rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/$(ETHERCAT_INSTALL_MOD_D IR) endef $(eval $(call GENTARGETS)) #####$(eval $(call AUTOTARGETS,package,ethercat)) > Do keep in mind that in previous > versions of buildroot, the LINUX_ prefix was called LINUX26_, so for > example LINUX_MAKE_FLAGS needs to be renamed to LINUX26_MAKE_FLAGS, > likewise with LINUX_DIR. Thanks. I changed them, but I left ETHERCAT_DEPENDENCIES = linux as just "linux". Should it be "linux26"? The build is going on now, but it takes a while, so if it should be "linux26" can you tell me (or if anything else is wrong in .mk) so I can stop the build and fix it? > If you still have questions, I suggest you provide us with your > current.mk file and the problems (e.g. build errors) you still > experience with it. I'll see how this latest build goes, but I think the result needs to be that /lib/modules/2.6.33 needs to have an 'ethercat' subdirectory containing ec_master.ko, among other files. So far, no build has done this. Thanks so much, time is short and this is really helping. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 18:11 ` Jeff Krasky @ 2011-11-30 19:31 ` Jeff Krasky 2011-11-30 19:44 ` Thomas De Schampheleire 1 sibling, 0 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 19:31 UTC (permalink / raw) To: buildroot > $(eval $(call GENTARGETS)) This needed to be changed to $(eval $(call GENTARGETS,package,ethercat)) and then it built the modules! Now there is /lib/modules/2.6.33/ethercat with the correct kernel modules. However, there is no longer /etc/init.d/ethercat executable file. So in changing the EtherCAT.mk file now the "application" part isn't getting built. Do I need to put back this line: $(eval $(call AUTOTARGETS,package,ethercat)) If not, what should I do? It seems I can make application OR kernel module, just not both. Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 18:11 ` Jeff Krasky 2011-11-30 19:31 ` Jeff Krasky @ 2011-11-30 19:44 ` Thomas De Schampheleire 2011-11-30 20:01 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Thomas De Schampheleire @ 2011-11-30 19:44 UTC (permalink / raw) To: buildroot Hi, On Wed, Nov 30, 2011 at 7:11 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> * create one .mk file, with one set of build rules, that combine the >> build steps for the application and for the kernel. > > I'll try this one first. ?Here is the latest EtherCAT.mk: > > ############################################################# > # > # EtherCAT > # > ############################################################# > ETHERCAT_VERSION = 1.0 > ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 > ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ > ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ > ETHERCAT_INSTALL_STAGING = YES > ETHERCAT_INSTALL_TARGET = YES > ETHERCAT_CONF_OPT = --enable-generic > ETHERCAT_DEPENDENCIES = linux > ETHERCAT_INSTALL_MOD_DIR = ethercat > #####ETHERCAT_INSTALL_MOD_PATH > > define ETHERCAT_BUILD_CMDS > ? ? ? $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) modules > endef > > define ETHERCAT_INSTALL_TARGET_CMDS > ? ? ? $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) \ > ? ? ? ? ? ? ? INSTALL_MOD_STRIP=1 \ > ? ? ? ? ? ? ? INSTALL_MOD_DIR=$(ETHERCAT_INSTALL_MOD_DIR) \ > ? ? ? ? ? ? ? modules_install > endef > > define ETHERCAT_UNINSTALL_TARGET_CMDS > ? ? ? rm -rf > $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/$(ETHERCAT_INSTALL_MOD_D > IR) > endef > > $(eval $(call GENTARGETS)) > > #####$(eval $(call AUTOTARGETS,package,ethercat)) You do realize that these rules are purely intended for the module, right. Based on what ThomasP says, things may be a little more complicated than I originally thought. > > >> Do keep in mind that in previous >> versions of buildroot, the LINUX_ prefix was called LINUX26_, so for >> example LINUX_MAKE_FLAGS needs to be renamed to LINUX26_MAKE_FLAGS, >> likewise with LINUX_DIR. > > Thanks. ?I changed them, but I left > > ETHERCAT_DEPENDENCIES = linux > > as just "linux". ?Should it be "linux26"? ?The build is going on now, but it > takes a while, so if it should be "linux26" can you tell me (or if anything > else is wrong in .mk) so I can stop the build and fix it? In buildroot 2010.05, it was possible to use both linux as linux26, so you should be fine. > >> If you still have questions, I suggest you provide us with your >> current.mk file and the problems (e.g. build errors) you still >> experience with it. > > I'll see how this latest build goes, but I think the result needs to be that > > > /lib/modules/2.6.33 > > needs to have an 'ethercat' subdirectory containing ec_master.ko, among > other files. ?So far, no build has done this. Just checking: you are looking into output/target/lib/modules or /lib/modules on the target right, not /lib/modules on the host? If the modules_install step in your .mk file goes well, this should put the file there. Seeing the build log of that part should hint you what is wrong, if anything. > > Thanks so much, time is short and this is really helping. > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 19:44 ` Thomas De Schampheleire @ 2011-11-30 20:01 ` Jeff Krasky 2011-11-30 22:21 ` Thomas Petazzoni 2011-12-01 22:56 ` Jeff Krasky 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 20:01 UTC (permalink / raw) To: buildroot > You do realize that these rules are purely intended for the module, right. No, I thought it would do both. I have a second build running with both $evals in it. Hopefully that will do it. > Based on what ThomasP says, things may be a little more complicated > than I originally thought. Do I need to separate sets of build rules in the .mk? > Just checking: you are looking into output/target/lib/modules or > /lib/modules on the target right, not /lib/modules on the host? Correct, I am looking at /lib/modules when running the Linux image on the target. > If the modules_install step in your .mk file goes well, this should > put the file there. It did. I just wrote a post about how it's there but the application isn't. Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 20:01 ` Jeff Krasky @ 2011-11-30 22:21 ` Thomas Petazzoni [not found] ` <001201ccafb0$4b5e06e0$0400a8c0@dspcgrnzks9p98> 2011-12-01 22:56 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-30 22:21 UTC (permalink / raw) To: buildroot Le Wed, 30 Nov 2011 14:01:10 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > It did. I just wrote a post about how it's there but the application isn't. I have just posted a patch that adds the igh-ethercat package to Buildroot. It applies on the latest Buildroot Git, which should become in a few hours the 2011.11 release. The patch has only been compile tested, I don't have the EtherCAT slaves hardware to test this. Note that you must use a kernel version compatible with the EtherCAT network drivers. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
[parent not found: <001201ccafb0$4b5e06e0$0400a8c0@dspcgrnzks9p98>]
* [Buildroot] LIBFOO_SITE in .mk file [not found] ` <001201ccafb0$4b5e06e0$0400a8c0@dspcgrnzks9p98> @ 2011-11-30 22:49 ` Thomas Petazzoni 2011-11-30 22:54 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-30 22:49 UTC (permalink / raw) To: buildroot Hello, Please don't reply to me directly, but use the list instead. Le Wed, 30 Nov 2011 16:34:59 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > > I have just posted a patch that adds the igh-ethercat package to > > Buildroot. It applies on the latest Buildroot Git, which should become > > in a few hours the 2011.11 release. > > So if I: > > wget http://buildroot.uclibc.org/downloads/buildroot-2011.11.tar.bz2 > > I can un-tar it, go into 'make menuconfig' and select EtherCAT and then it > will build both the application and kernel module as part of the Linux > image/filesystem? After untarring the tarball, you have to apply the patch. The igh-ethercat package is *not* part of the release. > Right now I am building with 2.6.33, will I still be able to select that in > buildroot-2011.11? Buildroot allows you to select whatever kernel version you want. However, none of the EtherCAT drivers seem to be supported for 2.6.33. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 22:49 ` Thomas Petazzoni @ 2011-11-30 22:54 ` Jeff Krasky 2011-12-01 8:11 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-30 22:54 UTC (permalink / raw) To: buildroot > After untarring the tarball, you have to apply the patch. The > igh-ethercat package is *not* part of the release. Oh, ok. So the patch will be a .patch file on http://buildroot.uclibc.org/downloads/ and I just have to 1. download it 2. go into buildroot-2011.11 directory 3. run 'patch filename.patch' 4. then do the 'make menuconfig', 'make' etc. is that correct? Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 22:54 ` Jeff Krasky @ 2011-12-01 8:11 ` Thomas Petazzoni 2011-12-01 14:58 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-12-01 8:11 UTC (permalink / raw) To: buildroot Le Wed, 30 Nov 2011 16:54:58 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > Oh, ok. So the patch will be a .patch file on > > http://buildroot.uclibc.org/downloads/ No, the patch is in an e-mail I have sent to the list yesterday evening. > 1. download it > 2. go into buildroot-2011.11 directory > 3. run 'patch filename.patch' No: cat filename.patch | patch -p1 Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 8:11 ` Thomas Petazzoni @ 2011-12-01 14:58 ` Jeff Krasky 2011-12-01 15:03 ` Michael S. Zick 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 14:58 UTC (permalink / raw) To: buildroot > No, the patch is in an e-mail I have sent to the list yesterday evening. Ok, so I go to the email with a subject of "[Buildroot] [PATCH 1/1] igh-ethercat: new package" and I copy the text from --- package/Config.in | 1 + package/igh-ethercat/Config.in | 23 +++++++++++++++++++++++ all the way down to the text +IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES + +$(eval $(call AUTOTARGETS)) \ No newline at end of file -- 1.7.4.1 and place it in a text file called filename.patch. Then I go into the directory buildroot-2011.11 and I run 'cat filename.patch | patch -p1' Then I can just run 'make menuconfig', 'make', etc? Thanks so much. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 14:58 ` Jeff Krasky @ 2011-12-01 15:03 ` Michael S. Zick 2011-12-01 15:55 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-12-01 15:03 UTC (permalink / raw) To: buildroot On Thu December 1 2011, Jeff Krasky wrote: > > No, the patch is in an e-mail I have sent to the list yesterday evening. > > Ok, so I go to the email with a subject of "[Buildroot] [PATCH 1/1] > igh-ethercat: new package" and I copy the text from > You don't even have to do that, just save the e-mail as a plain text file using your e-mail client. Patch will ignore the leading, non-patch, discussion. It was designed that way, back in the days when the only way to pass patches was by e-mail. ;-) Mike > > > --- > package/Config.in | 1 + > package/igh-ethercat/Config.in | 23 +++++++++++++++++++++++ > > > > > all the way down to the text > > > > > +IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES > + > +$(eval $(call AUTOTARGETS)) > \ No newline at end of file > -- > 1.7.4.1 > > > > and place it in a text file called filename.patch. Then I go into the > directory buildroot-2011.11 and I run 'cat filename.patch | patch -p1' > > Then I can just run 'make menuconfig', 'make', etc? > > Thanks so much. > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 15:03 ` Michael S. Zick @ 2011-12-01 15:55 ` Jeff Krasky 2011-12-01 16:16 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 15:55 UTC (permalink / raw) To: buildroot > You don't even have to do that, just save the e-mail as a plain text > file using your e-mail client. > > Patch will ignore the leading, non-patch, discussion. > > It was designed that way, back in the days when the only way to > pass patches was by e-mail. ;-) Ok, I saved the entire email in notepad as an ANSI text document, then renamed it to have the .patch extension. I went to run 'make linux-menuconfig' and I got this message: package/igh-ethercat/igh-ethercat.mk:11: *** missing separator. Stop. When using Buildroot-2011.05 I needed to run 'make linux-menuconfig'. Here is the .mk file: IGH_ETHERCAT_VERSION = stable-1.5 IGH_ETHERCAT_SITE = http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster /archive/ IGH_ETHERCAT_SOURCE = $(IGH_ETHERCAT_VERSION).tar.bz2 IGH_ETHERCAT_AUTORECONF = YES IGH_ETHERCAT_DEPENDENCIES = linux IGH_ETHERCAT_INSTALL_STAGING = YES IGH_ETHERCAT_CONF_OPT = \ --with-linux-dir=$(LINUX_DIR) IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100) IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000),--enable-e1000,--disable-e1000) IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,--disable-r8169) define IGH_ETHERCAT_CREATE_CHANGELOG touch $(@D)/ChangeLog endef IGH_ETHERCAT_POST_PATCH_HOOKS += IGH_ETHERCAT_CREATE_CHANGELOG define IGH_ETHERCAT_BUILD_MODULES $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules endef IGH_ETHERCAT_POST_BUILD_HOOKS += IGH_ETHERCAT_BUILD_MODULES define IGH_ETHERCAT_INSTALL_MODULES $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install endef IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES Line 11 appears to be "$(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too)". Does this need to be tabbed in or something? The build takes about 30 minutes and so I'd like to correct in advance if I could. Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 15:55 ` Jeff Krasky @ 2011-12-01 16:16 ` Jeff Krasky 2011-12-01 16:33 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 16:16 UTC (permalink / raw) To: buildroot > Ok, I saved the entire email in notepad as an ANSI text document, then > renamed it to have the .patch extension. Now I even re-newlined each line to make sure it wasn't a windows newline versus linux newline issue. > I went to run 'make linux-menuconfig' and I got this message: > > package/igh-ethercat/igh-ethercat.mk:11: *** missing separator. Stop. I have tried running just 'make' and that gives the same error. Please help. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 16:16 ` Jeff Krasky @ 2011-12-01 16:33 ` Jeff Krasky 2011-12-01 16:52 ` Michael S. Zick 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 16:33 UTC (permalink / raw) To: buildroot > > I went to run 'make linux-menuconfig' and I got this message: > > > > package/igh-ethercat/igh-ethercat.mk:11: *** missing separator. Stop. > > I have tried running just 'make' and that gives the same error. Looks like those lines had to be on the same line as the 'if' that proceeded them: IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) all one line. Also, the endef's appearing later on had to be placed on their own line, at the beginning. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 16:33 ` Jeff Krasky @ 2011-12-01 16:52 ` Michael S. Zick 2011-12-01 18:15 ` Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-12-01 16:52 UTC (permalink / raw) To: buildroot On Thu December 1 2011, Jeff Krasky wrote: > > > I went to run 'make linux-menuconfig' and I got this message: > > > > > > package/igh-ethercat/igh-ethercat.mk:11: *** missing separator. Stop. > > > > I have tried running just 'make' and that gives the same error. > > Looks like those lines had to be on the same line as the 'if' that proceeded > them: > > IGH_ETHERCAT_CONF_OPT += $(if > $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) > > all one line. > > Also, the endef's appearing later on had to be placed on their own line, at > the beginning. > Ah, the joys of: X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <001101ccb044$956d1340$0400a8c0@dspcgrnzks9p98> Have you ever considered running Linux on that box? Or at least a sane e-mail client? Mike > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 16:52 ` Michael S. Zick @ 2011-12-01 18:15 ` Jeff Krasky 0 siblings, 0 replies; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 18:15 UTC (permalink / raw) To: buildroot > Looks like those lines had to be on the same line as the 'if' that > proceeded them: > > IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) > > all one line. > > Also, the endef's appearing later on had to be placed on their own line, > at the beginning. Ok, it built the image and filesystem now. I put them in Nandflash where the previous kernel image and jffs2 filesystem would go (0xA0000 and 0x400000 respectively). Now I see this error: Freeing init memory: 124K JFFS2 error: (1) jffs2_do_read_inode_internal: Argh. Special inode #95 with mode 0x21b6 had more than one node iget() failed for ino #95 Warning: unable to open an initial console. Any ideas? Is something different with 2011.11? I am using the same bootstrap and uboot that I have been using. Two paths: 1) Can I just look at the new igh-ethercat.mk file and put that stuff in the EtherCAT.mk file I was working on yesterday? I'd like to see something work. 2) Anyone have a clue about this latest error? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-30 20:01 ` Jeff Krasky 2011-11-30 22:21 ` Thomas Petazzoni @ 2011-12-01 22:56 ` Jeff Krasky 2011-12-02 7:50 ` Thomas De Schampheleire 1 sibling, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-01 22:56 UTC (permalink / raw) To: buildroot The following is a message from yesterday. It was the closest I have gotten to both ethercat application and kernel modules being built. As can be seen from the last email I sent today, I can't build either one with the new .mk file. Something in that file only applies to buildroot-2011.11? Can someone help out with what I had going yesterday? The suggestions from Thomas De Schampheleire helped to build the kernel modules, but in so doing the application was no longer being built. I will show both .mk files. It would get REALLY appreciated if someone would merge these for me somehow. .mk file for building the application: ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_AUTORECONF = YES ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic $(eval $(call AUTOTARGETS,package,ethercat)) And here is the .mk for building the kernel module: ############################################################# # # EtherCAT # ############################################################# ETHERCAT_VERSION = 1.0 ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_AUTORECONF = YES ETHERCAT_INSTALL_STAGING = YES ETHERCAT_INSTALL_TARGET = YES ETHERCAT_CONF_OPT = --enable-generic ###These next two lines were a part of building the kernel module. ETHERCAT_DEPENDENCIES = linux ETHERCAT_INSTALL_MOD_DIR = ethercat # From here to the GENTARGETS line is part of building the kernel module. define ETHERCAT_BUILD_CMDS $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) modules endef define ETHERCAT_INSTALL_TARGET_CMDS $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) \ INSTALL_MOD_STRIP=1 \ INSTALL_MOD_DIR=$(ETHERCAT_INSTALL_MOD_DIR) \ modules_install endef define ETHERCAT_UNINSTALL_TARGET_CMDS rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/$(ETHERCAT_INSTALL_MOD_D IR) endef $(eval $(call GENTARGETS,package,ethercat)) > You do realize that these rules are purely intended for the module, right. No, I thought it would do both. I have a second build running with both $evals in it. Hopefully that will do it. > Based on what ThomasP says, things may be a little more complicated > than I originally thought. Do I need to separate sets of build rules in the .mk? > Just checking: you are looking into output/target/lib/modules or > /lib/modules on the target right, not /lib/modules on the host? Correct, I am looking at /lib/modules when running the Linux image on the target. > If the modules_install step in your .mk file goes well, this should > put the file there. It did. I just wrote a post about how it's there but the application isn't. Thanks again. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-01 22:56 ` Jeff Krasky @ 2011-12-02 7:50 ` Thomas De Schampheleire 2011-12-02 8:50 ` Thomas Petazzoni 2011-12-02 13:33 ` Michael S. Zick 0 siblings, 2 replies; 81+ messages in thread From: Thomas De Schampheleire @ 2011-12-02 7:50 UTC (permalink / raw) To: buildroot Jeff, On Thu, Dec 1, 2011 at 11:56 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: > The following is a message from yesterday. ?It was the closest I have gotten > to both ethercat application and kernel modules being built. ?As can be seen > from the last email I sent today, I can't build either one with the new .mk > file. ?Something in that file only applies to buildroot-2011.11? > > Can someone help out with what I had going yesterday? ?The suggestions from > Thomas De Schampheleire helped to build the kernel modules, but in so doing > the application was no longer being built. ?I will show both .mk files. ?It > would get REALLY appreciated if someone would merge these for me somehow. > I have the impression you are missing some basic skills, and I really think it will help you if you took the time to learn about them. For example: * how does make work and how are Makefiles organized * what is a patch, how do you apply a patch There is some information on patching here: http://www.linuxchix.org/content/courses/kernel_hacking/lesson9 but take into account that some of it is specific to the linux kernel. Regarding ethercat: what Thomas Petazzoni has provided you with is a patch for the entire thing, application + drivers. It is based on a clean 2011.11 release. Here is a step-by-step guide of things I think you should do: 1. Start from a clean 2011.11 buildroot tarball (unpack it) 2. Move to the buildroot directory with cd 3. Apply the patch of ThomasP by saving the e-mail in text file format) and run: patch -p1 < saved-email You should see output like: patching file package/Config.in patching file package/igh-ethercat/Config.in patching file package/igh-ethercat/igh-ethercat.mk 4. Configure buildroot properly (using make menuconfig) and don't forget to enable the new igh-ethercat package, which is present under 'Networking applications' 5. Run 'make'. That should be it. Buildroot will do all the rest for you and when the build is done, you can test ethercat to see if everything works. Best regards, Thomas ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-02 7:50 ` Thomas De Schampheleire @ 2011-12-02 8:50 ` Thomas Petazzoni 2011-12-02 13:33 ` Michael S. Zick 1 sibling, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-12-02 8:50 UTC (permalink / raw) To: buildroot Hello, Le Fri, 2 Dec 2011 08:50:55 +0100, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > I have the impression you are missing some basic skills, and I really > think it will help you if you took the time to learn about them. I am sorry to say that I agree here. You really should learn about the basics before trying to build an embedded Linux system with a piece of software as complicated to configure as EtherCAT. I don't think it is possible to work on EtherCAT without having knowledge of makefiles, build process, patching, etc. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-02 7:50 ` Thomas De Schampheleire 2011-12-02 8:50 ` Thomas Petazzoni @ 2011-12-02 13:33 ` Michael S. Zick 2011-12-02 15:57 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Michael S. Zick @ 2011-12-02 13:33 UTC (permalink / raw) To: buildroot On Fri December 2 2011, Thomas De Schampheleire wrote: > Jeff, > > On Thu, Dec 1, 2011 at 11:56 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: > > The following is a message from yesterday. ?It was the closest I have gotten > > to both ethercat application and kernel modules being built. ?As can be seen > > from the last email I sent today, I can't build either one with the new .mk > > file. ?Something in that file only applies to buildroot-2011.11? > > > > Can someone help out with what I had going yesterday? ?The suggestions from > > Thomas De Schampheleire helped to build the kernel modules, but in so doing > > the application was no longer being built. ?I will show both .mk files. ?It > > would get REALLY appreciated if someone would merge these for me somehow. > > > > I have the impression you are missing some basic skills, and I really > think it will help you if you took the time to learn about them. For > example: > * how does make work and how are Makefiles organized > * what is a patch, how do you apply a patch > > There is some information on patching here: > http://www.linuxchix.org/content/courses/kernel_hacking/lesson9 > but take into account that some of it is specific to the linux kernel. > > > Regarding ethercat: what Thomas Petazzoni has provided you with is a > patch for the entire thing, application + drivers. It is based on a > clean 2011.11 release. Here is a step-by-step guide of things I think > you should do: > > 1. Start from a clean 2011.11 buildroot tarball (unpack it) > 2. Move to the buildroot directory with cd > 3. Apply the patch of ThomasP by saving the e-mail in text file format) and run: > patch -p1 < saved-email > You should see output like: > patching file package/Config.in > patching file package/igh-ethercat/Config.in > patching file package/igh-ethercat/igh-ethercat.mk > > 4. Configure buildroot properly (using make menuconfig) and don't > forget to enable the new igh-ethercat package, which is present under > 'Networking applications' > 4.5 Ensure that you have a kernel version selected that is supported by the EtherCAT patches. I seem to recall the most recent supported kernel in stable-1.5 was 2.6.32, __not__ 2.6.33 which was mentioned in your posts earlier. Mike > 5. Run 'make'. > > That should be it. Buildroot will do all the rest for you and when the > build is done, you can test ethercat to see if everything works. > > Best regards, > Thomas > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-02 13:33 ` Michael S. Zick @ 2011-12-02 15:57 ` Jeff Krasky 2011-12-02 16:09 ` Quotient Remainder 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-02 15:57 UTC (permalink / raw) To: buildroot Ok, ok, I'm tryin again from the 2011.11 version. Can someone at least say if there is a way to just clean the ethercat part? Like a 'make clean-igh-ethercat' or something? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-12-02 15:57 ` Jeff Krasky @ 2011-12-02 16:09 ` Quotient Remainder 2011-12-02 16:51 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Jeff Krasky 0 siblings, 1 reply; 81+ messages in thread From: Quotient Remainder @ 2011-12-02 16:09 UTC (permalink / raw) To: buildroot On 2 Noll 2011 15:58, "Jeff Krasky" <jeff.krasky@dspcg.com> wrote: > > Ok, ok, I'm tryin again from the 2011.11 version. Can someone at least say > if there is a way to just clean the ethercat part? Like a > > 'make clean-igh-ethercat' or something? > > > make igh-ethercat-clean to run the clean commands for the package. (in the ..._CLEAN_CMDS variable in the .mk file) make igh-ethercat-dirclean to start from blank build directory again. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/48a3b675/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 16:09 ` Quotient Remainder @ 2011-12-02 16:51 ` Jeff Krasky 2011-12-02 16:59 ` Jeff Krasky 2011-12-02 17:33 ` Tim Judd 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-12-02 16:51 UTC (permalink / raw) To: buildroot I'm giving things a try with 2011.11 and when booting the board I see this: VFS: Mounted root (jffs2 filesystem) on device 31:1. Freeing init memory: 124K Kernel panic - not syncing: Attempted to kill init! If anyone has a hint it would be appreciated. I think I've done the steps correctly, so if I can just get it to boot.. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/27c2a065/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 16:51 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Jeff Krasky @ 2011-12-02 16:59 ` Jeff Krasky 2011-12-02 17:33 ` Tim Judd 1 sibling, 0 replies; 81+ messages in thread From: Jeff Krasky @ 2011-12-02 16:59 UTC (permalink / raw) To: buildroot > I'm giving things a try with 2011.11 and when booting the board I see this: > > VFS: Mounted root (jffs2 filesystem) on device 31:1. > Freeing init memory: 124K > Kernel panic - not syncing: Attempted to kill init! > If it helps any, I get this same error message whether I put the jffs2 filesystem at 0x400000 (four hundred thousand) or 0x2a0000 in Nandflash. So maybe the kernel doesn't know where to look? When building kernel 2.6.33 in 2011.05 I would put kernel at 0xa0000 and filesystem at 0x400000 (four hundred thousand). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/8263d55f/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 16:51 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Jeff Krasky 2011-12-02 16:59 ` Jeff Krasky @ 2011-12-02 17:33 ` Tim Judd 2011-12-02 18:02 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Tim Judd @ 2011-12-02 17:33 UTC (permalink / raw) To: buildroot "Attempted to kill init" means the init process died.? Kernel must panic because init cannot terminate. There's something preventing init from running, or it is dying during execution. Is your userland correctly have an init?? normally /sbin/init is called.? If your init is somewhere else, use the init= paramater to kernel append you may have a mounted jffs2 filesystem but not directly usable (think squashfs), is it loaded to ramdisk?? if so, root=/dev/ram0 init=/sbin/init I'm trying to rework an OEM userland and have come up on many attempts to kill init.? It sucks for diagnostics. ? If opportunity doesn't knock, build a door. "I can" is a way of life. More and Bigger is not always Better. The road to success is always uphill. Life isn't about finding yourself, it's about creating yourself. ________________________________ From: Jeff Krasky <jeff.krasky@dspcg.com> To: buildroot at busybox.net Sent: Friday, December 2, 2011 9:51 AM Subject: [Buildroot] Kernel panic - not syncing: Attempted to kill init! I?m giving things a try with 2011.11 and when booting the board I see this: ? VFS: Mounted root (jffs2 filesystem) on device 31:1. Freeing init memory: 124K Kernel panic - not syncing: Attempted to kill init! ? If anyone has a hint it would be appreciated.? I think I?ve done the steps correctly, so if I can just get it to boot?. ? ? Thanks. _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/329157bd/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 17:33 ` Tim Judd @ 2011-12-02 18:02 ` Jeff Krasky 2011-12-02 18:21 ` Aleksander Dutkowski 2011-12-02 18:24 ` Tim Judd 0 siblings, 2 replies; 81+ messages in thread From: Jeff Krasky @ 2011-12-02 18:02 UTC (permalink / raw) To: buildroot > "Attempted to kill init" means the init process died. Kernel must panic because init cannot terminate. > There's something preventing init from running, or it is dying during execution. > > Is your userland correctly have an init? normally /sbin/init is called. If your init is somewhere else, use > the init= paramater to kernel append How do I know where init is if I can't bring the board up and run any linux commands? >you may have a mounted jffs2 filesystem but not directly usable (think squashfs), is it loaded to > ramdisk? if so, root=/dev/ram0 init=/sbin/init When I successfully ran 2.6.33 built from Buildroot-2011.05, in U-boot the setting for root was root=/dev/mtdblock1. I am not sure what squashfs is. How can the filesystem not be usable? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/62bb2304/attachment-0001.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 18:02 ` Jeff Krasky @ 2011-12-02 18:21 ` Aleksander Dutkowski 2011-12-02 18:30 ` Jeff Krasky 2011-12-02 18:31 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Tim Judd 2011-12-02 18:24 ` Tim Judd 1 sibling, 2 replies; 81+ messages in thread From: Aleksander Dutkowski @ 2011-12-02 18:21 UTC (permalink / raw) To: buildroot afair this message could be because of lack of dev/console and/or dev/null. You must run "mknod -m 660 dev/console c 5 1" and "mknod -m 660dev/null c 1 3" in root partition. How to do it? I have my on usb stick, so i simply mount usb drive, and do some changes. If youre using yaffs2 and NAND memory, you can use System configuration --> Custom script to run before creating filesystem images to invoke those commands or just find unyaffs script (somewhere on the Internet, on google code afair), unyaffs your rootfs, make changes and make yaffs image one more time. You have output/target folder with your rootfs, so you can make changes there :) On Fri, Dec 2, 2011 at 7:02 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> "Attempted to kill init" means the init process died.? Kernel must panic >> because init cannot terminate. > >> There's something preventing init from running, or it is dying during >> execution. > >> > >> Is your userland correctly have an init?? normally /sbin/init is called. >> If your init is somewhere else, use > >> the init= paramater to kernel append > > > > How do I know where init is if I can?t bring the board up and run any linux > commands? > > > >>you may have a mounted jffs2 filesystem but not directly usable (think >> squashfs), is it loaded to > >> ramdisk?? if so, root=/dev/ram0 init=/sbin/init > > > > When I successfully ran 2.6.33 built from Buildroot-2011.05, in U-boot the > setting for root was root=/dev/mtdblock1. ?I am not sure what squashfs is. > How can the filesystem not be usable? > > > > Thanks. > > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- pozdrawiam Aleksander Dutkowski ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 18:21 ` Aleksander Dutkowski @ 2011-12-02 18:30 ` Jeff Krasky 2011-12-03 0:25 ` Aleksander Dutkowski 2011-12-02 18:31 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Tim Judd 1 sibling, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-12-02 18:30 UTC (permalink / raw) To: buildroot > afair this message could be because of lack of dev/console and/or dev/null. > You must run "mknod -m 660 dev/console c 5 1" and "mknod -m > 660dev/null c 1 3" in root partition. > > How to do it? I have my on usb stick, so i > simply mount usb drive, and do some changes. If youre using yaffs2 and > NAND memory, you can use > > System configuration --> Custom script to run before creating filesystem > images > > to invoke those commands or just find unyaffs script (somewhere on the > Internet, on google code > afair), unyaffs your rootfs, make changes and make yaffs image one > more time. Ok, I ran 'make menuconfig' and went into "System configuration -> Custom script to run before creating filesystem images" and I entered this string: mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3 and I got this when running 'make': echo 2011.11 > /home/user1/buildroot-2011.11/output/target/etc/br-version "mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3" /home/user1/buildroot-2011.11/output/target /bin/sh: mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3: No such file or directory make: *** [target-finalize] Error 127 user1 at dhcppc15:~/buildroot-2011.11> > You have output/target folder with your rootfs, so you can make changes > there :) How to do it to a already built .jffs2 file? Can I just open a terminal window on the linux PC that buildroot is on and run some commands? ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 18:30 ` Jeff Krasky @ 2011-12-03 0:25 ` Aleksander Dutkowski 2011-12-03 8:25 ` [Buildroot] Device files and Buildroot Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Aleksander Dutkowski @ 2011-12-03 0:25 UTC (permalink / raw) To: buildroot On Fri, Dec 2, 2011 at 7:30 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> afair this message could be because of lack of dev/console and/or > dev/null. >> You must run "mknod -m 660 dev/console c 5 1" and "mknod -m >> 660dev/null c 1 3" in root partition. >> >> How to do it? I have my on usb stick, so i >> simply mount usb drive, and do some changes. If youre using yaffs2 and >> NAND memory, you can use >> >> System configuration --> Custom script to run before creating filesystem >> images >> >> to invoke those commands or just find unyaffs script (somewhere on the >> Internet, on google code >> afair), unyaffs your rootfs, make changes and make yaffs image one >> more time. > > Ok, I ran 'make menuconfig' and went into "System configuration -> Custom > script to run before creating filesystem images" and I entered this string: > > mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3 > > and I got this when running 'make': > > echo 2011.11 > /home/user1/buildroot-2011.11/output/target/etc/br-version > "mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3" > /home/user1/buildroot-2011.11/output/target > /bin/sh: mknod -m 660 dev/console c 5 1; mknod -m 660 dev/null c 1 3: No > such file or directory > make: *** [target-finalize] Error 127 > user1 at dhcppc15:~/buildroot-2011.11> "System configuration --> Custom script to run before creating filesystem image" input is for specify a PATH to bash script. You you must simply create script, fill with mknod commands (remember - mknod can be ran only by root! so do 'sudo mknod') and then put the path to the script in "Custom script to run before creating filesystem image". Remeber to add execute mode to the script (chmod +x file) > > >> You have output/target folder with your rootfs, so you can make changes >> there :) > > How to do it to a already built .jffs2 file? ?Can I just open a terminal > window on the linux PC that buildroot is on and run some commands? When buildroot is done compiling all packages, it installs all in 'output/target' directory, and then create image. I am used to tell buildroot not to create any images, make my own adjustements in output/target dir, and then create image by hand. If you need to create yaffs, you can look for "mkyaffs2" script, which you can find on code.google.com. On Fri, Dec 2, 2011 at 7:31 PM, Tim Judd <tjudd2k@yahoo.com> wrote: > lack of dev/console or /dev/null should give a message something like "can't > allocate initial tty!" > I was having those errors too.? his is unable to run/survive init > > > having dev/console and dev/null (and if necessary dev/tty*) so the console > can be opened.? It's odd the kernel can spit the bootup on ttyS0 but > complains when trying to run init.? one of the great mysteries of linux. I had another error message (I experienced problem with lack of /dev/console some time ago), but you can be right. I'm just assuming, that my solution is proper, and want Jeff to check it ;) > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- pozdrawiam Aleksander Dutkowski ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-03 0:25 ` Aleksander Dutkowski @ 2011-12-03 8:25 ` Thomas Petazzoni 2011-12-03 12:53 ` Trevor Woerner ` (2 more replies) 0 siblings, 3 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-12-03 8:25 UTC (permalink / raw) To: buildroot Le Sat, 3 Dec 2011 01:25:41 +0100, Aleksander Dutkowski <adutkowski@gmail.com> a ?crit : > "System configuration --> Custom script to run before creating > filesystem image" input is for specify a PATH to bash script. > You you must simply create script, fill with mknod commands (remember > - mknod can be ran only by root! so do 'sudo mknod') No, no, no and no ! I'm sorry but this is totally horrible and is definitely not the way of doing things with Buildroot. With Buildroot, you have four ways of managing the device files in /dev. The mechanism used to manage device files is configured from System configuration -> /dev management. The four ways are : * Static using device table. In this case the "System configuration -> Path to the device tables" option gives a space-separated list of files, each of which containing a list of devices to create at build time in the root filesystem. By default, this list is defined to just the target/generic/device_table_dev.txt, which creates some basic device files. Those device files are created at *build* time and are statically present in the root filesystem image generated by Buildroot. All basic devices such as /dev/console, /dev/null and al. are already present in the default device table. If you are in this mode and want to add more device files, then you should add them to target/generic/device_table_dev.txt, or better, create your own additional device table in board/<yourcompany>/<yourproject>/device_table.txt, and add it to the space-separated list in "System configuration -> Path to the device tables". * Dynamic using devtmpfs only. Devtmpfs is a virtual filesystem implemented in the Linux kernel that can be mounted in /dev. The kernel will automatically create/remove device files from this filesystem as devices appear/disappear from the system. devtmpfs exists in the Linux kernel since 2.6.32. When this option is selected *and* Buildroot is responsible for building the kernel, then Buildroot ensures that the kernel is built with the appropriate options to make devtmpfs work. When Buildroot is *not* responsible for building the kernel (the user does it on its own), then the user is responsible for making sure that CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT are both enabled in the kernel configuration. When this mode is used, no static device files are created in the root filesystem: the device files are automatically created at boot time by the kernel. * Dynamic using mdev. This is exactly like with 'devtmpfs' (i.e, devtmpfs is required for this mode to work), but Buildroot adds the mdev utility into the mix. mdev is an utility bundled with Busybox which gets executed when the kernel notifies that a device has been added or removed from the system. Compared to a pure 'devtmpfs' solution, it allows to execute arbitrary applications or shell scripts when devices appear/disappear. mdev behaviour can be configured from /etc/mdev.conf, refer to the Busybox documentation for more details. Since this case relies on devtmpfs, there are no static device files created in the root filesystem, and no device table is used. * Dynamic using udev. This is also exactly like with 'devtmpfs' (i.e, devtmpfs is required for this mode to work), but Buildroot adds the udev daemon into the mix. udev is the "device event manager" used in all Linux desktop and server systems and can be seen as a "full-featured" mdev. It is more configurable, provides a library called libudev to allow applications to query for which devices are available, etc. So, no, do *NOT* ever use the post-build script to create device files. Just understand how those device files work and the different mode Buildroot provides to handle them. If you need precisions or have questions on this topic, don't hesitate to ask. We have many people on the list ready to answer your questions. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-03 8:25 ` [Buildroot] Device files and Buildroot Thomas Petazzoni @ 2011-12-03 12:53 ` Trevor Woerner 2011-12-03 18:40 ` Thomas Petazzoni 2011-12-05 10:54 ` Aleksander Dutkowski 2011-12-08 21:30 ` Felipe Contreras 2 siblings, 1 reply; 81+ messages in thread From: Trevor Woerner @ 2011-12-03 12:53 UTC (permalink / raw) To: buildroot Hi Thomas, Excellent write-up. Does buildroot's /dev handling also tweak /etc/fstab? I would assume /dev would only need to be mounted in the non-static cases. Best regards, Trevor ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-03 12:53 ` Trevor Woerner @ 2011-12-03 18:40 ` Thomas Petazzoni 0 siblings, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-12-03 18:40 UTC (permalink / raw) To: buildroot Le Sat, 3 Dec 2011 07:53:51 -0500, Trevor Woerner <twoerner@gmail.com> a ?crit : > Excellent write-up. Does buildroot's /dev handling also tweak > /etc/fstab? I would assume /dev would only need to be mounted in the > non-static cases. Two cases here : * Static /dev. In this case /dev is part of the root filesystem itself, so there is no need for anything special in /etc/fstab. * Dynamic /dev (either with devtmpfs only, or with devtmpfs+mdev or devtmpfs+udev). In this case, we use the CONFIG_DEVTMPFS_MOUNT kernel option, which tells the kernel to automatically mount the devtmpfs filesystem at boot time. So the root filesystem simply contains a /dev directory, completely empty. Nothing is needed in /etc/fstab: the kernel will mount devtmpfs in /dev automatically. The only special case here is when the root filesystem is an initramfs: for some reason, the kernel does not mount devtmpfs automatically in this case, but Buildroot installs a special /init wrapper script, which mounts devtmpfs before starting the real init. But even in this case, nothing special is needed in /etc/fstab. Does that answer your question? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-03 8:25 ` [Buildroot] Device files and Buildroot Thomas Petazzoni 2011-12-03 12:53 ` Trevor Woerner @ 2011-12-05 10:54 ` Aleksander Dutkowski 2011-12-08 21:30 ` Felipe Contreras 2 siblings, 0 replies; 81+ messages in thread From: Aleksander Dutkowski @ 2011-12-05 10:54 UTC (permalink / raw) To: buildroot I've read your message, and I now know, what was the problem in my case - I'am using kernel 2.6.30 with udev and it doesn't have devtmpfs, so it is not creating dev/null and /dev/console. Thanks! Best Regards, Aleksander On Sat, Dec 3, 2011 at 9:25 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Le Sat, 3 Dec 2011 01:25:41 +0100, > Aleksander Dutkowski <adutkowski@gmail.com> a ?crit : > >> "System configuration --> Custom script to run before creating >> filesystem image" input is for specify a PATH to bash script. >> You you must simply create script, fill with mknod commands (remember >> - mknod can be ran only by root! so do 'sudo mknod') > > No, no, no and no ! I'm sorry but this is totally horrible and is > definitely not the way of doing things with Buildroot. > > With Buildroot, you have four ways of managing the device files > in /dev. The mechanism used to manage device files is configured from > System configuration -> /dev management. The four ways are : > > ?* Static using device table. In this case the "System configuration -> > ? Path to the device tables" option gives a space-separated list of > ? files, each of which containing a list of devices to create at build > ? time in the root filesystem. By default, this list is defined to > ? just the target/generic/device_table_dev.txt, which creates some > ? basic device files. Those device files are created at *build* time > ? and are statically present in the root filesystem image generated by > ? Buildroot. All basic devices such as /dev/console, /dev/null and al. > ? are already present in the default device table. If you are in this > ? mode and want to add more device files, then you should add them to > ? target/generic/device_table_dev.txt, or better, create your own > ? additional device table in > ? board/<yourcompany>/<yourproject>/device_table.txt, and add it to > ? the space-separated list in "System configuration -> Path to the > ? device tables". > > ?* Dynamic using devtmpfs only. Devtmpfs is a virtual filesystem > ? implemented in the Linux kernel that can be mounted in /dev. The > ? kernel will automatically create/remove device files from this > ? filesystem as devices appear/disappear from the system. devtmpfs > ? exists in the Linux kernel since 2.6.32. When this option is > ? selected *and* Buildroot is responsible for building the kernel, > ? then Buildroot ensures that the kernel is built with the appropriate > ? options to make devtmpfs work. When Buildroot is *not* responsible > ? for building the kernel (the user does it on its own), then the user > ? is responsible for making sure that CONFIG_DEVTMPFS and > ? CONFIG_DEVTMPFS_MOUNT are both enabled in the kernel configuration. > ? When this mode is used, no static device files are created in the > ? root filesystem: the device files are automatically created at boot > ? time by the kernel. > > ?* Dynamic using mdev. This is exactly like with 'devtmpfs' (i.e, > ? devtmpfs is required for this mode to work), but Buildroot adds the > ? mdev utility into the mix. mdev is an utility bundled with Busybox > ? which gets executed when the kernel notifies that a device has been > ? added or removed from the system. Compared to a pure 'devtmpfs' > ? solution, it allows to execute arbitrary applications or shell > ? scripts when devices appear/disappear. mdev behaviour can be > ? configured from /etc/mdev.conf, refer to the Busybox documentation > ? for more details. Since this case relies on devtmpfs, there are no > ? static device files created in the root filesystem, and no device > ? table is used. > > ?* Dynamic using udev. This is also exactly like with 'devtmpfs' (i.e, > ? devtmpfs is required for this mode to work), but Buildroot adds the > ? udev daemon into the mix. udev is the "device event manager" used in > ? all Linux desktop and server systems and can be seen as a > ? "full-featured" mdev. It is more configurable, provides a library > ? called libudev to allow applications to query for which devices are > ? available, etc. > > So, no, do *NOT* ever use the post-build script to create device files. > Just understand how those device files work and the different mode > Buildroot provides to handle them. > > If you need precisions or have questions on this topic, don't hesitate > to ask. We have many people on the list ready to answer your questions. > > Best regards, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-03 8:25 ` [Buildroot] Device files and Buildroot Thomas Petazzoni 2011-12-03 12:53 ` Trevor Woerner 2011-12-05 10:54 ` Aleksander Dutkowski @ 2011-12-08 21:30 ` Felipe Contreras 2011-12-08 23:49 ` Michael S. Zick 2011-12-09 18:49 ` Thomas Petazzoni 2 siblings, 2 replies; 81+ messages in thread From: Felipe Contreras @ 2011-12-08 21:30 UTC (permalink / raw) To: buildroot On Sat, Dec 3, 2011 at 10:25 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Le Sat, 3 Dec 2011 01:25:41 +0100, > Aleksander Dutkowski <adutkowski@gmail.com> a ?crit : > >> "System configuration --> Custom script to run before creating >> filesystem image" input is for specify a PATH to bash script. >> You you must simply create script, fill with mknod commands (remember >> - mknod can be ran only by root! so do 'sudo mknod') > > No, no, no and no ! I'm sorry but this is totally horrible and is > definitely not the way of doing things with Buildroot. > > With Buildroot, you have four ways of managing the device files > in /dev. The mechanism used to manage device files is configured from > System configuration -> /dev management. The four ways are : Why is this not described when one press '?' on the menu options? Cheers. -- Felipe Contreras ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-08 21:30 ` Felipe Contreras @ 2011-12-08 23:49 ` Michael S. Zick 2011-12-09 18:49 ` Thomas Petazzoni 1 sibling, 0 replies; 81+ messages in thread From: Michael S. Zick @ 2011-12-08 23:49 UTC (permalink / raw) To: buildroot On Thu December 8 2011, Felipe Contreras wrote: > On Sat, Dec 3, 2011 at 10:25 AM, Thomas Petazzoni > <thomas.petazzoni@free-electrons.com> wrote: > > Le Sat, 3 Dec 2011 01:25:41 +0100, > > Aleksander Dutkowski <adutkowski@gmail.com> a ?crit : > > > >> "System configuration --> Custom script to run before creating > >> filesystem image" input is for specify a PATH to bash script. > >> You you must simply create script, fill with mknod commands (remember > >> - mknod can be ran only by root! so do 'sudo mknod') > > > > No, no, no and no ! I'm sorry but this is totally horrible and is > > definitely not the way of doing things with Buildroot. > > > > With Buildroot, you have four ways of managing the device files > > in /dev. The mechanism used to manage device files is configured from > > System configuration -> /dev management. The four ways are : > > Why is this not described when one press '?' on the menu options? > Because you haven't sent the patch for the menu that does that yet. Mike > Cheers. > ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Device files and Buildroot 2011-12-08 21:30 ` Felipe Contreras 2011-12-08 23:49 ` Michael S. Zick @ 2011-12-09 18:49 ` Thomas Petazzoni 1 sibling, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-12-09 18:49 UTC (permalink / raw) To: buildroot Le Thu, 8 Dec 2011 23:30:21 +0200, Felipe Contreras <felipe.contreras@gmail.com> a ?crit : > Why is this not described when one press '?' on the menu options? Yeah, that's possible, but help options on kconfig "choices" is a bit non-user friendly. There is no way to specify a global help for the choice, it is only possible to provide a per-choice help. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 18:21 ` Aleksander Dutkowski 2011-12-02 18:30 ` Jeff Krasky @ 2011-12-02 18:31 ` Tim Judd 1 sibling, 0 replies; 81+ messages in thread From: Tim Judd @ 2011-12-02 18:31 UTC (permalink / raw) To: buildroot lack of dev/console or /dev/null should give a message something like "can't allocate initial tty!" I was having those errors too.? his is unable to run/survive init having dev/console and dev/null (and if necessary dev/tty*) so the console can be opened.? It's odd the kernel can spit the bootup on ttyS0 but complains when trying to run init.? one of the great mysteries of linux. ? If opportunity doesn't knock, build a door. "I can" is a way of life. More and Bigger is not always Better. The road to success is always uphill. Life isn't about finding yourself, it's about creating yourself. ________________________________ From: Aleksander Dutkowski <adutkowski@gmail.com> To: buildroot at busybox.net Sent: Friday, December 2, 2011 11:21 AM Subject: Re: [Buildroot] Kernel panic - not syncing: Attempted to kill init! afair this message could be because of lack of dev/console and/or dev/null. You must run "mknod -m 660 dev/console c 5 1" and "mknod -m 660dev/null c 1 3" in root partition. How to do it? I have my on usb stick, so i simply mount usb drive, and do some changes. If youre using yaffs2 and NAND memory, you can use System configuration --> Custom script to run before creating filesystem images to invoke those commands or just find unyaffs script (somewhere on the Internet, on google code afair), unyaffs your rootfs, make changes and make yaffs image one more time. You have output/target folder with your rootfs, so you can make changes there :) On Fri, Dec 2, 2011 at 7:02 PM, Jeff Krasky <jeff.krasky@dspcg.com> wrote: >> "Attempted to kill init" means the init process died.? Kernel must panic >> because init cannot terminate. > >> There's something preventing init from running, or it is dying during >> execution. > >> > >> Is your userland correctly have an init?? normally /sbin/init is called. >> If your init is somewhere else, use > >> the init= paramater to kernel append > > > > How do I know where init is if I can?t bring the board up and run any linux > commands? > > > >>you may have a mounted jffs2 filesystem but not directly usable (think >> squashfs), is it loaded to > >> ramdisk?? if so, root=/dev/ram0 init=/sbin/init > > > > When I successfully ran 2.6.33 built from Buildroot-2011.05, in U-boot the > setting for root was root=/dev/mtdblock1. ?I am not sure what squashfs is. > How can the filesystem not be usable? > > > > Thanks. > > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- pozdrawiam Aleksander Dutkowski _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/b8eaca41/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] Kernel panic - not syncing: Attempted to kill init! 2011-12-02 18:02 ` Jeff Krasky 2011-12-02 18:21 ` Aleksander Dutkowski @ 2011-12-02 18:24 ` Tim Judd 1 sibling, 0 replies; 81+ messages in thread From: Tim Judd @ 2011-12-02 18:24 UTC (permalink / raw) To: buildroot "usable" on the filesystem is maybe not the perfect word to use, it is more meant in terms of what is read-write and freely accessible on the root device.? A mtdblock is an embedded flash memory area who often times has a read-only compressed filesystem such as squashfs (google it).? squashfs is not directly usable like ext2 on a hard disk is. You might have to hack 'n slash your way in (this is my limited linux knowledge.? I'm not claiming to be an expert). use an additional append= argument: "init=/bin/sh" or "init=/bin/bash" or "init=/bin/ash" to try to get into a usable shell to see what's there.? This argument overrides the traditional init that runs so you can look in the directories trying to find where your init is supposed to be.? Remember that init itself is never supposed to terminate/end like you can close Firefox.? So if you leave the shell, linux kernel WILL panic (same error you started this thread with) I'm not very confident mtdblock1 is supposed to be a read-write filesystem, but may have some kind of read-only squashfs kind of filesystem on it. you're still welcome to try "root=/dev/ram0 init=/bin/ash" and related combinations trying to get a usable root filesystem and working shell.? This is where the headaches for me start. I'm just knowledgeable enough to know basics, others here are guaranteed to be more experienced. ? If opportunity doesn't knock, build a door. "I can" is a way of life. More and Bigger is not always Better. The road to success is always uphill. Life isn't about finding yourself, it's about creating yourself. ________________________________ From: Jeff Krasky <jeff.krasky@dspcg.com> To: buildroot at busybox.net Sent: Friday, December 2, 2011 11:02 AM Subject: Re: [Buildroot] Kernel panic - not syncing: Attempted to kill init! > "Attempted to kill init" means the init process died.? Kernel must panic because init cannot terminate. > There's something preventing init from running, or it is dying during execution. > > Is your userland correctly have an init?? normally /sbin/init is called.? If your init is somewhere else, use > the init= paramater to kernel append ? How do I know where init is if I can?t bring the board up and run any linux commands? ? >you may have a mounted jffs2 filesystem but not directly usable (think squashfs), is it loaded to > ramdisk?? if so, root=/dev/ram0 init=/sbin/init ? When I successfully ran 2.6.33 built from Buildroot-2011.05, in U-boot the setting for root was root=/dev/mtdblock1. ?I am not sure what squashfs is.? How can the filesystem not be usable? ? Thanks. _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111202/c9e38a49/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-29 14:36 ` Thomas Petazzoni 2011-11-29 14:43 ` Jeff Krasky @ 2011-11-29 14:54 ` Michael S. Zick 1 sibling, 0 replies; 81+ messages in thread From: Michael S. Zick @ 2011-11-29 14:54 UTC (permalink / raw) To: buildroot On Tue November 29 2011, Thomas Petazzoni wrote: > Le Tue, 29 Nov 2011 08:28:56 -0600, > "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > > > ############################################################# > > # > > # EtherCAT > > # > > ############################################################# > > ETHERCAT_VERSION = 1.0 > > ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 > > ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ > > ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/ > > That will work, but you still seem to not understand how to do this > properly. I've already explained in the past e-mails. You should do > > ETHERCAT_SITE = http://www.ethercat.org/somedirectory/ > And if you want more recent than version 1.4, either switch to Buildroot 2011.11(-rc?) and use the hg methods for download or use the direct hg link to the tarball of the stable version 1.5 tag that I posted. The hg setup installed at SourceForge is set to provide a *.tar.bz2 of any tag in the repository, down to a specific file level. Other hg repositories may be setup differently (the one I run provides zip and *.tar.gz). The Buildroot hg method will clone and tar-ball the entire repository, which may take more than a few cpu cycles. ;-) But that is the more general method. Hardcoding the URL displayed by the "tar-ball button(s)" when browsing an hg repository leaves you with a strangely named file but it may be a much smaller download. Although not as general, that only needs the http methods available in the older Buildroot versions. Mike > And then if you really need to hack EtherCAT locally, use the source > override feature. > > > Regarding how the EtherCAT build system works, how do I answer this for you? > > Are there some Makefiles that would explain it? Some other file I can post > > that will explain it? > > I'll try to look at the EtherCAT build system, but I'm quite busy at > the moment. The INSTALL file has some details, but to build within > Buildroot, probably quite a few environment variables have to be passed. > > Regards, > > Thomas ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 18:50 ` Jeff Krasky 2011-11-28 19:24 ` Michael S. Zick @ 2011-11-29 7:35 ` Thomas Petazzoni 1 sibling, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-29 7:35 UTC (permalink / raw) To: buildroot Le Mon, 28 Nov 2011 12:50:22 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > >>> ethercat 1.0 Downloading > file:///home/user1/Desktop/EtherCAT4Atmel//etherlabmaster.tar.bz2: > Unsupported scheme "file". Support for "file" has been added in 2011.11, and you're using 2011.05, so it's not supported. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 16:14 ` Jeff Krasky 2011-11-28 17:39 ` Michael S. Zick @ 2011-11-28 18:55 ` Quotient Remainder 2011-11-28 19:02 ` Jeff Krasky 2011-11-29 7:31 ` Thomas Petazzoni 2 siblings, 1 reply; 81+ messages in thread From: Quotient Remainder @ 2011-11-28 18:55 UTC (permalink / raw) To: buildroot On 28 Samh 2011 16:15, "Jeff Krasky" <jeff.krasky@dspcg.com> wrote: ... > > So any thoughts on why it is not finding the file? > Try "make ethercat-dirclean", then "rm dl/ethercat*" and finally, "make ethercat". The stamp files or a partial download may be confusing matters. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111128/8be27223/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 18:55 ` Quotient Remainder @ 2011-11-28 19:02 ` Jeff Krasky 0 siblings, 0 replies; 81+ messages in thread From: Jeff Krasky @ 2011-11-28 19:02 UTC (permalink / raw) To: buildroot > Try "make ethercat-dirclean" This removed output/build/ethercat-1.0 > "rm dl/ethercat*" No files like this existed. > "make ethercat" Same problem still. What makes Buildroot think it has the file in dl already? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111128/a78bddbf/attachment.html> ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] LIBFOO_SITE in .mk file 2011-11-28 16:14 ` Jeff Krasky 2011-11-28 17:39 ` Michael S. Zick 2011-11-28 18:55 ` Quotient Remainder @ 2011-11-29 7:31 ` Thomas Petazzoni 2 siblings, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-29 7:31 UTC (permalink / raw) To: buildroot Le Mon, 28 Nov 2011 10:14:58 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > Because I don't want just the default source of EtherCAT built into > the Linux image. Lets say I want to modify something in the examples > directory of EtherCAT. For instance, I had to modify the sample code > and rebuild. So what I want is this "rebuilt" version of EtherCAT, > with customized example code, as part of the Linux image. If I point > at the EtherCAT website, that won't be the correct version. The > EtherCAT examples development will occur on the same machine that > Buildroot is on, hence why I like the local filesystem solution. I am not sure what you are trying to achieve here. If the upstream package has issues that need to be fixed, then you can put patches in the package/ethercat/ directory, which Buildroot will apply after extracting the upstream tarball. In addition, if you want to do quick development on EtherCAT, you can also use the new "source override" feature that is part of the upcoming Buildroot 2011.11. With this feature, you can tell Buildroot to use a local directory for the source code instead of an upstream tarball without changing the package .mk file itself, so that the .mk file remains usable for upstreaming in Buildroot. To do this, just create a local.mk file in the top directory of Buildroot with the following contents : ETHERCAT_OVERRIDE_SRCDIR = /my/local/place/ and then reference this local.mk file in the BR2_PACKAGE_OVERRIDE_FILE configuration option. If you really want to use a local directory directly in the package .mk file, then you can use ETHERCAT_SITE = /my/local/place ETHERCAT_SITE_METHOD = local But this is not great as it won't allow you to submit Ethercat to the Buildroot developers, and will also force all users (including in your company) to have Ethercat available at this location. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-22 22:35 ` Jeff Krasky 2011-11-23 7:19 ` Thomas De Schampheleire @ 2011-11-23 8:25 ` Thomas Petazzoni 2011-11-23 14:17 ` Jeff Krasky 1 sibling, 1 reply; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-23 8:25 UTC (permalink / raw) To: buildroot Le Tue, 22 Nov 2011 16:35:20 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > 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 > familiar with BuildRoot? Basically you have the choice of : * Generating your system with Buildroot, then manually build EtherCAT outside of Buildroot using the Buildroot cross-compiler and the kernel built by Buildroot. Advantages: I don't see any, except maybe the fact that you don't need to learn out to create packages in Buildroot. Drawbacks: it might actually be *harder* to achieve than to create a package in Buildroot, and your build process is no longer nicely integrated. * Add a package in Buildroot. Requires learning a bit about how to create packages (but our documentation on this is quite good I think, and the Buildroot source tree is full of examples). In the end, it might be simpler to package your software component than building it manually, and you have the benefit of having it nicely integrated. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-23 8:25 ` [Buildroot] equivalent of a 'make modules' Thomas Petazzoni @ 2011-11-23 14:17 ` Jeff Krasky 2011-11-23 14:23 ` Thomas Petazzoni 0 siblings, 1 reply; 81+ messages in thread From: Jeff Krasky @ 2011-11-23 14:17 UTC (permalink / raw) To: buildroot >Basically you have the choice of : > > * Generating your system with Buildroot, then manually build EtherCAT > outside of Buildroot using the Buildroot cross-compiler and the > kernel built by Buildroot. Advantages: I don't see any, except maybe > the fact that you don't need to learn out to create packages in > Buildroot. That, and I am already trying this approach. If there are just one or two small things to do along this approach, it might be easier to stick with it. For example, if there was just an easy way to do something like 'make modules' then this approach might be quickest. > Drawbacks: it might actually be *harder* to achieve than > to create a package in Buildroot, and your build process is no > longer nicely integrated. Is the 'make modules' idea considered hard? > * Add a package in Buildroot. Requires learning a bit about how to > create packages (but our documentation on this is quite good I > think, and the Buildroot source tree is full of examples). I believe another poster sent a link to read about this, so I will look at that. In the meantime, can you comment on the first part of this email? Thanks. ^ permalink raw reply [flat|nested] 81+ messages in thread
* [Buildroot] equivalent of a 'make modules' 2011-11-23 14:17 ` Jeff Krasky @ 2011-11-23 14:23 ` Thomas Petazzoni 0 siblings, 0 replies; 81+ messages in thread From: Thomas Petazzoni @ 2011-11-23 14:23 UTC (permalink / raw) To: buildroot Le Wed, 23 Nov 2011 08:17:24 -0600, "Jeff Krasky" <jeff.krasky@dspcg.com> a ?crit : > > Drawbacks: it might actually be *harder* to achieve than > > to create a package in Buildroot, and your build process is no > > longer nicely integrated. > > Is the 'make modules' idea considered hard? It doesn't make any sense for Buildroot to provide "make modules". This is a *Linux* build target, not a *Buildroot* build target. You certainly don't need Buildroot to provide "make modules" to build external kernel modules outside of Buildroot. I would need to look at how EtherCAT works to provide more details here. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 81+ messages in thread
end of thread, other threads:[~2011-12-09 18:49 UTC | newest]
Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 20:51 [Buildroot] equivalent of a 'make modules' Jeff Krasky
2011-11-22 22:04 ` Thomas Petazzoni
2011-11-22 22:11 ` Jeff Krasky
2011-11-22 22:29 ` Thomas Petazzoni
2011-11-22 22:35 ` Jeff Krasky
2011-11-23 7:19 ` Thomas De Schampheleire
2011-11-23 21:38 ` [Buildroot] LIBFOO_SITE in .mk file Jeff Krasky
2011-11-23 22:43 ` Jeff Krasky
2011-11-24 8:15 ` Thomas De Schampheleire
2011-11-28 15:07 ` Jeff Krasky
2011-11-28 15:11 ` Thomas Petazzoni
2011-11-28 15:19 ` Jeff Krasky
2011-11-28 15:54 ` Thomas Petazzoni
2011-11-28 16:14 ` Jeff Krasky
2011-11-28 17:39 ` Michael S. Zick
2011-11-28 18:50 ` Jeff Krasky
2011-11-28 19:24 ` Michael S. Zick
2011-11-28 19:33 ` Jeff Krasky
2011-11-28 21:14 ` Jeff Krasky
2011-11-28 22:15 ` Jeff Krasky
2011-11-29 7:37 ` Thomas Petazzoni
2011-11-29 14:28 ` Jeff Krasky
2011-11-29 14:36 ` Thomas Petazzoni
2011-11-29 14:43 ` Jeff Krasky
2011-11-29 21:43 ` Jeff Krasky
2011-11-29 22:42 ` Jeff Krasky
2011-11-30 15:59 ` Jeff Krasky
2011-11-30 16:04 ` Thomas Petazzoni
2011-11-30 16:20 ` Jeff Krasky
2011-11-30 16:33 ` Thomas Petazzoni
2011-11-30 16:38 ` Jeff Krasky
2011-11-30 16:49 ` Michael S. Zick
2011-11-30 16:57 ` Jeff Krasky
2011-11-30 17:08 ` Michael S. Zick
2011-11-30 17:48 ` Thomas De Schampheleire
2011-11-30 17:58 ` Thomas Petazzoni
2011-11-30 18:11 ` Jeff Krasky
2011-11-30 19:31 ` Jeff Krasky
2011-11-30 19:44 ` Thomas De Schampheleire
2011-11-30 20:01 ` Jeff Krasky
2011-11-30 22:21 ` Thomas Petazzoni
[not found] ` <001201ccafb0$4b5e06e0$0400a8c0@dspcgrnzks9p98>
2011-11-30 22:49 ` Thomas Petazzoni
2011-11-30 22:54 ` Jeff Krasky
2011-12-01 8:11 ` Thomas Petazzoni
2011-12-01 14:58 ` Jeff Krasky
2011-12-01 15:03 ` Michael S. Zick
2011-12-01 15:55 ` Jeff Krasky
2011-12-01 16:16 ` Jeff Krasky
2011-12-01 16:33 ` Jeff Krasky
2011-12-01 16:52 ` Michael S. Zick
2011-12-01 18:15 ` Jeff Krasky
2011-12-01 22:56 ` Jeff Krasky
2011-12-02 7:50 ` Thomas De Schampheleire
2011-12-02 8:50 ` Thomas Petazzoni
2011-12-02 13:33 ` Michael S. Zick
2011-12-02 15:57 ` Jeff Krasky
2011-12-02 16:09 ` Quotient Remainder
2011-12-02 16:51 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Jeff Krasky
2011-12-02 16:59 ` Jeff Krasky
2011-12-02 17:33 ` Tim Judd
2011-12-02 18:02 ` Jeff Krasky
2011-12-02 18:21 ` Aleksander Dutkowski
2011-12-02 18:30 ` Jeff Krasky
2011-12-03 0:25 ` Aleksander Dutkowski
2011-12-03 8:25 ` [Buildroot] Device files and Buildroot Thomas Petazzoni
2011-12-03 12:53 ` Trevor Woerner
2011-12-03 18:40 ` Thomas Petazzoni
2011-12-05 10:54 ` Aleksander Dutkowski
2011-12-08 21:30 ` Felipe Contreras
2011-12-08 23:49 ` Michael S. Zick
2011-12-09 18:49 ` Thomas Petazzoni
2011-12-02 18:31 ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Tim Judd
2011-12-02 18:24 ` Tim Judd
2011-11-29 14:54 ` [Buildroot] LIBFOO_SITE in .mk file Michael S. Zick
2011-11-29 7:35 ` Thomas Petazzoni
2011-11-28 18:55 ` Quotient Remainder
2011-11-28 19:02 ` Jeff Krasky
2011-11-29 7:31 ` Thomas Petazzoni
2011-11-23 8:25 ` [Buildroot] equivalent of a 'make modules' Thomas Petazzoni
2011-11-23 14:17 ` Jeff Krasky
2011-11-23 14:23 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox