summaryrefslogtreecommitdiffstats
path: root/project
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-09-12 04:34:16 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-09-12 04:34:16 +0000
commit7521f37372839210e18207223ef54ed768422726 (patch)
treeb83665b04f7a60ca456d331cfd19631147cc41b2 /project
parent157d8decab1306e388881ff47146f2dd513e2155 (diff)
downloadbuildroot-novena-7521f37372839210e18207223ef54ed768422726.tar.gz
buildroot-novena-7521f37372839210e18207223ef54ed768422726.zip
Add hooks for creating your own board support package
Diffstat (limited to 'project')
-rw-r--r--project/project.mk29
1 files changed, 28 insertions, 1 deletions
diff --git a/project/project.mk b/project/project.mk
index 847cde99e..62645850b 100644
--- a/project/project.mk
+++ b/project/project.mk
@@ -1,5 +1,7 @@
+PROJECT_FILE:=$(LOCAL)/$(PROJECT)/$(PROJECT).config
-.PHONY: target-host-info
+
+.PHONY: target-host-info saveconfig getconfig
target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname
@@ -12,3 +14,28 @@ $(TARGET_DIR)/etc/issue: .config
$(TARGET_DIR)/etc/hostname: .config
mkdir -p $(TARGET_DIR)/etc
echo "$(TARGET_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
+
+saveconfig: $(CONFIG)/conf
+ mkdir -p $(LOCAL)/$(PROJECT)
+ -cp .config $(PROJECT_FILE)
+ if [ -f $(LINUX26_DIR)/.config ] ; then \
+ cp $(LINUX26_DIR)/.config $(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config ; \
+ $(SED) '/BR2_PACKAGE_LINUX_KCONFIG/d' $(PROJECT_FILE) ; \
+ echo "BR2_PACKAGE_LINUX_KCONFIG:=$(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config" >> $(PROJECT_FILE) ; \
+ fi
+ if [ -f $(BUSYBOX_DIR)/.config ] ; then \
+ cp $(BUSYBOX_DIR)/.config $(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config ; \
+ $(SED) '/BR2_PACKAGE_BUSYBOX_CONFIG/d' $(PROJECT_FILE) ; \
+ echo "BR2_PACKAGE_BUSYBOX_CONFIG:=$(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config" >> $(PROJECT_FILE) ; \
+ fi
+ if [ -f $(UCLIBC_DIR)/.config ] ; then \
+ cp $(UCLIBC_DIR)/.config $(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config ; \
+ $(SED) '/BR2_UCLIBC_CONFIG/d' $(PROJECT_FILE) ; \
+ echo "BR2_UCLIBC_CONFIG:=$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config" >> $(PROJECT_FILE) ; \
+ fi
+ if [ -f $(UBOOT_DIR)/include/configs/$(PROJECT).h ] ; then \
+ cp $(UBOOT_DIR)/include/configs/$(PROJECT).h $(LOCAL)/$(PROJECT)/u-boot/$(PROJECT).h ; \
+ fi
+
+getconfig: $(CONFIG)/conf
+ -cp $(LOCAL)/$(PROJECT)/$(PROJECT).config .config