Commit Graph

47 Commits

Author SHA1 Message Date
Oliver Smith 968d0b94f6 contrib/jenkins: tweak shell logic
Move the logic down to where make gets called, so we don't need the
variable. Print whether we use CLANG or GCC.

Don't put /opt/llvm-arm/bin infront of PATH unless building with CLANG.
Right now it doesn't seem to have e.g. an override for gcc, but the
files in that path may change when we update
LLVM-embedded-toolchain-for-Arm.

Related: OS#6026
Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c
2023-05-16 10:13:30 +02:00
Eric Wild 749dcdc277 fw: only build the bl with clang
-Oz breaks cardem, so just build the bootloader with clang.

Closes: OS#6026
Change-Id: Idb9e9a024fb8bfec28ff479c254ea73be0c8ef82
2023-05-15 16:37:35 +02:00
Eric Wild 773d314142 contrib/jenkins.sh : build and publish combined targets
This makes production a bit easier.

Related: OS#5722
Change-Id: I32f9a0213aaefa50232a3d8dc2e7a4f2f44dbae1
2022-11-22 21:54:26 +00:00
Eric Wild cfab7c00ce conrtrib/upload : upload elf files
Due to popular demand people want elf files that can be loaded to get
debug symbols, so publish the elf file, but not the stub-less bin file.

This elf file can ONLY be used to look up symbols, it should NOT be
"load"ed into flash, because the preceding crc stub has to match. Mixing
older crc stubs that are still in flash and newer elf files means the
device will end up in DFU mode upon reset.

Change-Id: Ifceb16d385388356ac1bf8b13f5df62c643bebf8
2022-11-16 10:48:29 +00:00
Oliver Smith 139d517bc1 contrib/jenkins.sh: set USE_CLANG=1
As the bootloader goes beyond partition size in modern gcc, use clang
instead.

Depends: docker-playground Ib82a53fa7edc62d21e772efbb9b2c049d1b50c4d
Related: OS#5260
Change-Id: I2aa2e20e75e334560dbe1f6db9fd1491873ff91f
2022-10-13 13:03:20 +02:00
Harald Welte c3f366b55e contrib/simtrace.lua: Add Flag bits + Data to COL_INFO
this provides an esy way to understand more without looking at the
detailed decode for each packet.

Change-Id: I0aa3d68172022907fbe8371aaca6538df0649dfe
2022-03-03 18:04:45 +00:00
Eric Wild 3a6f1adc2e lua dissector: adjust usage instructions
...as originally described in the first commit that added the file.

Change-Id: I67918f0f62b1619786324ae84276a46d7c64eee5
2022-02-02 11:48:05 +01:00
Harald Welte 70e60aa1de contrib/simtrace.lua: Register for "decode as..."
This allows to manually decode traces that don't contain the vid/pid information

Change-Id: Idd605f63f01f005f07a4c329847d08331bfdc9e8
2022-01-26 16:10:27 +01:00
Harald Welte 4775a94959 contrib/simtrace.lua: Dissect some more cardem related message types
Change-Id: I1892c1e154130d8048e99fd1d8f8809f00366e80
2022-01-26 16:10:27 +01:00
Harald Welte d3b9d95b34 contrib/simtrace.lua: Don't print SIMTRACE_MSGT_ in every COL_INFO
this is redundant.  We care about *which* message type, and not about
wasting horizontal screen real-estate.

Change-Id: I98f90561b39401f1c2339f79a3cb40574bb03b2d
2022-01-26 16:10:27 +01:00
Harald Welte 408889d8b2 contrib/simtrace.lua: print length + slot-number in decimal only
Change-Id: Ia9a969b88170c49f8bb1cb0cda6918d6a894d3ba
2022-01-26 15:06:06 +00:00
Harald Welte 7b160b5ed7 contrib/simtrace.lua: Add header with author/description/usage
Change-Id: I56574741cd77436f9f452420677c00d8049a50cc
2022-01-26 15:06:02 +00:00
Harald Welte 15a3ef25a2 cosmetic: contrib/simtrace.lua: more consistent formatting
Change-Id: If842dd95c7244ebe33579ed104247c66682ed4d4
2022-01-26 15:05:17 +00:00
Harald Welte 5820eacf57 contrib/simtrace.lua: Add VID/PID of all currentl simtrace2 devices
Change-Id: Ie425f8dbd3a02c6bdcdaeaafaf0d5b4fb351ec4d
2022-01-26 15:04:52 +00:00
Eric Wild 7fde63b7c6 wireshark lua dissector: dissect more
Change-Id: If81812b6330205a65c1c9b7d4240094b71f3c757
2021-12-15 14:10:19 +00:00
Eric Wild cb655f9774 firmware: add crc stub to all dfu apps to ensure reliable loading
DFU flashing of apps sometimes aborts, and although rare this leads to
broken devices if no boot button or serial/jtag access exists, because
the bootloader will keep trying to start a half-flashed app that then
crashes at some point.

