Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*added version info and build time info #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AMV007
Copy link

@AMV007 AMV007 commented Jun 7, 2024

*added vscode settings to exclude
*max_payload_size to more clear size

*added vscode settings to exclude
*max_payload_size to more clear size
@konradybcio
Copy link
Member

couple points:

  • this is all good improvements
  • most of the commiters here are used to the linux kernel way of structuring changes (one change per commit), but that's not a big deal for me with such small patches
  • qdl (lowercase) seems to be the used throughout the codebase
  • I think having a git hash in the print would be very useful (say qdl version 1.0.0-1234abde)
  • the date could use a LC_ALL=C in the front
  • since i added so many nits, I may as well ask to put a space between the * and the operands in the max_payload_size declaration 😉

thanks!

@@ -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 ;-)

@@ -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")
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.

@@ -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
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.

@@ -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")
VERSION := "1.0.0"
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.

@@ -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

@@ -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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants