diff --git a/build_wl18xx.sh b/build_wl18xx.sh
index 870fb5eb2c65ae7410215d7c25bc355e419ec7f5..56c188e026170804c7a4faeb8a4de1f99c86ed8c 100755 (executable)
--- a/build_wl18xx.sh
+++ b/build_wl18xx.sh
url=${repositories[$i + 1]}
branch=${repositories[$i + 2]}
checkout_type="branch"
- #for all the openlink repo. we use a tag if provided.
+ #for all the openlink repo. we use a tag if provided.
[ "$name" == "kernel" ] && [ -z "$DEFAULT_KERNEL" ] && i=$[$i + 3] && continue
- cd_repo $name
+ cd_repo $name
echo -e "\n${NORMAL}Checking out branch ${GREEN}$branch ${NORMAL}in repo ${GREEN}$name ${NORMAL} "
git checkout $branch
git fetch origin
function build_uimage()
{
- cd_repo kernel
+ cd_repo kernel
[ -z $NO_CONFIG ] && cp `path configuration`/kernel_$KERNEL_VERSION.$KERNEL_PATCHLEVEL.config `repo_path kernel`/.config
[ -z $NO_CLEAN ] && make clean
[ -z $NO_CLEAN ] && assert_no_error
- if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
+ if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
+ then
+ make -j${PROCESSORS_NUMBER} uImage
+ cp `repo_path kernel`/arch/arm/boot/uImage `path tftp`/uImage
+ else
+ if [ -z $NO_DTB ]
then
- make -j${PROCESSORS_NUMBER} uImage
+ make -j${PROCESSORS_NUMBER} uImage
+ make -j${PROCESSORS_NUMBER} am335x-evm.dtb
+ cp `repo_path kernel`/arch/arm/boot/zImage `path tftp`/zImage
+ cp `repo_path kernel`/arch/arm/boot/dts/am335x-evm.dtb `path tftp`/am335x-evm.dtba
else
- LOADADDR=0x80008000 make -j${PROCESSORS_NUMBER} uImage.am335x-evm
+ LOADADDR=0x80008000 make -j${PROCESSORS_NUMBER} uImage.am335x-evm
+ cp `repo_path kernel`/arch/arm/boot/uImage.am335x-evm `path tftp`/uImage
fi
-
+ fi
assert_no_error
- cp `repo_path kernel`/arch/arm/boot/uImage `path tftp`/uImage
cd_back
}
function build_wlconf()
{
- files_to_copy="dictionary.txt struct.bin wl18xx-conf-default.bin README example.conf example.ini configure-device.sh"
+ files_to_copy="dictionary.txt struct.bin default.conf wl18xx-conf-default.bin README example.conf example.ini configure-device.sh"
cd `repo_path ti_utils`/wlconf
if [ -z $NO_CLEAN ]; then
NFSROOT=`path filesystem` make clean
cd_back
}
+function clean_kernel()
+{
+ echo "Cleaning kernel folder"
+ cd_repo kernel
+ git clean -fdx > /dev/null
+}
+
function clean_outputs()
{
- echo "Cleaning outputs"
+ echo "Cleaning outputs"
rm -rf `path filesystem`/*
rm -f `path outputs`/${tar_filesystem[0]}
rm -f `path outputs`/uImage
cd_path filesystem
tar cpjf `path outputs`/${tar_filesystem[0]} .
cd_back
- cp `path tftp`/uImage `path outputs`/uImage
+
+ if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
+ then
+ cp `path tftp`/uImage `path outputs`/uImage
+ else
+ if [ -z $NO_DTB ]
+ then
+ cp `path tftp`/zImage `path outputs`/zImage
+ cp `path tftp`/am335x-evm.dtb `path outputs`/am335x-evm.dtb
+ else
+ cp `path tftp`/uImage `path outputs`/uImage
+ fi
+ fi
fi
}
function build_all()
{
- read_kernel_version
-
if [ -z $NO_EXTERNAL ]
then
[ $DEFAULT_KERNEL ] && build_uimage
fi
[ -z $NO_VERIFY ] && verify_skeleton
-
}
function setup_and_build()
setup_environment
setup_directories
+ read_kernel_version
case "$1" in
'update')
else
print_highlight "Updating all to head (this will revert local changes)"
RESET=1
- fi
+ fi
+ clean_kernel
+ clean_outputs
setup_workspace
+ read_kernel_version #####read kernel version again after update#####
build_all
;;
[[ -n "$2" ]] && echo "Using tag $2 " && USE_TAG=$2
NO_BUILD=1
setup_workspace
- read_kernel_version
+ read_kernel_version #####read kernel version again after init#####
;;
-
-
+
'clean')
print_highlight " cleaning & building all "
clean_outputs
#################### Building single components #############################
'kernel')
print_highlight " building only Kernel "
+ clean_kernel
build_uimage
;;
'wpa_supplicant')
print_highlight " building only wpa_supplicant "
- build_wpa_supplicant
-
+ build_wpa_supplicant
;;
'hostapd')
print_highlight " Copying scripts "
build_scripts_download
;;
+
'utils')
print_highlight " building only ti-utils "
build_calibrator