summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/get.sh2
-rw-r--r--include/mrc.sh4
-rw-r--r--include/rom.sh40
-rw-r--r--include/tree.sh40
-rw-r--r--include/vendor.sh20
5 files changed, 57 insertions, 49 deletions
diff --git a/include/get.sh b/include/get.sh
index 0d430abe..4731c694 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -288,7 +288,7 @@ try_git()
x_ mv "$tmpgitcache" "$gitdest"
fi
- if git -C "$gitdest" whatchanged "$7" 1>/dev/null 2>/dev/null && \
+ if git -C "$gitdest" show "$7" 1>/dev/null 2>/dev/null && \
[ "$forcepull" != "y" ]; then
# don't try to pull the latest changes if the given target
# revision already exists locally. this saves a lot of time
diff --git a/include/mrc.sh b/include/mrc.sh
index 9d4566be..f1e31fa7 100644
--- a/include/mrc.sh
+++ b/include/mrc.sh
@@ -68,8 +68,8 @@ extract_partition()
SIZE=$(( $( echo $ROOTP | cut -f4 -d\ | tr -d "B" ) ))
- x_ dd if="${1%.zip}" of="root-a.ext2" bs=1024 skip=$(( $START / 1024 )) \
- count=$(( $SIZE / 1024 ))
+ x_ dd if="${1%.zip}" of="root-a.ext2" bs=1024 \
+ skip=$(( $START / 1024 )) count=$(( $SIZE / 1024 ))
printf "cd /usr/sbin\ndump chromeos-firmwareupdate %s\nquit" \
"$SHELLBALL" | debugfs "root-a.ext2" || \
diff --git a/include/rom.sh b/include/rom.sh
index b1c3c559..6f0e3529 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -25,9 +25,8 @@ buildser()
copyps1bios()
{
- if [ "$if_not_dry_build" = ":" ]; then
+ $if_dry_build \
return 0
- fi
remkdir "bin/playstation"
x_ cp src/pcsx-redux/src/mips/openbios/openbios.bin bin/playstation
@@ -45,9 +44,8 @@ mkpayload_grub()
grub_modules=""
grub_install_modules=""
- if [ "$if_not_dry_build" = ":" ]; then
+ $if_dry_build \
return 0
- fi
. "$grubdata/module/$tree" || \
err "Can't read '$grubdata/module/$tree'" "mkpayload_grub" "$@"
@@ -209,7 +207,7 @@ mkcorebootbin_real()
fi
if [ "$payload_seabios" = "y" ] && [ "$payload_uboot" = "arm64" ]; then
$if_not_dry_build \
- err "$target: U-Boot arm and SeaBIOS/GRUB both enabled" \
+ err "$target: U-Boot arm / SeaBIOS/GRUB both enabled" \
"mkcorebootbin_real" "$@"
fi
@@ -235,26 +233,25 @@ mkcorebootbin_real()
payload_grubsea="n"
fi
+ $if_dry_build \
+ return 0
+
if [ -f "$cbfscfg" ]; then
- $if_not_dry_build \
- dx_ add_cbfs_option "$cbfscfg"
+ dx_ add_cbfs_option "$cbfscfg"
fi
- if $if_not_dry_build grep "CONFIG_PAYLOAD_NONE=y" "$defconfig"; then
+ if grep "CONFIG_PAYLOAD_NONE=y" "$defconfig"; then
if [ "$payload_seabios" = "y" ]; then
pname="seabios"
- $if_not_dry_build \
- add_seabios
+ add_seabios
fi
if [ "$payload_uboot" = "arm64" ]; then
pname="uboot"
- $if_not_dry_build \
- add_uboot
+ add_uboot
fi
else
pname="custom"
- $if_not_dry_build \
- cprom
+ cprom
fi; :
}
@@ -504,13 +501,14 @@ cbfs()
mkcoreboottar()
{
- if [ "$target" != "$tree" ] && [ "$XBMK_RELEASE" = "y" ] && \
- [ "$release" != "n" ]; then
-
- $if_not_dry_build \
- mkrom_tarball "bin/$target"
+ $if_dry_build \
+ return 0
- $if_not_dry_build \
- x_ ./mk inject "bin/${relname}_${target}.tar.xz" nuke
+ if [ "$target" = "$tree" ] || [ "$XBMK_RELEASE" != "y" ] || \
+ [ "$release" = "n" ]; then
+ return 0
fi
+
+ mkrom_tarball "bin/$target"
+ x_ ./mk inject "bin/${relname}_${target}.tar.xz" nuke
}
diff --git a/include/tree.sh b/include/tree.sh
index 19060110..2020c450 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -35,6 +35,7 @@ cmakedir=""
defconfig=""
postmake=""
mkhelpercfg=""
+if_dry_build=":"
if_not_dry_build=""
dest_dir=""
mdir=""
@@ -51,7 +52,7 @@ forcepull=""
trees()
{
- flags="f:b:m:u:c:x:s:l:n:d:"
+ flags="f:F:b:m:u:c:x:s:l:n:d:"
while getopts $flags option
do
@@ -73,6 +74,7 @@ trees()
# and $if_not_dry_build is prefixed to skipped commands
if_not_dry_build=":"
+ if_dry_build=""
;;
-b) : ;;
-u) mode="oldconfig" ;;
@@ -82,10 +84,12 @@ trees()
-f) # download source code for a project
do_make="n" # lets us know not to build anything
if_not_dry_build=":"
+ if_dry_build=""
;;
-F) # same as -F, but don't skip git fetch/pull on cache
do_make="n" # lets us know not to build anything
if_not_dry_build=":"
+ if_dry_build=""
forcepull="y"
;;
-s) mode="savedefconfig" ;;
@@ -236,9 +240,10 @@ handle_defconfig()
if [ -z "$mode" ]; then
for _xarch in $xarch; do
+ $if_dry_build \
+ break
if [ -n "$_xarch" ]; then
- $if_not_dry_build \
- check_cross_compiler "$_xarch"
+ check_cross_compiler "$_xarch"
fi
done; :
fi
@@ -625,7 +630,9 @@ check_defconfig()
# skip build if a previous one exists:
- if ! $if_not_dry_build elfcheck; then
+ $if_dry_build \
+ return 0
+ if ! elfcheck; then
return 1
fi
}
@@ -697,25 +704,26 @@ run_make_command()
fi
if [ "$mode" = "clean" ]; then
- $if_not_dry_build \
- make -C "$srcdir" $cleanargs distclean || \
- $if_not_dry_build \
- x_ make -C "$srcdir" $cleanargs clean; :
+ $if_dry_build \
+ return 0
+ if ! make -C "$srcdir" $cleanargs distclean; then
+ x_ make -C "$srcdir" $cleanargs clean
+ fi
fi
}
check_cmake()
{
- if [ -n "$cmakedir" ]; then
- if ! $if_not_dry_build check_makefile "$1"; then
- if ! cmake -B "$1" "$1/$cmakedir"; then
- $if_not_dry_build \
- x_ check_makefile "$1"
- fi
+ $if_dry_build \
+ return 0
+ if [ ! -n "$cmakedir" ]; then
+ return 0
+ elif ! check_makefile "$1"; then
+ if ! cmake -B "$1" "$1/$cmakedir"; then
+ x_ check_makefile "$1"
fi
- $if_not_dry_build \
- x_ check_makefile "$1"; :
fi
+ x_ check_makefile "$1"; :
}
check_autoconf()
diff --git a/include/vendor.sh b/include/vendor.sh
index 7fb4d9ea..761f9250 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -24,16 +24,16 @@ appdir="$vendir/app"
vfix="DO_NOT_FLASH_YET._FIRST,_INJECT_FILES_VIA_INSTRUCTIONS_ON_LIBREBOOT.ORG_"
# lbmk-specific extension to the "checkvars" variable (not suitable for cbmk)
-checkvarschk="CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
- CONFIG_LENOVO_TBFW_BIN CONFIG_VGA_BIOS_FILE CONFIG_FSP_M_FILE \
- CONFIG_FSP_S_FILE CONFIG_KBC1126_FW1 CONFIG_KBC1126_FW2"
+checkvarschk="CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_HAVE_MRC \
+ CONFIG_HAVE_ME_BIN CONFIG_LENOVO_TBFW_BIN CONFIG_VGA_BIOS_FILE \
+ CONFIG_FSP_M_FILE CONFIG_FSP_S_FILE CONFIG_KBC1126_FW1 CONFIG_KBC1126_FW2"
# lbmk-specific extensions to the "checkvars" variable (not suitable for cbmk)
-checkvarsxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_FSP_FULL_FD \
- CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET CONFIG_FSP_USE_REPO \
- CONFIG_VGA_BIOS_ID CONFIG_BOARD_DELL_E6400 CONFIG_FSP_S_CBFS \
- CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE CONFIG_FSP_FD_PATH \
- CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
+checkvarsxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE \
+ CONFIG_FSP_FULL_FD CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET \
+ CONFIG_FSP_USE_REPO CONFIG_VGA_BIOS_ID CONFIG_BOARD_DELL_E6400 \
+ CONFIG_FSP_S_CBFS CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE \
+ CONFIG_FSP_FD_PATH CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
# lbmk-specific extensions; general variables
_dest=""
@@ -702,7 +702,9 @@ vfile()
fi
elif [ "$nuke" = "nuke" ]; then
x_ "$cbfstool" "$rom" remove -n "$cbfsname"
- elif [ "$blobtype" = "stage" ]; then # the only stage we handle is refcode
+ elif [ "$blobtype" = "stage" ]; then
+ # the only stage we handle is refcode
+
x_ rm -f "$xbtmp/refcode"
x_ "$rmodtool" -i "$_dest" -o "$xbtmp/refcode"
x_ "$cbfstool" "$rom" add-stage -f "$xbtmp/refcode" \