1 ################################################################################
5 ################################################################################
7 AM335X_PRU_PACKAGE_VERSION
= 5f374ad57cc195f28bf5e585c3d446aba6ee7096
8 AM335X_PRU_PACKAGE_SITE
= $(call github
,beagleboard
,am335x_pru_package
,$(AM335X_PRU_PACKAGE_VERSION
))
9 AM335X_PRU_PACKAGE_LICENSE
= BSD-3c
10 AM335X_PRU_PACKAGE_LICENSE_FILES
= pru_sw
/utils
/LICENCE.txt
11 AM335X_PRU_PACKAGE_DEPENDENCIES
= host-am335x-pru-package
12 AM335X_PRU_PACKAGE_INSTALL_STAGING
= YES
14 # The default 'all' rule builds everything, when we just need the library
15 ifeq ($(BR2_ENABLE_DEBUG
),y
)
16 AM335X_MAKE_TARGET
= debug
$(if
$(BR2_STATIC_LIBS
),,sodebug
)
18 AM335X_MAKE_TARGET
= release
$(if
$(BR2_STATIC_LIBS
),,sorelease
)
21 define AM335X_PRU_PACKAGE_BUILD_CMDS
22 $(TARGET_MAKE_ENV
) $(MAKE
) CROSS_COMPILE
="$(TARGET_CROSS)" \
23 -C
$(@D
)/pru_sw
/app_loader
/interface
$(AM335X_MAKE_TARGET
)
26 # 'install' installs whatever was built, and our patch removes the dependency
27 # on the release build, so we can use it to install whatever we built above.
28 define AM335X_PRU_PACKAGE_INSTALL_STAGING_CMDS
29 $(TARGET_MAKE_ENV
) $(MAKE1
) DESTDIR
="$(STAGING_DIR)" PREFIX
="/usr" \
30 -C
$(@D
)/pru_sw
/app_loader
/interface
install
33 define AM335X_PRU_PACKAGE_INSTALL_TARGET_CMDS
34 $(TARGET_MAKE_ENV
) $(MAKE1
) DESTDIR
="$(TARGET_DIR)" PREFIX
="/usr" \
35 -C
$(@D
)/pru_sw
/app_loader
/interface
install
38 # The debug libraries are named differently than the release ones,
39 # so we must provide a symlink to still be able to link with them.
40 ifeq ($(BR2_ENABLE_DEBUG
),y
)
42 define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
43 ln
-sf libprussdrvd.a
$(STAGING_DIR
)/usr
/lib
/libprussdrv.a
45 AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS
+= AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
47 ifeq ($(BR2_STATIC_LIBS
),)
49 define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
50 ln
-sf libprussdrvd.so
$(STAGING_DIR
)/usr
/lib
/libprussdrv.so
52 AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS
+= AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
54 define AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
55 ln
-sf libprussdrvd.so
$(TARGET_DIR
)/usr
/lib
/libprussdrv.so
57 AM335X_PRU_PACKAGE_POST_INSTALL_TARGET_HOOKS
+= AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
63 define HOST_AM335X_PRU_PACKAGE_BUILD_CMDS
64 cd
$(@D
)/pru_sw
/utils
/pasm_source
; \
65 $(HOSTCC
) -Wall
-D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c \
66 pasmdot.c pasmstruct.c pasmmacro.c path_utils.c
-o ..
/pasm
69 define HOST_AM335X_PRU_PACKAGE_INSTALL_CMDS
70 $(INSTALL
) -m
0755 -D
$(@D
)/pru_sw
/utils
/pasm
$(HOST_DIR
)/usr
/bin
/pasm
73 $(eval
$(generic-package
))
74 $(eval
$(host-generic-package
))