Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ffbs
gluon
Commits
1b520c68
Commit
1b520c68
authored
10 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
Use site_config loader from gluon packages
parent
78dc6543
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+2
-3
2 additions, 3 deletions
Makefile
include/gluon.mk
+2
-1
2 additions, 1 deletion
include/gluon.mk
scripts/load_site.lua
+0
-7
0 additions, 7 deletions
scripts/load_site.lua
scripts/site.sh
+4
-1
4 additions, 1 deletion
scripts/site.sh
with
8 additions
and
12 deletions
Makefile
+
2
−
3
View file @
1b520c68
...
...
@@ -240,10 +240,9 @@ prepare-image: FORCE
cp
$(
KERNEL_BUILD_DIR
)
/vmlinux
$(
KERNEL_BUILD_DIR
)
/vmlinux.elf
$(
BOARD_KDIR
)
/
+
$(
SUBMAKE
)
-C
$(
TOPDIR
)
/target/linux/
$(
BOARD
)
/image
-f
$(
GLUONDIR
)
/include/Makefile.image prepare
KDIR
=
"
$(
BOARD_KDIR
)
"
CheckSite
:=
$(
STAGING_DIR_HOST
)
/bin/lua
$(
GLUONDIR
)
/scripts/load_site.lua
||
(
echo
'Your site configuration did not pass validation.'
;
false
)
prepare
:
FORCE
@$(
CheckSite
)
@$(
STAGING_DIR_HOST
)
/bin/lua
$(
GLUONDIR
)
/packages/gluon/gluon/gluon-core/files/usr/lib/lua/gluon/site_config.lua
\
||
(
echo
'Your site configuration did not pass validation.'
;
false
)
mkdir
-p
$(GLUON_IMAGEDIR)
$(BOARD_BUILDDIR)
echo 'src packages file
:
../openwrt/bin/$(BOARD)/packages' > $(BOARD_BUILDDIR)/opkg.conf
...
...
This diff is collapsed.
Click to expand it.
include/gluon.mk
+
2
−
1
View file @
1b520c68
...
...
@@ -3,6 +3,7 @@ __gluon_inc=1
GLUON_ORIGOPENWRTDIR
:=
$(
GLUONDIR
)
/openwrt
GLUON_SITEDIR
:=
$(
GLUONDIR
)
/site
GLUON_SITE_CONFIG
:=
$(
GLUON_SITEDIR
)
/site.conf
GLUON_IMAGEDIR
?=
$(
GLUONDIR
)
/images
GLUON_BUILDDIR
?=
$(
GLUONDIR
)
/build
...
...
@@ -12,7 +13,7 @@ GLUON_OPENWRTDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET)/openwrt
BOARD_BUILDDIR
=
$(
GLUON_BUILDDIR
)
/
$(
BOARD
)$(
if
$(
SUBTARGET
)
,-
$(
SUBTARGET
))
BOARD_KDIR
=
$(
BOARD_BUILDDIR
)
/kernel
export
GLUONDIR
GLUON_SITEDIR
GLUON_IMAGEDIR
GLUON_OPENWRTDIR
GLUON_BUILDDIR
export
GLUONDIR
GLUON_SITEDIR
GLUON_SITE_CONFIG
GLUON_IMAGEDIR
GLUON_OPENWRTDIR
GLUON_BUILDDIR
$(GLUON_SITEDIR)/site.mk
:
$(
error There was no site configuration found. Please check out a site configuration to
$(
GLUON_SITEDIR
))
...
...
This diff is collapsed.
Click to expand it.
scripts/load_site.lua
deleted
100644 → 0
+
0
−
7
View file @
78dc6543
local
function
loader
()
coroutine.yield
(
'return '
)
coroutine.yield
(
io.open
(
os.getenv
(
'GLUONDIR'
)
..
'/site/site.conf'
):
read
(
'*a'
))
end
-- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
config
=
setfenv
(
assert
(
load
(
coroutine.wrap
(
loader
),
'site.conf'
)),
{})()
This diff is collapsed.
Click to expand it.
scripts/site.sh
+
4
−
1
View file @
1b520c68
#!/bin/sh
export
GLUONDIR
=
"
$(
dirname
"
$0
"
)
/.."
export
GLUON_SITE_CONFIG
=
"
$GLUONDIR
/site/site.conf"
"
$GLUONDIR
"
/openwrt/staging_dir/host/bin/lua
-e
"dofile(os.getenv('GLUONDIR') .. '/scripts/load_site.lua') print(assert(config.
$1
))"
2>/dev/null
SITE_CONFIG_LUA
=
packages/gluon/gluon/gluon-core/files/usr/lib/lua/gluon/site_config.lua
"
$GLUONDIR
"
/openwrt/staging_dir/host/bin/lua
-e
"print(assert(dofile(os.getenv('GLUONDIR') .. '/
${
SITE_CONFIG_LUA
}
').
$1
))"
2>/dev/null
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