Skip to contentSkip to conversation

Add custom boards support for Atmel SAM-BA software

PATCH New gregory hermant 2 participants 3 messages Aug 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add custom boards support for Atmel SAM-BA software

---
 package/sam-ba/Config.in.host |   13 +++++++++++++
 package/sam-ba/sam-ba.mk      |    9 +++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
package/sam-ba/Config.in.host +13 -0
index 20b2b36..16279db 100644
@@ -7,3 +7,16 @@ config BR2_PACKAGE_HOST_SAM_BA
 	  microcontrollers.
 
 	  http://www.at91.com/linux4sam/bin/view/Linux4SAM/SoftwareTools
+
+if	BR2_PACKAGE_HOST_SAM_BA
+
+config BR2_TARGET_SAM_BA_CUSTOM_PATCH_DIR
+	string "custom patch dir"
+	help
+	  If your board requires custom patches, add the path to the
+	  directory containing the patches here. The patches must be
+	  named sam-ba-<version>-<something>.patch.
+
+	  Most users may leave this empty
+
+endif
package/sam-ba/sam-ba.mk +9 -0
index 9f39347..98b600b 100644
@@ -8,6 +8,15 @@ define HOST_SAM_BA_EXTRACT_CMDS
         rmdir $(BUILD_DIR)/sam-ba_cdc_cdc_linux/
 endef
 
+ifneq ($(call qstrip,$(BR2_TARGET_SAM_BA_CUSTOM_PATCH_DIR)),)
+define SAM_BA_APPLY_CUSTOM_PATCHES
+	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_SAM_BA_CUSTOM_PATCH_DIR) \
+		sam-ba-$(SAM_BA_VERSION)-\*.patch
+endef
+
+HOST_SAM_BA_POST_PATCH_HOOKS += SAM_BA_APPLY_CUSTOM_PATCHES
+endif
+
 # Since it's a prebuilt application and it does not conform to the
 # usual Unix hierarchy, we install it in $(HOST_DIR)/opt/sam-ba and
 # then create a symbolic link from $(HOST_DIR)/usr/bin to the
Signature · 1 line
1.5.6.3
#1 lore raw

PATCH 1/1 Add custom boards support for Atmel SAM-BA software

Le Wed, 29 Aug 2012 11:55:03 +0200,
gregory hermant <[email protected]> a ?crit :

Quoted 1 line

+config BR2_TARGET_SAM_BA_CUSTOM_PATCH_DIR

This should be BR2_HOST_SAM_BA...

Also, could you send this together with another patch that actually uses this feature for at least one board, so we can see the type of patches that it is going to add?

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 Add custom boards support for Atmel SAM-BA software

Thomas,
The patch will include applets (binaries) for each board.
Do you prefer another way (for example a sam-ba package including the support of the calao board downloadable from our website) ? gregory

Quoted 14 lines · Thomas Petazzoni

Le Wed, 29 Aug 2012 11:55:03 +0200,
gregory hermant <[email protected]> a ?crit :

Quoted 1 line

+config BR2_TARGET_SAM_BA_CUSTOM_PATCH_DIR

This should be BR2_HOST_SAM_BA...

Also, could you send this together with another patch that actually uses this feature for at least one board, so we can see the type of patches that it is going to add?

Thanks!

Thomas