gluon: (partial) add FLAG "GLUON_FOREIGN" to make the framework usable for other types of firmwares
ignored changes in MAkefile defining this FLAG (to "1") disables / skips some things * including gluon-core packages * strict inclusion of some packages * per device sepecific kernel build * a gluon specific target/generic_gluon will be considered
This commit is contained in:
parent
add560b18f
commit
a4e0b26470
@ -28,6 +28,9 @@ END_MAKE
|
||||
end
|
||||
|
||||
lib.include('generic')
|
||||
if env.FOREIGN_BUILD == '' then
|
||||
lib.include('generic_gluon')
|
||||
end
|
||||
for pkg in string.gmatch(extra_packages, '%S+') do
|
||||
lib.packages {pkg}
|
||||
end
|
||||
@ -72,10 +75,12 @@ END_MAKE
|
||||
handle_pkg(pkg)
|
||||
end
|
||||
|
||||
funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile),
|
||||
'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile)
|
||||
lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"',
|
||||
openwrt_config_target, profile, device_pkgs)
|
||||
if env.FOREIGN_BUILD == '' then
|
||||
funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile),
|
||||
'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile)
|
||||
lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"',
|
||||
openwrt_config_target, profile, device_pkgs)
|
||||
end
|
||||
end
|
||||
|
||||
return lib
|
||||
|
@ -1,22 +1,9 @@
|
||||
assert(env.GLUON_LANGS)
|
||||
|
||||
|
||||
config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR)
|
||||
config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE)
|
||||
try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '')
|
||||
|
||||
for lang in string.gmatch(env.GLUON_LANGS, '%S+') do
|
||||
try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang)
|
||||
end
|
||||
|
||||
config('CONFIG_TARGET_%s=y', env.BOARD)
|
||||
if env.SUBTARGET ~= '' then
|
||||
config('CONFIG_TARGET_%s_%s=y', env.BOARD, env.SUBTARGET)
|
||||
end
|
||||
|
||||
-- Disable non-default feeds in distfeeds.conf
|
||||
config('# CONFIG_FEED_gluon_base is not set')
|
||||
|
||||
local default_feeds = {}
|
||||
for feed in string.gmatch(exec_capture_raw('. scripts/default_feeds.sh && echo "$DEFAULT_FEEDS"'), '%S+') do
|
||||
default_feeds[feed] = true
|
||||
@ -28,29 +15,6 @@ for feed in string.gmatch(exec_capture_raw('. scripts/modules.sh && echo -n "$FE
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set'
|
||||
|
||||
config 'CONFIG_ALL_NONSHARED=y'
|
||||
|
||||
config '# CONFIG_PACKAGE_usbip is not set' -- fails to build
|
||||
config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build
|
||||
|
||||
config 'CONFIG_BUSYBOX_CUSTOM=y'
|
||||
config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set'
|
||||
|
||||
config 'CONFIG_PACKAGE_ATH_DEBUG=y'
|
||||
|
||||
config '# CONFIG_KERNEL_IP_MROUTE is not set'
|
||||
config '# CONFIG_KERNEL_IPV6_MROUTE is not set'
|
||||
|
||||
try_config 'CONFIG_TARGET_MULTI_PROFILE=y'
|
||||
try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y'
|
||||
|
||||
if envtrue.GLUON_MULTIDOMAIN then
|
||||
config 'CONFIG_GLUON_MULTIDOMAIN=y'
|
||||
end
|
||||
|
||||
if envtrue.GLUON_DEBUG then
|
||||
config 'CONFIG_DEBUG=y'
|
||||
config 'CONFIG_NO_STRIP=y'
|
||||
@ -59,14 +23,3 @@ if envtrue.GLUON_DEBUG then
|
||||
|
||||
try_config 'CONFIG_TARGET_ROOTFS_PARTSIZE=500'
|
||||
end
|
||||
|
||||
|
||||
packages {
|
||||
'-odhcpd-ipv6only',
|
||||
'-ppp',
|
||||
'-ppp-mod-pppoe',
|
||||
'-wpad-mini',
|
||||
'-wpad-basic',
|
||||
'gluon-core',
|
||||
'ip6tables',
|
||||
}
|
||||
|
45
targets/generic_gluon
Normal file
45
targets/generic_gluon
Normal file
@ -0,0 +1,45 @@
|
||||
assert(env.GLUON_LANGS)
|
||||
|
||||
config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR)
|
||||
config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE)
|
||||
try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '')
|
||||
|
||||
for lang in string.gmatch(env.GLUON_LANGS, '%S+') do
|
||||
try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang)
|
||||
end
|
||||
|
||||
-- Disable non-default feeds in distfeeds.conf
|
||||
config('# CONFIG_FEED_gluon_base is not set')
|
||||
|
||||
config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set'
|
||||
|
||||
config 'CONFIG_ALL_NONSHARED=y'
|
||||
|
||||
config '# CONFIG_PACKAGE_usbip is not set' -- fails to build
|
||||
config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build
|
||||
|
||||
config 'CONFIG_BUSYBOX_CUSTOM=y'
|
||||
config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set'
|
||||
|
||||
config 'CONFIG_PACKAGE_ATH_DEBUG=y'
|
||||
|
||||
config '# CONFIG_KERNEL_IP_MROUTE is not set'
|
||||
config '# CONFIG_KERNEL_IPV6_MROUTE is not set'
|
||||
|
||||
try_config 'CONFIG_TARGET_MULTI_PROFILE=y'
|
||||
try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y'
|
||||
|
||||
if envtrue.GLUON_MULTIDOMAIN then
|
||||
config 'CONFIG_GLUON_MULTIDOMAIN=y'
|
||||
end
|
||||
|
||||
|
||||
packages {
|
||||
'-odhcpd-ipv6only',
|
||||
'-ppp',
|
||||
'-ppp-mod-pppoe',
|
||||
'-wpad-mini',
|
||||
'-wpad-basic',
|
||||
'gluon-core',
|
||||
'ip6tables',
|
||||
}
|
Loading…
Reference in New Issue
Block a user