Skip to content

Commit 32ae042

Browse files
committed
rebuild-esp32s3-linux-wifi: add optional reconfigure steps
Add `reconfigure_kernel`, `reconfigure_rootfs` and `reconfigure_boot` environment variables to reconfigure parts of the build. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent c5cfe99 commit 32ae042

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

rebuild-esp32s3-linux-wifi.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
# keep_bootloader=y -- don't redownload the bootloader, only rebuild it
1010
# keep_etc=y -- don't overwrite the /etc partition
1111
#
12+
# reconfigure_kernel=y -- reconfigure kernel
13+
# reconfigure_rootfs=y -- reconfigure rootfs
14+
# reconfigure_boot=y -- reconfigure bootloader
15+
#
1216

1317
SET_BAUDRATE='-b 2000000'
1418

@@ -106,6 +110,14 @@ if [ ! -d build-buildroot-$BUILDROOT_CONFIG ] ; then
106110
buildroot/utils/config --file build-buildroot-$BUILDROOT_CONFIG/.config --set-str TOOLCHAIN_EXTERNAL_PREFIX '$(ARCH)-esp32s3-linux-uclibcfdpic'
107111
buildroot/utils/config --file build-buildroot-$BUILDROOT_CONFIG/.config --set-str TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX '$(ARCH)-esp32s3-linux-uclibcfdpic'
108112
fi
113+
if [ -n "$reconfigure_rootfs" ] ; then
114+
nice make -C buildroot O=`pwd`/build-buildroot-$BUILDROOT_CONFIG menuconfig
115+
nice make -C buildroot O=`pwd`/build-buildroot-$BUILDROOT_CONFIG savedefconfig
116+
fi
117+
if [ -n "$reconfigure_kernel" ] ; then
118+
nice make -C buildroot O=`pwd`/build-buildroot-$BUILDROOT_CONFIG linux-menuconfig
119+
nice make -C buildroot O=`pwd`/build-buildroot-$BUILDROOT_CONFIG linux-savedefconfig
120+
fi
109121
nice make -C buildroot O=`pwd`/build-buildroot-$BUILDROOT_CONFIG
110122
[ -f build-buildroot-$BUILDROOT_CONFIG/images/xipImage -a -f build-buildroot-$BUILDROOT_CONFIG/images/rootfs.cramfs -a -f build-buildroot-$BUILDROOT_CONFIG/images/etc.jffs2 ] || exit 1
111123

@@ -120,6 +132,10 @@ cd esp-idf
120132
cd ../network_adapter
121133
idf.py set-target esp32s3
122134
cp $ESP_HOSTED_CONFIG sdkconfig || die "Could not apply IDF config $ESP_HOSTED_CONFIG"
135+
if [ -n "$reconfigure_boot" ] ; then
136+
idf.py menuconfig
137+
cp sdkconfig $ESP_HOSTED_CONFIG
138+
fi
123139
idf.py build
124140
read -p 'ready to flash... press enter'
125141
while ! idf.py $SET_BAUDRATE flash ; do

0 commit comments

Comments
 (0)