|
@@ -0,0 +1,74 @@
|
|
|
+#!/bin/bash
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-uboot-default: u-boot_clean u-boot"
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/$1/Images/"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-uboot-menuconfig:"
|
|
|
+echo -e "\t@echo ==================================="
|
|
|
+echo -e "\t@echo Building U-boot menuconfig"
|
|
|
+echo -e "\t@echo ==================================="
|
|
|
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=\$(CROSS_COMPILE) menuconfig"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-uboot:"
|
|
|
+echo -e "\t@echo ==================================="
|
|
|
+echo -e "\t@echo Building U-boot"
|
|
|
+echo -e "\t@echo ==================================="
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/[$1]am335x-evm.dts board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/arch/arm/dts/am335x-evm.dts"
|
|
|
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=\$(CROSS_COMPILE)"
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/MLO EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/u-boot.img EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/spl/u-boot-spl.bin EVSE/Projects/$1/Images/"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-linux-default: linux_clean linux"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/zImage EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/am335x-evm.dtb EVSE/Projects/$1/Images/"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-linux:"
|
|
|
+echo -e "\t@echo ====================================="
|
|
|
+echo -e "\t@echo Building the Linux Kernel DTBs"
|
|
|
+echo -e "\t@echo ====================================="
|
|
|
+echo -e "\t@rm -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/am335x-evm.dtb"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/[$1]am335x-evm.dts board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/am335x-evm.dts"
|
|
|
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=\$(CROSS_COMPILE) am335x-evm.dtb"
|
|
|
+echo -e "\t@echo ================================="
|
|
|
+echo -e "\t@echo Building User Linux Kernel"
|
|
|
+echo -e "\t@echo ================================="
|
|
|
+echo -e "\t@rm -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/zImage"
|
|
|
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=\$(CROSS_COMPILE) zImage"
|
|
|
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=\$(CROSS_COMPILE) modules"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/zImage EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/am335x-evm.dtb EVSE/Projects/$1/Images/"
|
|
|
+echo -e "\t@cp -f board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/drivers/net/ethernet/qualcomm/qcaspi.ko EVSE/rootfs/lib/"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-rootfs:"
|
|
|
+echo -e "\t@echo ================================="
|
|
|
+echo -e "\t@echo Building User rootfs"
|
|
|
+echo -e "\t@echo ================================="
|
|
|
+echo -e "#\t@cd EVSE/GPL;make all"
|
|
|
+echo -e "\t@cd EVSE/Modularization;make all"
|
|
|
+echo -e "\t@cd EVSE/Projects/$1/Apps;make all"
|
|
|
+echo -e "\t@rm -f EVSE/Projects/$1/Images/ramdisk.gz"
|
|
|
+echo -e "\t@dd if=/dev/zero of=/dev/ram0 bs=1k count=131072"
|
|
|
+echo -e "\t@mke2fs -vm0 /dev/ram0 131072"
|
|
|
+echo -e "\t@tune2fs -c 0 /dev/ram0"
|
|
|
+echo -e "\t@dd if=/dev/ram0 bs=1k count=131072 | gzip -v9 > EVSE/Projects/$1/Images/ramdisk.gz"
|
|
|
+echo -e "\t@mkdir -p EVSE/Projects/$1/Images/mnt"
|
|
|
+echo -e "\t@gunzip EVSE/Projects/$1/Images/ramdisk.gz"
|
|
|
+echo -e "\t@sync"
|
|
|
+echo -e "\t@mount -o loop EVSE/Projects/$1/Images/ramdisk EVSE/Projects/$1/Images/mnt"
|
|
|
+echo -e "\t@cp -rfv EVSE/rootfs/* EVSE/Projects/$1/Images/mnt/"
|
|
|
+echo -e "\t@chown www-data:www-data EVSE/Projects/$1/Images/mnt/var/www -R"
|
|
|
+echo -e "\t@chmod 777 EVSE/Projects/$1/Images/mnt/var/log -R"
|
|
|
+echo -e "\t@chmod 777 EVSE/Projects/$1/Images/mnt/var/run -R"
|
|
|
+echo -e "\t@cp -rfv EVSE/Projects/$1/Images/root/* EVSE/Projects/$1/Images/mnt/root"
|
|
|
+echo -e "\t@sync"
|
|
|
+echo -e "\t@sleep 3"
|
|
|
+echo -e "\t@umount EVSE/Projects/$1/Images/mnt"
|
|
|
+echo -e "\t@sync"
|
|
|
+echo -e "\t@gzip -v9 EVSE/Projects/$1/Images/ramdisk"
|
|
|
+echo -e "\t@rm -rfv EVSE/Projects/$1/Images/root"
|
|
|
+echo -e "\t@rm -rfv EVSE/Projects/$1/Images/mnt"
|
|
|
+echo -e ""
|
|
|
+echo -e "$1-all: $1-uboot $1-linux $1-rootfs"
|
|
|
+echo -e ""
|