@@ -226,37 +226,46 @@ function build_odroid_h4 {
226
226
DEFCONFIG=" configs/config.hardkernel_odroid_h4"
227
227
FW_VERSION=$( cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d ' =' -f 2 | tr -d ' "' )
228
228
229
- # Without following sequence workspce would be created by docker with root
230
- # privilidges and build will fail.
231
- # Target directory
232
- TARGET_DIR=" payloads/external/edk2/workspace/Dasharo"
233
- mkdir -p " $TARGET_DIR "
234
- chown -R $( id -u) :$( id -g) " $TARGET_DIR "
235
- chmod -R 755 " $TARGET_DIR "
236
-
237
229
# checkout several submodules needed by these boards (some others are checked
238
230
# out by coreboot's Makefile)
239
231
git submodule update --init --force --checkout \
240
232
3rdparty/dasharo-blobs
241
233
242
- # do not do distclean, because it removes all downloaded artifacts
243
234
docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
244
235
-v $HOME /.ssh:/home/coreboot/.ssh \
245
- --network none \
246
- ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
247
236
-w /home/coreboot/coreboot ${DASHARO_SDK} \
248
- /bin/bash -c " make clean "
237
+ /bin/bash -c " make distclean "
249
238
250
239
cp $DEFCONFIG .config
251
240
252
241
echo " Building Dasharo compatbile with Hardkernel ODROID H4 (version $FW_VERSION )"
253
242
254
- docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
255
- -v $HOME /.ssh:/home/coreboot/.ssh \
256
- --network none \
257
- ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
258
- -w /home/coreboot/coreboot ${DASHARO_SDK} \
259
- /bin/bash -c " make olddefconfig && make -j$( nproc) "
243
+ if [ -z ${AIRGAP} ]; then
244
+
245
+ # In this situation we assume that provided repository is ready to be used
246
+ # and nothing should be downloaded during build process.
247
+
248
+ # Without following sequence workspce would be created by docker with root
249
+ # privilidges and build will fail.
250
+ # Target directory
251
+ TARGET_DIR=" payloads/external/edk2/workspace/Dasharo"
252
+ mkdir -p " $TARGET_DIR "
253
+ chown -R $( id -u) :$( id -g) " $TARGET_DIR "
254
+ chmod -R 755 " $TARGET_DIR "
255
+
256
+ docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
257
+ -v $HOME /.ssh:/home/coreboot/.ssh \
258
+ --network none \
259
+ ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
260
+ -e BUILD_TIMELESS=${BUILD_TIMELESS}
261
+ -w /home/coreboot/coreboot ${DASHARO_SDK} \
262
+ /bin/bash -c " echo $BUILD_TIMELESS && make olddefconfig && make -j$( nproc) "
263
+ else
264
+ docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
265
+ -v $HOME /.ssh:/home/coreboot/.ssh \
266
+ -w /home/coreboot/coreboot ${DASHARO_SDK} \
267
+ /bin/bash -c " make olddefconfig && make -j$( nproc) "
268
+ fi
260
269
261
270
cp build/coreboot.rom hardkernel_odroid_h4_${FW_VERSION} .rom
262
271
if [ $? -eq 0 ]; then
@@ -272,37 +281,46 @@ function build_odroid_h4_btg {
272
281
DEFCONFIG=" configs/config.hardkernel_odroid_h4_btg"
273
282
FW_VERSION=$( cat ${DEFCONFIG} | grep CONFIG_LOCALVERSION | cut -d ' =' -f 2 | tr -d ' "' )
274
283
275
- # Without following sequence workspce would be created by docker with root
276
- # privilidges and build will fail.
277
- # Target directory
278
- TARGET_DIR=" payloads/external/edk2/workspace/Dasharo"
279
- mkdir -p " $TARGET_DIR "
280
- chown -R $( id -u) :$( id -g) " $TARGET_DIR "
281
- chmod -R 755 " $TARGET_DIR "
282
-
283
284
# checkout several submodules needed by these boards (some others are checked
284
285
# out by coreboot's Makefile)
285
286
git submodule update --init --force --checkout \
286
287
3rdparty/dasharo-blobs
287
288
288
- # do not do distclean, because it removes all downloaded artifacts
289
289
docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
290
290
-v $HOME /.ssh:/home/coreboot/.ssh \
291
- --network none \
292
- ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
293
291
-w /home/coreboot/coreboot ${DASHARO_SDK} \
294
- /bin/bash -c " make clean "
292
+ /bin/bash -c " make distclean "
295
293
296
294
cp $DEFCONFIG .config
297
295
298
296
echo " Building Dasharo compatbile with Hardkernel ODROID H4 (version $FW_VERSION )"
299
297
300
- docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
301
- -v $HOME /.ssh:/home/coreboot/.ssh \
302
- --network none \
303
- ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
304
- -w /home/coreboot/coreboot ${DASHARO_SDK} \
305
- /bin/bash -c " make olddefconfig && make -j$( nproc) "
298
+ if [ -z ${AIRGAP} ]; then
299
+
300
+ # In this situation we assume that provided repository is ready to be used
301
+ # and nothing should be downloaded during build process.
302
+
303
+ # Without following sequence workspce would be created by docker with root
304
+ # privilidges and build will fail.
305
+ # Target directory
306
+ TARGET_DIR=" payloads/external/edk2/workspace/Dasharo"
307
+ mkdir -p " $TARGET_DIR "
308
+ chown -R $( id -u) :$( id -g) " $TARGET_DIR "
309
+ chmod -R 755 " $TARGET_DIR "
310
+
311
+ docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
312
+ -v $HOME /.ssh:/home/coreboot/.ssh \
313
+ --network none \
314
+ ${EDK2_REPO_PATH: +-v $EDK2_REPO_PATH :/ home/ coreboot/ coreboot/ payloads/ external/ edk2/ workspace/ Dasharo} \
315
+ -e BUILD_TIMELESS=${BUILD_TIMELESS}
316
+ -w /home/coreboot/coreboot ${DASHARO_SDK} \
317
+ /bin/bash -c " echo $BUILD_TIMELESS && make olddefconfig && make -j$( nproc) "
318
+ else
319
+ docker run --rm -t -u $UID -v $PWD :/home/coreboot/coreboot \
320
+ -v $HOME /.ssh:/home/coreboot/.ssh \
321
+ -w /home/coreboot/coreboot ${DASHARO_SDK} \
322
+ /bin/bash -c " make olddefconfig && make -j$( nproc) "
323
+ fi
306
324
307
325
cp build/coreboot.rom hardkernel_odroid_h4_${FW_VERSION} .rom
308
326
if [ $? -eq 0 ]; then
0 commit comments