The easiest fix that works with existing bootloaders is to prepend a
small 512 byte stub that calculcates the crc and compares it with the
crc calculated at build time, and then either starts the actual app, or
sets the dfu flag and resets. This ensures we either have a working,
running app, or end up in the bootloader, ready to flash again.

For obvious reasons this only applies to dfu apps, and not to flash
targets like the actual bootloader itself.

Change-Id: Id6df0486c8b779889d21800dc2441b3aa9af8a5f
2021-12-15 14:04:20 +00:00
Eric Wild 23125d05f7 jenkins: build bootloader updater
Change-Id: I8b2023921a67b0e8945d8f24e4c8076de3e12acf
2021-11-02 10:50:36 +00:00
Harald Welte 19ccc209c1 jenkins.sh: Build 'trace' firmware for ngff_cardem
Let's create and publish binary builds for 'trace' on BOARD=ngff_carde.

According to SYS#5525 this is verified working since two months ago, so
there's no reason to withhold the binary builds for it.

Change-Id: I8a98002ef5aa58e5a3d49627323fe11505508bc8
Related: SYS#5525
2021-10-06 21:01:14 +02:00
Eric Wild 301aec51f7 contrib/jenkins.sh: lower trace to make bl fit
We keep running out of rom space, so reduce tracing to nothing for alle
dfu targets, and let's hope newer gcc versions stop producing more
code...

Change-Id: I7d2947c84097035bed00ad489a175d614b4c388e
2021-10-04 15:07:44 +00:00
Eric Wild 1f75e3881c contrib: allow manually forcing bulk simtrace dissection
Change-Id: I5fcfe3c221b87b02e21c857ac51d0392c3b4de3c
2021-08-09 15:18:59 +02:00
Eric Wild 5beffa5d91 contrib/jenkins.sh: build ngff_Cardem dfu bootloader
It does fit with some compiler versions, while others overflow the bl region,
so just reduce the trace level a bit to make it fits all the time.

Change-Id: I168a847da8dfc585aaeef0030f95fc225a713147
2021-08-09 12:45:13 +02:00
Harald Welte 3092721729 contrib/jenkins.sh: Build APP=cardem for BOARD=ngff_cardem
This makes sure downloads.osmocom.org will get cardem images
for the new ngff_cardem board.

The dfu loader was not enabled as it currently overflows the ROM
region by 200 bytes, see OS#5210.

Change-Id: Id2b7925c823fb19f880e06a205764d2b19de4ad4
Related: OS#5210
2021-08-08 21:31:03 +02:00
Eric Wild 23a9771467 contrib: more cardem dissection
Change-Id: Ia74d3674f854b390c9745a1cb8d5756bd5d39540
2021-08-02 09:23:19 +00:00
Harald Welte 4fe93be725 introduce support for new ngff_cardem board
This adds support for the new ngff_cardem board, a board that
basically combines a ngff breakout board with a built-in SIMtrace2.

Cardem works, but depending on the modem it might need a adjusted ATR to
ensure a lower baud  rate is used by the modem, high rates might lead
to weird power cycling of the card after a few transfers.

Trace was also tested and appears to work as expected.

Change-Id: Ia96124fbe8a752c98e7fd4096d542a3b2b9bc255
2021-08-02 09:22:46 +00:00
Harald Welte c85f39078c contrib/flash.py: Add OCTSIMTEST support
Change-Id: Id906d955f45a204ac0b00f56d8f5149c64c62f32
2021-07-09 11:46:16 +00:00
Eric Wild f0653533cc contrib: add a basic simtrace lua dissector for wireshark
See Help->About Wireshark->Folders tab,the usual place this should go is
~/.local/lib/wireshark/plugins
Hot reload possible after editing using Analyze->Reload Lua Plugins

Change-Id: I360ab522dabc3a378969df36efd3b48fc4cade3c
2021-06-21 17:38:53 +02:00
Harald Welte b69f5a85b3 contrib/jenkins.sh: Build 'cardem' app for 'octsimtest' board
Change-Id: Ia38bbb85c2828ab7307ffe688e50d7cdf70d6d39
2021-06-03 09:36:10 +02:00
Harald Welte 796501293d Revert "cardem: disable upload for simtrace2"
This reverts commit baa62777c8 which
deleted simtrace-cardem builds to prevent them from being published.

Change-Id: I63fd4bea2985fcc87f202d8b69a4f24661858185
2021-06-01 18:47:37 +02:00
Harald Welte e33c2907bc jenkins.sh: build 'cardem' firmware also for simtrace board
Now that it is supported, we should also build + publish the related
binaries.

Change-Id: I9231503b865adc863959d74d98e7f24f83c293e9
2021-06-01 18:38:25 +02:00
Harald Welte 206d613b4d contrib/jenkins.sh: Switch from rita -> ftp.osmocom.org
We should use service-aliases and not the primary host name, as
that makes migration between machines hard.

Change-Id: I34b18457268ae6f8ae3a053c5424210074a4d52e
2021-04-22 11:21:12 +02:00
Kevin Redon debbf3c6fa cardem: currently simtrace does not support cardem
the SIMtrace board does not support the current card emulation
application because this uses a timer counter to handle the
timeouts, but on the SIMtrace board this is not connected to the
CLK signal

