Skip to contentSkip to conversation

bitbake.conf: Switch BB_SIGNATURE_HANDLER to OEEquivHash by default

PATCH In review Richard Purdie 2 participants 2 messages Feb 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake.conf: Switch BB_SIGNATURE_HANDLER to OEEquivHash by default

Hash Equivalence is an extremely powerful feature for reducing build time. In simple terms, if something is rebuilt and the output is the same as a previous build, all sstate build artefacts beyond that point can be reused instead of being rebuilt.

This can be done with a local hash equivalence database/server which is the default and even local builds with a local sstate can benefit hugely from it.

There is an assumption that builds are reproducible in order for this to work optimally.

The downside is that when enabled to pull from a shared sstate cache, you need to use a common hash equivalence server to match it for things to work well.

OE-Core wasn't enabling hash equivalence by default but this changes it to do so. This has been extensively tested as the deafault in Poky for a long time.

---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index d247eb3adfc..9308ee431f2 100644
@@ -951,7 +951,7 @@ BB_DEFAULT_EVENTLOG ?= "${LOG_DIR}/eventlog/${DATETIME}.json"
 BB_DEFER_BBCLASSES = "native nativesdk cross crosssdk"
 
 # Setup our default hash policy
-BB_SIGNATURE_HANDLER ?= "OEBasicHash"
+BB_SIGNATURE_HANDLER ?= "OEEquivHash"
 BB_HASHEXCLUDE_COMMON ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
     THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL \
     USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
#1 lore raw

Richard Purdie via lists.openembedded.org <richard.purdie= [email protected]> escreveu (quinta, 26/02/2026 à(s) 11:36):

Quoted 18 lines

Hash Equivalence is an extremely powerful feature for reducing build time. In simple terms, if something is rebuilt and the output is the same as a previous build, all sstate build artefacts beyond that point can be reused instead of being rebuilt.

This can be done with a local hash equivalence database/server which is the default and even local builds with a local sstate can benefit hugely from it.

There is an assumption that builds are reproducible in order for this to work
optimally.

The downside is that when enabled to pull from a shared sstate cache, you need
to use a common hash equivalence server to match it for things to work well.

Quoted 5 lines

OE-Core wasn't enabling hash equivalence by default but this changes it to do
so. This has been extensively tested as the deafault in Poky for a long time.

I am happy with this change and it will make the noditro better aligned with what
has been used and tested in poky since dunfell.

However, I would like to highlight a problem I have recently encountered:

When bitbake starts from scratch it takes a lot of time to populate the hash equivalence database.
The issue can be observed locally if we start from an empty build directory:

watch -la build/cache/hashserv.db
bitbake core-image-base -n

and bitbake gets stuck in "Initialising tasks:" 44% for quite a while. In some cases, I noticed that in some cases the time reaches 20 minutes.

Jose

Quoted 33 lines
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +0 -0
index d247eb3adfc..9308ee431f2 100644
@@ -951,7 +951,7 @@ BB_DEFAULT_EVENTLOG ?=

"${LOG_DIR}/eventlog/${DATETIME}.json"
BB_DEFER_BBCLASSES = "native nativesdk cross crosssdk"

# Setup our default hash policy

meta/conf/bitbake.conf +1 -1
-BB_SIGNATURE_HANDLER ?= "OEBasicHash"
+BB_SIGNATURE_HANDLER ?= "OEEquivHash"
 BB_HASHEXCLUDE_COMMON ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH

BBSERVER DL_DIR \
THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE
PRSERV_HOST \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#232001):
https://lists.openembedded.org/g/openembedded-core/message/232001
Mute This Topic: https://lists.openembedded.org/mt/118010453/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma