[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-99-g9c58cd6
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-01-12 13:38:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 9c58cd6caeb75bda635d865c56e7e6457ea02587 (commit)
via e117f00537b9d3b9362a1c3447def2e977e47d31 (commit)
via dc8bb35f627f6d17e75374d2d55c9a884038ec99 (commit)
from 9ed2344b0fc2883f1abb1303dcaba2ae6fc3e41f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9c58cd6caeb75bda635d865c56e7e6457ea02587
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 14:37:46 2010 +0100
[TOOLS] Now U-Boot can be quiltified too
commit e117f00537b9d3b9362a1c3447def2e977e47d31
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 13:59:35 2010 +0100
[BUILD] Add U-Boot version to armadeus global envt variables
commit dc8bb35f627f6d17e75374d2d55c9a884038ec99
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jan 12 13:18:31 2010 +0100
[BUILD] Add U-Boot dir to armadeus global envt variables
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 +
Makefile.in | 2 +
patches/buildroot/051-u-boot.patch | 33 +++++++++++++------
scripts/quiltify.sh | 62 +++++++++++++++++++++++++++---------
4 files changed, 74 insertions(+), 25 deletions(-)
diff --git a/Makefile b/Makefile
index d6b53da..6aa728b 100644
--- a/Makefile
+++ b/Makefile
@@ -184,6 +184,8 @@ shell_env:
@echo ARMADEUS_BUILDROOT_DIR=$(BUILDROOT_DIR) > $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_DIR=$(ARMADEUS_LINUX_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_LINUX_PATCH_DIR=$(ARMADEUS_LINUX_PATCH_DIR) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_U_BOOT_DIR=$(ARMADEUS_U_BOOT_DIR) >> $(ARMADEUS_ENV_FILE)
+ @echo ARMADEUS_U_BOOT_VERSION=$(ARMADEUS_U_BOOT_VERSION) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_ROOTFS_DIR=$(ARMADEUS_ROOTFS_DIR) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_BINARIES=$(ARMADEUS_BINARIES) >> $(ARMADEUS_ENV_FILE)
@echo ARMADEUS_ROOTFS_TAR=$(ARMADEUS_ROOTFS_TAR) >> $(ARMADEUS_ENV_FILE)
diff --git a/Makefile.in b/Makefile.in
index 97acd7e..aef85c8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,6 +12,7 @@ BUILDROOT_DIR=$(ARMADEUS_BASE_DIR)/buildroot
-include $(BUILDROOT_DIR)/.config
ARMADEUS_LINUX_VERSION:=$(shell echo $(BR2_LINUX26_VERSION))
+ARMADEUS_U_BOOT_VERSION:=$(shell grep "U_BOOT_VERSION:=" $(BUILDROOT_DIR)/target/u-boot/Makefile.in 2>/dev/null | cut -d = -f 2)
ARMADEUS_BOARD_NAME:=$(shell echo $(BR2_BOARD_NAME))
ARMADEUS_PROJECT_NAME:=$(shell echo $(BR2_PROJECT))
ARMADEUS_TARGET_ARCH:=$(shell echo $(BR2_GCC_TARGET_ARCH))
@@ -25,6 +26,7 @@ endif
ARMADEUS_PATCH_DIR=patches
ARMADEUS_LINUX_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/linux-$(ARMADEUS_LINUX_VERSION)
ARMADEUS_LINUX_PATCH_DIR=$(BUILDROOT_DIR)/target/device/armadeus/linux/kernel-patches/$(ARMADEUS_LINUX_VERSION)
+ARMADEUS_U_BOOT_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/u-boot-$(ARMADEUS_U_BOOT_VERSION)
ARMADEUS_UCLIBC_DIR=$(BUILDROOT_DIR)/toolchain_build_$(ARMADEUS_TARGET_ARCH)/uClibc-$(ARMADEUS_UCLIBC_VERSION)
ARMADEUS_BOARD_DIR=$(BUILDROOT_DIR)/target/device/armadeus/$(ARMADEUS_BOARD_NAME)/
ARMADEUS_ROOTFS_DIR=$(BUILDROOT_DIR)/project_build_$(ARMADEUS_TARGET_ARCH)/$(ARMADEUS_PROJECT_NAME)/root
diff --git a/patches/buildroot/051-u-boot.patch b/patches/buildroot/051-u-boot.patch
index e26611c..2697416 100644
--- a/patches/buildroot/051-u-boot.patch
+++ b/patches/buildroot/051-u-boot.patch
@@ -1,5 +1,7 @@
---- buildroot/target/u-boot.ref/Config.in 2008-11-03 09:15:09.000000000 +0100
-+++ buildroot/target/u-boot/Config.in 2008-11-13 22:01:30.000000000 +0100
+Index: buildroot/target/u-boot/Config.in
+===================================================================
+--- buildroot.orig/target/u-boot/Config.in 2008-11-03 09:15:09.000000000 +0100
++++ buildroot/target/u-boot/Config.in 2010-01-06 22:23:02.000000000 +0100
@@ -7,11 +7,18 @@
config BR2_TARGET_UBOOT_BOARDNAME
string "board name"
@@ -31,9 +33,11 @@
+ default ""
+ help
+ Copies the resulting image to a secondary location.
---- buildroot/target/u-boot/Makefile.in.ref 2008-11-03 09:15:09.000000000 +0100
-+++ buildroot/target/u-boot/Makefile.in 2008-11-20 23:52:02.000000000 +0100
-@@ -9,7 +9,14 @@ U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boo
+Index: buildroot/target/u-boot/Makefile.in
+===================================================================
+--- buildroot.orig/target/u-boot/Makefile.in 2008-11-03 09:15:09.000000000 +0100
++++ buildroot/target/u-boot/Makefile.in 2010-01-12 11:53:17.000000000 +0100
+@@ -9,7 +9,14 @@
U_BOOT_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-patches
U_BOOT_CAT:=$(BZCAT)
@@ -48,7 +52,7 @@
U_BOOT_TOOLS_BIN:=mkimage
# u-boot still uses arch=ppc for powerpc
U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
-@@ -28,7 +35,6 @@ ifeq ($(strip $(BR2_TARGET_UBOOT_TOOL_EN
+@@ -28,7 +35,6 @@
U_BOOT_TARGET_TOOLS+=$(TARGET_DIR)/usr/sbin/fw_printenv
endif
@@ -56,7 +60,16 @@
# Define a helper function
define insert_define
@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
-@@ -80,6 +86,9 @@ $(U_BOOT_DIR)/.header_modified: $(U_BOOT
+@@ -45,6 +51,8 @@
+ | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
++u-boot-unpacked: $(U_BOOT_DIR)/.unpacked
++
+ $(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(U_BOOT_DIR) target/u-boot/ \
+ u-boot-$(U_BOOT_VERSION)-\*.patch \
+@@ -80,6 +88,9 @@
ifneq ($(strip $(BR2_PROJECT)),"")
$(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))
endif
@@ -66,7 +79,7 @@
ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"")
$(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP))
endif
-@@ -110,27 +119,35 @@ ifeq ($(strip $(BR2_TARGET_UBOOT_SILENT)
+@@ -110,27 +121,35 @@
$(call insert_define, CONFIG_SILENT_CONSOLE,)
endif
@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
@@ -107,7 +120,7 @@
mkdir -p $(@D)
$(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
-DUSE_HOSTCC -o $@ \
-@@ -138,11 +155,22 @@ $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_
+@@ -138,11 +157,22 @@
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
@@ -131,7 +144,7 @@
u-boot-dirclean:
rm -rf $(U_BOOT_DIR)
-@@ -173,5 +201,7 @@ u-boot-status:
+@@ -173,5 +203,7 @@
@echo BR2_TARGET_UBOOT_BOOTARGS = $(BR2_TARGET_UBOOT_BOOTARGS)
@echo BR2_TARGET_UBOOT_BOOTCMD = $(BR2_TARGET_UBOOT_BOOTCMD)
@echo BR2_TARGET_UBOOT_SILENT = $(BR2_TARGET_UBOOT_SILENT)
diff --git a/scripts/quiltify.sh b/scripts/quiltify.sh
index 0f97a82..cfda698 100755
--- a/scripts/quiltify.sh
+++ b/scripts/quiltify.sh
@@ -5,11 +5,16 @@
answer=""
-# $1: thing to ask, $* possibilities. Will fill answer variable.
-ask_user()
+ask_user_banner()
{
echo
echo -e "--- "$1
+}
+
+# $1: thing to ask, $* possibilities. Will fill in "answer" variable.
+ask_user()
+{
+ ask_user_banner "$1"
shift
n=1
while [ "$1" != "" ]; do
@@ -20,23 +25,45 @@ ask_user()
read -p "> " answer
}
+ask_user_choice()
+{
+ ask_user_banner "$1"
+ shift
+ export PS3="> "
+ select answer in $1; do
+# echo "($answer) ($REPLY)"
+ if [ "$answer" == "" ]; then
+ echo "Bad choice: $REPLY"
+ else
+ break
+ fi
+ done
+}
+
# Get useful envt variables
make shell_env
. armadeus_env.sh
if [ "$1" != "export" ]; then
- ask_user "What do you want to quiltify today ? ;-)" "Linux (default)" "Buildroot"
+ ask_user_choice "What do you want to quiltify today ? ;-)" "Linux_(default) Buildroot U-Boot"
fi
if [ "$1" == "export" ]; then
- ask_user "What kind of quilt patches do you want to export ?" "Linux (default)" "Buildroot"
+ ask_user_choice "What kind of quilt patches do you want to export ?" "Linux_(default) Buildroot U-Boot"
fi
-if [ "$answer" == "2" ]; then
+if [ "$answer" == "Buildroot" ]; then
QUILT_TARGET_NAME="Buildroot"
QUILT_MAKEFILE_TARGET="buildroot-unpacked"
QUILT_TARGET_DIR=$ARMADEUS_BUILDROOT_DIR
QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/buildroot
+elif [ "$answer" == "U-Boot" ]; then
+ QUILT_TARGET_NAME="U-Boot"
+ QUILT_MAKEFILE_TARGET="u-boot-unpacked"
+ QUILT_MAKEFILE_TARGET_TOUCH=".unpacked .patched"
+ QUILT_PATCH_FILTER="$ARMADEUS_U_BOOT_VERSION"
+ QUILT_TARGET_DIR=$ARMADEUS_U_BOOT_DIR
+ QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/u-boot
else
QUILT_TARGET_NAME="Linux kernel"
QUILT_MAKEFILE_TARGET="linux26-patched"
@@ -44,9 +71,8 @@ else
QUILT_TARGET_PATCH_DIR=$ARMADEUS_LINUX_PATCH_DIR
fi
-if [ "$1" != "export" ]; then
- echo -e "\nThis script is going to rebuild a quiltified "$QUILT_TARGET_NAME" in the current view..."
-fi
+
+## Copy patches from working dir to version dir:
if [ "$1" == "export" ]; then
echo "Exporting your work (patches) from $QUILT_TARGET_DIR/patches/ to $QUILT_TARGET_PATCH_DIR"
@@ -62,8 +88,9 @@ if [ "$1" == "export" ]; then
exit 0
fi
+## else import patches in working dir:
-# else import patches:
+echo -e "\nThis script is going to rebuild a quiltified "$QUILT_TARGET_NAME" in the current view..."
# Update repository
ask_user "Update (pull) your local GIT repository (y/N) ?"
@@ -99,7 +126,11 @@ fi
# Import patches
pushd $QUILT_TARGET_DIR
mkdir patches
-PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch`
+if [ "$QUILT_PATCH_FILTER" != "" ]; then
+ PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch | grep $QUILT_PATCH_FILTER`
+else
+ PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch`
+fi
for patch in $PATCHES; do
quilt import $patch
done
@@ -109,13 +140,14 @@ if [ "$?" != 0 ]; then
exit 1
fi
quilt series >> .applied_patches_list
-
-touch .unpacked
-touch .patched
-touch .patched.arch
-touch .patched.board
+if [ "$QUILT_MAKEFILE_TARGET_TOUCH" != "" ]; then
+ touch $QUILT_MAKEFILE_TARGET_TOUCH
+else
+ touch .unpacked .patched .patched.arch .patched.board
+fi
popd
+# Build it
echo -e "\n--- Your "$QUILT_TARGET_NAME" is \"quiltified\" ! I will now compile it...\n"
sleep 2
make
hooks/post-receive
--
armadeus
|