Change-Id: Idd09ea534179f0ede705573e1373dbd045c9828a
2021-04-04 18:06:51 +00:00
Oliver Smith 62ad58ad56 contrib/prepare_upload.sh: fix cd problems
Call the script from the proper directory, and cd into the topdir on top
of the script. Fixes:
/build/contrib/jenkins.sh: line 71: contrib/prepare_upload.sh: No such file or directory

Related: OS#4413
Change-Id: Icbfaa5579aab887830ca90b24a2e322df8d98f4f
2021-03-08 08:37:06 +01:00
Oliver Smith 1031d9b884 firmware: create duplicate files for upload only
Don't create copies of firmware files with version strings appended in
the normal build. Only do this before uploading the firmware files.

I have verified that "make" before this change and
"make; contrib/prepare_upload.sh" after produce the same files.

Close: OS#4413
Change-Id: I118a4ff397a178281c26a6b98112fa66b6f049ab
2021-03-05 15:38:48 +01:00
Eric Wild baa62777c8 cardem: disable upload for simtrace2
cardem on the st2 has been broken forever and still does not work, so
stop uploading cardem binaries

Change-Id: I33828f799d41386afb3f8dcd9bb510902877e03f
2020-01-30 17:22:40 +01:00
Kevin Redon e88be9e782 add script to flash latest firmware
this python script lists the SIMtrace 2 devices connected to USB
and will flash the latest version of the application (if necessary).
it requires pyusb and dfu-util.
it is intended for end users so they don't need to read the length
and error-prone instructions provided in the wiki.

TODO:
- support updating bootloader (once dfu-ram image exists)
- use python implementation of dfu-util to be python only

Change-Id: I3ebe0f54b6e3b7b45478603cc0a5b56e87b1f461
2020-01-16 20:36:23 +00:00
Harald Welte cdc0853777 jenkins.sh: Add verify_value_string_arrays_are_terminated.py
Change-Id: I15f13e12711b87ce71b38b16ef17620850fd8eb7
2019-12-17 13:28:15 +01:00
Harald Welte 964cda309d host: use autotools and split shared code to libosmo-simtrace2
Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b
2019-11-24 23:15:53 +01:00
Harald Welte e876bf53e8 Attempt to fix master-simtrace2 publish stage (missing WORKSPACE env)
Change-Id: I5dfb22199727d424d83584f58c6517c80573e880
Related: OS#4243
2019-10-30 09:26:38 +01:00
Kevin Redon d14970f95b publish: also upload latest
the jenkins script will now upload the versioned output to the
all directory, and a copy named "latest" in the latest directory.

Change-Id: I70114ef8414779e369da5cbf945854c9ace3464e
2019-08-01 17:23:23 +02:00
Harald Welte 298a5ba722 contrib/jenkins.sh: don't delete old builds from ftp
Change-Id: I2b34b5d4525d62564d34a6583ee3739b82c07c68
2019-07-19 18:58:49 +02:00
Harald Welte c3ef475ea5 contrib/jenkins.sh: also push the .elf files to the ftp (for gdb/objdump)
Change-Id: Ibccf92e30c84f34ff61b3e823151cf33f20a1c4f
2019-07-19 18:58:44 +02:00
Kevin Redon 76ef811a4e jenkins: add simtrace/trace to the builds
trace is now stable enough on simtrace to be built and uploaded.

Change-Id: I157fff9930d03a7ec52ecac4a1be0511ea66c010
2018-08-07 19:01:25 +02:00
Kevin Redon fecfa2aa51 jenkins: clean after upload
the upload failed because after the firmware were built (make),
they where removed (make clean).
now they are removed only after the upload.

Change-Id: Ie4421a6fa9207eb541107de9c14f265626f6be96
2018-08-07 17:51:48 +02:00
Kevin Redon 37e7861c4d jenkins: fix publish
the script argument was not saved in the publish variable used later
to decide if publishing/uploading is needed.

Change-Id: Ic768a8e96e5e4d72acf3979da1412d683f79ec55
2018-08-07 12:09:49 +02:00
Kevin Redon d5f583da60 jenkins: add build uploads
firmware binaries should be uploaded to
https://ftp.osmocom.org/binaries/simtrace2/firmware/
this directory wiki be documented in the SIMtrace 2 wiki for users
to get the latest firmware images without having to cross-compile
themselves.

Change-Id: I589531f59e54a0997b012bdd91e3bef9f847f517
2018-08-06 15:57:43 +02:00
Harald Welte cb6e20596e contrib/jenkins.sh: Also run firmware tests + build-test host software
Change-Id: Ie53857164d0a21daac334057c5bafbfd9912bf4b
2018-07-01 16:33:25 +02:00
Harald Welte 105c1dce4f add contrib/jenkins.sh for build verification
The contrib/jenkins.sh script will build all supported apps for all
supported builds.  It will be used by jenkins/gerrit build testing.
2018-06-29 21:39:42 +02:00