Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darkbit
ffbs-gluon
Commits
d7e724ad
Unverified
Commit
d7e724ad
authored
5 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
target_lib: replace envtrue with more intuitive istrue helper
Signed-off-by:
Matthias Schiffer
<
mschiffer@universe-factory.net
>
parent
c9f3017a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.luacheckrc
+1
-1
1 addition, 1 deletion
.luacheckrc
scripts/target_lib.lua
+5
-6
5 additions, 6 deletions
scripts/target_lib.lua
targets/generic
+2
-2
2 additions, 2 deletions
targets/generic
with
8 additions
and
9 deletions
.luacheckrc
+
1
−
1
View file @
d7e724ad
...
...
@@ -89,13 +89,13 @@ files["targets/*"] = {
"defaults",
"device",
"env",
"envtrue",
"exec",
"exec_capture",
"exec_capture_raw",
"exec_raw",
"factory_image",
"include",
"istrue",
"no_opkg",
"packages",
"sysupgrade_image",
...
...
This diff is collapsed.
Click to expand it.
scripts/target_lib.lua
+
5
−
6
View file @
d7e724ad
...
...
@@ -15,11 +15,6 @@ local env = setmetatable({}, {
})
F
.
env
=
env
local
envtrue
=
setmetatable
({},
{
__index
=
function
(
_
,
k
)
return
(
tonumber
(
os.getenv
(
k
))
or
0
)
>
0
end
})
F
.
envtrue
=
envtrue
assert
(
env
.
GLUON_SITEDIR
)
assert
(
env
.
GLUON_TARGETSDIR
)
assert
(
env
.
GLUON_RELEASE
)
...
...
@@ -55,8 +50,12 @@ for dev in string.gmatch(env.GLUON_DEVICES or '', '%S+') do
unknown_devices
[
dev
]
=
true
end
function
F
.
istrue
(
v
)
return
(
tonumber
(
v
)
or
0
)
>
0
end
local
function
want_device
(
dev
,
options
)
if
options
.
broken
and
not
envtrue
.
BROKEN
then
if
options
.
broken
and
not
F
.
istrue
(
env
.
BROKEN
)
then
return
false
end
if
options
.
deprecated
and
env
.
GLUON_DEPRECATED
==
'0'
then
...
...
This diff is collapsed.
Click to expand it.
targets/generic
+
2
−
2
View file @
d7e724ad
...
...
@@ -47,11 +47,11 @@ config '# CONFIG_KERNEL_IPV6_MROUTE is not set'
try_config 'CONFIG_TARGET_MULTI_PROFILE=y'
try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y'
if
env
true.GLUON_MULTIDOMAIN then
if
is
true
(env
.GLUON_MULTIDOMAIN
)
then
config 'CONFIG_GLUON_MULTIDOMAIN=y'
end
if
env
true.GLUON_DEBUG then
if
is
true
(env
.GLUON_DEBUG
)
then
config 'CONFIG_DEBUG=y'
config 'CONFIG_NO_STRIP=y'
config '# CONFIG_USE_STRIP is not set'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment