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
Container Registry
Model registry
Operate
Environments
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
ffbs
ffbs-gluon
Commits
e993f222
Commit
e993f222
authored
4 years ago
by
Matthias Schiffer
Committed by
David Bauer
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
scripts/target_lib.lua: reorganize images into per-device lists
parent
8bc602b0
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
scripts/copy_output.lua
+12
-10
12 additions, 10 deletions
scripts/copy_output.lua
scripts/generate_manifest.lua
+5
-3
5 additions, 3 deletions
scripts/generate_manifest.lua
scripts/target_lib.lua
+3
-1
3 additions, 1 deletion
scripts/target_lib.lua
with
20 additions
and
14 deletions
scripts/copy_output.lua
+
12
−
10
View file @
e993f222
...
...
@@ -36,20 +36,22 @@ local function clean(image, name)
lib
.
exec
{
'rm'
,
'-f'
,
dir
..
'/'
..
file
}
end
for
_
,
image
in
ipairs
(
lib
.
images
)
do
clean
(
image
,
image
.
image
)
for
_
,
images
in
pairs
(
lib
.
images
)
do
for
_
,
image
in
ipairs
(
images
)
do
clean
(
image
,
image
.
image
)
local
destdir
,
destname
=
image
:
dest_name
(
image
.
image
)
local
source
=
string.format
(
'openwrt/bin/targets/%s/openwrt-%s-%s%s%s'
,
bindir
,
openwrt_target
,
image
.
name
,
image
.
in_suffix
,
image
.
extension
)
local
destdir
,
destname
=
image
:
dest_name
(
image
.
image
)
local
source
=
string.format
(
'openwrt/bin/targets/%s/openwrt-%s-%s%s%s'
,
bindir
,
openwrt_target
,
image
.
name
,
image
.
in_suffix
,
image
.
extension
)
lib
.
exec
{
'cp'
,
source
,
destdir
..
'/'
..
destname
}
lib
.
exec
{
'cp'
,
source
,
destdir
..
'/'
..
destname
}
for
_
,
alias
in
ipairs
(
image
.
aliases
)
do
clean
(
image
,
alias
)
for
_
,
alias
in
ipairs
(
image
.
aliases
)
do
clean
(
image
,
alias
)
local
_
,
aliasname
=
image
:
dest_name
(
alias
)
lib
.
exec
{
'ln'
,
'-s'
,
destname
,
destdir
..
'/'
..
aliasname
}
local
_
,
aliasname
=
image
:
dest_name
(
alias
)
lib
.
exec
{
'ln'
,
'-s'
,
destname
,
destdir
..
'/'
..
aliasname
}
end
end
end
...
...
This diff is collapsed.
Click to expand it.
scripts/generate_manifest.lua
+
5
−
3
View file @
e993f222
...
...
@@ -48,8 +48,10 @@ local function generate(image)
end
end
for
_
,
image
in
ipairs
(
lib
.
images
)
do
if
image
.
subdir
==
'sysupgrade'
then
generate
(
image
)
for
_
,
images
in
pairs
(
lib
.
images
)
do
for
_
,
image
in
ipairs
(
images
)
do
if
image
.
subdir
==
'sysupgrade'
then
generate
(
image
)
end
end
end
This diff is collapsed.
Click to expand it.
scripts/target_lib.lua
+
3
−
1
View file @
e993f222
...
...
@@ -143,7 +143,9 @@ local image_mt = {
}
local
function
add_image
(
image
)
table.insert
(
M
.
images
,
setmetatable
(
image
,
image_mt
))
local
device
=
image
.
image
M
.
images
[
device
]
=
M
.
images
[
device
]
or
{}
table.insert
(
M
.
images
[
device
],
setmetatable
(
image
,
image_mt
))
end
function
F
.
try_config
(
...
)
...
...
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