]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wilink8-wlan/build-utilites.git/blobdiff - build_wl18xx.sh
Add option to build just the wireless modules
[wilink8-wlan/build-utilites.git] / build_wl18xx.sh
index 9230f57730070ce5db266311f2bda42af413cd80..d3efcbfe71ab4cd6d4f5b5071ce843bbce30915e 100755 (executable)
@@ -272,6 +272,46 @@ function setup_toolchain()
        fi
 }
 
+function build_intree()
+{
+    cd_repo driver
+       export KERNEL_PATH=`repo_path driver`
+       read_kernel_version
+       [ $CONFIG ] && cp `path configuration`/kernel_$KERNEL_VERSION.$KERNEL_PATCHLEVEL.config `repo_path driver`/.config
+       [ $CLEAN ] && make clean
+       [ $CLEAN ] && assert_no_error
+
+       make -j${PROCESSORS_NUMBER} zImage
+       make -j${PROCESSORS_NUMBER} am335x-evm.dtb
+       make -j${PROCESSORS_NUMBER} am335x-bone.dtb
+       make -j${PROCESSORS_NUMBER} am335x-boneblack.dtb
+       make -j${PROCESSORS_NUMBER} modules
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} modules_install
+       cp `repo_path driver`/arch/arm/boot/zImage `path tftp`/zImage
+       cp `repo_path driver`/arch/arm/boot/dts/am335x-*.dtb `path tftp`/
+
+       assert_no_error
+       cd_back
+}
+
+function rebuild_intree()
+{
+    cd_repo driver
+       export KERNEL_PATH=`repo_path driver`
+
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=net/wireless/ modules
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=net/wireless/ modules_install
+
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=net/mac80211/ modules
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=net/mac80211/ modules_install
+
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=drivers/net/wireless/ti/ modules
+       INSTALL_MOD_PATH=`path filesystem` make -j${PROCESSORS_NUMBER} M=drivers/net/wireless/ti/ modules_install
+
+       assert_no_error
+       cd_back
+}
+
 function build_uimage()
 {
     cd_repo kernel
@@ -393,7 +433,7 @@ function build_hostapd()
 {
     cd `repo_path hostap`/hostapd
        [ -z $NO_CONFIG ] && cp android.config .config
-       [ -n "$UPNP_EN" ] && echo "Enable UPNP config" && sed -i "/#CONFIG_WPS_UPNP=y/ s/# *//" .config
+       [ -z $NO_UPNP ] && echo "Enable UPNP config" && sed -i "/#CONFIG_WPS_UPNP=y/ s/# *//" .config
        CONFIG_LIBNL32=y DESTDIR=`path filesystem` make clean
        assert_no_error
        CONFIG_LIBNL32=y DESTDIR=`path filesystem` CFLAGS+="-I`path filesystem`/usr/local/ssl/include -I`repo_path libnl`/include" LIBS+="-L`path filesystem`/lib -L`path filesystem`/usr/local/ssl/lib -lssl -lcrypto -lm -ldl -lpthread" LIBS_p+="-L`path filesystem`/lib -L`path filesystem`/usr/local/ssl/lib -lssl -lcrypto -lm -ldl -lpthread" make -j${PROCESSORS_NUMBER} CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar
@@ -407,7 +447,7 @@ function build_hostapd()
 function build_crda()
 {      
        cp `repo_path wireless_regdb`/regulatory.bin `path filesystem`/usr/lib/crda/regulatory.bin
-       cp `repo_path wireless_regdb`/sforshee.key.pub.pem `path filesystem`/etc/wireless-regdb/pubkeys/
+       cp `repo_path crda`/pubkeys/* `path filesystem`/etc/wireless-regdb/pubkeys/
     cd_repo crda
        
        [ -z $NO_CLEAN ] && DESTDIR=`path filesystem` make clean
@@ -463,6 +503,17 @@ function build_fw_download()
        cp `repo_path fw_download`/*.bin `path filesystem`/lib/firmware/ti-connectivity
 }
 
+function build_fw()
+{
+       cd `repo_path firmware-build`/victoria/firmware
+       [ -z $NO_CLEAN ] && ./build.sh clean
+       ./build.sh
+       cp `repo_path firmware-build`/victoria/firmware/out/Firmware18xx/wl18xx-fw-4.bin `path filesystem`/lib/firmware/ti-connectivity
+       cp `repo_path firmware-build`/victoria/firmware/out/Firmware18xx/wl18xx-fw-4.bin `path outputs`
+       cd_back
+}
+
+
 function patch_kernel()
 {
        [ ! -d $KERNEL_PATH ] && echo "Error KERNEL_PATH: $KERNEL_PATH dir does not exist" && exit 1
@@ -505,7 +556,7 @@ function build_uim()
 function build_bt_firmware()
 {
        cd_repo bt-firmware
-       for i in `repo_path bt-firmware`/*.bts; do
+       for i in `repo_path bt-firmware`/initscripts/*.bts; do
                echo "Installing bluetooth init script: $i"
                install -m 0755 $i `path filesystem`/lib/firmware/
                assert_no_error
@@ -838,15 +889,26 @@ function main()
         #################### Building single components #############################
                'kernel')
                print_highlight " building only Kernel "
-                #clean_kernel
+        #clean_kernel
                build_uimage
                ;;
+
+               'intree')
+               print_highlight " building modules intree"
+               build_intree
+               ;;
                
-                'kernel_modules')
-        print_highlight " building only Driver modules "
-                build_uimage
+               'intree_m')
+               print_highlight " Building JUST wireless modules intree"
+               rebuild_intree
+               ;;
+
+        'kernel_modules')
+        print_highlight " building kernel and driver modules"
+        build_uimage
                build_modules
-                ;;
+               ;;
+
                'modules')
         print_highlight " building only Driver modules "
                build_modules
@@ -898,6 +960,11 @@ function main()
                build_fw_download
                ;;
 
+               'fw')
+               print_highlight " building only firmware"
+               build_fw
+               ;;
+
                'patch_kernel')
                print_highlight " only patching kernel $2 without performing an actual build!"
                NO_BUILD=1