This ports barebox commit: | commit 2cc9777631ac22e2f8831727a7463000ba83c80e | Author: Ahmad Fatoum <a.fatoum@pengutronix.de> | Date: Fri Jul 28 15:31:58 2023 +0200 | | state: backend_bucket_direct: add debug prints on read/write | | We already have debug prints for the circular backend to help see how | much data is read/written for each bucket. Add similar debugging info | for the direct backend as well. Example with stride size of 2048 and | 44 bytes for the variable set: | | barebox@board:/ state -l | state: Read state from 0 length 68 | state: Read state from 2048 length 68 | state: Read state from 4096 length 68 | | barebox@board:/ state -s | state: Written state to offset 0 length 68 data length 60 | state: Written state to offset 2048 length 68 data length 60 | state: Written state to offset 4096 length 68 data length 60 | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> | Reviewed-by: Johannes Zink <j.zink@pengutronix.de> | Link: https://lore.barebox.org/20230728133158.3828436-1-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state/backend_bucket_direct.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/barebox-state/backend_bucket_direct.c b/src/barebox-state/backend_bucket_direct.c index bf060ebed4c0..3e756e21dd41 100644 --- a/src/barebox-state/backend_bucket_direct.c +++ b/src/barebox-state/backend_bucket_direct.c @@ -53,7 +53,7 @@ static int state_backend_bucket_direct_read(struct state_backend_storage_bucket struct state_backend_storage_bucket_direct *direct = get_bucket_direct(bucket); struct state_backend_storage_bucket_direct_meta meta; - uint32_t read_len; + uint32_t read_len, header_len = 0; void *buf; int ret; @@ -73,6 +73,8 @@ static int state_backend_bucket_direct_read(struct state_backend_storage_bucket return -EINVAL; } + + header_len = sizeof(meta); } else { if (meta.magic != ~0 && !!meta.magic) bucket->wrong_magic = 1; @@ -88,12 +90,16 @@ static int state_backend_bucket_direct_read(struct state_backend_storage_bucket -errno); return -errno; } + } buf = xmalloc(read_len); if (!buf) return -ENOMEM; + dev_dbg(direct->dev, "Read state from %lld length %d\n", (long long) direct->offset, + header_len + read_len); + ret = read_full(direct->fd, buf, read_len); if (ret < 0) { dev_err(direct->dev, "Failed to read from file, %d\n", ret); @@ -113,6 +119,7 @@ static int state_backend_bucket_direct_write(struct state_backend_storage_bucket { struct state_backend_storage_bucket_direct *direct = get_bucket_direct(bucket); + size_t header_len = 0; int ret; struct state_backend_storage_bucket_direct_meta meta; @@ -130,6 +137,8 @@ static int state_backend_bucket_direct_write(struct state_backend_storage_bucket dev_err(direct->dev, "Failed to write metadata to file, %d\n", ret); return ret; } + + header_len = sizeof(meta); } else { if (!IS_ENABLED(CONFIG_STATE_BACKWARD_COMPATIBLE)) { dev_dbg(direct->dev, "Too small stride size: must skip metadata! Increase stride size\n"); @@ -149,6 +158,9 @@ static int state_backend_bucket_direct_write(struct state_backend_storage_bucket return ret; } + dev_dbg(direct->dev, "Written state to offset %lld length %zu data length %zu\n", + (long long)direct->offset, len + header_len, len); + return 0; } -- 2.39.2
This ports barebox commit: | commit c0afc799fb9a19a11f651596fe23b4b755593887 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Wed Dec 14 13:35:09 2022 +0100 | | Rename struct device_d to device | | The '_d' suffix was originally introduced in case we want to import | Linux struct device as a separate struct into barebox. Over time it | became clear that this won't happen, instead barebox struct device_d | is basically the same as Linux struct device. Rename the struct name | accordingly to make porting Linux code easier. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> | Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state/backend_bucket_circular.c | 4 ++-- src/barebox-state/backend_bucket_direct.c | 4 ++-- src/barebox-state/backend_format_dtb.c | 4 ++-- src/barebox-state/backend_format_raw.c | 4 ++-- src/barebox-state/state.h | 14 ++++++------- src/dt/common.h | 22 ++++++++++----------- src/dt/dt.h | 8 ++++---- src/libdt.c | 2 +- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/barebox-state/backend_bucket_circular.c b/src/barebox-state/backend_bucket_circular.c index 0906268f5e7c..b84463c4be5e 100644 --- a/src/barebox-state/backend_bucket_circular.c +++ b/src/barebox-state/backend_bucket_circular.c @@ -63,7 +63,7 @@ struct state_backend_storage_bucket_circular { #endif /* For outputs */ - struct device_d *dev; + struct device *dev; }; /* @@ -457,7 +457,7 @@ static int bucket_circular_is_block_bad(struct state_backend_storage_bucket_circ } #endif -int state_backend_bucket_circular_create(struct device_d *dev, const char *path, +int state_backend_bucket_circular_create(struct device *dev, const char *path, struct state_backend_storage_bucket **bucket, unsigned int eraseblock, ssize_t writesize, diff --git a/src/barebox-state/backend_bucket_direct.c b/src/barebox-state/backend_bucket_direct.c index dd9c8570ad3d..cf77c3f6a0df 100644 --- a/src/barebox-state/backend_bucket_direct.c +++ b/src/barebox-state/backend_bucket_direct.c @@ -30,7 +30,7 @@ struct state_backend_storage_bucket_direct { int fd; - struct device_d *dev; + struct device *dev; }; struct __attribute__((__packed__)) state_backend_storage_bucket_direct_meta { @@ -163,7 +163,7 @@ static void state_backend_bucket_direct_free(struct free(direct); } -int state_backend_bucket_direct_create(struct device_d *dev, const char *path, +int state_backend_bucket_direct_create(struct device *dev, const char *path, struct state_backend_storage_bucket **bucket, off_t offset, ssize_t max_size, bool readonly) { diff --git a/src/barebox-state/backend_format_dtb.c b/src/barebox-state/backend_format_dtb.c index 1d701efb3709..ab57990a8dc5 100644 --- a/src/barebox-state/backend_format_dtb.c +++ b/src/barebox-state/backend_format_dtb.c @@ -29,7 +29,7 @@ struct state_backend_format_dtb { struct device_node *root; /* For outputs */ - struct device_d *dev; + struct device *dev; }; static inline struct state_backend_format_dtb *get_format_dtb(struct @@ -132,7 +132,7 @@ static void state_backend_format_dtb_free(struct state_backend_format *format) } int backend_format_dtb_create(struct state_backend_format **format, - struct device_d *dev) + struct device *dev) { struct state_backend_format_dtb *dtb; diff --git a/src/barebox-state/backend_format_raw.c b/src/barebox-state/backend_format_raw.c index 686eb983bfba..8127a27e5732 100644 --- a/src/barebox-state/backend_format_raw.c +++ b/src/barebox-state/backend_format_raw.c @@ -33,7 +33,7 @@ struct state_backend_format_raw { unsigned int digest_length; /* For outputs */ - struct device_d *dev; + struct device *dev; char *secret_name; int needs_secret; @@ -301,7 +301,7 @@ static int backend_format_raw_init_digest(struct state_backend_format_raw *raw, int backend_format_raw_create(struct state_backend_format **format, struct device_node *node, const char *secret_name, - struct device_d *dev) + struct device *dev) { struct state_backend_format_raw *raw; int ret; diff --git a/src/barebox-state/state.h b/src/barebox-state/state.h index 8d279fb4cc11..c8217a382070 100644 --- a/src/barebox-state/state.h +++ b/src/barebox-state/state.h @@ -91,7 +91,7 @@ struct state_backend_storage { struct list_head buckets; /* For outputs */ - struct device_d *dev; + struct device *dev; const char *name; @@ -106,7 +106,7 @@ struct state_backend_storage { struct state { struct list_head list; /* Entry to enqueue on list of states */ - struct device_d dev; + struct device dev; char *of_path; const char *name; uint32_t magic; @@ -203,21 +203,21 @@ struct device_node *state_to_node(struct state *state, enum state_convert conv); int backend_format_raw_create(struct state_backend_format **format, struct device_node *node, const char *secret_name, - struct device_d *dev); + struct device *dev); int backend_format_dtb_create(struct state_backend_format **format, - struct device_d *dev); + struct device *dev); int state_storage_init(struct state *state, const char *path, off_t offset, size_t max_size, uint32_t stridesize, const char *storagetype); void state_storage_set_readonly(struct state_backend_storage *storage); void state_add_var(struct state *state, struct state_variable *var); struct variable_type *state_find_type_by_name(const char *name); -int state_backend_bucket_circular_create(struct device_d *dev, const char *path, +int state_backend_bucket_circular_create(struct device *dev, const char *path, struct state_backend_storage_bucket **bucket, unsigned int eraseblock, ssize_t writesize, struct mtd_info_user *mtd_uinfo); -int state_backend_bucket_cached_create(struct device_d *dev, +int state_backend_bucket_cached_create(struct device *dev, struct state_backend_storage_bucket *raw, struct state_backend_storage_bucket **out); struct state_variable *state_find_var(struct state *state, const char *name); @@ -225,7 +225,7 @@ struct digest *state_backend_format_raw_get_digest(struct state_backend_format *format); void state_backend_set_readonly(struct state *state); void state_storage_free(struct state_backend_storage *storage); -int state_backend_bucket_direct_create(struct device_d *dev, const char *path, +int state_backend_bucket_direct_create(struct device *dev, const char *path, struct state_backend_storage_bucket **bucket, off_t offset, ssize_t max_size, bool readonly); int state_storage_write(struct state_backend_storage *storage, diff --git a/src/dt/common.h b/src/dt/common.h index 7ba1bed1d475..a3c2642c0ec8 100644 --- a/src/dt/common.h +++ b/src/dt/common.h @@ -45,14 +45,14 @@ typedef uint64_t u64; (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) -struct device_d; +struct device; void pr_level_set(int level); int pr_level_get(void); int pr_printf(int level, const char *format, ...) __attribute__ ((format(__printf__, 2, 3))); -int dev_printf(int level, const struct device_d *dev, const char *format, ...) +int dev_printf(int level, const struct device *dev, const char *format, ...) __attribute__ ((format(__printf__, 3, 4))); #define pr_err(fmt, arg...) pr_printf(3, fmt, ##arg) @@ -372,13 +372,13 @@ static inline int is_zero_ether_addr(const u8 *addr) #define MAX_DRIVER_NAME 32 #define DEVICE_ID_SINGLE -1 -struct device_d { +struct device { char name[MAX_DRIVER_NAME]; int id; struct device_node *device_node; }; -static inline struct param_d *dev_add_param_enum(struct device_d *dev, const char *name, +static inline struct param_d *dev_add_param_enum(struct device *dev, const char *name, int (*set)(struct param_d *p, void *priv), int (*get)(struct param_d *p, void *priv), uint32_t *value, const char * const *names, int max, void *priv) @@ -387,7 +387,7 @@ static inline struct param_d *dev_add_param_enum(struct device_d *dev, const cha return NULL; } -static inline struct param_d *dev_add_param_bool(struct device_d *dev, const char *name, +static inline struct param_d *dev_add_param_bool(struct device *dev, const char *name, int (*set)(struct param_d *p, void *priv), int (*get)(struct param_d *p, void *priv), uint32_t *value, void *priv) @@ -395,7 +395,7 @@ static inline struct param_d *dev_add_param_bool(struct device_d *dev, const cha return NULL; } -static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char *name, +static inline struct param_d *dev_add_param_mac(struct device *dev, const char *name, int (*set)(struct param_d *p, void *priv), int (*get)(struct param_d *p, void *priv), u8 *mac, void *priv) @@ -403,7 +403,7 @@ static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char return NULL; } -static inline struct param_d *dev_add_param_string(struct device_d *dev, const char *name, +static inline struct param_d *dev_add_param_string(struct device *dev, const char *name, int (*set)(struct param_d *p, void *priv), int (*get)(struct param_d *p, void *priv), char **value, void *priv) @@ -411,7 +411,7 @@ static inline struct param_d *dev_add_param_string(struct device_d *dev, const c return NULL; } -static inline struct param_d *dev_add_param_uint32(struct device_d *dev, const char *name, +static inline struct param_d *dev_add_param_uint32(struct device *dev, const char *name, int (*set)(struct param_d *p, void *priv), int (*get)(struct param_d *p, void *priv), uint32_t *value, const char *format, void *priv) @@ -424,7 +424,7 @@ static inline struct param_d *dev_add_param_uint32(struct device_d *dev, const c * @dev: device * @fmt: format string for the device's name */ -static inline int dev_set_name(struct device_d *dev, const char *fmt, ...) +static inline int dev_set_name(struct device *dev, const char *fmt, ...) { char newname[MAX_DRIVER_NAME]; va_list vargs; @@ -454,11 +454,11 @@ static inline int register_driver(struct driver_d *d) return 0; } -static inline int register_device(struct device_d *d) +static inline int register_device(struct device *d) { return 0; } -static inline int unregister_device(struct device_d *d) +static inline int unregister_device(struct device *d) { return 0; } diff --git a/src/dt/dt.h b/src/dt/dt.h index e473b4e7cea5..a5a2da269a24 100644 --- a/src/dt/dt.h +++ b/src/dt/dt.h @@ -62,10 +62,10 @@ struct of_reserve_map *of_get_reserve_map(void); void of_clean_reserve_map(void); void fdt_add_reserve_map(void *fdt); -struct device_d; +struct device; struct driver_d; -int of_match(struct device_d *dev, struct driver_d *drv); +int of_match(struct device *dev, struct driver_d *drv); struct fdt_header *fdt_get_tree(void); @@ -222,9 +222,9 @@ extern int of_set_root_node(struct device_node *node); extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, - struct device_d *parent); + struct device *parent); -int of_device_is_stdout_path(struct device_d *dev); +int of_device_is_stdout_path(struct device *dev); const char *of_get_model(void); void *of_flatten_dtb(struct device_node *node); int of_add_memory(struct device_node *node, bool dump); diff --git a/src/libdt.c b/src/libdt.c index 72e8ab41e09b..0cfce4af9b39 100644 --- a/src/libdt.c +++ b/src/libdt.c @@ -74,7 +74,7 @@ int pr_printf(int level, const char *format, ...) return ret; } -int dev_printf(int level, const struct device_d *dev, const char *format, ...) +int dev_printf(int level, const struct device *dev, const char *format, ...) { va_list args; int ret = 0; -- 2.39.2
Just a cosmetic commit to reduce the diff to barebox. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state/backend_bucket_direct.c | 3 +-- src/barebox-state/state.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/barebox-state/backend_bucket_direct.c b/src/barebox-state/backend_bucket_direct.c index 1518ef679f63..dd9c8570ad3d 100644 --- a/src/barebox-state/backend_bucket_direct.c +++ b/src/barebox-state/backend_bucket_direct.c @@ -165,8 +165,7 @@ static void state_backend_bucket_direct_free(struct int state_backend_bucket_direct_create(struct device_d *dev, const char *path, struct state_backend_storage_bucket **bucket, - off_t offset, ssize_t max_size, - bool readonly) + off_t offset, ssize_t max_size, bool readonly) { int fd; struct state_backend_storage_bucket_direct *direct; diff --git a/src/barebox-state/state.h b/src/barebox-state/state.h index 8b87554d90fe..8d279fb4cc11 100644 --- a/src/barebox-state/state.h +++ b/src/barebox-state/state.h @@ -227,8 +227,7 @@ void state_backend_set_readonly(struct state *state); void state_storage_free(struct state_backend_storage *storage); int state_backend_bucket_direct_create(struct device_d *dev, const char *path, struct state_backend_storage_bucket **bucket, - off_t offset, ssize_t max_size, - bool readonly); + off_t offset, ssize_t max_size, bool readonly); int state_storage_write(struct state_backend_storage *storage, const void * buf, ssize_t len); int state_storage_read(struct state_backend_storage *storage, -- 2.39.2
This patch ports barebox commits: | commit 22d06d7d72d781d16db7f8292181d51752e2a860 | Author: Ahmad Fatoum <a.fatoum@pengutronix.de> | Date: Thu Nov 25 17:10:36 2021 +0100 | | state: mark state init errors specially | | First boot with uninitialized state is needlessly verbose. As | preparation for making boot less noisy on fresh state, mark all the | error messages with newly introduced dev_err_state_init(). | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> | Link: https://lore.barebox.org/20211125161042.3829996-2-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | commit 863a2251393e5ee5ecdd6d696ee0e23c3b945f9a | Author: Ahmad Fatoum <a.fatoum@pengutronix.de> | Date: Thu Nov 25 17:10:37 2021 +0100 | | state: make first boot less verbose | | First boot with uninitialized state is needlessly verbose: | | state: New state registered 'state' | state: Detected old on-storage format | ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 0@0x00000000... | state: Detected old on-storage format | ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 1@0x00040000... | state: Detected old on-storage format | ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 2@0x00080000... | ERROR: state: Failed to find any valid state copy in any bucket | ERROR: state: Failed to read state with format raw, -2 | | This has confused barebox-state novices more than once. Let's handle | the zeroed state case specially and reduce output in that case, so | it now looks like this: | | state: New state registered 'state' | state: Detected old on-storage format | state: Detected old on-storage format | state: Detected old on-storage format | state state.of: Fresh state detected, continuing with defaults | | This is only the output when CRC is zero (hinting at zeroed state | partition). If crc != zero, then output is a little more verbose than | before: | | state: New state registered 'state' | state: Detected old on-storage format | ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 0@0x00000000... | state: Detected old on-storage format | ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 1@0x00040000... | state: Detected old on-storage format | ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000 | state: Ignoring broken bucket 2@0x00080000... | ERROR: state: init error: No such file or directory: no valid state copy in any bucket | ERROR: state: init error: No such file or directory: format raw read failed | WARNING: state state.of: Failed to load persistent state, continuing with defaults, -2 | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> | Link: https://lore.barebox.org/20211125161042.3829996-3-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | commit 818d180da1c709f3d2789925662222019b3cf439 | Author: Ahmad Fatoum <ahmad@a3f.at> | Date: Mon Nov 29 08:22:35 2021 +0100 | | state: make first boot with uninitialized legacy state less verbose | | With non-legacy state, barebox checks a header for a specific magic | signature. This can be all zero on an uninitialized state, so in that | particular case, bump down the log message severity. | | Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> | Link: https://lore.barebox.org/20211129072235.2016324-1-ahmad@a3f.at | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state.c | 4 +++- src/barebox-state/backend_bucket_direct.c | 4 ++-- src/barebox-state/backend_format_raw.c | 7 +++---- src/barebox-state/backend_storage.c | 24 ++++++++++++++--------- src/barebox-state/state.c | 4 ++-- src/barebox-state/state.h | 7 +++++++ 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/barebox-state.c b/src/barebox-state.c index e74ba1992286..1a515d30dde4 100644 --- a/src/barebox-state.c +++ b/src/barebox-state.c @@ -409,7 +409,9 @@ struct state *state_get(const char *name, const char *filename, bool readonly, b else ret = state_load_no_auth(state); - if (ret) + if (ret == -ENOMEDIUM) + pr_info("Fresh state detected, continuing with defaults\n"); + else if (ret) pr_err("Failed to load persistent state, continuing with defaults, %d\n", ret); return state; diff --git a/src/barebox-state/backend_bucket_direct.c b/src/barebox-state/backend_bucket_direct.c index cf77c3f6a0df..bf060ebed4c0 100644 --- a/src/barebox-state/backend_bucket_direct.c +++ b/src/barebox-state/backend_bucket_direct.c @@ -77,9 +77,9 @@ static int state_backend_bucket_direct_read(struct state_backend_storage_bucket if (meta.magic != ~0 && !!meta.magic) bucket->wrong_magic = 1; if (!IS_ENABLED(CONFIG_STATE_BACKWARD_COMPATIBLE)) { - dev_err(direct->dev, "No meta data header found\n"); dev_dbg(direct->dev, "Enable backward compatibility or increase stride size\n"); - return -EINVAL; + return dev_err_state_init(direct->dev, meta.magic ? -EINVAL : -ENOMEDIUM, + "No meta data header found\n"); } read_len = direct->max_size; if (lseek(direct->fd, direct->offset, SEEK_SET) != diff --git a/src/barebox-state/backend_format_raw.c b/src/barebox-state/backend_format_raw.c index 8127a27e5732..85ea539657dc 100644 --- a/src/barebox-state/backend_format_raw.c +++ b/src/barebox-state/backend_format_raw.c @@ -114,11 +114,10 @@ static int backend_format_raw_verify(struct state_backend_format *format, header = (struct backend_raw_header *)buf; crc = crc32(0, header, sizeof(*header) - sizeof(uint32_t)); - if (crc != header->header_crc) { - dev_err(backend_raw->dev, "Error, invalid header crc in raw format, calculated 0x%08x, found 0x%08x\n", + if (crc != header->header_crc) + return dev_err_state_init(backend_raw->dev, header->header_crc ? -EINVAL : -ENOMEDIUM, + "header crc in raw format, calculated 0x%08x, found 0x%08x\n", crc, header->header_crc); - return -EINVAL; - } if (magic && magic != header->magic) { dev_err(backend_raw->dev, "Error, invalid magic in raw format 0x%08x, should be 0x%08x\n", diff --git a/src/barebox-state/backend_storage.c b/src/barebox-state/backend_storage.c index 6d659c1fd85a..135c7aad0e81 100644 --- a/src/barebox-state/backend_storage.c +++ b/src/barebox-state/backend_storage.c @@ -145,6 +145,7 @@ int state_storage_read(struct state_backend_storage *storage, enum state_flags flags) { struct state_backend_storage_bucket *bucket, *bucket_used = NULL; + int zerobuckets = 0, totalbuckets = 0; int ret; dev_dbg(storage->dev, "Checking redundant buckets...\n"); @@ -153,30 +154,35 @@ int state_storage_read(struct state_backend_storage *storage, * one we want to use. */ list_for_each_entry(bucket, &storage->buckets, bucket_list) { + totalbuckets++; + ret = bucket->read(bucket, &bucket->buf, &bucket->len); - if (ret == -EUCLEAN) + if (ret == -EUCLEAN) { bucket->needs_refresh = 1; - else if (ret) + } else if (ret) { + if (ret == -ENOMEDIUM) + zerobuckets++; continue; + } /* * Verify the buffer crcs. The buffer length is passed in the len argument, * .verify overwrites it with the length actually used. */ ret = format->verify(format, magic, bucket->buf, &bucket->len, flags); - if (!ret && !bucket_used) + if (ret == -ENOMEDIUM) + zerobuckets++; + else if (!ret && !bucket_used) bucket_used = bucket; - if (ret) + else if (ret) dev_info(storage->dev, "Ignoring broken bucket %d@0x%08llx...\n", bucket->num, (long long) bucket->offset); } dev_dbg(storage->dev, "Checking redundant buckets finished.\n"); - if (!bucket_used) { - dev_err(storage->dev, "Failed to find any valid state copy in any bucket\n"); - - return -ENOENT; - } + if (!bucket_used) + return dev_err_state_init(storage->dev, zerobuckets == totalbuckets ? -ENOMEDIUM : -ENOENT, + "no valid state copy in any bucket\n"); dev_info(storage->dev, "Using bucket %d@0x%08llx\n", bucket_used->num, (long long) bucket_used->offset); diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index df76407d4d33..d842bf1de0ec 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -102,8 +102,8 @@ static int state_do_load(struct state *state, enum state_flags flags) ret = state_storage_read(&state->storage, state->format, state->magic, &buf, &len, flags); if (ret) { - dev_err(&state->dev, "Failed to read state with format %s, %d\n", - state->format->name, ret); + dev_err_state_init(&state->dev, ret, "format %s read failed\n", + state->format->name); goto out; } diff --git a/src/barebox-state/state.h b/src/barebox-state/state.h index c8217a382070..734899b075b1 100644 --- a/src/barebox-state/state.h +++ b/src/barebox-state/state.h @@ -290,3 +290,10 @@ static inline int open_exclusive(const char *path, int flags) return fd; } + +#define dev_err_state_init(dev, ret, fmt, ...) ({ \ + int __ret = (ret); \ + dev_printf(__ret == -ENOMEDIUM ? 7 : 3, \ + (dev), "init error: %pe: " fmt, ERR_PTR(__ret), ##__VA_ARGS__); \ + __ret; \ +}) -- 2.39.2
Hi, this re-sync the barebox_state user-space tool with the barebox code. The reason for the sync is to avoid error prints in case of fresh initialized barebox state backends. While on it, I ported a few other commit as well to align the code with barebox. Regards, Marco Marco Felsch (6): state: align state_backend_bucket_direct_create with barebox state: don't mix goto labels and statements on same line state: drop null pointer checks around of_delete_node treewide: rename struct device_d to device state: make uninitialized state less verbose state: backend_bucket_direct: add debug prints on read/write src/barebox-state.c | 4 +++- src/barebox-state/backend_bucket_circular.c | 4 ++-- src/barebox-state/backend_bucket_direct.c | 25 +++++++++++++++------ src/barebox-state/backend_format_dtb.c | 4 ++-- src/barebox-state/backend_format_raw.c | 11 +++++---- src/barebox-state/backend_storage.c | 24 ++++++++++++-------- src/barebox-state/state.c | 19 +++++++++------- src/barebox-state/state.h | 24 ++++++++++++-------- src/barebox-state/state_variables.c | 9 +++++--- src/dt/common.h | 22 +++++++++--------- src/dt/dt.h | 8 +++---- src/libdt.c | 2 +- 12 files changed, 93 insertions(+), 63 deletions(-) -- 2.39.2
This is a partial port of: | commit a81a28f9be1c9d40c20add6a4093d260df8c6049 | Author: Ahmad Fatoum <a.fatoum@pengutronix.de> | Date: Fri May 19 12:01:15 2023 +0200 | | treewide: don't mix goto labels and statements on same line | | Coding style across the project is not to indent goto labels and | to not mix them with code on the same line. Let's fix the few outliers | that are there. | | No functional change. | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> | Link: https://lore.barebox.org/20230519100120.2365970-2-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state/state.c | 12 ++++++++---- src/barebox-state/state_variables.c | 9 ++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index 3b02624be756..13d406e6a38b 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -335,8 +335,10 @@ static int state_convert_node_variable(struct state *state, goto out; return 0; - out_free:free(name); - out: return ret; +out_free: + free(name); +out: + return ret; } struct device_node *state_to_node(struct state *state, @@ -363,7 +365,8 @@ struct device_node *state_to_node(struct state *state, } return root; - out: of_delete_node(root); +out: + of_delete_node(root); return ERR_PTR(ret); } @@ -563,7 +566,8 @@ static int of_state_fixup(struct device_node *root, void *ctx) return 0; - out: of_delete_node(new_node); +out: + of_delete_node(new_node); return ret; } diff --git a/src/barebox-state/state_variables.c b/src/barebox-state/state_variables.c index a94ccce9b739..daceef6bf427 100644 --- a/src/barebox-state/state_variables.c +++ b/src/barebox-state/state_variables.c @@ -264,7 +264,8 @@ static struct state_variable *state_enum32_create(struct state *state, } return &enum32->var; - out: for (i--; i >= 0; i--) +out: + for (i--; i >= 0; i--) free((char *)enum32->names[i]); free(enum32->names); free(enum32); @@ -330,7 +331,8 @@ static struct state_variable *state_mac_create(struct state *state, } return &mac->var; - out: free(mac); +out: + free(mac); return ERR_PTR(ret); } @@ -445,7 +447,8 @@ static struct state_variable *state_string_create(struct state *state, } return &string->var; - out: free(string); +out: + free(string); return ERR_PTR(ret); } -- 2.39.2
This is a partial port of: | commit 035ca2a10ef2b5776629eadb6ea97b22b7978ccb | Author: Ahmad Fatoum <a.fatoum@pengutronix.de> | Date: Fri May 19 12:01:16 2023 +0200 | | treewide: drop null pointer checks around of_delete_node | | of_delete_node is a no-op when called on a null pointer, so remove the | useless null checks around it. | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> | Link: https://lore.barebox.org/20230519100120.2365970-3-a.fatoum@pengutronix.de | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- src/barebox-state/state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index 13d406e6a38b..df76407d4d33 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -561,8 +561,7 @@ static int of_state_fixup(struct device_node *root, void *ctx) goto out; /* delete existing node */ - if (node) - of_delete_node(node); + of_delete_node(node); return 0; -- 2.39.2
On Fri, Nov 24, 2023 at 01:09:40PM +0100, Ahmad Fatoum wrote: > On 24.11.23 12:04, Roland Hieber wrote: > > Hi, > > > > I've just release dt-utils version 2023.11.0. You can download it at the > > usual location: > > > > https://public.pengutronix.de/software/dt-utils/dt-utils-2023.08.0.tar.xz > > https://public.pengutronix.de/software/dt-utils/dt-utils-2023.11.0.tar.xz Oh yes, thank you, you're correct… so much for re-using old release mails… 🙈 - Roland > > The file checksums are as follows: > > > > * MD5: 4aa4ef310c76a2baa5df62254f0b7453 > > * SHA1: 3d9556c78c3894ef13fbf9b58eb66d1c11950563 > > * SHA256: d224d941c076c143f43d59cd7c6e1c522926064a31ac34a67720632ddecb6b53 > > Hashes are correct though. > > Thanks for the release! > Ahmad > > > > > A small bugfix release, mainly consisting of the following commit: > > > > * commit b67e96895f52 "libdt: prefer first found disk when looking for > > block devices" > > When using barebox-state on boards with a barbeox-state partition on > > an eMMC device, it could happen that barebox-state tried to find a GPT > > partition on /dev/mmcblkXbootN instead of /dev/mmcblkX, obviously > > failing to find a matching partition there, and quitting without any > > further action. This commit restores the old behaviour of using the > > first found MMC device (/dev/mmcblkX) instead of the last one. > > Although this is not completely future-proof, it has worked for years > > and serves a good stop-gap solution for now. > > > > A few more housekeeping and maintenance commits: > > > > * commit feca1c1ffdaa "README: provide git format.subjectPrefix line to copy" > > * commit 1cd62596dbd7 "meson: align libdt-utils version with autotools'" > > > > This release includes contributions by Ahmad Fatoum, Enrico Jörns, Leonard > > Göhrs, and Roland Hieber. Thank you to all contributors! > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On 24.11.23 12:04, Roland Hieber wrote: > Hi, > > I've just release dt-utils version 2023.11.0. You can download it at the > usual location: > > https://public.pengutronix.de/software/dt-utils/dt-utils-2023.08.0.tar.xz https://public.pengutronix.de/software/dt-utils/dt-utils-2023.11.0.tar.xz > > The file checksums are as follows: > > * MD5: 4aa4ef310c76a2baa5df62254f0b7453 > * SHA1: 3d9556c78c3894ef13fbf9b58eb66d1c11950563 > * SHA256: d224d941c076c143f43d59cd7c6e1c522926064a31ac34a67720632ddecb6b53 Hashes are correct though. Thanks for the release! Ahmad > > A small bugfix release, mainly consisting of the following commit: > > * commit b67e96895f52 "libdt: prefer first found disk when looking for > block devices" > When using barebox-state on boards with a barbeox-state partition on > an eMMC device, it could happen that barebox-state tried to find a GPT > partition on /dev/mmcblkXbootN instead of /dev/mmcblkX, obviously > failing to find a matching partition there, and quitting without any > further action. This commit restores the old behaviour of using the > first found MMC device (/dev/mmcblkX) instead of the last one. > Although this is not completely future-proof, it has worked for years > and serves a good stop-gap solution for now. > > A few more housekeeping and maintenance commits: > > * commit feca1c1ffdaa "README: provide git format.subjectPrefix line to copy" > * commit 1cd62596dbd7 "meson: align libdt-utils version with autotools'" > > This release includes contributions by Ahmad Fatoum, Enrico Jörns, Leonard > Göhrs, and Roland Hieber. Thank you to all contributors! > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Mon, Nov 06, 2023 at 12:04:05PM +0100, Ahmad Fatoum wrote: > Recent rework introduced a regression for state located in the eMMC > user area described by DT fixed partitions. Whereas before, the first > device with type "disk" was taken, dt-utils will now iterate over all > devices to try to find a matching GPT partition. If it doesn't find any, > it will instead take the last device with type "disk", which will be the > second boot partition for eMMC devices leading barebox-state to access > /dev/mmcblkXboot1 instead of /dev/mmcblkX. > > Let's fix this regression by restoring the old behavior of preferring the > first disk. This may not be totally future proof, but it worked ok for > years and a better solution can always be added later with a regular > release. > > Reported-by: Leonard Göhrs <l.goehrs@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > src/libdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, this patch is now released in v2023.11.0. - Roland > diff --git a/src/libdt.c b/src/libdt.c > index 650b40467587..72e8ab41e09b 100644 > --- a/src/libdt.c > +++ b/src/libdt.c > @@ -2301,7 +2301,7 @@ static int cdev_from_block_device(struct udev_device *dev, > devtype = udev_device_get_devtype(part); > if (!devtype) > continue; > - if (!strcmp(devtype, "disk")) { > + if (!strcmp(devtype, "disk") && !best_match) { > best_match = part; > > /* Should we try to find a matching partition first? */ > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Mon, Nov 06, 2023 at 12:29:53PM +0100, Ahmad Fatoum wrote: > The oss-tools list is shared between a number of projects, so we should > always use a subject prefix to make it clear where the patch applies. > > The README already notes that and references the git man page, but it's > more convenient to just provide a command line that can be directly > copied and pasted. > > Cc: Bastian Krause <bst@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > README | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Thanks, this patch is now released in v2023.11.0. - Roland > diff --git a/README b/README > index d68e6dacae6c..c6ef99c10b00 100644 > --- a/README > +++ b/README > @@ -44,8 +44,10 @@ The Git web view for this software can be found at: > <https://git.pengutronix.de/cgit/tools/dt-utils> > > Any patches should be sent to the mailing list above. Please prefix your > -subject with "[PATCH dt-utils]" (when sending patches with Git, see the > -git-config manpage for the option format.subjectPrefix). > +subject with "[PATCH dt-utils]". This can be configured in Git with: > + > + git config format.subjectPrefix "PATCH dt-utils" > + > Mails sent to this mailing list are also archived at > > <https://lore.pengutronix.de/oss-tools/> > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Mon, Nov 06, 2023 at 02:49:07PM +0100, Ahmad Fatoum wrote: > Makefile.am has following defines for libtool versioning: > > LIBDT_CURRENT=6 > LIBDT_REVISION=0 > LIBDT_AGE=0 > > along with a comment on how the values were chosen. Copy the comment and > the values into the meson.build as well, so appropriate symlinks > pointing at the versioned library are created. We forego the extra > complexity of having a common file that's read from both build systems > as we are intent on phasing out autotools anyway, once wrinkles such as > what's fixed here are ironed out. > > The translation from libtool versioning to major/minor/revision as > expected by meson is taken from GNOME's gcab[1]. More information > about libtool versioning is available in its documentation[2]. > > [1]: https://gitlab.gnome.org/GNOME/gcab/-/commit/2c8048f74ec8c088397 > [2]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Thanks, this patch is now released in v2023.11.0. - Roland > --- > v1 -> v2: > - set library version major as current - age > --- > meson.build | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/meson.build b/meson.build > index 9579e712dfea..6489e4c4d52e 100644 > --- a/meson.build > +++ b/meson.build > @@ -122,6 +122,18 @@ versiondep = declare_dependency(sources: version_h) > > meson.add_dist_script('version-gen', meson.project_version()) > > +# If the library source code has changed at all since the last release, > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > +# If any interfaces have been added/removed/changed since the last release, > +# then increment current, and set revision to 0. > +# If any public interfaces have been added since the last public release, > +# then increment age. > +# If any interfaces have been removed or changed since the last release, > +# then set age to 0. > +lt_current = 6 > +lt_revision = 0 > +lt_age = 0 > + > mapfile = 'src/libdt-utils.sym' > libdt_ld_flags = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) > > @@ -133,6 +145,7 @@ libdt = shared_library('dt-utils', > c_args : ['-include', meson.current_build_dir() / 'version.h'], > dependencies : [udevdep, versiondep], > gnu_symbol_visibility : 'default', > + version: '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision), > install : true) > > executable('barebox-state', > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi, I've just release dt-utils version 2023.11.0. You can download it at the usual location: https://public.pengutronix.de/software/dt-utils/dt-utils-2023.08.0.tar.xz The file checksums are as follows: * MD5: 4aa4ef310c76a2baa5df62254f0b7453 * SHA1: 3d9556c78c3894ef13fbf9b58eb66d1c11950563 * SHA256: d224d941c076c143f43d59cd7c6e1c522926064a31ac34a67720632ddecb6b53 A small bugfix release, mainly consisting of the following commit: * commit b67e96895f52 "libdt: prefer first found disk when looking for block devices" When using barebox-state on boards with a barbeox-state partition on an eMMC device, it could happen that barebox-state tried to find a GPT partition on /dev/mmcblkXbootN instead of /dev/mmcblkX, obviously failing to find a matching partition there, and quitting without any further action. This commit restores the old behaviour of using the first found MMC device (/dev/mmcblkX) instead of the last one. Although this is not completely future-proof, it has worked for years and serves a good stop-gap solution for now. A few more housekeeping and maintenance commits: * commit feca1c1ffdaa "README: provide git format.subjectPrefix line to copy" * commit 1cd62596dbd7 "meson: align libdt-utils version with autotools'" This release includes contributions by Ahmad Fatoum, Enrico Jörns, Leonard Göhrs, and Roland Hieber. Thank you to all contributors! -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi Roland, Am Montag, dem 06.11.2023 um 14:56 +0100 schrieb Roland Hieber: > On Mon, Nov 06, 2023 at 01:12:48PM +0100, Enrico Jörns wrote: > > Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: > > > On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > > > > Makefile.am has: > > > > > > > > LIBDT_CURRENT=6 > > > > LIBDT_REVISION=0 > > > > LIBDT_AGE=0 > > > > > > > > along with a comment on how the values were chosen. Copy the comment and > > > > the values into the meson.build as well, so appropriate symlinks > > > > pointing at the versioned library are created. We forego the extra > > > > complexity of having a common file that's read from both build systems > > > > as we are intent on phasing out autotools anyway, once wrinkles such as > > > > what's fixed here are ironed out. > > > > > > > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > > > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > > > > > Reviewed-by: Roland Hieber <rhi@pengutronix.de> > > > > > > > --- > > > > meson.build | 9 +++++++++ > > > > 1 file changed, 9 insertions(+) > > > > > > > > diff --git a/meson.build b/meson.build > > > > index 9579e712dfea..9894d7311bb3 100644 > > > > --- a/meson.build > > > > +++ b/meson.build > > > > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > > > > c_args : ['-include', meson.current_build_dir() / 'version.h'], > > > > dependencies : [udevdep, versiondep], > > > > gnu_symbol_visibility : 'default', > > > > +# If the library source code has changed at all since the last release, > > > > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > > > > +# If any interfaces have been added/removed/changed since the last release, > > > > +# then increment current, and set revision to 0. > > > > Does this make sense? > > Isn't "current" meant to mark *incompatible* public API changes? > > This might be valid for "removed" or "changed", but not for "added". > > > > How does "interfaces" differ from "public interfaces" below? > > > > Regards, Enrico > > > > > > +# If any public interfaces have been added since the last public release, > > > > +# then increment age. > > > > +# If any interfaces have been removed or changed since the last release, > > > > +# then set age to 0. > > > > + version: '6.0.0', > > Wait. Enrico has a point. The "version" field in meson has the usual > "major.minor.patch" semantics [1], which does not relate to autotools' > current/revision/age scheme, which in autotools is used to calculate the > soversion (by some strange formula that I can never memorise). meson > however assumes the major number as soversion if nothing else is > specified. mh, but this is just the 'library version' and may thus be changed by hand and independent from any other release version, right? And "soversion" is just the first component of "version" by default if I get the documentation right: > If this is not specified, the first part of version is used instead (see below). For example, if > version is 3.6.0 and soversion is not defined, it is set to 3. https://mesonbuild.com/Reference-manual_functions.html#shared_library Regards, Enrico > Also [2] notes: > > > To set the version of the library, libtool provides the > > -version-info parameter, which accepts three numbers, separated by > > colons, that are called respectively, current, revision and age. > > Both their name and their behaviour, nowadays, have to be considered > > fully arbitrary, as the explanation provided in the official > > documentation is confusing to say the least, and can be, in some > > cases, considered completely wrong. > > As we want to get rid of autotools in the foreseeable future anyway, I > suggest that we drop the current/revision/age scheme and use semantic > versioning instead (i.e., increase major for ABI-incompatible changes, > increase minor for ABI-compatible new features, increase patch for > ABI-compatible bugfixes), which for versions like "6.1.2" results in > library names like "libdt-utils.so.6.1.2" and soversion of 6. > > [1]: https://mesonbuild.com/Reference-manual_functions.html#shared_library_version > [2]: https://autotools.info/libtool/version.html#idm1602 > > (Please disregard my premature Reviewed-by.) > > - Roland > > > > > install : true) > > > > > > > > executable('barebox-state', > > > > -- > > > > 2.39.2 > > > > > > > > > > > > > > > > > > > -- > > Pengutronix e.K. | Enrico Jörns | > > Embedded Linux Consulting & Support | https://www.pengutronix.de/ | > > Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | > > 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 | > > > > > -- Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
Hi Ahmad, Am Montag, dem 06.11.2023 um 14:44 +0100 schrieb Ahmad Fatoum: > Hello Enrico, > > On 06.11.23 13:12, Enrico Jörns wrote: > > Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: > > > On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > > > > Makefile.am has: > > > > > > > > LIBDT_CURRENT=6 > > > > LIBDT_REVISION=0 > > > > LIBDT_AGE=0 > > > > > > > > along with a comment on how the values were chosen. Copy the comment and > > > > the values into the meson.build as well, so appropriate symlinks > > > > pointing at the versioned library are created. We forego the extra > > > > complexity of having a common file that's read from both build systems > > > > as we are intent on phasing out autotools anyway, once wrinkles such as > > > > what's fixed here are ironed out. > > > > > > > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > > > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > > > > > Reviewed-by: Roland Hieber <rhi@pengutronix.de> > > > > > > > --- > > > > meson.build | 9 +++++++++ > > > > 1 file changed, 9 insertions(+) > > > > > > > > diff --git a/meson.build b/meson.build > > > > index 9579e712dfea..9894d7311bb3 100644 > > > > --- a/meson.build > > > > +++ b/meson.build > > > > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > > > > c_args : ['-include', meson.current_build_dir() / 'version.h'], > > > > dependencies : [udevdep, versiondep], > > > > gnu_symbol_visibility : 'default', > > > > +# If the library source code has changed at all since the last release, > > > > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > > > > +# If any interfaces have been added/removed/changed since the last release, > > > > +# then increment current, and set revision to 0. > > > > Does this make sense? > > It was copied into Makefile.am verbatim from the libtool documentation: > https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html thank you for the link, I guess this clarifies the versioning purpose for me a bit better. Haven't looked at this topic in that detail yet either. 😉 Maybe it would make sense to just refer to generic libtool versioning scheme (and probably include the link) instead of duplicating the text here? Anyway, I would be fine with both variants in the first round! Best regards Enrico > > Isn't "current" meant to mark *incompatible* public API changes? > > libtool numbering is new to me as well, but apparently "Current" is the most recent > interface number that this library implements. > > The major version number should thus be current - age, not just current. > I will fix that in v2. See > https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html > https://gitlab.gnome.org/GNOME/gcab/-/merge_requests/6/diffs?commit_id=2c8048f74ec8c088397d47730aa47c574526918f > > > This might be valid for "removed" or "changed", but not for "added". > > > > How does "interfaces" differ from "public interfaces" below? > > No difference AFAIK. > > Cheers, > Ahmad > > > > > Regards, Enrico > > > > > > +# If any public interfaces have been added since the last public release, > > > > +# then increment age. > > > > +# If any interfaces have been removed or changed since the last release, > > > > +# then set age to 0. > > > > + version: '6.0.0', > > > > install : true) > > > > > > > > executable('barebox-state', > > > > -- > > > > 2.39.2 > > > > > > > > > > > > > > > > > > -- Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
On Mon, Nov 06, 2023 at 01:12:48PM +0100, Enrico Jörns wrote: > Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: > > On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > > > Makefile.am has: > > > > > > LIBDT_CURRENT=6 > > > LIBDT_REVISION=0 > > > LIBDT_AGE=0 > > > > > > along with a comment on how the values were chosen. Copy the comment and > > > the values into the meson.build as well, so appropriate symlinks > > > pointing at the versioned library are created. We forego the extra > > > complexity of having a common file that's read from both build systems > > > as we are intent on phasing out autotools anyway, once wrinkles such as > > > what's fixed here are ironed out. > > > > > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > > > Reviewed-by: Roland Hieber <rhi@pengutronix.de> > > > > > --- > > > meson.build | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > diff --git a/meson.build b/meson.build > > > index 9579e712dfea..9894d7311bb3 100644 > > > --- a/meson.build > > > +++ b/meson.build > > > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > > > c_args : ['-include', meson.current_build_dir() / 'version.h'], > > > dependencies : [udevdep, versiondep], > > > gnu_symbol_visibility : 'default', > > > +# If the library source code has changed at all since the last release, > > > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > > > +# If any interfaces have been added/removed/changed since the last release, > > > +# then increment current, and set revision to 0. > > Does this make sense? > Isn't "current" meant to mark *incompatible* public API changes? > This might be valid for "removed" or "changed", but not for "added". > > How does "interfaces" differ from "public interfaces" below? > > Regards, Enrico > > > > +# If any public interfaces have been added since the last public release, > > > +# then increment age. > > > +# If any interfaces have been removed or changed since the last release, > > > +# then set age to 0. > > > + version: '6.0.0', Wait. Enrico has a point. The "version" field in meson has the usual "major.minor.patch" semantics [1], which does not relate to autotools' current/revision/age scheme, which in autotools is used to calculate the soversion (by some strange formula that I can never memorise). meson however assumes the major number as soversion if nothing else is specified. Also [2] notes: > To set the version of the library, libtool provides the > -version-info parameter, which accepts three numbers, separated by > colons, that are called respectively, current, revision and age. > Both their name and their behaviour, nowadays, have to be considered > fully arbitrary, as the explanation provided in the official > documentation is confusing to say the least, and can be, in some > cases, considered completely wrong. As we want to get rid of autotools in the foreseeable future anyway, I suggest that we drop the current/revision/age scheme and use semantic versioning instead (i.e., increase major for ABI-incompatible changes, increase minor for ABI-compatible new features, increase patch for ABI-compatible bugfixes), which for versions like "6.1.2" results in library names like "libdt-utils.so.6.1.2" and soversion of 6. [1]: https://mesonbuild.com/Reference-manual_functions.html#shared_library_version [2]: https://autotools.info/libtool/version.html#idm1602 (Please disregard my premature Reviewed-by.) - Roland > > > install : true) > > > > > > executable('barebox-state', > > > -- > > > 2.39.2 > > > > > > > > > > > > > -- > Pengutronix e.K. | Enrico Jörns | > Embedded Linux Consulting & Support | https://www.pengutronix.de/ | > Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | > 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 | > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Makefile.am has following defines for libtool versioning: LIBDT_CURRENT=6 LIBDT_REVISION=0 LIBDT_AGE=0 along with a comment on how the values were chosen. Copy the comment and the values into the meson.build as well, so appropriate symlinks pointing at the versioned library are created. We forego the extra complexity of having a common file that's read from both build systems as we are intent on phasing out autotools anyway, once wrinkles such as what's fixed here are ironed out. The translation from libtool versioning to major/minor/revision as expected by meson is taken from GNOME's gcab[1]. More information about libtool versioning is available in its documentation[2]. [1]: https://gitlab.gnome.org/GNOME/gcab/-/commit/2c8048f74ec8c088397 [2]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html Reported-by: Enrico Jörns <e.joerns@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- v1 -> v2: - set library version major as current - age --- meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meson.build b/meson.build index 9579e712dfea..6489e4c4d52e 100644 --- a/meson.build +++ b/meson.build @@ -122,6 +122,18 @@ versiondep = declare_dependency(sources: version_h) meson.add_dist_script('version-gen', meson.project_version()) +# If the library source code has changed at all since the last release, +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). +# If any interfaces have been added/removed/changed since the last release, +# then increment current, and set revision to 0. +# If any public interfaces have been added since the last public release, +# then increment age. +# If any interfaces have been removed or changed since the last release, +# then set age to 0. +lt_current = 6 +lt_revision = 0 +lt_age = 0 + mapfile = 'src/libdt-utils.sym' libdt_ld_flags = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) @@ -133,6 +145,7 @@ libdt = shared_library('dt-utils', c_args : ['-include', meson.current_build_dir() / 'version.h'], dependencies : [udevdep, versiondep], gnu_symbol_visibility : 'default', + version: '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision), install : true) executable('barebox-state', -- 2.39.2
Hello Enrico, On 06.11.23 13:12, Enrico Jörns wrote: > Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: >> On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: >>> Makefile.am has: >>> >>> LIBDT_CURRENT=6 >>> LIBDT_REVISION=0 >>> LIBDT_AGE=0 >>> >>> along with a comment on how the values were chosen. Copy the comment and >>> the values into the meson.build as well, so appropriate symlinks >>> pointing at the versioned library are created. We forego the extra >>> complexity of having a common file that's read from both build systems >>> as we are intent on phasing out autotools anyway, once wrinkles such as >>> what's fixed here are ironed out. >>> >>> Reported-by: Enrico Jörns <e.joerns@pengutronix.de> >>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> >> >> Reviewed-by: Roland Hieber <rhi@pengutronix.de> >> >>> --- >>> meson.build | 9 +++++++++ >>> 1 file changed, 9 insertions(+) >>> >>> diff --git a/meson.build b/meson.build >>> index 9579e712dfea..9894d7311bb3 100644 >>> --- a/meson.build >>> +++ b/meson.build >>> @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', >>> c_args : ['-include', meson.current_build_dir() / 'version.h'], >>> dependencies : [udevdep, versiondep], >>> gnu_symbol_visibility : 'default', >>> +# If the library source code has changed at all since the last release, >>> +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). >>> +# If any interfaces have been added/removed/changed since the last release, >>> +# then increment current, and set revision to 0. > > Does this make sense? It was copied into Makefile.am verbatim from the libtool documentation: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html > Isn't "current" meant to mark *incompatible* public API changes? libtool numbering is new to me as well, but apparently "Current" is the most recent interface number that this library implements. The major version number should thus be current - age, not just current. I will fix that in v2. See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html https://gitlab.gnome.org/GNOME/gcab/-/merge_requests/6/diffs?commit_id=2c8048f74ec8c088397d47730aa47c574526918f > This might be valid for "removed" or "changed", but not for "added". > > How does "interfaces" differ from "public interfaces" below? No difference AFAIK. Cheers, Ahmad > > Regards, Enrico > >>> +# If any public interfaces have been added since the last public release, >>> +# then increment age. >>> +# If any interfaces have been removed or changed since the last release, >>> +# then set age to 0. >>> + version: '6.0.0', >>> install : true) >>> >>> executable('barebox-state', >>> -- >>> 2.39.2 >>> >>> >>> >> > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On 06.11.23 13:03, Roland Hieber wrote: > On Mon, Nov 06, 2023 at 12:04:05PM +0100, Ahmad Fatoum wrote: >> Recent rework introduced a regression for state located in the eMMC >> user area described by DT fixed partitions. Whereas before, the first >> device with type "disk" was taken, dt-utils will now iterate over all >> devices to try to find a matching GPT partition. If it doesn't find any, >> it will instead take the last device with type "disk", which will be the >> second boot partition for eMMC devices leading barebox-state to access >> /dev/mmcblkXboot1 instead of /dev/mmcblkX. >> >> Let's fix this regression by restoring the old behavior of preferring the >> first disk. This may not be totally future proof, but it worked ok for >> years and a better solution can always be added later with a regular >> release. >> >> Reported-by: Leonard Göhrs <l.goehrs@pengutronix.de> >> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > Tested-by: Roland Hieber <rhi@pengutronix.de> [riot,imx6s-riotboard] Tested-by: Leonard Göhrs <lgo@pengutronix.de> [lxa,stm32mp157c-tac-gen1] >> --- >> src/libdt.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/libdt.c b/src/libdt.c >> index 650b40467587..72e8ab41e09b 100644 >> --- a/src/libdt.c >> +++ b/src/libdt.c >> @@ -2301,7 +2301,7 @@ static int cdev_from_block_device(struct udev_device *dev, >> devtype = udev_device_get_devtype(part); >> if (!devtype) >> continue; >> - if (!strcmp(devtype, "disk")) { >> + if (!strcmp(devtype, "disk") && !best_match) { >> best_match = part; >> >> /* Should we try to find a matching partition first? */ >> -- >> 2.39.2 >> >> >> >
Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: > On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > > Makefile.am has: > > > > LIBDT_CURRENT=6 > > LIBDT_REVISION=0 > > LIBDT_AGE=0 > > > > along with a comment on how the values were chosen. Copy the comment and > > the values into the meson.build as well, so appropriate symlinks > > pointing at the versioned library are created. We forego the extra > > complexity of having a common file that's read from both build systems > > as we are intent on phasing out autotools anyway, once wrinkles such as > > what's fixed here are ironed out. > > > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > > Reviewed-by: Roland Hieber <rhi@pengutronix.de> > > > --- > > meson.build | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/meson.build b/meson.build > > index 9579e712dfea..9894d7311bb3 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > > c_args : ['-include', meson.current_build_dir() / 'version.h'], > > dependencies : [udevdep, versiondep], > > gnu_symbol_visibility : 'default', > > +# If the library source code has changed at all since the last release, > > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > > +# If any interfaces have been added/removed/changed since the last release, > > +# then increment current, and set revision to 0. Does this make sense? Isn't "current" meant to mark *incompatible* public API changes? This might be valid for "removed" or "changed", but not for "added". How does "interfaces" differ from "public interfaces" below? Regards, Enrico > > +# If any public interfaces have been added since the last public release, > > +# then increment age. > > +# If any interfaces have been removed or changed since the last release, > > +# then set age to 0. > > + version: '6.0.0', > > install : true) > > > > executable('barebox-state', > > -- > > 2.39.2 > > > > > > > -- Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > Makefile.am has: > > LIBDT_CURRENT=6 > LIBDT_REVISION=0 > LIBDT_AGE=0 > > along with a comment on how the values were chosen. Copy the comment and > the values into the meson.build as well, so appropriate symlinks > pointing at the versioned library are created. We forego the extra > complexity of having a common file that's read from both build systems > as we are intent on phasing out autotools anyway, once wrinkles such as > what's fixed here are ironed out. > > Reported-by: Enrico Jörns <e.joerns@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Roland Hieber <rhi@pengutronix.de> > --- > meson.build | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/meson.build b/meson.build > index 9579e712dfea..9894d7311bb3 100644 > --- a/meson.build > +++ b/meson.build > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > c_args : ['-include', meson.current_build_dir() / 'version.h'], > dependencies : [udevdep, versiondep], > gnu_symbol_visibility : 'default', > +# If the library source code has changed at all since the last release, > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > +# If any interfaces have been added/removed/changed since the last release, > +# then increment current, and set revision to 0. > +# If any public interfaces have been added since the last public release, > +# then increment age. > +# If any interfaces have been removed or changed since the last release, > +# then set age to 0. > + version: '6.0.0', > install : true) > > executable('barebox-state', > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Mon, Nov 06, 2023 at 12:04:05PM +0100, Ahmad Fatoum wrote: > Recent rework introduced a regression for state located in the eMMC > user area described by DT fixed partitions. Whereas before, the first > device with type "disk" was taken, dt-utils will now iterate over all > devices to try to find a matching GPT partition. If it doesn't find any, > it will instead take the last device with type "disk", which will be the > second boot partition for eMMC devices leading barebox-state to access > /dev/mmcblkXboot1 instead of /dev/mmcblkX. > > Let's fix this regression by restoring the old behavior of preferring the > first disk. This may not be totally future proof, but it worked ok for > years and a better solution can always be added later with a regular > release. > > Reported-by: Leonard Göhrs <l.goehrs@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Tested-by: Roland Hieber <rhi@pengutronix.de> [riot,imx6s-riotboard] > --- > src/libdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/libdt.c b/src/libdt.c > index 650b40467587..72e8ab41e09b 100644 > --- a/src/libdt.c > +++ b/src/libdt.c > @@ -2301,7 +2301,7 @@ static int cdev_from_block_device(struct udev_device *dev, > devtype = udev_device_get_devtype(part); > if (!devtype) > continue; > - if (!strcmp(devtype, "disk")) { > + if (!strcmp(devtype, "disk") && !best_match) { > best_match = part; > > /* Should we try to find a matching partition first? */ > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Makefile.am has: LIBDT_CURRENT=6 LIBDT_REVISION=0 LIBDT_AGE=0 along with a comment on how the values were chosen. Copy the comment and the values into the meson.build as well, so appropriate symlinks pointing at the versioned library are created. We forego the extra complexity of having a common file that's read from both build systems as we are intent on phasing out autotools anyway, once wrinkles such as what's fixed here are ironed out. Reported-by: Enrico Jörns <e.joerns@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meson.build b/meson.build index 9579e712dfea..9894d7311bb3 100644 --- a/meson.build +++ b/meson.build @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', c_args : ['-include', meson.current_build_dir() / 'version.h'], dependencies : [udevdep, versiondep], gnu_symbol_visibility : 'default', +# If the library source code has changed at all since the last release, +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). +# If any interfaces have been added/removed/changed since the last release, +# then increment current, and set revision to 0. +# If any public interfaces have been added since the last public release, +# then increment age. +# If any interfaces have been removed or changed since the last release, +# then set age to 0. + version: '6.0.0', install : true) executable('barebox-state', -- 2.39.2
On Mon, Nov 06, 2023 at 12:29:53PM +0100, Ahmad Fatoum wrote: > The oss-tools list is shared between a number of projects, so we should > always use a subject prefix to make it clear where the patch applies. > > The README already notes that and references the git man page, but it's > more convenient to just provide a command line that can be directly > copied and pasted. > > Cc: Bastian Krause <bst@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Roland Hieber <rhi@pengutronix.de> > --- > README | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/README b/README > index d68e6dacae6c..c6ef99c10b00 100644 > --- a/README > +++ b/README > @@ -44,8 +44,10 @@ The Git web view for this software can be found at: > <https://git.pengutronix.de/cgit/tools/dt-utils> > > Any patches should be sent to the mailing list above. Please prefix your > -subject with "[PATCH dt-utils]" (when sending patches with Git, see the > -git-config manpage for the option format.subjectPrefix). > +subject with "[PATCH dt-utils]". This can be configured in Git with: > + > + git config format.subjectPrefix "PATCH dt-utils" > + > Mails sent to this mailing list are also archived at > > <https://lore.pengutronix.de/oss-tools/> > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On 11/6/23 12:29, Ahmad Fatoum wrote: > The oss-tools list is shared between a number of projects, so we should > always use a subject prefix to make it clear where the patch applies. > > The README already notes that and references the git man page, but it's > more convenient to just provide a command line that can be directly > copied and pasted. > > Cc: Bastian Krause <bst@pengutronix.de> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > README | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/README b/README > index d68e6dacae6c..c6ef99c10b00 100644 > --- a/README > +++ b/README > @@ -44,8 +44,10 @@ The Git web view for this software can be found at: > <https://git.pengutronix.de/cgit/tools/dt-utils> > > Any patches should be sent to the mailing list above. Please prefix your > -subject with "[PATCH dt-utils]" (when sending patches with Git, see the > -git-config manpage for the option format.subjectPrefix). > +subject with "[PATCH dt-utils]". This can be configured in Git with: > + > + git config format.subjectPrefix "PATCH dt-utils" > + Nice, thanks! Regards, Bastian > Mails sent to this mailing list are also archived at > > <https://lore.pengutronix.de/oss-tools/> -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |