]> rtime.felk.cvut.cz Git - fpga/zynq/canbench-sw.git/commitdiff
petalinux: added app bc
authorMartin Jerabek <jerabma7@fel.cvut.cz>
Tue, 24 May 2016 11:07:17 +0000 (13:07 +0200)
committerMartin Jerabek <jerabma7@fel.cvut.cz>
Tue, 24 May 2016 11:07:17 +0000 (13:07 +0200)
petalinux/components/apps/bc/Kconfig [new file with mode: 0644]
petalinux/components/apps/bc/Makefile [new file with mode: 0644]
petalinux/components/apps/mc/Makefile
petalinux/subsystems/linux/configs/rootfs/config

diff --git a/petalinux/components/apps/bc/Kconfig b/petalinux/components/apps/bc/Kconfig
new file mode 100644 (file)
index 0000000..10c20a4
--- /dev/null
@@ -0,0 +1,14 @@
+###############################################################################
+# Please modify this file if you want to configure your own application.
+# You can uncommon and/or change the following Kconfig elements.
+###############################################################################
+
+
+if ROOTFS_COMPONENT_APPS_NAME_BC
+       comment "No additional options for BC"
+
+#      config APPS_BC_OPTION0
+#      bool "option0"
+#      help
+#        Help text
+endif
diff --git a/petalinux/components/apps/bc/Makefile b/petalinux/components/apps/bc/Makefile
new file mode 100644 (file)
index 0000000..dfdfd4e
--- /dev/null
@@ -0,0 +1,60 @@
+ifndef PETALINUX
+$(error "Error: PETALINUX environment variable not set.  Change to the root of your PetaLinux install, and source the settings.sh file")
+endif
+
+include apps.common.mk
+
+export PKG_CONFIG_PATH = $(STAGEDIR)/usr/lib/pkgconfig
+export PKG_CONFIG_SYSROOT_DIR = $(STAGEDIR)
+
+.PHONY: all build install clean help
+all: build install
+build: .installed
+
+VER := 1.06
+DIR := bc-$(VER)
+ARCHIVE := $(DIR).tar.gz
+URL := https://ftp.gnu.org/gnu/bc/$(ARCHIVE)
+
+$(ARCHIVE):
+       wget -c $(URL)
+.unpacked: $(ARCHIVE)
+       tar xf $(ARCHIVE)
+       touch .unpacked
+
+PREFIX := $(shell pwd)/image
+
+.configured: .unpacked
+       cd $(DIR) && ./configure --host=arm-xilinx-linux-gnueabi \
+               --with-sysroot=$(STAGEDIR) \
+               --prefix=/ --exec-prefix=/usr --includedir=/usr/include --datadir=/usr/share
+       touch .configured
+.built: .configured
+       cd $(DIR) && $(MAKE)
+       touch .built
+.installed: .built
+       cd $(DIR) && $(MAKE) install DESTDIR=$(PREFIX)
+       for f in $(PREFIX)/usr/bin/* $(PREFIX)/usr/lib/*; do \
+               echo "Stripping $$f"; $(STRIP) $$f &>/dev/null; done; true
+       (cd $(PREFIX) && find . -not -type d) >.files
+       rm $(STAGEDIR)/usr/bin/dc # remove dc from busybox
+       cp -R -t $(STAGEDIR) $(PREFIX)/*
+       rm -R $(PREFIX)
+       while read f; do \
+               $(TARGETINST) -d $(STAGEDIR)/$$f /$$f; \
+       done <.files
+       #touch .installed
+
+install: .installed
+
+clean:
+       rm -rf $(DIR) .unpacked .configured .built .installed .files
+
+help:
+       @echo "$(TARGETINST)"
+       @echo "Quick reference for various supported build targets for $(INSTANCE)."
+       @echo "----------------------------------------------------"
+       @echo "  clean                  clean out build objects"
+       @echo "  all                    build $(INSTANCE) and install to rootfs host copy"
+       @echo "  build                  build subsystem"
+       @echo "  install                install built objects to rootfs host copy"
index a005f1a38cb116683591655106817be6eeb6a1a0..911b23ed6952c0a17d1cb96d03066f025eceed12 100644 (file)
@@ -35,6 +35,8 @@ PREFIX := $(shell pwd)/image
        touch .built
 .installed: .built
        cd $(DIR) && $(MAKE) install DESTDIR=$(PREFIX)
+       for f in $(PREFIX)/usr/bin/* $(PREFIX)/usr/lib/*; do \
+               echo "Stripping $$f"; $(STRIP) $$f &>/dev/null; done; true
        (cd $(PREFIX) && find . -not -type d) >.files
        cp -R -t $(STAGEDIR) $(PREFIX)/*
        rm -R $(PREFIX)
index 836abb7403bd649fe564e4330a0f26e0bd672059..2d240b84d4b2a613299da12140f23550c6803237 100644 (file)
@@ -252,7 +252,7 @@ CONFIG_ROOTFS_PACKAGES_UTIL_LINUX_UMOUNT=y
 #
 # bash
 #
-# CONFIG_ROOTFS_PACKAGES_BASH is not set
+CONFIG_ROOTFS_PACKAGES_BASH=y
 
 #
 # console/network
@@ -1635,6 +1635,11 @@ CONFIG_ROOTFS_COMPONENT_LIBS_NAME_TALLOC=y
 #
 # Apps
 #
+CONFIG_ROOTFS_COMPONENT_APPS_NAME_BC=y
+
+#
+# No additional options for BC
+#
 CONFIG_ROOTFS_COMPONENT_APPS_NAME_CANHWTSTAMP=y
 
 #