* [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft
@ 2013-04-11 14:48 Spenser Gilliland
2013-04-11 14:48 ` [Buildroot] [PATCH] fs: add uimage support w/ example for cpio Spenser Gilliland
2013-04-11 17:33 ` [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Spenser Gilliland @ 2013-04-11 14:48 UTC (permalink / raw)
To: buildroot
From: Spenser Gilliland <Spenser309@gmail.com>
The current fftw package only produces double precision floating point
libraries. This package recompiles the library for single precision and
uses the neon extensions if available.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
package/Config.in | 1 +
package/fftwf/Config.in | 14 ++++++++++++++
package/fftwf/fftwf.mk | 21 +++++++++++++++++++++
3 files changed, 36 insertions(+)
create mode 100644 package/fftwf/Config.in
create mode 100644 package/fftwf/fftwf.mk
diff --git a/package/Config.in b/package/Config.in
index 69d87f0..b1bbfea 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -550,6 +550,7 @@ source "package/libcofi/Config.in"
source "package/classpath/Config.in"
source "package/elfutils/Config.in"
source "package/fftw/Config.in"
+source "package/fftw/Config.in"
source "package/libargtable2/Config.in"
source "package/argp-standalone/Config.in"
source "package/boost/Config.in"
diff --git a/package/fftwf/Config.in b/package/fftwf/Config.in
new file mode 100644
index 0000000..243be02
--- /dev/null
+++ b/package/fftwf/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_FFTWF
+ bool "fftwf"
+ depends on BR2_PACKAGE_FFTW
+ help
+ Library for computing Fast Fourier Transforms using the ARM Neon
+ instruction set.
+
+ This library computes Fast Fourier Transforms (FFT) in one
+ or more dimensions. It is extremely fast. This package
+ contains the shared library version of the fftw libraries in
+ single precision.
+
+ http://www.fftw.org
+
diff --git a/package/fftwf/fftwf.mk b/package/fftwf/fftwf.mk
new file mode 100644
index 0000000..90fb80e
--- /dev/null
+++ b/package/fftwf/fftwf.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# fftwf
+#
+################################################################################
+
+FFTWF_VERSION = 3.3.2
+FFTWF_SITE = http://www.fftw.org
+FFTWF_SOURCE = fftw-$(FFTWF_VERSION).tar.gz
+FFTWF_INSTALL_STAGING = YES
+
+ifeq ($(BR2_ARM_ENABLE_NEON),y)
+FFTWF_CONF_OPT = --enable-single --enable-neon
+FFTWF_CONF_ENV += \
+ CFLAGS="$(TARGET_CFLAGS) -mfpu=neon -mfloat-abi=softfp"
+else
+FFTWF_CONF_OPT = --enable-single
+endif
+
+$(eval $(autotools-package))
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] fs: add uimage support w/ example for cpio
2013-04-11 14:48 [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Spenser Gilliland
@ 2013-04-11 14:48 ` Spenser Gilliland
2013-04-11 16:41 ` Sören Brinkmann
2013-04-11 17:39 ` Thomas Petazzoni
2013-04-11 17:33 ` [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Thomas Petazzoni
1 sibling, 2 replies; 6+ messages in thread
From: Spenser Gilliland @ 2013-04-11 14:48 UTC (permalink / raw)
To: buildroot
From: Spenser Gilliland <Spenser309@gmail.com>
Adds uimage support for various root filesystems. Uimage support is needed
when using the bootm command in uboot. This provides both a simple infrastructure
similar to the current BR2_TARGET_ROOTFS_$(2)_GZ for adding compression. To define the a rootfs should have a UIMAGE wrapper simply create the BR2_TARGET_ROOTFS_$(2)_UIMAGE symbol.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
fs/common.mk | 19 ++++++++++++++++++-
fs/cpio/Config.in | 7 +++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/fs/common.mk b/fs/common.mk
index a0b7b39..c97e012 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -31,6 +31,8 @@
# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
# macro will automatically generate a compressed filesystem image.
+MKIMAGE_RAMDISK = $(HOST_DIR)/usr/bin/mkimage -A $(BR2_ARCH) -T ramdisk -C $(1) -d $(2) $(2).uboot
+
FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
@@ -39,7 +41,7 @@ ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
define ROOTFS_TARGET_INTERNAL
# extra deps
-ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
+ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma) $$(if $$(BR2_TARGET_ROOTFS_$(2)_UIMAGE),host-uboot-tools)
$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES)
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
@@ -70,6 +72,21 @@ endif
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
$$(LZMA) -9 -c $$@ > $$@.lzma
endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_UIMAGE),y)
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_NONE),y)
+ $$(call MKIMAGE_RAMDISK,none,$$@)
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
+ $$(call MKIMAGE_RAMDISK,gzip,$$@.gz)
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
+ $$(call MKIMAGE_RAMDISK,bzip2,$$@.bz2)
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
+ $$(call MKIMAGE_RAMDISK,lzma,$$@.lzma)
+endif
+endif
+
rootfs-$(1)-show-depends:
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in
index 0669a44..b0c0210 100644
--- a/fs/cpio/Config.in
+++ b/fs/cpio/Config.in
@@ -5,6 +5,13 @@ config BR2_TARGET_ROOTFS_CPIO
used for an initial RAM filesystem that is passed to the kernel
by the bootloader.
+config BR2_TARGET_ROOTFS_CPIO_UIMAGE
+ bool "Add U-Boot header to the root filesystem"
+ depends on BR2_TARGET_ROOTFS_CPIO
+ help
+ Add a u-boot header to the cpio root filesystem. This allows
+ the image to be booted by the bootm command in uboot.
+
choice
prompt "Compression method"
default BR2_TARGET_ROOTFS_CPIO_NONE
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] fs: add uimage support w/ example for cpio
2013-04-11 14:48 ` [Buildroot] [PATCH] fs: add uimage support w/ example for cpio Spenser Gilliland
@ 2013-04-11 16:41 ` Sören Brinkmann
2013-04-11 17:39 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Sören Brinkmann @ 2013-04-11 16:41 UTC (permalink / raw)
To: buildroot
On Thu, Apr 11, 2013 at 09:48:04AM -0500, Spenser Gilliland wrote:
> From: Spenser Gilliland <Spenser309@gmail.com>
>
> Adds uimage support for various root filesystems. Uimage support is needed
> when using the bootm command in uboot. This provides both a simple infrastructure
> similar to the current BR2_TARGET_ROOTFS_$(2)_GZ for adding compression. To define the a rootfs should have a UIMAGE wrapper simply create the BR2_TARGET_ROOTFS_$(2)_UIMAGE symbol.
>
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
I successfully created a lzma compressed initramfs with u-boot header.
With this and my patch from yesterday I can directly create working root file
systems for Zynq w/o any further interaction.
This patch though, adds two lines with trailing white spaces.
S?ren
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft
2013-04-11 14:48 [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Spenser Gilliland
2013-04-11 14:48 ` [Buildroot] [PATCH] fs: add uimage support w/ example for cpio Spenser Gilliland
@ 2013-04-11 17:33 ` Thomas Petazzoni
2013-04-11 18:17 ` Spenser Gilliland
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2013-04-11 17:33 UTC (permalink / raw)
To: buildroot
Dear Spenser Gilliland,
On Thu, 11 Apr 2013 09:48:03 -0500, Spenser Gilliland wrote:
> +FFTWF_VERSION = 3.3.2
> +FFTWF_SITE = http://www.fftw.org
> +FFTWF_SOURCE = fftw-$(FFTWF_VERSION).tar.gz
> +FFTWF_INSTALL_STAGING = YES
package/fftw/ that already exists in Buildroot builds the exact same
source code. Why do you think a different package is needed?
Why don't you just add the:
+ifeq ($(BR2_ARM_ENABLE_NEON),y)
+FFTWF_CONF_OPT = --enable-single --enable-neon
+FFTWF_CONF_ENV += \
+ CFLAGS="$(TARGET_CFLAGS) -mfpu=neon -mfloat-abi=softfp"
+else
+FFTWF_CONF_OPT = --enable-single
+endif
block of code into package/fftw/fftw.mk ?
In Buildroot, we generally have one package for each source tarball.
But this package may provide different configuration options to adapt
to the specificities of the platform, or to provide different kind of
features.
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] 6+ messages in thread
* [Buildroot] [PATCH] fs: add uimage support w/ example for cpio
2013-04-11 14:48 ` [Buildroot] [PATCH] fs: add uimage support w/ example for cpio Spenser Gilliland
2013-04-11 16:41 ` Sören Brinkmann
@ 2013-04-11 17:39 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2013-04-11 17:39 UTC (permalink / raw)
To: buildroot
Dear Spenser Gilliland,
Thanks for your contribution!
On Thu, 11 Apr 2013 09:48:04 -0500, Spenser Gilliland wrote:
> From: Spenser Gilliland <Spenser309@gmail.com>
>
> Adds uimage support for various root filesystems. Uimage support is needed
> when using the bootm command in uboot. This provides both a simple infrastructure
> similar to the current BR2_TARGET_ROOTFS_$(2)_GZ for adding compression. To define the a rootfs should have a UIMAGE wrapper simply create the BR2_TARGET_ROOTFS_$(2)_UIMAGE symbol.
Please wrap the commit log at ~80 columns.
> # extra deps
> -ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
> +ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma) $$(if $$(BR2_TARGET_ROOTFS_$(2)_UIMAGE),host-uboot-tools)
Split the line:
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot \
$$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma) \
$$(if $$(BR2_TARGET_ROOTFS_$(2)_UIMAGE),host-uboot-tools)
> +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_UIMAGE),y)
> +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_NONE),y)
> + $$(call MKIMAGE_RAMDISK,none,$$@)
> +endif
> +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
> + $$(call MKIMAGE_RAMDISK,gzip,$$@.gz)
> +endif
> +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
> + $$(call MKIMAGE_RAMDISK,bzip2,$$@.bz2)
> +endif
> +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
> + $$(call MKIMAGE_RAMDISK,lzma,$$@.lzma)
> +endif
> +endif
I am wondering: will we ever need this on something else than cpio?
> +config BR2_TARGET_ROOTFS_CPIO_UIMAGE
> + bool "Add U-Boot header to the root filesystem"
> + depends on BR2_TARGET_ROOTFS_CPIO
> + help
Indentation should be one tab.
> + Add a u-boot header to the cpio root filesystem. This allows
> + the image to be booted by the bootm command in uboot.
> +
> choice
> prompt "Compression method"
> default BR2_TARGET_ROOTFS_CPIO_NONE
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] 6+ messages in thread
* [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft
2013-04-11 17:33 ` [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Thomas Petazzoni
@ 2013-04-11 18:17 ` Spenser Gilliland
0 siblings, 0 replies; 6+ messages in thread
From: Spenser Gilliland @ 2013-04-11 18:17 UTC (permalink / raw)
To: buildroot
The problem is that the FFTW program cannot build both the single and
double precision libraries at the same time.
so the following must be done.
./configure
make
make install
./configure --enable-single --enable-neon
make
make install
The first run through installs the fftw library and pkg-config file.
The second run through only installs the fftwf library (no pkg-config
file).
Because the pkg-config is only installed from the double precision
(1st install). The fftwf library must depend on the fftw library for
proper operation.
Let me know if any changes should be made.
Spenser
On Thu, Apr 11, 2013 at 12:33 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Spenser Gilliland,
>
> On Thu, 11 Apr 2013 09:48:03 -0500, Spenser Gilliland wrote:
>
>> +FFTWF_VERSION = 3.3.2
>> +FFTWF_SITE = http://www.fftw.org
>> +FFTWF_SOURCE = fftw-$(FFTWF_VERSION).tar.gz
>> +FFTWF_INSTALL_STAGING = YES
>
> package/fftw/ that already exists in Buildroot builds the exact same
> source code. Why do you think a different package is needed?
>
> Why don't you just add the:
>
> +ifeq ($(BR2_ARM_ENABLE_NEON),y)
> +FFTWF_CONF_OPT = --enable-single --enable-neon
> +FFTWF_CONF_ENV += \
> + CFLAGS="$(TARGET_CFLAGS) -mfpu=neon -mfloat-abi=softfp"
> +else
> +FFTWF_CONF_OPT = --enable-single
> +endif
>
> block of code into package/fftw/fftw.mk ?
>
> In Buildroot, we generally have one package for each source tarball.
> But this package may provide different configuration options to adapt
> to the specificities of the platform, or to provide different kind of
> features.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
--
Spenser Gilliland
Computer Engineer
Doctoral Candidate
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-11 18:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 14:48 [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Spenser Gilliland
2013-04-11 14:48 ` [Buildroot] [PATCH] fs: add uimage support w/ example for cpio Spenser Gilliland
2013-04-11 16:41 ` Sören Brinkmann
2013-04-11 17:39 ` Thomas Petazzoni
2013-04-11 17:33 ` [Buildroot] [PATCH] fftwf: Add fftwf package for single precision fft Thomas Petazzoni
2013-04-11 18:17 ` Spenser Gilliland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox