mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
nwztools: small fixes
Make sure scripts use bash, make nwz database generator more deterministic Change-Id: I26812b697abe0406fb3c60d6eb231cb27edc81d5
This commit is contained in:
parent
d7770a1cdd
commit
3c3e133f99
6 changed files with 8 additions and 6 deletions
|
|
@ -199,9 +199,9 @@ with open("nwz_db.h", "w") as fp:
|
|||
# generate list of all nvp nodes
|
||||
for name in sorted(g_nvp_names):
|
||||
# create comment to explain the meaning, gather several meaning together
|
||||
# if there are more than one
|
||||
# if there are more than one (sorted to keep a stable order when we update)
|
||||
explain = ""
|
||||
if name in g_nvp_desc:
|
||||
if name in sorted(g_nvp_desc):
|
||||
explain = " | ".join(list(g_nvp_desc[name]))
|
||||
# overwrite desc set with a single string for later
|
||||
g_nvp_desc[name] = explain
|
||||
|
|
@ -257,7 +257,7 @@ with open("nwz_db.c", "w") as fp:
|
|||
fp.write(" { %s, \"%s\" },\n" % (hex(model["mid"]), model["name"]))
|
||||
fp.write("};\n")
|
||||
# generate nvps
|
||||
for hash in g_hash_nvp:
|
||||
for hash in sorted(g_hash_nvp):
|
||||
nvp = g_hash_nvp[hash]
|
||||
fp.write("\nstatic int nvp_index_%s[NWZ_NVP_COUNT] =\n" % hash)
|
||||
fp.write("{\n")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#
|
||||
#!/bin/bash
|
||||
# usage: parse_all_nvp_headers /path/to/directory
|
||||
#
|
||||
# the expected structure is:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#
|
||||
#!/bin/bash
|
||||
# usage: parse_all_nvp_nodes /path/to/directory
|
||||
#
|
||||
# the expected structure is:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
# usage
|
||||
# parse_header.sh /path/to/icx_nvp.h
|
||||
# parse_header.sh /path/to/linux/source [file]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
# usage
|
||||
# parse_nodes.sh /path/to/icx_nvp_emmc.ko output_file
|
||||
# parse_nodes.sh /path/to/rootfs/dir output_file
|
||||
|
|
|
|||
|
|
@ -553,4 +553,4 @@ int nvp_info(void)
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue