Ver código fonte

[Improve][all][Makefile]

2022.03.16 / Folus Wen

Actions:
1. u-boot & linux kernel path change to varaible from Rule.make

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 anos atrás
pai
commit
1686c86d6e

BIN
.Rules.make.swp


Diferenças do arquivo suprimidas por serem muito extensas
+ 257 - 257
Makefile


+ 3 - 0
Rules.make

@@ -33,6 +33,9 @@ export ENV_SETUP=$(LINUX_DEVKIT_PATH)/environment-setup
 #The directory that points to the SDK kernel source tree
 LINUXKERNEL_INSTALL_DIR=$(TI_SDK_PATH)/board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305
 
+#The directory that points to the uboot source tree
+UBOOT_INSTALL_DIR=$(TI_SDK_PATH)/board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04
+
 CFLAGS= -march=armv7-a -marm -mfpu=neon  -mfloat-abi=hard
 
 #Strip modules when installing to conserve disk space

+ 1 - 0
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/lib/.crc7.ko.cmd

@@ -0,0 +1 @@
+cmd_lib/crc7.ko := /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld -EL -r  -T ./scripts/module-common.lds --build-id  -o lib/crc7.ko lib/crc7.o lib/crc7.mod.o ;  true

+ 46 - 0
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/lib/.gen_crc32table.cmd

@@ -0,0 +1,46 @@
+cmd_lib/gen_crc32table := gcc -Wp,-MD,lib/.gen_crc32table.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89     -o lib/gen_crc32table lib/gen_crc32table.c  
+
+source_lib/gen_crc32table := lib/gen_crc32table.c
+
+deps_lib/gen_crc32table := \
+  /usr/include/stdc-predef.h \
+  /usr/include/stdio.h \
+  /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \
+  /usr/include/features.h \
+  /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+  /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+  /usr/include/x86_64-linux-gnu/bits/long-double.h \
+  /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+  /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+  /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h \
+  /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h \
+  /usr/include/x86_64-linux-gnu/bits/types.h \
+  /usr/include/x86_64-linux-gnu/bits/timesize.h \
+  /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+  /usr/include/x86_64-linux-gnu/bits/time64.h \
+  /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \
+  /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \
+  /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \
+  /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \
+  /usr/include/x86_64-linux-gnu/bits/types/FILE.h \
+  /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \
+  /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+  /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+  /usr/include/x86_64-linux-gnu/bits/stdio.h \
+  /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+  lib/crc32defs.h \
+    $(wildcard include/config/crc32/sliceby8.h) \
+    $(wildcard include/config/crc32/sliceby4.h) \
+    $(wildcard include/config/crc32/sarwate.h) \
+    $(wildcard include/config/crc32/bit.h) \
+    $(wildcard include/config/64bit.h) \
+  /usr/include/inttypes.h \
+  /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h \
+  /usr/include/stdint.h \
+  /usr/include/x86_64-linux-gnu/bits/wchar.h \
+  /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \
+  /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h \
+
+lib/gen_crc32table: $(deps_lib/gen_crc32table)
+
+$(deps_lib/gen_crc32table):

+ 16 - 16
run_gen_make_script.sh

@@ -1,45 +1,45 @@
 #!/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 "\t@cp -f \$(UBOOT_INSTALL_DIR)/MLO EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(UBOOT_INSTALL_DIR)/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 "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(UBOOT_INSTALL_DIR) 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) FLASH_IC=MT29F16G08_BCH16 DDR_IC=MT41K256M16HA125E_303"
-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 "\t@cp -f \$(UBOOT_INSTALL_DIR)/arch/arm/dts/[$1]am335x-evm.dts\$(UBOOT_INSTALL_DIR)/arch/arm/dts/am335x-evm.dts"
+echo -e "\t\$(MAKE) -j \$(MAKE_JOBS) -C \$(UBOOT_INSTALL_DIR) CROSS_COMPILE=\$(CROSS_COMPILE) FLASH_IC=MT29F16G08_BCH16 DDR_IC=MT41K256M16HA125E_303"
+echo -e "\t@cp -f \$(UBOOT_INSTALL_DIR)/MLO EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(UBOOT_INSTALL_DIR)/u-boot.img EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(UBOOT_INSTALL_DIR)/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 "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/zImage EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/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@rm -f \$(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/dts/am335x-evm.dtb"
+echo -e "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/dts/[$1]am335x-evm.dts \$(LINUXKERNEL_INSTALL_DIR)/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@rm -f \$(LINUXKERNEL_INSTALL_DIR)/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 "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/zImage EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/dts/am335x-evm.dtb EVSE/Projects/$1/Images/"
+echo -e "\t@cp -f \$(LINUXKERNEL_INSTALL_DIR)/drivers/net/ethernet/qualcomm/qcaspi.ko EVSE/rootfs/lib/"
 echo -e ""
 echo -e "$1-rootfs:"
 echo -e "\t@echo ================================="

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff