Skip to content
Snippets Groups Projects
Commit ab10be9f authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

We're on Chaos Calmer now

parent 63165e80
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 86 deletions
......@@ -212,7 +212,7 @@ config: FORCE
echo 'CONFIG_BUILD_SUFFIX="gluon-$(GLUON_TARGET)"'; \
echo '$(patsubst %,CONFIG_PACKAGE_%=m,$(sort $(filter-out -%,$(GLUON_DEFAULT_PACKAGES) $(GLUON_SITE_PACKAGES) $(PROFILE_PACKAGES))))' \
| sed -e 's/ /\n/g'; \
echo '$(patsubst %,CONFIG_GLUON_LANG_%=y,$(GLUON_LANGS))' \
echo '$(patsubst %,CONFIG_LUCI_LANG_%=y,$(GLUON_LANGS))' \
| sed -e 's/ /\n/g'; \
) > $(BOARD_BUILDDIR)/config.tmp
scripts/config/conf --defconfig=$(BOARD_BUILDDIR)/config.tmp Config.in
......@@ -281,8 +281,11 @@ packages: $(package/stamp-compile)
prepare-image: FORCE
rm -rf $(BOARD_KDIR)
mkdir -p $(BOARD_KDIR)
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)"
$(foreach k, vmlinux vmlinux.elf \
$(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out dtbs,$(KERNELNAME))), \
$(CP) $(KERNEL_BUILD_DIR)/$(k) $(BOARD_KDIR)/$(k); \
)
+$(SUBMAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image image_prepare KDIR="$(BOARD_KDIR)"
prepare: FORCE
@$(STAGING_DIR_HOST)/bin/lua $(GLUONDIR)/package/gluon-core/files/usr/lib/lua/gluon/site_config.lua \
......@@ -346,7 +349,7 @@ $(eval $(call merge-lists,INSTALL_PACKAGES,DEFAULT_PACKAGES GLUON_DEFAULT_PACKAG
package_install: FORCE
$(OPKG) update
$(OPKG) install $(PACKAGE_DIR)/libc_*.ipk
$(OPKG) install $(PACKAGE_DIR)/base-files_*.ipk $(PACKAGE_DIR)/libc_*.ipk
$(OPKG) install $(PACKAGE_DIR)/kernel_*.ipk
$(OPKG) install $(INSTALL_PACKAGES)
......@@ -354,6 +357,10 @@ package_install: FORCE
rm -f $(TARGET_DIR)/usr/lib/opkg/lists/* $(TARGET_DIR)/tmp/opkg.lock
# Remove opkg database when opkg is not intalled
if [ ! -x $(TARGET_DIR)/bin/opkg ]; then rm -rf $(TARGET_DIR)/usr/lib/opkg; fi
ifeq ($(GLUON_OPKG_CONFIG),1)
include $(INCLUDE_DIR)/version.mk
endif
......
......@@ -80,9 +80,9 @@ instead).
Adding support for new languages
--------------------------------
A list of all languages supported by LuCI can be found in the ``include/package.mk`` file of
the Gluon repository. Adding translations for these languages is straightforward using the ``msginit``
command.
A list of all languages supported by LuCI can be found in the ``packages/luci/luci.mk`` file after
Gluon's dependencies have been downloaded using ``make update``. Adding translations for these
languages is straightforward using the ``msginit`` command.
For other languages, support must be added tu LuCI first, which constitutes completely translating
the ``base.pot``. Please contact the upstream LuCI maintainers if you'd like to do this.
override define BuildImage
prepare: FORCE
$(call Image/Prepare)
endef
# The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/image/Makefile
include Makefile
......@@ -7,8 +7,7 @@ override define Kernel/Configure
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(BOARD_BUILDDIR)/config-allmods > $(LINUX_DIR)/.config.override
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(BOARD_BUILDDIR)/config-allmods $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
$(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
$(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules
......
......@@ -19,4 +19,4 @@ CONFIG_ATH_USER_REGD=y
CONFIG_PACKAGE_ATH_DEBUG=y
CONFIG_ATH10K_CT_COMMUNITY_FW=y
CONFIG_PACKAGE_luci-base_srcdiet=y
CONFIG_LUCI_SRCDIET=y
......@@ -35,7 +35,7 @@ export GLUON_LANGS
ifeq ($(OPENWRT_BUILD),1)
ifeq ($(GLUON_TOOLS),1)
CONFIG_VERSION_REPO := $(shell $(GLUONDIR)/scripts/site.sh opkg_repo || echo http://downloads.openwrt.org/barrier_breaker/14.07/%S/packages)
CONFIG_VERSION_REPO := $(shell $(GLUONDIR)/scripts/site.sh opkg_repo || echo http://downloads.openwrt.org/chaos_calmer/15.05-rc1/%S/packages)
export CONFIG_VERSION_REPO
GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
......@@ -65,7 +65,7 @@ GLUON_TARGET_$$(gluon_target)_BOARD := $(1)
GLUON_TARGET_$$(gluon_target)_SUBTARGET := $(2)
endef
GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools
GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools -wpad-mini hostapd-mini
override DEFAULT_PACKAGES.router :=
......
......@@ -7,45 +7,20 @@ $(shell cat $(1) | sed -ne '1h; 1!H; $$ {g; s/@/+@/g; s/\n/-@/g; p}')
END__GLUON__CHECK__SITE
endef
# Languages supported by LuCi
GLUON_SUPPORTED_LANGS := ca zh_cn en fr de el he hu it ja ms no pl pt_br pt ro ru es sv uk vi
GLUON_LANG_ca := catalan
GLUON_LANG_zh_cn := chinese
GLUON_LANG_en := english
GLUON_LANG_fr := french
GLUON_LANG_de := german
GLUON_LANG_el := greek
GLUON_LANG_he := hebrew
GLUON_LANG_hu := hungarian
GLUON_LANG_it := italian
GLUON_LANG_ja := japanese
GLUON_LANG_ms := malay
GLUON_LANG_no := norwegian
GLUON_LANG_pl := polish
GLUON_LANG_pt_br := portuguese-brazilian
GLUON_LANG_pt := portuguese
GLUON_LANG_ro := romanian
GLUON_LANG_ru := russian
GLUON_LANG_es := spanish
GLUON_LANG_sv := swedish
GLUON_LANG_uk := ukrainian
GLUON_LANG_vi := vietnamese
GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+GLUON_LANG_$(lang):luci-i18n-$(GLUON_LANG_$(lang)))
GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_GLUON_LANG_$(lang))
GLUON_ENABLED_LANGS := $(foreach lang,$(GLUON_SUPPORTED_LANGS),$(if $(CONFIG_GLUON_LANG_$(lang)),$(lang)))
GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+LUCI_LANG_$(lang):luci-i18n-base-$(lang))
GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_LUCI_LANG_$(lang))
GLUON_ENABLED_LANGS := $(foreach lang,$(GLUON_SUPPORTED_LANGS),$(if $(CONFIG_LUCI_LANG_$(lang)),$(lang)))
GLUON_PO2LMO := $(BUILD_DIR)/luci/build/po2lmo
define GluonBuildI18N
mkdir -p $$(PKG_BUILD_DIR)/i18n
for lang in $$(GLUON_ENABLED_LANGS); do \
if [ -e $(2)/$$$$lang.po ]; then \
rm -f $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \
$(GLUON_PO2LMO) $(2)/$$$$lang.po $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \
po2lmo $(2)/$$$$lang.po $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \
fi; \
done
endef
......
GLUON_FEEDS='openwrt gluon routing luci'
OPENWRT_REPO=git://git.openwrt.org/14.07/openwrt.git
OPENWRT_COMMIT=179bab8b1700d74b28cc6cd25322f9a1ad670107
OPENWRT_REPO=git://git.openwrt.org/openwrt.git
OPENWRT_COMMIT=53a178af743eb1a463c806ee79d1e622969ad6ef
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
PACKAGES_OPENWRT_COMMIT=01fcd1f29174a56d6ddb59901ed8c67ea42c3a8f
PACKAGES_OPENWRT_BRANCH=for-14.07
PACKAGES_OPENWRT_COMMIT=914beae80e848c161214464fba7a9826c66bbf26
PACKAGES_OPENWRT_BRANCH=for-15.05
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=e8ee21d116a0abc2e328b0ee181d79845654582e
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=5d4ad63897b435d5df0f39a49bd58962c22c33b8
PACKAGES_ROUTING_BRANCH=for-14.07
PACKAGES_ROUTING_COMMIT=b1c3bdfbf47003088198bf8ef699a94cc29e3eca
PACKAGES_ROUTING_BRANCH=for-15.05
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
PACKAGES_LUCI_COMMIT=f81be49ae756dab82e1758a6c9de145f0d36960e
PACKAGES_LUCI_COMMIT=7a54785ea616df1e72f20b9cad2f1a6b3097f7b5
PACKAGES_LUCI_BRANCH=for-15.05
......@@ -2,12 +2,12 @@
module('gluon.announce', package.seeall)
fs = require 'luci.fs'
fs = require 'nixio.fs'
uci = require('luci.model.uci').cursor()
util = require 'luci.util'
local function collect_entry(entry)
if fs.isdirectory(entry) then
if fs.stat(entry, 'type') == 'dir' then
return collect_dir(entry)
else
return setfenv(loadfile(entry), _M)()
......@@ -17,7 +17,7 @@ end
function collect_dir(dir)
local ret = {}
for _, entry in ipairs(fs.dir(dir)) do
for entry in fs.dir(dir) do
if entry:sub(1, 1) ~= '.' then
local ok, val = pcall(collect_entry, dir .. '/' .. entry)
if ok then
......
......@@ -49,10 +49,11 @@ function action_reboot()
uci:commit("gluon-setup-mode")
if nixio.fork() ~= 0 then
local fs = require "luci.fs"
local fs = require "nixio.fs"
local util = require "nixio.util"
local parts_dir = "/lib/gluon/config-mode/reboot/"
local files = fs.dir(parts_dir)
local files = util.consume(fs.dir(parts_dir))
table.sort(files)
......
local wizard_dir = "/lib/gluon/config-mode/wizard/"
local i18n = luci.i18n
local uci = luci.model.uci.cursor()
local fs = require "luci.fs"
local fs = require "nixio.fs"
local util = require "nixio.util"
local f, s
local wizard = {}
local files = fs.dir(wizard_dir)
local files = util.consume(fs.dir(wizard_dir))
table.sort(files)
......
......@@ -12,21 +12,7 @@ define Package/gluon-core
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Base files of Gluon
DEPENDS:=+gluon-site +lua-platform-info +luci-lib-nixio +odhcp6c +firewall
endef
define LangConfig
config GLUON_LANG_$(1)
bool "$(GLUON_LANG_$(1)) language support"
depends on PACKAGE_gluon-core
default n
endef
define Package/gluon-core/config
$(foreach lang,$(GLUON_SUPPORTED_LANGS),$(call LangConfig,$(lang)))
DEPENDS:=+gluon-site +lua-platform-info +luci-base +odhcp6c +firewall
endef
......
#!/usr/bin/lua
local fs = require 'luci.fs'
local fs = require 'nixio.fs'
local sysconfig = require 'gluon.sysconfig'
if fs.isfile('/lib/gluon/version/core') and not sysconfig.gluon_version then
if fs.stat('/lib/gluon/version/core') and not sysconfig.gluon_version then
-- This isn't an initial upgrade, so set gluon_version
sysconfig.gluon_version = ''
end
......@@ -10,7 +10,7 @@ end
local platform = require 'gluon.platform'
local fs = require 'luci.fs'
local fs = require 'nixio.fs'
local util = require 'luci.util'
......
......@@ -2,7 +2,7 @@
local sysconfig = require 'gluon.sysconfig'
local fs = require 'luci.fs'
local fs = require 'nixio.fs'
local util = require 'luci.util'
......
<%-
local fs = require 'luci.fs'
local fs = require 'nixio.fs'
local uci = require('luci.model.uci').cursor()
local util = require 'luci.util'
local i18n = require 'luci.i18n'
......
......@@ -20,7 +20,6 @@ $Id$
local hostname = sys.hostname()
local release = fs.readfile("/lib/gluon/release")
local load1, load5, load15 = sys.loadavg()
local request = disp.context.path
local request2 = disp.context.request
......
......@@ -11,7 +11,7 @@ define Package/gluon-mesh-batman-adv-core
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Support for batman-adv meshing (core)
DEPENDS:=+gluon-core +firewall +kmod-ipt-nathelper +libiwinfo-lua
DEPENDS:=+gluon-core +firewall +libiwinfo-lua
endef
define Build/Prepare
......
......@@ -5,7 +5,7 @@ PKG_VERSION:=$(if $(GLUON_SITE_CODE),$(GLUON_SITE_CODE),1)
PKG_RELEASE:=$(GLUON_RELEASE)
PKG_FILE_DEPENDS := $(GLUON_SITEDIR)/
PKG_BUILD_DEPENDS := luci
PKG_BUILD_DEPENDS := luci-base/host
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
......
#!/usr/bin/lua
local util = require("luci.util")
local fs = require("luci.fs")
local fs = require("nixio.fs")
local ltn12 = require 'luci.ltn12'
local sys = require("luci.sys")
local json = require("luci.json")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment