Page MenuHomeFreeBSD

Add the possibility to use another DTC
ClosedPublic

Authored by manu on Feb 13 2017, 9:10 PM.
Tags
Referenced Files
Unknown Object (File)
Sat, Mar 23, 1:08 AM
Unknown Object (File)
Dec 20 2023, 4:57 AM
Unknown Object (File)
Nov 12 2023, 3:57 PM
Unknown Object (File)
Oct 19 2023, 9:18 PM
Unknown Object (File)
Oct 19 2023, 8:40 PM
Unknown Object (File)
Oct 19 2023, 5:49 PM
Unknown Object (File)
Oct 19 2023, 10:31 AM
Unknown Object (File)
Aug 24 2023, 8:49 AM
Subscribers

Details

Summary

Add the possibility to use another DTC

Add a make.conf DTC variable that control which DTC (Device Tree Compiler) to use.

Test Plan

Compile kernel for ARM which uses DTC.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7422
Build 7585: arc lint + arc unit

Event Timeline

manu retitled this revision from to Add the possibility to use another DTC.
manu updated this object.
manu edited the test plan for this revision. (Show Details)
manu added reviewers: imp, bdrewery, ARM.
manu set the repository for this revision to rS FreeBSD src repository - subversion.
manu added a project: ARM.
sys/conf/kmod.mk
67

Don't we need a .export here to pass the value to the subshell that does the compile?

bdrewery edited edge metadata.
bdrewery added inline comments.
sys/conf/kmod.mk
67

Yup, and please use "dtc" as the script had, not "/usr/bin/dtc". Otherwise we won't be calling one in the build tools directory, if we built one. Even if we don't do that now, it's better practice to support build tools directories being set via PATH.

sys/tools/fdt/make_dtb.sh
9

I recommend adding a default DTC variable here in case none is sent from environment. This is done for MACHINE on line 15 as well but is simpler:

: ${DTC:=dtc}

This will set DTC to dtc if no value is set yet.

This revision now requires changes to proceed.Feb 13 2017, 10:36 PM
sys/conf/kmod.mk
67

I hadn't checked yet, but we do build dtc as a build tool in bootstrap-tools. So we definitely don't want "/usr/bin/" here. That would make the manpage inaccurate too.

Yeah I definitely doesn't work for me as is (also I'm sure it did when I created this review but I must have had some local mods).
I can't seems to be able to use .export, are .export variabled really exported for subshell ? Where is this documented ?

manu edited edge metadata.
manu removed rS FreeBSD src repository - subversion as the repository for this revision.

Export the DTC variable in bsd.dtb.mk and correct man page.

wblock added inline comments.
share/man/man5/make.conf.5
27

Please remember to bump .Dd.

bdrewery edited edge metadata.
bdrewery added inline comments.
sys/tools/fdt/make_dtb.sh
19–21

This is redundant, you don't need the if and fi lines, just the middle ':' line is enough here, or make the middle line DTC=dtc.

This revision now requires changes to proceed.Feb 17 2017, 7:59 PM
manu edited edge metadata.

Update based on comment from from bdrewery@ and wblock@

manu marked 2 inline comments as done.Feb 23 2017, 5:05 AM

Looks like all of Bryan's feedback has been answered, and that answers the questions I had.

This revision now requires changes to proceed.Jun 17 2017, 11:11 PM
This revision is now accepted and ready to land.Jun 17 2017, 11:29 PM
This revision was automatically updated to reflect the committed changes.
head/share/man/man5/make.conf.5
27 ↗(On Diff #29762)

Please bump this date.

183 ↗(On Diff #29762)

This should be

is initially set to the value of
.Dq Li dtc .