@@ -5,8 +5,7 @@ subrel=${subrel:-1}
5
5
make=" -j 2"
6
6
which nproc >& /dev/null && make=" -j $(( $(nproc) + 1 )) "
7
7
gitopt=" --depth 1 --single-branch"
8
-
9
- arduino=${arduino:- $HOME / Arduino/ hardware/ esp8266com/ esp8266}
8
+ arduino=${arduino:- ${PWD} / arduino}
10
9
11
10
gcc=${gcc:- 4.8}
12
11
case $gcc in
@@ -108,6 +107,10 @@ makejson()
108
107
109
108
install ()
110
109
{
110
+ # Get a fresh copy of the Arduino tree
111
+ rm -rf ${arduino}
112
+ git clone https://github.com/earlephilhower/Arduino ${arduino}
113
+
111
114
# Need to rebuild and make install on newlib to get proper headers. Crufty, but we have an odd dir structure
112
115
echo " -------- Building installable newlib"
113
116
rm -rf arena/newlib-install
@@ -132,7 +135,7 @@ install()
132
135
cp -a ${installnative} /xtensa-lx106-elf ${arduino} /tools/sdk/xtensa-lx106-elf
133
136
echo " -------- Updating package.json"
134
137
git=$( git rev-parse --short HEAD)
135
- ver=${rel} -${git } -${subrel }
138
+ ver=${rel} -${subrel } -${git }
136
139
pkgfile=${arduino} /package/package_esp8266com_index.template.json
137
140
./patch_json.py --pkgfile " ${pkgfile} " --tool xtensa-lx106-elf-gcc --ver " ${ver} " --glob ' *xtensa-lx106-elf*.json'
138
141
./patch_json.py --pkgfile " ${pkgfile} " --tool esptool --ver " ${ver} " --glob ' *esptool*json'
378
381
echo " -------- Creating package tgz"
379
382
markrevinfo >& build-rev-info
380
383
tarball=$HOST .xtensa-lx106-elf-$( git rev-parse --short HEAD) .${tarext}
381
- (rm -rf pkg && mkdir pkg && markrevinfo > pkg/build-rev-info && cd pkg && cp -a ../xtensa-lx106-elf${EXT} xtensa-lx106-elf && mv ../ build-rev-info . && ${tarcmd} ${taropts} ../${tarball} xtensa-lx106-elf/)
384
+ (rm -rf pkg && mkdir pkg && markrevinfo > pkg/build-rev-info && cd pkg && cp -a ../xtensa-lx106-elf${EXT} xtensa-lx106-elf && mv build-rev-info xtensa-lx106-elf && ${tarcmd} ${taropts} ../${tarball} xtensa-lx106-elf/)
382
385
makejson
383
386
384
387
tool=mkspiffs CPPFLAGS=" -DSPIFFS_USE_MAGIC_LENGTH=0 -DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1" maketool
0 commit comments