From d48b80fc277cb123738461b6125a58ffe9923019 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 21 Aug 2024 17:39:16 +0800
Subject: [PATCH] update cross compiler
---
3rdparty/libgpiod/build.sh | 2 +-
hal/lcd/lvgl/libs_lvgl/build.sh | 2 +-
hal/lcd/lvgl/makefile | 2 +-
hal/modules/makefile | 2 +-
3rdparty/build.sh | 15 ---------------
3rdparty/libxml2/build.sh | 2 +-
booster/makefile | 2 +-
hal/lcd/drm/makefile | 2 +-
hal/api/libgpiod/build.sh | 2 +-
update.sh | 24 ++++++++++++++++++++++++
hal/api/makefile | 2 +-
hal/lcd/fb/makefile | 2 +-
12 files changed, 34 insertions(+), 25 deletions(-)
diff --git a/3rdparty/build.sh b/3rdparty/build.sh
index 435dea1..cbc3f36 100755
--- a/3rdparty/build.sh
+++ b/3rdparty/build.sh
@@ -1,17 +1,5 @@
#!/bin/bash
-REP_CROSSTOOL=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
-REP_LYFTP=http://master.weike-iot.com:2211/src/
-
-function replace_crosstool()
-{
- for f in `find -iname "build*.sh"`
- do
- sed -i -e "s|^CROSSTOOL=.*|CROSSTOOL=$REP_CROSSTOOL|g" $f
- sed -i -e "s|^LYFTP_SRC=.*|LYFTP_SRC=$REP_LYFTP|g" $f
- done
-}
-
function do_compile
{
for dir in `ls`
@@ -24,8 +12,5 @@
done
}
-#replace_crosstool
-
do_compile
-
diff --git a/3rdparty/libgpiod/build.sh b/3rdparty/libgpiod/build.sh
index 741e7da..a4ec3f4 100755
--- a/3rdparty/libgpiod/build.sh
+++ b/3rdparty/libgpiod/build.sh
@@ -12,7 +12,7 @@
LIB_URL=$LY_FTP
# Cross compiler for cross compile on Linux server
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
# compile jobs
JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
diff --git a/3rdparty/libxml2/build.sh b/3rdparty/libxml2/build.sh
index 4cc930c..3abf05a 100755
--- a/3rdparty/libxml2/build.sh
+++ b/3rdparty/libxml2/build.sh
@@ -12,7 +12,7 @@
LIB_URL=$LYFTP_SRC
# Cross compiler for cross compile on Linux server
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
# compile jobs
JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
diff --git a/booster/makefile b/booster/makefile
index b988130..d93b29d 100644
--- a/booster/makefile
+++ b/booster/makefile
@@ -13,7 +13,7 @@
PWD=$(shell pwd )
-#CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
LIBNAME=$(shell basename ${PWD} )
diff --git a/hal/api/libgpiod/build.sh b/hal/api/libgpiod/build.sh
index 741e7da..a4ec3f4 100755
--- a/hal/api/libgpiod/build.sh
+++ b/hal/api/libgpiod/build.sh
@@ -12,7 +12,7 @@
LIB_URL=$LY_FTP
# Cross compiler for cross compile on Linux server
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
# compile jobs
JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
diff --git a/hal/api/makefile b/hal/api/makefile
index d600230..befd362 100644
--- a/hal/api/makefile
+++ b/hal/api/makefile
@@ -15,7 +15,7 @@
PWD=$(shell pwd)
INSTPATH=/tftp
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
CC=${CROSS_COMPILE}gcc
LDFLAGS += -lm
diff --git a/hal/lcd/drm/makefile b/hal/lcd/drm/makefile
index 76f206c..de34d09 100644
--- a/hal/lcd/drm/makefile
+++ b/hal/lcd/drm/makefile
@@ -11,7 +11,7 @@
PRJ_PATH=$(shell pwd)
APP_NAME = drm_test
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
# C source files in top-level directory
SRCFILES = $(wildcard *.c)
diff --git a/hal/lcd/fb/makefile b/hal/lcd/fb/makefile
index 0b48c53..2c3b9e5 100644
--- a/hal/lcd/fb/makefile
+++ b/hal/lcd/fb/makefile
@@ -15,7 +15,7 @@
PWD=$(shell pwd)
INSTPATH=/tftp
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
CC=${CROSS_COMPILE}gcc
SRCS = $(wildcard ${VPATH}/*.c)
diff --git a/hal/lcd/lvgl/libs_lvgl/build.sh b/hal/lcd/lvgl/libs_lvgl/build.sh
index f3fc658..20f4d93 100755
--- a/hal/lcd/lvgl/libs_lvgl/build.sh
+++ b/hal/lcd/lvgl/libs_lvgl/build.sh
@@ -11,7 +11,7 @@
LIBS_DIR="lvgl lv_drivers lv_demos"
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
if [ $# == 1 ] ; then
CROSS_COMPILE=$1
fi
diff --git a/hal/lcd/lvgl/makefile b/hal/lcd/lvgl/makefile
index fc31e3b..2f7eb26 100644
--- a/hal/lcd/lvgl/makefile
+++ b/hal/lcd/lvgl/makefile
@@ -1,5 +1,5 @@
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
CC=${CROSS_COMPILE}gcc
CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized
diff --git a/hal/modules/makefile b/hal/modules/makefile
index 433e220..a904fdc 100644
--- a/hal/modules/makefile
+++ b/hal/modules/makefile
@@ -15,7 +15,7 @@
PWD=$(shell pwd)
INSTPATH=/tftp
-CROSS_COMPILE=arm-linux-gnueabihf-
+CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
CC=${CROSS_COMPILE}gcc
LDFLAGS += -lm
diff --git a/update.sh b/update.sh
new file mode 100755
index 0000000..eb9753f
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#REP_CROSSTOOL=arm-linux-gnueabihf-
+REP_CROSSTOOL=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
+REP_LYFTP=http://master.weike-iot.com:2211/src/
+
+function replace_crosstool()
+{
+ for f in `find -iname "build*.sh"`
+ do
+ sed -i -e "s|^CROSSTOOL=.*|CROSSTOOL=$REP_CROSSTOOL|g" $f
+ sed -i -e "s|^CROSS_COMPILE=.*|CROSS_COMPILE=$REP_CROSSTOOL|g" $f
+ sed -i -e "s|^LYFTP_SRC=.*|LYFTP_SRC=$REP_LYFTP|g" $f
+ done
+
+ for f in `find -iname "makefile"`
+ do
+ sed -i -e "s|^CROSS_COMPILE=.*|CROSS_COMPILE=$REP_CROSSTOOL|g" $f
+ done
+
+}
+
+replace_crosstool
+
--
Gitblit v1.9.1