@@ -140,21 +140,21 @@ autogen_hjson_rust_header = rule(
140140 } | stamp_attr (- 1 , "//rules:stamp_flag" ),
141141)
142142
143- def _chip_info_src (ctx ):
143+ def _build_info_src (ctx ):
144144 stamp_args = []
145145 stamp_files = []
146146 if stamping_enabled (ctx ):
147147 stamp_files = [ctx .version_file ]
148148 stamp_args .append ("--ot_version_file" )
149149 stamp_args .append (ctx .version_file .path )
150150 else :
151- print ("NOTE: stamping is disabled, the chip_info section will use a fixed version string" )
151+ print ("NOTE: stamping is disabled, the build_info section will use a fixed version string" )
152152 stamp_args .append ("--default_version" )
153153
154154 # The script expects a 20-character long hash: "OpenTitanOpenTitanOT"
155155 stamp_args .append ("4f70656e546974616e4f70656e546974616e4f54" )
156156
157- out_source = ctx .actions .declare_file ("chip_info .c" )
157+ out_source = ctx .actions .declare_file ("build_info .c" )
158158 ctx .actions .run (
159159 outputs = [
160160 out_source ,
@@ -173,32 +173,32 @@ def _chip_info_src(ctx):
173173 DefaultInfo (files = depset ([out_source ])),
174174 ]
175175
176- autogen_chip_info_src = rule (
177- implementation = _chip_info_src ,
176+ autogen_build_info_src = rule (
177+ implementation = _build_info_src ,
178178 attrs = {
179179 "_tool" : attr .label (
180- default = "//util:rom_chip_info " ,
180+ default = "//util:build_info " ,
181181 executable = True ,
182182 cfg = "exec" ,
183183 ),
184184 } | stamp_attr (- 1 , "//rules:stamp_flag" ),
185185)
186186
187- def autogen_chip_info (name ):
188- """Generates a cc_library named `name` that defines chip info ."""
187+ def autogen_build_info (name ):
188+ """Generates a cc_library named `name` that defines the build ID ."""
189189
190- # Generate a C source file that defines the chip info struct. This is an
190+ # Generate a C source file that defines the build ID struct. This is an
191191 # implementation detail and should not be depended on externally.
192- chip_info_src_target = name + "_gen_src"
193- autogen_chip_info_src (name = chip_info_src_target )
192+ build_info_src_target = name + "_gen_src"
193+ autogen_build_info_src (name = build_info_src_target )
194194
195195 # Package up the generated source file with its corresponding header file
196- # and dependencies. Any target that wants access to the chip info should
196+ # and dependencies. Any target that wants access to the build ID should
197197 # depend on this.
198198 native .cc_library (
199199 name = name ,
200- srcs = [chip_info_src_target ],
201- hdrs = ["//sw/device/silicon_creator/lib:chip_info .h" ],
200+ srcs = [build_info_src_target ],
201+ hdrs = ["//sw/device/silicon_creator/lib:build_info .h" ],
202202 deps = [
203203 "//sw/device/lib/base:macros" ,
204204 ],
0 commit comments