[Ovmsdev] How to reproduce exatly the same ovms3.bin (3.2.002-151-g56116fe) build

Mark Webb-Johnson mark at webb-johnson.net
Fri Aug 9 16:07:08 HKT 2019


I don’t think if you build on two different systems you will get the exactly same md5. Quite apart from minor differences in compiler versions, for example, the build date/time is inside the binary. The new IDF framework also has an app versioning system that puts a bunch of other information in it.

So long as you are building with the same sdkconfig, the output binary size should be roughly equivalent.

I updated the sdkconfig.default.hw31 with the exact sdkconfig I use for api.openvehicles.com <http://api.openvehicles.com/> productions builds. That should give you the same settings as I have. For local development, I use compiler optimisation debug, and a gdb stub, but for production we use release compiler optimisation.

Regards, Mark.

> On 9 Aug 2019, at 4:02 PM, Bernd Geistert <b_ghosti at gmx.de> wrote:
> 
> Thanks Mark,
>  
> my first build was using the original sdkconfig.default.hw31, where my ovms3.bin build had I size of 3036096 bytes, quite different to the "reference" ovms3.bin (3.2.002-151-g56116fe) with 2594192 bytes. Then I figured out that the Default setting in the original sdkconfig for 'Compiler Optimization' was 'Default', and I modifed it to 'Release'. Afterwards, I got an ovms3.bin build with 2592512 bytes. This may be more similar to the "reference" ovms3.bin (3.2.002-151-g56116fe) with 2594192 bytes, however, the .bin are not the same.
>  
> I'm used to check builds for equality using md5sum or sha256sum which can't work here due to the different size. Therefore I was asking if there are any more used modifications known from support/sdkconfig.default.hw31, to build exaclty the same "reference" ovms3.bin.
>  
> I'm not sure if this would solve my issue, as there could be some other issue with my toolchain (curently one can't follow the Developer's Guide instructions to get a working toolchain, plz see https://www.openvehicles.com/node/2263 <https://www.openvehicles.com/node/2263>
>  
> As a start, could you please tell my if you are setting  'Compiler Optimization' also to 'Release' instead of 'Debug' for the automatic builds? If not, there must by some other issue with my toolchain installation.
>  
> Regards, Matthias
>  
>  
> Gesendet: Donnerstag, 08. August 2019 um 11:14 Uhr
> Von: "Mark Webb-Johnson" <mark at webb-johnson.net>
> An: "OVMS Developers" <ovmsdev at lists.openvehicles.com>
> Betreff: Re: [Ovmsdev] How to reproduce exatly the same ovms3.bin (3.2.002-151-g56116fe) build
> If you copy from support/sdkconfig.default.hw31 to sdkconfig, you should have something pretty close to what we use to build the productions releases.
> 
> You may have to accept some default values the next time you build.
> 
> Regards, Mark.
> 
> > On 8 Aug 2019, at 3:32 AM, Bernd Geistert <b_ghosti at gmx.de> wrote:
> >
> > Hi all,
> >
> > I would like to have a defined toolchain for building ovms3.bin, so that
> > I can reproduce the same binary (for the same GIT #tag of course) from
> > where I can start and later share own development.
> >
> > I have downloaded the "reference" ovms3.bin (3.2.002-151-g56116fe Thu
> > Aug 1 16:04:20 UTC 2019 Automated build (markhk8), size = 2594192
> > bytes), but this is different to my own build in the mingw32 console using
> >
> > $ make clean
> > $ make all
> > Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
> > Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
> > Compiler version: 5.2.0
> > Python requirements from C:/msys32/home/.../esp/esp-idf/requirements.txt
> > are satisfied [Python 3.7.3]
> >
> > App "ovms3" version: 3.2.002-151-g56116fe1
> > CC build/app_update/esp_app_desc.o
> > AR build/app_update/libapp_update.a
> > Build version is 3.2.002-151-g56116fe1
> > CXX build/main/ovms_version.o
> > AR build/main/libmain.a
> > Generating libapp_update.a.sections_info
> > Generating libmain.a.sections_info
> > Generating esp32.project.ld
> > LD build/ovms3.elf
> >
> > $ ls -l build/ovms3.bin
> > -rw-r--r-- 1 Matthias None 2592512 5. Aug 21:12 build/ovms3.bin
> >
> > At first, my ovms3.bin build was size 3036096, but I modified the make
> > menuconfig default 'Compiler Optimization' from 'Default' to 'Release',
> > the size inow similar to edge/ovms3.bin, but not the same.
> >
> > Maybe someone could tell about other important settings in "IoT
> > Development Framework Configuration", maybe this could be the path to
> > match exactly markhk8's setting for 'Automated build'?
> >
> > I described this also in https://www.openvehicles.com/node/2263 <https://www.openvehicles.com/node/2263>
> >
> > Regards
> >
> > Matthias
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20190809/06249baf/attachment.htm>


More information about the OvmsDev mailing list