mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
utils/diffconfig: remove BR2_* prefix restriction
The utils/diffconfig script works only on variables with the BR2_ prefix. This is OK for Buildroot [def]configs since this is the prefix for all user-facing variables, but it prevents using the same script to compare configs from kconfig-based packages. Remove the BR2_ restriction, allowing usage such as: ./utils/diffconfig \ board/qemu/xtensa-lx60/linux.config \ board/qemu/xtensa-lx60/linux-nommu.config Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> Tested-by: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
0b68713aae
commit
bf9ccfc37b
@ -28,14 +28,14 @@ If no config files are specified, .config and .config.old are used.
|
|||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
$ diffconfig .config config-with-some-changes
|
$ diffconfig .config config-with-some-changes
|
||||||
-LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
|
-BR2_LINUX_KERNEL_INTREE_DTS_NAME "vexpress-v2p-ca9"
|
||||||
LINUX_KERNEL_DTS_SUPPORT y -> n
|
BR2_LINUX_KERNEL_DTS_SUPPORT y -> n
|
||||||
LINUX_KERNEL_USE_INTREE_DTS y -> n
|
BR2_LINUX_KERNEL_USE_INTREE_DTS y -> n
|
||||||
PACKAGE_DFU_UTIL n -> y
|
BR2_PACKAGE_DFU_UTIL n -> y
|
||||||
PACKAGE_LIBUSB n -> y
|
BR2_PACKAGE_LIBUSB n -> y
|
||||||
TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
|
BR2_TARGET_GENERIC_HOSTNAME "buildroot" -> "Tuxie"
|
||||||
TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
|
BR2_TARGET_GENERIC_ISSUE "Welcome to Buildroot" -> "Welcome to CustomBoard"
|
||||||
+PACKAGE_LIBUSB_COMPAT n
|
+BR2_PACKAGE_LIBUSB_COMPAT n
|
||||||
|
|
||||||
""")
|
""")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
@ -44,12 +44,14 @@ Example usage:
|
|||||||
def readconfig(config_file):
|
def readconfig(config_file):
|
||||||
d = {}
|
d = {}
|
||||||
for line in config_file:
|
for line in config_file:
|
||||||
line = line[:-1]
|
line = line.strip()
|
||||||
if line[:4] == "BR2_":
|
if len(line) == 0:
|
||||||
name, val = line[4:].split("=", 1)
|
continue
|
||||||
d[name] = val
|
|
||||||
if line[-11:] == " is not set":
|
if line[-11:] == " is not set":
|
||||||
d[line[6:-11]] = "n"
|
d[line[2:-11]] = "n"
|
||||||
|
elif line[0] != "#":
|
||||||
|
name, val = line.split("=", 1)
|
||||||
|
d[name] = val
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def print_config(op, config, value, new_value):
|
def print_config(op, config, value, new_value):
|
||||||
@ -58,9 +60,9 @@ def print_config(op, config, value, new_value):
|
|||||||
if merge_style:
|
if merge_style:
|
||||||
if new_value:
|
if new_value:
|
||||||
if new_value=="n":
|
if new_value=="n":
|
||||||
print("# BR2_%s is not set" % config)
|
print("# %s is not set" % config)
|
||||||
else:
|
else:
|
||||||
print("BR2_%s=%s" % (config, new_value))
|
print("%s=%s" % (config, new_value))
|
||||||
else:
|
else:
|
||||||
if op=="-":
|
if op=="-":
|
||||||
print("-%s %s" % (config, value))
|
print("-%s %s" % (config, value))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user