Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ qdl-ramdump
ks
compile_commands.json
.cache

.vscode/settings.json
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
QDL := qdl
RAMDUMP := qdl-ramdump

CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0 libusb-1.0`
BUILD_TIME := $(shell date +"%c")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the build unreproducible. Should use SOURCE_DATE_EPOCH, see https://reproducible-builds.org/docs/source-date-epoch/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this information valuable. Please use the commit message to describe your motivation.

Copy link
Author

@AMV007 AMV007 Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, next time, when I will debug non working qdl at the PC of my colleague may be I will return to this change ;-)

VERSION := "1.0.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to add git-version info (git describe) as well or instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the version information to be useful (e.g. for bug reports etc), we need to bump this version string on every commit. So, I think git describe provides much more value here.


CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0 libusb-1.0` -D "BUILD_TIME=\"$(BUILD_TIME)\"" -D "VERSION=\"$(VERSION)\""
LDFLAGS += `pkg-config --libs libxml-2.0 libusb-1.0`
prefix := /usr/local

Expand Down
2 changes: 1 addition & 1 deletion firehose.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int firehose_write(struct qdl_device *qdl, xmlDoc *doc)
return ret < 0 ? -saved_errno : 0;
}

static size_t max_payload_size = 1048576;
static size_t max_payload_size = 1024*1024;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change


/**
* firehose_configure_response_parser() - parse a configure response
Expand Down
1 change: 1 addition & 0 deletions qdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ int main(int argc, char **argv)
int opt;
bool qdl_finalize_provisioning = false;

printf("QDL version %s %s\n", VERSION, BUILD_TIME);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to make the tool less noisy... How about instead adding a --version argument which prints the version and exits?


static struct option options[] = {
{"debug", no_argument, 0, 'd'},
Expand Down