Blame view

buildroot/buildroot-2016.08.1/package/freescale-imx/imx-uuc/imx-uuc.mk 1.35 KB
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  ################################################################################
  #
  # imx-uuc
  #
  ################################################################################
  
  IMX_UUC_VERSION = 0.5.1
  IMX_UUC_SITE = $(FREESCALE_IMX_SITE)
  IMX_UUC_LICENSE = GPLv2+
  IMX_UUC_LICENSE_FILES = COPYING
  
  # mkfs.vfat is needed to create a FAT partition used by g_mass_storage
  # so Windows do not offer to format the device when connected to the PC.
  IMX_UUC_DEPENDENCIES = host-dosfstools
  
  define IMX_UUC_BUILD_CMDS
  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC=$(TARGET_CC)
  endef
  
  define IMX_UUC_INSTALL_TARGET_CMDS
  	$(INSTALL) -D -m 755 $(@D)/uuc $(TARGET_DIR)/usr/bin/uuc
  	$(INSTALL) -D -m 755 $(@D)/sdimage $(TARGET_DIR)/usr/bin/sdimage
  	dd if=/dev/zero of=$(TARGET_DIR)/fat bs=1M count=1
  	$(HOST_DIR)/usr/sbin/mkfs.vfat $(TARGET_DIR)/fat
  endef
  
  define IMX_UUC_INSTALL_INIT_SYSV
  	$(INSTALL) -D -m 0755 package/freescale-imx/imx-uuc/S80imx-uuc \
  		$(TARGET_DIR)/etc/init.d/S80imx-uuc
  endef
  
  define IMX_UUC_INSTALL_INIT_SYSTEMD
  	$(INSTALL) -D -m 0644 package/freescale-imx/imx-uuc/imx-uuc.service \
  		$(TARGET_DIR)/usr/lib/systemd/system/imx-uuc.service
  	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
  	ln -fs ../../../../usr/lib/systemd/system/imx-uuc.service \
  		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/imx-uuc.service
  endef
  
  $(eval $(generic-package))