mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Restructure src directory; add GPX utility
This commit is contained in:
parent
ce11cd8c1d
commit
7778bdd6e2
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/util/GPX.git"]
|
||||||
|
path = src/util/GPX.git
|
||||||
|
url = git://github.com/whpthomas/GPX.git
|
32
Makefile
32
Makefile
@ -70,9 +70,12 @@ endef
|
|||||||
# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the
|
# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the
|
||||||
# command to copy the binary file from its current location (in our case the build
|
# command to copy the binary file from its current location (in our case the build
|
||||||
# directory) to the install directory.
|
# directory) to the install directory.
|
||||||
|
|
||||||
|
AUTOWIFI_BASE_DIR := $(PKG_BUILD_DIR)/autowifi
|
||||||
|
GPX_BASE_DIR := $(PKG_BUILD_DIR)/util/GPX.git
|
||||||
|
|
||||||
define Package/wifibox/install
|
define Package/wifibox/install
|
||||||
|
### create required directories (autowifi)
|
||||||
### create required directories
|
|
||||||
|
|
||||||
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi
|
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi
|
||||||
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/admin
|
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/admin
|
||||||
@ -82,32 +85,35 @@ define Package/wifibox/install
|
|||||||
$(INSTALL_DIR) $(1)/etc/rc.d
|
$(INSTALL_DIR) $(1)/etc/rc.d
|
||||||
$(INSTALL_DIR) $(1)/www/cgi-bin
|
$(INSTALL_DIR) $(1)/www/cgi-bin
|
||||||
|
|
||||||
|
### create all files in /usr/share/lua/autowifi (autowifi)
|
||||||
|
|
||||||
### create all files in /usr/share/lua/autowifi
|
$(CP) $(AUTOWIFI_BASE_DIR)/*.lua $(1)/usr/share/lua/autowifi/
|
||||||
|
$(CP) $(AUTOWIFI_BASE_DIR)/admin/* $(1)/usr/share/lua/autowifi/admin/
|
||||||
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/*.lua $(1)/usr/share/lua/autowifi/
|
$(CP) $(AUTOWIFI_BASE_DIR)/ext/autowifi.js $(1)/usr/share/lua/autowifi/ext
|
||||||
$(CP) $(PKG_BUILD_DIR)/admin/* $(1)/usr/share/lua/autowifi/admin/
|
$(CP) $(AUTOWIFI_BASE_DIR)/ext/autowifi_init $(1)/usr/share/lua/autowifi/ext
|
||||||
|
$(CP) $(AUTOWIFI_BASE_DIR)/ext/wfcf $(1)/usr/share/lua/autowifi/ext
|
||||||
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/ext/autowifi.js $(1)/usr/share/lua/autowifi/ext
|
$(CP) $(AUTOWIFI_BASE_DIR)/ext/www/.autowifi-inplace $(1)/usr/share/lua/autowifi/ext/www
|
||||||
$(CP) $(PKG_BUILD_DIR)/ext/autowifi_init $(1)/usr/share/lua/autowifi/ext
|
$(CP) $(AUTOWIFI_BASE_DIR)/ext/www/index.html $(1)/usr/share/lua/autowifi/ext/www
|
||||||
$(CP) $(PKG_BUILD_DIR)/ext/wfcf $(1)/usr/share/lua/autowifi/ext
|
|
||||||
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/ext/www/.autowifi-inplace $(1)/usr/share/lua/autowifi/ext/www
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/ext/www/index.html $(1)/usr/share/lua/autowifi/ext/www
|
|
||||||
$(LN) -s /usr/share/lua/autowifi/admin $(1)/usr/share/lua/autowifi/ext/www
|
$(LN) -s /usr/share/lua/autowifi/admin $(1)/usr/share/lua/autowifi/ext/www
|
||||||
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/usr/share/lua/autowifi/ext/www/cgi-bin
|
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/usr/share/lua/autowifi/ext/www/cgi-bin
|
||||||
|
|
||||||
ifeq ($(CONFIG_WIFIBOX_DEVEL_PACKAGE),y)
|
ifeq ($(CONFIG_WIFIBOX_DEVEL_PACKAGE),y)
|
||||||
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/misc
|
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/misc
|
||||||
$(CP) $(PKG_BUILD_DIR)/misc/collect-code.sh $(1)/usr/share/lua/autowifi/misc/
|
$(CP) $(AUTOWIFI_BASE_DIR)/misc/collect-code.sh $(1)/usr/share/lua/autowifi/misc/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
### create links elsewhere in the system
|
### create links elsewhere in the system (autowifi)
|
||||||
|
|
||||||
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/www/cgi-bin
|
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/www/cgi-bin
|
||||||
$(LN) -s /usr/share/lua/autowifi/admin $(1)/www
|
$(LN) -s /usr/share/lua/autowifi/admin $(1)/www
|
||||||
$(LN) -s /usr/share/lua/autowifi/ext/autowifi_init $(1)/etc/rc.d/S18autowifi_init
|
$(LN) -s /usr/share/lua/autowifi/ext/autowifi_init $(1)/etc/rc.d/S18autowifi_init
|
||||||
|
|
||||||
|
### install gpx utility
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(GPX_BASE_DIR)/gpx $(1)/usr/bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/wifibox/postinst
|
define Package/wifibox/postinst
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
|
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
|
||||||
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)
|
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)
|
||||||
- see if updating works when a new version is 'released' (probably needs a real feed)
|
- see if updating works when a new version is 'released' (probably needs a real feed)
|
||||||
|
- add aliases to root profile only when debugging was requested in menuconfig
|
||||||
|
- symlinks created in the install section of the Makefile should perhaps be created in the postinstall script,
|
||||||
|
this way the package is truly relocatable
|
||||||
- add config option to compile sources using luac?
|
- add config option to compile sources using luac?
|
||||||
- add/link general OpenWrt build instructions for OSX to installation page on wiki.
|
- add/link general OpenWrt build instructions for OSX to installation page on wiki.
|
||||||
- remove usr/share/lua/autowifi and subdirectories (if empty) in postrm
|
- remove usr/share/lua/autowifi and subdirectories (if empty) in postrm
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
### This function makes sure the 'wlan' net is in the 'lan' zone
|
||||||
addFirewallNet() {
|
addFirewallNet() {
|
||||||
cfgChanged=0; zoneNum=-1; i=0
|
cfgChanged=0; zoneNum=-1; i=0
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ addFirewallNet() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### Replace the banner with a custom one
|
||||||
if [ ! -f /etc/banner.default ]; then
|
if [ ! -f /etc/banner.default ]; then
|
||||||
mv /etc/banner /etc/banner.default
|
mv /etc/banner /etc/banner.default
|
||||||
cat <<-'EOM' > /etc/banner
|
cat <<-'EOM' > /etc/banner
|
||||||
@ -46,6 +48,7 @@ if [ ! -f /etc/banner.default ]; then
|
|||||||
EOM
|
EOM
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Add some convenience functionality to root's profile
|
||||||
grep '^# DO NOT MODIFY.*wifibox package.$' /root/.profile >/dev/null 2>&1
|
grep '^# DO NOT MODIFY.*wifibox package.$' /root/.profile >/dev/null 2>&1
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
cat <<-EOM >> /root/.profile
|
cat <<-EOM >> /root/.profile
|
||||||
@ -56,6 +59,8 @@ if [ $? -eq 1 ]; then
|
|||||||
EOM
|
EOM
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Finally make sure basic configuration is set correctly
|
||||||
|
|
||||||
echo "Enabling wifi device..."
|
echo "Enabling wifi device..."
|
||||||
uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi
|
uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
|
GPX_PATH := util/GPX.git
|
||||||
|
|
||||||
|
.PHONY: $(GPX_PATH)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@echo "No compilation here...(dummy Makefile to keep buildroot happy)"
|
$(MAKE) -C $(GPX_PATH)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "No cleaning here... (dummy Makefile to keep buildroot happy)"
|
$(MAKE) -C $(GPX_PATH) clean
|
||||||
|
1
src/util/GPX.git
Submodule
1
src/util/GPX.git
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit bbca5831055e25fc312e5ff8b31f32771925bb9f
|
Loading…
Reference in New Issue
Block a user