Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
de2ad2c4
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
de2ad2c4
编写于
9月 12, 2017
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.denx.de/u-boot-dm
上级
d81a1de9
ee87a097
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
191 addition
and
56 deletion
+191
-56
arch/arm/mach-tegra/xusb-padctl-common.c
arch/arm/mach-tegra/xusb-padctl-common.c
+2
-6
arch/sandbox/Kconfig
arch/sandbox/Kconfig
+22
-0
arch/sandbox/dts/test.dts
arch/sandbox/dts/test.dts
+6
-4
board/sandbox/README.sandbox
board/sandbox/README.sandbox
+3
-4
doc/bounces
doc/bounces
+3
-0
drivers/block/blk-uclass.c
drivers/block/blk-uclass.c
+4
-4
drivers/block/sandbox.c
drivers/block/sandbox.c
+1
-1
drivers/core/dump.c
drivers/core/dump.c
+3
-5
drivers/core/ofnode.c
drivers/core/ofnode.c
+5
-4
drivers/core/root.c
drivers/core/root.c
+32
-2
drivers/misc/cros_ec.c
drivers/misc/cros_ec.c
+1
-2
drivers/power/pmic/pmic-uclass.c
drivers/power/pmic/pmic-uclass.c
+1
-3
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+1
-1
include/blk.h
include/blk.h
+4
-4
include/dm/ofnode.h
include/dm/ofnode.h
+24
-0
include/dm/root.h
include/dm/root.h
+14
-0
lib/libfdt/pylibfdt/libfdt.i
lib/libfdt/pylibfdt/libfdt.i
+2
-0
scripts/config_whitelist.txt
scripts/config_whitelist.txt
+0
-1
test/dm/blk.c
test/dm/blk.c
+3
-3
test/dm/test-main.c
test/dm/test-main.c
+1
-1
tools/buildman/kconfiglib.py
tools/buildman/kconfiglib.py
+16
-6
tools/genboardscfg.py
tools/genboardscfg.py
+5
-2
tools/moveconfig.py
tools/moveconfig.py
+3
-3
tools/patman/README
tools/patman/README
+12
-0
tools/patman/series.py
tools/patman/series.py
+5
-0
tools/patman/settings.py
tools/patman/settings.py
+18
-0
未找到文件。
arch/arm/mach-tegra/xusb-padctl-common.c
浏览文件 @
de2ad2c4
...
...
@@ -224,9 +224,7 @@ tegra_xusb_padctl_config_parse_dt(struct tegra_xusb_padctl *padctl,
config
->
name
=
ofnode_get_name
(
node
);
for
(
subnode
=
ofnode_first_subnode
(
node
);
ofnode_valid
(
subnode
);
subnode
=
ofnode_next_subnode
(
subnode
))
{
ofnode_for_each_subnode
(
subnode
,
node
)
{
struct
tegra_xusb_padctl_group
*
group
;
int
err
;
...
...
@@ -256,9 +254,7 @@ static int tegra_xusb_padctl_parse_dt(struct tegra_xusb_padctl *padctl,
return
err
;
}
for
(
subnode
=
ofnode_first_subnode
(
node
);
ofnode_valid
(
subnode
);
subnode
=
ofnode_next_subnode
(
subnode
))
{
ofnode_for_each_subnode
(
subnode
,
node
)
{
struct
tegra_xusb_padctl_config
*
config
=
&
padctl
->
config
;
debug
(
"%s: subnode=%s
\n
"
,
__func__
,
ofnode_get_name
(
subnode
));
...
...
arch/sandbox/Kconfig
浏览文件 @
de2ad2c4
...
...
@@ -18,4 +18,26 @@ config SYS_CONFIG_NAME
default "sandbox_spl" if SANDBOX_SPL
default "sandbox" if !SANDBOX_SPL
choice
prompt "Run sandbox on 32/64-bit host"
default SANDBOX_64BIT
help
Sandbox can be built on 32-bit and 64-bit hosts.
The default is to build on a 64-bit host and run
on a 64-bit host. If you want to run sandbox on
a 32-bit host, change it here.
config SANDBOX_32BIT
bool "32-bit host"
config SANDBOX_64BIT
bool "64-bit host"
endchoice
config SANDBOX_BITS_PER_LONG
int
default 32 if SANDBOX_32BIT
default 64 if SANDBOX_64BIT
endmenu
arch/sandbox/dts/test.dts
浏览文件 @
de2ad2c4
...
...
@@ -127,10 +127,12 @@
compatible
=
"denx,u-boot-fdt-test"
;
};
clk_fixed
:
clk
-
fixed
{
compatible
=
"fixed-clock"
;
#
clock
-
cells
=
<
0
>;
clock
-
frequency
=
<
1234
>;
clocks
{
clk_fixed
:
clk
-
fixed
{
compatible
=
"fixed-clock"
;
#
clock
-
cells
=
<
0
>;
clock
-
frequency
=
<
1234
>;
};
};
clk_sandbox
:
clk
-
sbox
{
...
...
board/sandbox/README.sandbox
浏览文件 @
de2ad2c4
...
...
@@ -24,6 +24,9 @@ single board in board/sandbox.
CONFIG_SANDBOX_BIG_ENDIAN should be defined when running on big-endian
machines.
By default sandbox builds and runs on 64-bit hosts. If you are going to build
and run sandbox on a 32-bit host, select CONFIG_SANDBOX_32BIT.
Note that standalone/API support is not available at present.
...
...
@@ -44,10 +47,6 @@ Note:
make sandbox_defconfig all NO_SDL=1
./u-boot
If you are building on a 32-bit machine you may get errors from __ffs.h
about shifting more than the machine word size. Edit the config file
include/configs/sandbox.h and change CONFIG_SANDBOX_BITS_PER_LONG to 32.
U-Boot will start on your computer, showing a sandbox emulation of the serial
console:
...
...
doc/bounces
0 → 100644
浏览文件 @
de2ad2c4
# List of addresses picked up by patman/get_maintainer.pl that are known to
# bounce. Addresses are listed one per line and need to match the author
# information recorded in git.
drivers/block/blk-uclass.c
浏览文件 @
de2ad2c4
...
...
@@ -546,7 +546,7 @@ static int blk_claim_devnum(enum if_type if_type, int devnum)
int
blk_create_device
(
struct
udevice
*
parent
,
const
char
*
drv_name
,
const
char
*
name
,
int
if_type
,
int
devnum
,
int
blksz
,
lbaint_t
size
,
struct
udevice
**
devp
)
lbaint_t
lba
,
struct
udevice
**
devp
)
{
struct
blk_desc
*
desc
;
struct
udevice
*
dev
;
...
...
@@ -567,7 +567,7 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
desc
=
dev_get_uclass_platdata
(
dev
);
desc
->
if_type
=
if_type
;
desc
->
blksz
=
blksz
;
desc
->
lba
=
size
/
blksz
;
desc
->
lba
=
lba
;
desc
->
part_type
=
PART_TYPE_UNKNOWN
;
desc
->
bdev
=
dev
;
desc
->
devnum
=
devnum
;
...
...
@@ -578,7 +578,7 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
int
blk_create_devicef
(
struct
udevice
*
parent
,
const
char
*
drv_name
,
const
char
*
name
,
int
if_type
,
int
devnum
,
int
blksz
,
lbaint_t
size
,
struct
udevice
**
devp
)
lbaint_t
lba
,
struct
udevice
**
devp
)
{
char
dev_name
[
30
],
*
str
;
int
ret
;
...
...
@@ -589,7 +589,7 @@ int blk_create_devicef(struct udevice *parent, const char *drv_name,
return
-
ENOMEM
;
ret
=
blk_create_device
(
parent
,
drv_name
,
str
,
if_type
,
devnum
,
blksz
,
size
,
devp
);
blksz
,
lba
,
devp
);
if
(
ret
)
{
free
(
str
);
return
ret
;
...
...
drivers/block/sandbox.c
浏览文件 @
de2ad2c4
...
...
@@ -129,7 +129,7 @@ int host_dev_bind(int devnum, char *filename)
}
ret
=
blk_create_device
(
gd
->
dm_root
,
"sandbox_host_blk"
,
str
,
IF_TYPE_HOST
,
devnum
,
512
,
os_lseek
(
fd
,
0
,
OS_SEEK_END
),
&
dev
);
os_lseek
(
fd
,
0
,
OS_SEEK_END
)
/
512
,
&
dev
);
if
(
ret
)
goto
err_file
;
ret
=
device_probe
(
dev
);
...
...
drivers/core/dump.c
浏览文件 @
de2ad2c4
...
...
@@ -14,12 +14,10 @@ static void show_devices(struct udevice *dev, int depth, int last_flag)
{
int
i
,
is_last
;
struct
udevice
*
child
;
char
class_name
[
12
];
/* print the first 11 characters to not break the tree-format. */
strlcpy
(
class_name
,
dev
->
uclass
->
uc_drv
->
name
,
sizeof
(
class_name
));
printf
(
" %-11s [ %c ] "
,
class_name
,
dev
->
flags
&
DM_FLAG_ACTIVATED
?
'+'
:
' '
);
printf
(
" %-10.10s [ %c ] %-10.10s "
,
dev
->
uclass
->
uc_drv
->
name
,
dev
->
flags
&
DM_FLAG_ACTIVATED
?
'+'
:
' '
,
dev
->
driver
->
name
);
for
(
i
=
depth
;
i
>=
0
;
i
--
)
{
is_last
=
(
last_flag
>>
i
)
&
1
;
...
...
@@ -50,7 +48,7 @@ void dm_dump_all(void)
root
=
dm_root
();
if
(
root
)
{
printf
(
" Class
Probed
Name
\n
"
);
printf
(
" Class
Probed Driver
Name
\n
"
);
printf
(
"----------------------------------------
\n
"
);
show_devices
(
root
,
-
1
,
0
);
}
...
...
drivers/core/ofnode.c
浏览文件 @
de2ad2c4
...
...
@@ -390,10 +390,11 @@ int ofnode_decode_display_timing(ofnode parent, int index,
if
(
!
ofnode_valid
(
timings
))
return
-
EINVAL
;
for
(
i
=
0
,
node
=
ofnode_first_subnode
(
timings
);
ofnode_valid
(
node
)
&&
i
!=
index
;
node
=
ofnode_first_subnode
(
node
))
i
++
;
i
=
0
;
ofnode_for_each_subnode
(
node
,
timings
)
{
if
(
i
++
==
index
)
break
;
}
if
(
!
ofnode_valid
(
node
))
return
-
EINVAL
;
...
...
drivers/core/root.c
浏览文件 @
de2ad2c4
...
...
@@ -312,8 +312,38 @@ int dm_scan_fdt(const void *blob, bool pre_reloc_only)
#endif
return
dm_scan_fdt_node
(
gd
->
dm_root
,
blob
,
0
,
pre_reloc_only
);
}
#else
static
int
dm_scan_fdt_node
(
struct
udevice
*
parent
,
const
void
*
blob
,
int
offset
,
bool
pre_reloc_only
)
{
return
0
;
}
#endif
int
dm_extended_scan_fdt
(
const
void
*
blob
,
bool
pre_reloc_only
)
{
int
node
,
ret
;
ret
=
dm_scan_fdt
(
gd
->
fdt_blob
,
pre_reloc_only
);
if
(
ret
)
{
debug
(
"dm_scan_fdt() failed: %d
\n
"
,
ret
);
return
ret
;
}
/* bind fixed-clock */
node
=
ofnode_to_offset
(
ofnode_path
(
"/clocks"
));
/* if no DT "clocks" node, no need to go further */
if
(
node
<
0
)
return
ret
;
ret
=
dm_scan_fdt_node
(
gd
->
dm_root
,
gd
->
fdt_blob
,
node
,
pre_reloc_only
);
if
(
ret
)
debug
(
"dm_scan_fdt_node() failed: %d
\n
"
,
ret
);
return
ret
;
}
__weak
int
dm_scan_other
(
bool
pre_reloc_only
)
{
return
0
;
...
...
@@ -335,9 +365,9 @@ int dm_init_and_scan(bool pre_reloc_only)
}
if
(
CONFIG_IS_ENABLED
(
OF_CONTROL
)
&&
!
CONFIG_IS_ENABLED
(
OF_PLATDATA
))
{
ret
=
dm_scan_fdt
(
gd
->
fdt_blob
,
pre_reloc_only
);
ret
=
dm_
extended_
scan_fdt
(
gd
->
fdt_blob
,
pre_reloc_only
);
if
(
ret
)
{
debug
(
"dm_
scan_f
dt() failed: %d
\n
"
,
ret
);
debug
(
"dm_
extended_scan_
dt() failed: %d
\n
"
,
ret
);
return
ret
;
}
}
...
...
drivers/misc/cros_ec.c
浏览文件 @
de2ad2c4
...
...
@@ -1038,8 +1038,7 @@ int cros_ec_decode_ec_flash(struct udevice *dev, struct fdt_cros_ec *config)
config
->
flash_erase_value
=
ofnode_read_s32_default
(
flash_node
,
"erase-value"
,
-
1
);
for
(
node
=
ofnode_first_subnode
(
flash_node
);
ofnode_valid
(
node
);
node
=
ofnode_next_subnode
(
node
))
{
ofnode_for_each_subnode
(
node
,
flash_node
)
{
const
char
*
name
=
ofnode_get_name
(
node
);
enum
ec_flash_region
region
;
...
...
drivers/power/pmic/pmic-uclass.c
浏览文件 @
de2ad2c4
...
...
@@ -34,9 +34,7 @@ int pmic_bind_children(struct udevice *pmic, ofnode parent,
debug
(
"%s for '%s' at node offset: %d
\n
"
,
__func__
,
pmic
->
name
,
dev_of_offset
(
pmic
));
for
(
node
=
ofnode_first_subnode
(
parent
);
ofnode_valid
(
node
);
node
=
ofnode_next_subnode
(
node
))
{
ofnode_for_each_subnode
(
node
,
parent
)
{
node_name
=
ofnode_get_name
(
node
);
debug
(
"* Found child node: '%s'
\n
"
,
node_name
);
...
...
drivers/scsi/scsi.c
浏览文件 @
de2ad2c4
...
...
@@ -580,7 +580,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
*/
snprintf
(
str
,
sizeof
(
str
),
"id%dlun%d"
,
id
,
lun
);
ret
=
blk_create_devicef
(
dev
,
"scsi_blk"
,
str
,
IF_TYPE_SCSI
,
-
1
,
bd
.
blksz
,
bd
.
blksz
*
bd
.
lba
,
&
bdev
);
bd
.
blksz
,
bd
.
lba
,
&
bdev
);
if
(
ret
)
{
debug
(
"Can't create device
\n
"
);
return
ret
;
...
...
include/blk.h
浏览文件 @
de2ad2c4
...
...
@@ -315,12 +315,12 @@ int blk_next_device(struct udevice **devp);
* @devnum: Device number, specific to the interface type, or -1 to
* allocate the next available number
* @blksz: Block size of the device in bytes (typically 512)
* @
size: Total size of the device in bytes
* @
lba: Total number of blocks of the device
* @devp: the new device (which has not been probed)
*/
int
blk_create_device
(
struct
udevice
*
parent
,
const
char
*
drv_name
,
const
char
*
name
,
int
if_type
,
int
devnum
,
int
blksz
,
lbaint_t
size
,
struct
udevice
**
devp
);
lbaint_t
lba
,
struct
udevice
**
devp
);
/**
* blk_create_devicef() - Create a new named block device
...
...
@@ -332,12 +332,12 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
* @devnum: Device number, specific to the interface type, or -1 to
* allocate the next available number
* @blksz: Block size of the device in bytes (typically 512)
* @
size: Total size of the device in bytes
* @
lba: Total number of blocks of the device
* @devp: the new device (which has not been probed)
*/
int
blk_create_devicef
(
struct
udevice
*
parent
,
const
char
*
drv_name
,
const
char
*
name
,
int
if_type
,
int
devnum
,
int
blksz
,
lbaint_t
size
,
struct
udevice
**
devp
);
lbaint_t
lba
,
struct
udevice
**
devp
);
/**
* blk_prepare_device() - Prepare a block device for use
...
...
include/dm/ofnode.h
浏览文件 @
de2ad2c4
...
...
@@ -628,4 +628,28 @@ int ofnode_read_resource(ofnode node, uint index, struct resource *res);
int
ofnode_read_resource_byname
(
ofnode
node
,
const
char
*
name
,
struct
resource
*
res
);
/**
* ofnode_for_each_subnode() - iterate over all subnodes of a parent
*
* @node: child node (ofnode, lvalue)
* @parent: parent node (ofnode)
*
* This is a wrapper around a for loop and is used like so:
*
* ofnode node;
*
* ofnode_for_each_subnode(node, parent) {
* Use node
* ...
* }
*
* Note that this is implemented as a macro and @node is used as
* iterator in the loop. The parent variable can be a constant or even a
* literal.
*/
#define ofnode_for_each_subnode(node, parent) \
for (node = ofnode_first_subnode(parent); \
ofnode_valid(node); \
node = ofnode_next_subnode(node))
#endif
include/dm/root.h
浏览文件 @
de2ad2c4
...
...
@@ -55,6 +55,20 @@ int dm_scan_platdata(bool pre_reloc_only);
*/
int
dm_scan_fdt
(
const
void
*
blob
,
bool
pre_reloc_only
);
/**
* dm_extended_scan_fdt() - Scan the device tree and bind drivers
*
* This calls dm_scna_dft() which scans the device tree and creates a driver
* for each node. the top-level subnodes are examined and also all sub-nodes
* of "clocks" node.
*
* @blob: Pointer to device tree blob
* @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC
* flag. If false bind all drivers.
* @return 0 if OK, -ve on error
*/
int
dm_extended_scan_fdt
(
const
void
*
blob
,
bool
pre_reloc_only
);
/**
* dm_scan_other() - Scan for other devices
*
...
...
lib/libfdt/pylibfdt/libfdt.i
浏览文件 @
de2ad2c4
...
...
@@ -8,6 +8,8 @@
%
module
libfdt
%
include
<
stdint
.
i
>
%
{
#
define
SWIG_FILE_WITH_INIT
#
include
"libfdt.h"
...
...
scripts/config_whitelist.txt
浏览文件 @
de2ad2c4
...
...
@@ -1950,7 +1950,6 @@ CONFIG_SAMSUNG
CONFIG_SAMSUNG_ONENAND
CONFIG_SANDBOX_ARCH
CONFIG_SANDBOX_BIG_ENDIAN
CONFIG_SANDBOX_BITS_PER_LONG
CONFIG_SANDBOX_SDL
CONFIG_SANDBOX_SPI_MAX_BUS
CONFIG_SANDBOX_SPI_MAX_CS
...
...
test/dm/blk.c
浏览文件 @
de2ad2c4
...
...
@@ -23,9 +23,9 @@ static int dm_test_blk_base(struct unit_test_state *uts)
/* Create two, one the parent of the other */
ut_assertok
(
blk_create_device
(
gd
->
dm_root
,
"sandbox_host_blk"
,
"test"
,
IF_TYPE_HOST
,
1
,
512
,
1024
,
&
blk
));
IF_TYPE_HOST
,
1
,
512
,
2
,
&
blk
));
ut_assertok
(
blk_create_device
(
blk
,
"usb_storage_blk"
,
"test"
,
IF_TYPE_USB
,
3
,
512
,
1024
,
&
usb_blk
));
IF_TYPE_USB
,
3
,
512
,
2
,
&
usb_blk
));
/* Check we can find them */
ut_asserteq
(
-
ENODEV
,
blk_get_device
(
IF_TYPE_HOST
,
0
,
&
dev
));
...
...
@@ -101,7 +101,7 @@ static int dm_test_blk_find(struct unit_test_state *uts)
struct
udevice
*
blk
,
*
dev
;
ut_assertok
(
blk_create_device
(
gd
->
dm_root
,
"sandbox_host_blk"
,
"test"
,
IF_TYPE_HOST
,
1
,
512
,
1024
,
&
blk
));
IF_TYPE_HOST
,
1
,
512
,
2
,
&
blk
));
ut_asserteq
(
-
ENODEV
,
blk_find_device
(
IF_TYPE_HOST
,
0
,
&
dev
));
ut_assertok
(
blk_find_device
(
IF_TYPE_HOST
,
1
,
&
dev
));
ut_asserteq_ptr
(
blk
,
dev
);
...
...
test/dm/test-main.c
浏览文件 @
de2ad2c4
...
...
@@ -92,7 +92,7 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test,
if
(
test
->
flags
&
DM_TESTF_PROBE_TEST
)
ut_assertok
(
do_autoprobe
(
uts
));
if
(
test
->
flags
&
DM_TESTF_SCAN_FDT
)
ut_assertok
(
dm_scan_fdt
(
gd
->
fdt_blob
,
false
));
ut_assertok
(
dm_
extended_
scan_fdt
(
gd
->
fdt_blob
,
false
));
/*
* Silence the console and rely on console reocrding to get
...
...
tools/buildman/kconfiglib.py
浏览文件 @
de2ad2c4
...
...
@@ -204,6 +204,7 @@ class Config(object):
self
.
print_warnings
=
print_warnings
self
.
print_undef_assign
=
print_undef_assign
self
.
_warnings
=
[]
# For parsing routines that stop when finding a line belonging to a
# different construct, these holds that line and the tokenized version
...
...
@@ -398,8 +399,12 @@ class Config(object):
need to refer to the top-level kernel directory with "$srctree".
replace (default: True): True if the configuration should replace the
old configuration; False if it should add to it.
"""
old configuration; False if it should add to it.
Returns a list or warnings (hopefully empty)
"""
self
.
_warnings
=
[]
# Put this first so that a missing file doesn't screw up our state
filename
=
os
.
path
.
expandvars
(
filename
)
line_feeder
=
_FileFeed
(
filename
)
...
...
@@ -449,7 +454,7 @@ class Config(object):
while
1
:
line
=
line_feeder
.
get_next
()
if
line
is
None
:
return
return
self
.
_warnings
line
=
line
.
rstrip
()
...
...
@@ -1763,8 +1768,10 @@ class Config(object):
def
_warn
(
self
,
msg
,
filename
=
None
,
linenr
=
None
):
"""For printing warnings to stderr."""
msg
=
_build_msg
(
"warning: "
+
msg
,
filename
,
linenr
)
if
self
.
print_warnings
:
_stderr_msg
(
"warning: "
+
msg
,
filename
,
linenr
)
sys
.
stderr
.
write
(
msg
+
"
\n
"
)
self
.
_warnings
.
append
(
msg
)
class
Item
(
object
):
...
...
@@ -3369,10 +3376,13 @@ def _clean_up_path(path):
path
=
path
[
2
:]
return
path
.
rstrip
(
"/"
)
def
_
stderr
_msg
(
msg
,
filename
,
linenr
):
def
_
build
_msg
(
msg
,
filename
,
linenr
):
if
filename
is
not
None
:
sys
.
stderr
.
write
(
"{0}:{1}: "
.
format
(
_clean_up_path
(
filename
),
linenr
))
sys
.
stderr
.
write
(
msg
+
"
\n
"
)
msg
=
"{0}:{1}: "
.
format
(
_clean_up_path
(
filename
),
linenr
)
+
msg
return
msg
def
_stderr_msg
(
msg
,
filename
,
linenr
):
sys
.
stderr
.
write
(
_build_msg
(
msg
,
filename
,
linenr
)
+
"
\n
"
)
def
_tokenization_error
(
s
,
filename
,
linenr
):
loc
=
""
if
filename
is
None
else
"{0}:{1}: "
.
format
(
filename
,
linenr
)
...
...
tools/genboardscfg.py
浏览文件 @
de2ad2c4
...
...
@@ -124,7 +124,7 @@ class KconfigScanner:
os
.
environ
[
'srctree'
]
=
os
.
getcwd
()
os
.
environ
[
'UBOOTVERSION'
]
=
'dummy'
os
.
environ
[
'KCONFIG_OBJDIR'
]
=
''
self
.
_conf
=
kconfiglib
.
Config
()
self
.
_conf
=
kconfiglib
.
Config
(
print_warnings
=
False
)
def
__del__
(
self
):
"""Delete a leftover temporary file before exit.
...
...
@@ -166,7 +166,10 @@ class KconfigScanner:
else
:
f
.
write
(
line
[
colon
+
1
:])
self
.
_conf
.
load_config
(
self
.
_tmpfile
)
warnings
=
self
.
_conf
.
load_config
(
self
.
_tmpfile
)
if
warnings
:
for
warning
in
warnings
:
print
'%s: %s'
%
(
defconfig
,
warning
)
try_remove
(
self
.
_tmpfile
)
self
.
_tmpfile
=
None
...
...
tools/moveconfig.py
浏览文件 @
de2ad2c4
...
...
@@ -1877,10 +1877,10 @@ def main():
if
options
.
build_db
:
with
open
(
CONFIG_DATABASE
,
'w'
)
as
fd
:
for
defconfig
,
configs
in
config_db
.
iteritems
():
print
>>
fd
,
'%s'
%
defconfig
fd
.
write
(
'%s
\n
'
%
defconfig
)
for
config
in
sorted
(
configs
.
keys
()):
print
>>
fd
,
' %s=%s'
%
(
config
,
configs
[
config
]
)
print
>>
fd
fd
.
write
(
' %s=%s
\n
'
%
(
config
,
configs
[
config
])
)
fd
.
write
(
'
\n
'
)
if
__name__
==
'__main__'
:
main
()
tools/patman/README
浏览文件 @
de2ad2c4
...
...
@@ -84,6 +84,18 @@ Aliases are recursive.
The checkpatch.pl in the U-Boot tools/ subdirectory will be located and
used. Failing that you can put it into your path or ~/bin/checkpatch.pl
If you want to avoid sending patches to email addresses that are picked up
by patman but are known to bounce you can add a [bounces] section to your
.patman file. Unlike the [alias] section these are simple key: value pairs
that are not recursive.
>>>
[bounces]
gonefishing: Fred Bloggs <f.bloggs@napier.net>
<<<
If you want to change the defaults for patman's command-line arguments,
you can add a [settings] section to your .patman file. This can be used
...
...
tools/patman/series.py
浏览文件 @
de2ad2c4
...
...
@@ -10,6 +10,7 @@ import os
import
get_maintainer
import
gitutil
import
settings
import
terminal
# Series-xxx tags that we understand
...
...
@@ -218,6 +219,7 @@ class Series(dict):
Return:
Filename of temp file created
"""
col
=
terminal
.
Color
()
# Look for commit tags (of the form 'xxx:' at the start of the subject)
fname
=
'/tmp/patman.%d'
%
os
.
getpid
()
fd
=
open
(
fname
,
'w'
)
...
...
@@ -233,6 +235,9 @@ class Series(dict):
cc
+=
add_maintainers
elif
add_maintainers
:
cc
+=
get_maintainer
.
GetMaintainer
(
commit
.
patch
)
for
x
in
set
(
cc
)
&
set
(
settings
.
bounces
):
print
(
col
.
Color
(
col
.
YELLOW
,
'Skipping "%s"'
%
x
))
cc
=
set
(
cc
)
-
set
(
settings
.
bounces
)
cc
=
[
m
.
encode
(
'utf-8'
)
if
type
(
m
)
!=
str
else
m
for
m
in
cc
]
all_ccs
+=
cc
print
(
commit
.
patch
,
', '
.
join
(
set
(
cc
)),
file
=
fd
)
...
...
tools/patman/settings.py
浏览文件 @
de2ad2c4
...
...
@@ -269,6 +269,19 @@ def _ReadAliasFile(fname):
if
bad_line
:
print
(
bad_line
)
def
_ReadBouncesFile
(
fname
):
"""Read in the bounces file if it exists
Args:
fname: Filename to read.
"""
if
os
.
path
.
exists
(
fname
):
with
open
(
fname
)
as
fd
:
for
line
in
fd
:
if
line
.
startswith
(
'#'
):
continue
bounces
.
add
(
line
.
strip
())
def
Setup
(
parser
,
project_name
,
config_fname
=
''
):
"""Set up the settings module by reading config files.
...
...
@@ -293,10 +306,15 @@ def Setup(parser, project_name, config_fname=''):
for
name
,
value
in
config
.
items
(
'alias'
):
alias
[
name
]
=
value
.
split
(
','
)
_ReadBouncesFile
(
'doc/bounces'
)
for
name
,
value
in
config
.
items
(
'bounces'
):
bounces
.
add
(
value
)
_UpdateDefaults
(
parser
,
config
)
# These are the aliases we understand, indexed by alias. Each member is a list.
alias
=
{}
bounces
=
set
()
if
__name__
==
"__main__"
:
import
doctest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录