From c264dcf849dfbd207d53b98468c6cbdc926f8934 Mon Sep 17 00:00:00 2001 From: Martin Jerabek Date: Tue, 29 Mar 2016 20:36:18 +0200 Subject: [PATCH] petalinux: added canutils, dropbear (SSH server), libs --- petalinux/components/apps/canutils/Kconfig | 14 ++++++ petalinux/components/apps/canutils/Makefile | 43 +++++++++++++++++++ petalinux/components/libs/talloc/Makefile | 7 ++- .../subsystems/linux/configs/rootfs/config | 29 +++++++------ 4 files changed, 77 insertions(+), 16 deletions(-) create mode 100644 petalinux/components/apps/canutils/Kconfig create mode 100644 petalinux/components/apps/canutils/Makefile diff --git a/petalinux/components/apps/canutils/Kconfig b/petalinux/components/apps/canutils/Kconfig new file mode 100644 index 0000000..f1eba3c --- /dev/null +++ b/petalinux/components/apps/canutils/Kconfig @@ -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_CANUTILS + comment "No additional options for CANUTILS" + +# config APPS_CANUTILS_OPTION0 +# bool "option0" +# help +# Help text +endif diff --git a/petalinux/components/apps/canutils/Makefile b/petalinux/components/apps/canutils/Makefile new file mode 100644 index 0000000..6eeb8bd --- /dev/null +++ b/petalinux/components/apps/canutils/Makefile @@ -0,0 +1,43 @@ +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 + +.PHONY: all build install clean +all: build install + +DIR := zynq_canutils +ARCHIVE := $(DIR).rar +URL := http://www.wiki.xilinx.com/file/view/zynq_canutils.rar/498279002/$(ARCHIVE) + +$(ARCHIVE): + wget -c $(URL) +.unpacked: $(ARCHIVE) + unrar x $(ARCHIVE) + touch .unpacked +.installed: .unpacked + cd $(DIR) && tar -x --strip-components=1 -f canutils_install.tar.gz -C $(STAGEDIR)/usr + cd $(DIR) && tar -x --strip-components=1 -f libskt_install.tar.gz -C $(STAGEDIR)/usr + + +build: .installed + +L := libsocketcan.so +install: build + for f in candump canecho cansequence; do $(TARGETINST) -d $(STAGEDIR)/usr/bin/$$f /usr/bin/$$f; done + for f in canconfig; do $(TARGETINST) -d $(STAGEDIR)/usr/sbin/$$f /usr/sbin/$$f; done + for f in $(L).2.2.0; do $(TARGETINST) -d $(STAGEDIR)/usr/lib/$$f /usr/lib/$$f; done + for f in $(L) $(L).2; do $(TARGETINST) -s $(L).2.2.0 /usr/lib/$$f; done + +clean: + -rm -Rf $(DIR) .unpacked .installed + +help: + @echo "" + @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" diff --git a/petalinux/components/libs/talloc/Makefile b/petalinux/components/libs/talloc/Makefile index 1e6f1b6..7746829 100644 --- a/petalinux/components/libs/talloc/Makefile +++ b/petalinux/components/libs/talloc/Makefile @@ -7,7 +7,6 @@ include libs.common.mk .PHONY: all build install clean help all: build install build: .installed -install: .merged VER := 2.1.6 DIR := talloc-$(VER) @@ -17,7 +16,7 @@ L := libtalloc.so $(ARCHIVE): wget -c $(URL) -.unpacked: | $(ARCHIVE) +.unpacked: $(ARCHIVE) tar xzf $(ARCHIVE) touch .unpacked @@ -31,12 +30,12 @@ $(ARCHIVE): cd $(DIR) && python2 ./buildtools/bin/waf install touch .installed -.merged: .installed +install: .installed for f in $(L).$(VER); do $(TARGETINST) -d $(STAGEDIR)/usr/lib/$$f /usr/lib/$$f; done for f in $(L) $(L).2; do $(TARGETINST) -s $(L).$(VER) /usr/lib/$$f; done clean: - rm -rf $(DIR) + rm -rf $(DIR) .unpacked .configured .built .installed help: @echo "" diff --git a/petalinux/subsystems/linux/configs/rootfs/config b/petalinux/subsystems/linux/configs/rootfs/config index 1f7202b..b11673d 100644 --- a/petalinux/subsystems/linux/configs/rootfs/config +++ b/petalinux/subsystems/linux/configs/rootfs/config @@ -266,8 +266,8 @@ CONFIG_ROOTFS_PACKAGES_UTIL_LINUX_UMOUNT=y # # dropbear # -# CONFIG_ROOTFS_PACKAGES_DROPBEAR is not set -# CONFIG_ROOTFS_PACKAGES_DROPBEAR_OPENSSH_SFTP_SERVER is not set +CONFIG_ROOTFS_PACKAGES_DROPBEAR=y +CONFIG_ROOTFS_PACKAGES_DROPBEAR_OPENSSH_SFTP_SERVER=y # # ethtool @@ -282,7 +282,7 @@ CONFIG_ROOTFS_PACKAGES_UTIL_LINUX_UMOUNT=y # # openssh # -# CONFIG_ROOTFS_PACKAGES_OPENSSH_SFTP_SERVER is not set +CONFIG_ROOTFS_PACKAGES_OPENSSH_SFTP_SERVER=y # # portmap @@ -1559,21 +1559,21 @@ CONFIG_ROOTFS_PACKAGES_LIBPOPT_DEV=y # # ncurses # -# CONFIG_ROOTFS_PACKAGES_LIBFORM5 is not set +CONFIG_ROOTFS_PACKAGES_LIBFORM5=y # CONFIG_ROOTFS_PACKAGES_LIBFORMW5 is not set -# CONFIG_ROOTFS_PACKAGES_LIBMENU5 is not set +CONFIG_ROOTFS_PACKAGES_LIBMENU5=y # CONFIG_ROOTFS_PACKAGES_LIBMENUW5 is not set -# CONFIG_ROOTFS_PACKAGES_LIBNCURSES5 is not set +CONFIG_ROOTFS_PACKAGES_LIBNCURSES5=y CONFIG_ROOTFS_PACKAGES_LIBNCURSESW5=y # CONFIG_ROOTFS_PACKAGES_LIBPANEL5 is not set # CONFIG_ROOTFS_PACKAGES_LIBPANELW5 is not set -# CONFIG_ROOTFS_PACKAGES_LIBTIC5 is not set +CONFIG_ROOTFS_PACKAGES_LIBTIC5=y # CONFIG_ROOTFS_PACKAGES_LIBTICW5 is not set CONFIG_ROOTFS_PACKAGES_LIBTINFO5=y -# CONFIG_ROOTFS_PACKAGES_NCURSES is not set -# CONFIG_ROOTFS_PACKAGES_NCURSES_TERMINFO is not set -# CONFIG_ROOTFS_PACKAGES_NCURSES_TERMINFO_BASE is not set -# CONFIG_ROOTFS_PACKAGES_NCURSES_TOOLS is not set +CONFIG_ROOTFS_PACKAGES_NCURSES=y +CONFIG_ROOTFS_PACKAGES_NCURSES_TERMINFO=y +CONFIG_ROOTFS_PACKAGES_NCURSES_TERMINFO_BASE=y +CONFIG_ROOTFS_PACKAGES_NCURSES_TOOLS=y # # popt @@ -1583,7 +1583,7 @@ CONFIG_ROOTFS_PACKAGES_LIBPOPT0=y # # zlib # -# CONFIG_ROOTFS_PACKAGES_LIBZ1 is not set +CONFIG_ROOTFS_PACKAGES_LIBZ1=y # # libs/network @@ -1640,6 +1640,11 @@ CONFIG_ROOTFS_COMPONENT_APPS_NAME_CANHWTSTAMP=y # # No additional options for CANHWTSTAMP # +CONFIG_ROOTFS_COMPONENT_APPS_NAME_CANUTILS=y + +# +# No additional options for CANUTILS +# CONFIG_ROOTFS_COMPONENT_APPS_NAME_FWUPGRADE=y # CONFIG_ROOTFS_COMPONENT_APPS_NAME_GPIO__DEMO is not set # CONFIG_ROOTFS_COMPONENT_APPS_NAME_LATENCYSTAT is not set -- 2.39.2