Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35456 )
Change subject: sconfig: Allow to link devices to other device' drivers ......................................................................
Patch Set 4:
(5 comments)
Thanks for reviving this!
https://review.coreboot.org/c/coreboot/+/35456/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35456/4//COMMIT_MSG@36 PS4, Line 36: defined in the base tree. Changing the alias feels wrong. But we can start with this behavior and amend it if it ever fails us (e.g. make it a list of aliases?).
Alternatively, we could resolve the references right before an override tree is applied or the tree is printed out in the end. This way, aliases would have some kind of file scope.
https://review.coreboot.org/c/coreboot/+/35456/4//COMMIT_MSG@38 PS4, Line 38: conflits confli*c*ts
https://review.coreboot.org/c/coreboot/+/35456/4/util/sconfig/main.c File util/sconfig/main.c:
https://review.coreboot.org/c/coreboot/+/35456/4/util/sconfig/main.c@862 PS4, Line 862: free(alias); This looks a bit odd now that we have a copy of the pointer in the `->ref` list. I would prefer to just drop the free() or clean the whole list up (which we know isn't necessary as sconfig is nearly done).
https://review.coreboot.org/c/coreboot/+/35456/4/util/sconfig/main.c@874 PS4, Line 874: if (!dev->chip_instance->ref) Nit, technicallly this repeats the loop condition.
https://review.coreboot.org/c/coreboot/+/35456/4/util/sconfig/main.c@1716 PS4, Line 1716: walk_device_tree(autogen, autohead, &base_root_dev, update_references); Could we just do it as part of pass0()? If not, is there a reason to interleave it with the printing, or could we do it above after applying the override tree?