Skip to content

Commit

Permalink
merge: change branding for LEDE to OpenWrt
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Dec 12, 2017
1 parent 72c6b99 commit 7185e1c
Show file tree
Hide file tree
Showing 50 changed files with 111 additions and 120 deletions.
2 changes: 1 addition & 1 deletion Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See /LICENSE for more information.
#

mainmenu "LEDE Configuration"
mainmenu "OpenWrt Configuration"

config MODULES
option modules
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG TZ

empty:=
space:= $(empty) $(empty)
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the LEDE directory must not include any spaces))
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt directory must not include any spaces))

world:

Expand Down
6 changes: 3 additions & 3 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define Build/uImage
mkimage -A $(LINUX_KARCH) \
-O linux -T kernel \
-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION))' -d $@ $@.new
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION))' -d $@ $@.new
mv $@.new $@
endef

Expand Down Expand Up @@ -60,7 +60,7 @@ endef

define Build/netgear-dni
$(STAGING_DIR_HOST)/bin/mkdniimg \
-B $(NETGEAR_BOARD_ID) -v LEDE.$(REVISION) \
-B $(NETGEAR_BOARD_ID) -v OpenWrt.$(REVISION) \
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
-r "$(1)" \
-i $@ -o $@.new
Expand All @@ -83,7 +83,7 @@ define Build/append-uImage-fakeroot-hdr
rm -f $@.fakeroot
$(STAGING_DIR_HOST)/bin/mkimage \
-A $(LINUX_KARCH) -O linux -T filesystem -C none \
-n '$(call toupper,$(LINUX_KARCH)) LEDE fakeroot' \
-n '$(call toupper,$(LINUX_KARCH)) OpenWrt fakeroot' \
-s \
$@.fakeroot
cat $@.fakeroot >> $@
Expand Down
2 changes: 1 addition & 1 deletion include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endef

define Image/BuildKernel/MkuImage
mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \
-n '$(call toupper,$(ARCH)) LEDE Linux-$(LINUX_VERSION)' -d $(4) $(5)
-n '$(call toupper,$(ARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $(4) $(5)
endef

define Image/BuildKernel/MkFIT
Expand Down
2 changes: 1 addition & 1 deletion include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $(eval $(call TestHostCommand,working-make, \
$(MAKE) -v | grep -E 'Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)'))

$(eval $(call TestHostCommand,case-sensitive-fs, \
LEDE can only be built on a case-sensitive filesystem, \
OpenWrt can only be built on a case-sensitive filesystem, \
rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \
test ! -f $(TMP_DIR)/test.FS))

Expand Down
16 changes: 4 additions & 12 deletions include/version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
# REVISION:=x
# SOURCE_DATE_EPOCH:=x

RELEASE:=Reboot

PKG_CONFIG_DEPENDS += \
CONFIG_VERSION_BUG_URL \
CONFIG_VERSION_NUMBER \
CONFIG_VERSION_CODE \
CONFIG_VERSION_NICK \
CONFIG_VERSION_REPO \
CONFIG_VERSION_DIST \
CONFIG_VERSION_MANUFACTURER \
Expand All @@ -36,18 +33,15 @@ VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),SNAPSHOT)
VERSION_CODE:=$(call qstrip_escape,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))

VERSION_NICK:=$(call qstrip_escape,$(CONFIG_VERSION_NICK))
VERSION_NICK:=$(if $(VERSION_NICK),$(VERSION_NICK),$(RELEASE))

VERSION_REPO:=$(call qstrip_escape,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/releases/17.01.4)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/snapshots)

VERSION_DIST:=$(call qstrip_escape,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),LEDE)
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
VERSION_DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))

VERSION_MANUFACTURER:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER))
VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),LEDE)
VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),OpenWrt)

VERSION_MANUFACTURER_URL:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER_URL))
VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),http://lede-project.org/)
Expand Down Expand Up @@ -93,8 +87,6 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
-e 's,%v,\L$(subst $(space),_,$(VERSION_NUMBER)),g' \
-e 's,%C,$(VERSION_CODE),g' \
-e 's,%c,\L$(subst $(space),_,$(VERSION_CODE)),g' \
-e 's,%N,$(VERSION_NICK),g' \
-e 's,%n,\L$(subst $(space),_,$(VERSION_NICK)),g' \
-e 's,%D,$(VERSION_DIST),g' \
-e 's,%d,\L$(subst $(space),_,$(VERSION_DIST)),g' \
-e 's,%R,$(REVISION),g' \
Expand All @@ -109,4 +101,4 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
-e 's,%P,$(VERSION_PRODUCT),g' \
-e 's,%h,$(VERSION_HWREV),g'

VERSION_SED_SCRIPT:=$(subst '\'','\'\\\\\'\'',$(VERSION_SED))
VERSION_SED_SCRIPT:=$(subst '\'','\'\\\\\'\'',$(VERSION_SED))
2 changes: 1 addition & 1 deletion package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ define Package/base-files
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
TITLE:=Base filesystem for Lede
TITLE:=Base filesystem for OpenWrt
URL:=http://openwrt.org/
VERSION:=$(PKG_RELEASE)-$(REVISION)
endef
Expand Down
10 changes: 5 additions & 5 deletions package/base-files/files/bin/config_generate
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ generate_static_system() {
uci -q batch <<-EOF
delete system.@system[0]
add system system
set system.@system[-1].hostname='LEDE'
set system.@system[-1].hostname='OpenWrt'
set system.@system[-1].timezone='UTC'
set system.@system[-1].ttylogin='0'
set system.@system[-1].log_size='64'
Expand All @@ -236,10 +236,10 @@ generate_static_system() {
set system.ntp='timeserver'
set system.ntp.enabled='1'
set system.ntp.enable_server='0'
add_list system.ntp.server='0.lede.pool.ntp.org'
add_list system.ntp.server='1.lede.pool.ntp.org'
add_list system.ntp.server='2.lede.pool.ntp.org'
add_list system.ntp.server='3.lede.pool.ntp.org'
add_list system.ntp.server='0.openwrt.pool.ntp.org'
add_list system.ntp.server='1.openwrt.pool.ntp.org'
add_list system.ntp.server='2.openwrt.pool.ntp.org'
add_list system.ntp.server='3.openwrt.pool.ntp.org'
EOF

if json_is_a system object; then
Expand Down
18 changes: 8 additions & 10 deletions package/base-files/files/etc/banner
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / %N (%V, %C)
\________\/ -----------------------------------------------------------

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
%D %V, %C
-----------------------------------------------------
2 changes: 1 addition & 1 deletion package/base-files/files/etc/init.d/system
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USE_PROCD=1
validate_system_section()
{
uci_validate_section system system "${1}" \
'hostname:string:lede' \
'hostname:string:OpenWrt' \
'conloglevel:uinteger' \
'buffersize:uinteger' \
'timezone:string:UTC' \
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/files/lib/preinit/10_indicate_preinit
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ preinit_ip() {
preinit_config_board
fi

preinit_net_echo "Doing Lede Preinit\n"
preinit_net_echo "Doing OpenWrt Preinit\n"
}

preinit_ip_deconfig() {
Expand Down
8 changes: 4 additions & 4 deletions package/base-files/image-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if VERSIONOPT
config VERSION_DIST
string
prompt "Release distribution"
default "LEDE"
default "OpenWrt"
help
This is the name of the release distribution.
If unspecified, it defaults to OpenWrt.
Expand Down Expand Up @@ -201,13 +201,13 @@ if VERSIONOPT
%c .. Configured release revision code or value of %R, lowercase
%N .. Release name, uppercase
%n .. Release name, lowercase
%D .. Distribution name or "Lede", uppercase
%d .. Distribution name or "lede", lowercase
%D .. Distribution name or "OpenWrt", uppercase
%d .. Distribution name or "openwrt", lowercase
%T .. Target name
%S .. Target/Subtarget name
%A .. Package architecture
%t .. Build taint flags, e.g. "no-all busybox"
%M .. Manufacturer name or "Lede"
%M .. Manufacturer name or "OpenWrt"
%P .. Product name or "Generic"
%h .. Hardware revision or "v0"

Expand Down
2 changes: 1 addition & 1 deletion package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ detect_broadcom() {
set wireless.default_wl${i}.device=wl${i}
set wireless.default_wl${i}.network=lan
set wireless.default_wl${i}.mode=ap
set wireless.default_wl${i}.ssid=Lede${i#0}
set wireless.default_wl${i}.ssid=OpenWrt${i#0}
set wireless.default_wl${i}.encryption=none
EOF
uci -q commit wireless
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/mac80211/files/lib/wifi/mac80211.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ detect_mac80211() {
set wireless.default_radio${devidx}.device=radio${devidx}
set wireless.default_radio${devidx}.network=lan
set wireless.default_radio${devidx}.mode=ap
set wireless.default_radio${devidx}.ssid=LEDE
set wireless.default_radio${devidx}.ssid=OpenWrt
set wireless.default_radio${devidx}.encryption=none
EOF
uci -q commit wireless
Expand Down
4 changes: 2 additions & 2 deletions package/network/services/hostapd/files/hostapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ hostapd_set_bss_options() {
[ -n "$wps_possible" -a -n "$config_methods" ] && {
set_default ext_registrar 0
set_default wps_device_type "6-0050F204-1"
set_default wps_device_name "Lede AP"
set_default wps_manufacturer "www.lede-project.org"
set_default wps_device_name "OpenWrt AP"
set_default wps_manufacturer "www.openwrt.org"
set_default wps_independent 1

wps_state=2
Expand Down
2 changes: 1 addition & 1 deletion package/network/services/lldpd/files/lldpd.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config lldpd config
option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"

# if empty, the distribution description is sent
#option lldp_description "Lede System"
#option lldp_description "OpenWrt System"

# interfaces to listen on
list interface "loopback"
Expand Down
2 changes: 1 addition & 1 deletion package/network/services/lldpd/files/lldpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_release_info()
[ -z "$PRETTY_NAME" ] && [ -s /etc/openwrt_version ] && \
PRETTY_NAME="$(cat /etc/openwrt_version)"

echo "${PRETTY_NAME:-Unknown Lede release} @ $(cat /proc/sys/kernel/hostname)"
echo "${PRETTY_NAME:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)"
}

write_lldpd_conf()
Expand Down
4 changes: 2 additions & 2 deletions package/network/services/samba36/files/samba.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config samba
option 'name' 'Lede'
option 'name' 'OpenWrt'
option 'workgroup' 'WORKGROUP'
option 'description' 'Lede'
option 'description' 'OpenWrt'
option 'homes' '1'

6 changes: 3 additions & 3 deletions package/network/services/samba36/files/samba.init
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ smb_header() {
local name workgroup description charset
local hostname="$(uci_get system.@system[0].hostname)"

config_get name $1 name "${hostname:-Lede}"
config_get workgroup $1 workgroup "${hostname:-Lede}"
config_get description $1 description "Samba on ${hostname:-Lede}"
config_get name $1 name "${hostname:-OpenWrt}"
config_get workgroup $1 workgroup "${hostname:-OpenWrt}"
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
config_get charset $1 charset "UTF-8"

mkdir -p /var/etc
Expand Down
2 changes: 1 addition & 1 deletion package/network/services/uhttpd/files/uhttpd.config
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ config uhttpd main
option tcp_keepalive 1

# Basic auth realm, defaults to local hostname
# option realm Lede
# option realm OpenWrt

# Configuration file in busybox httpd format
# option config /etc/httpd.conf
Expand Down
2 changes: 1 addition & 1 deletion package/network/services/uhttpd/files/uhttpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ generate_keys() {
[ -n "$GENKEY_CMD" ] && {
$GENKEY_CMD \
-days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \
-subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/O="${commonname:-Lede}$UNIQUEID"/CN="${commonname:-Lede}"
-subj /C="${country:-ZZ}"/ST="${state:-Somewhere}"/L="${location:-Unknown}"/O="${commonname:-OpenWrt}$UNIQUEID"/CN="${commonname:-OpenWrt}"
sync
mv "${UHTTPD_KEY}.new" "${UHTTPD_KEY}"
mv "${UHTTPD_CERT}.new" "${UHTTPD_CERT}"
Expand Down
2 changes: 1 addition & 1 deletion package/network/utils/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ define Build/Configure
$(PKG_BUILD_DIR)/Makefile
$(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
$(PKG_BUILD_DIR)/Makefile
echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-lede\";" \
echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
endef

Expand Down
4 changes: 2 additions & 2 deletions package/utils/busybox/Config-defaults.in
Original file line number Diff line number Diff line change
Expand Up @@ -2332,10 +2332,10 @@ config BUSYBOX_DEFAULT_FEATURE_NETSTAT_PRG
config BUSYBOX_DEFAULT_NSLOOKUP
bool
default n
config BUSYBOX_DEFAULT_NSLOOKUP_LEDE
config BUSYBOX_DEFAULT_NSLOOKUP_OPENWRT
bool
default y
config BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
config BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
bool
default n
config BUSYBOX_DEFAULT_NTPD
Expand Down
12 changes: 6 additions & 6 deletions package/utils/busybox/config/networking/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -700,17 +700,17 @@ config BUSYBOX_CONFIG_NSLOOKUP
default BUSYBOX_DEFAULT_NSLOOKUP
help
nslookup is a tool to query Internet name servers.
config BUSYBOX_CONFIG_NSLOOKUP_LEDE
config BUSYBOX_CONFIG_NSLOOKUP_OPENWRT
bool "nslookup_lede"
depends on !BUSYBOX_CONFIG_NSLOOKUP
default BUSYBOX_DEFAULT_NSLOOKUP_LEDE
default BUSYBOX_DEFAULT_NSLOOKUP_OPENWRT
help
nslookup is a tool to query Internet name servers (LEDE flavor).
nslookup is a tool to query Internet name servers (OpenWrt flavor).

config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
bool "Enable long options"
default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
depends on BUSYBOX_CONFIG_NSLOOKUP_LEDE && BUSYBOX_CONFIG_LONG_OPTS
default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
depends on BUSYBOX_CONFIG_NSLOOKUP_OPENWRT && BUSYBOX_CONFIG_LONG_OPTS
help
Support long options for the nslookup applet.
config BUSYBOX_CONFIG_NTPD
Expand Down
16 changes: 8 additions & 8 deletions package/utils/busybox/patches/230-add_nslookup_lede.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+//config:config NSLOOKUP_LEDE
+//config: bool "nslookup_lede"
+//config:config NSLOOKUP_OPENWRT
+//config: bool "nslookup_openwrt"
+//config: depends on !NSLOOKUP
+//config: default y
+//config: help
+//config: nslookup is a tool to query Internet name servers (LEDE flavor).
+//config:
+//config:config FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
+//config:config FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
+//config: bool "Enable long options"
+//config: default y
+//config: depends on NSLOOKUP_LEDE && LONG_OPTS
+//config: depends on NSLOOKUP_OPENWRT && LONG_OPTS
+//config: help
+//config: Support long options for the nslookup applet.
+
+//applet:IF_NSLOOKUP_LEDE(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_NSLOOKUP_OPENWRT(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_NSLOOKUP_LEDE) += nslookup_lede.o
+//kbuild:lib-$(CONFIG_NSLOOKUP_OPENWRT) += nslookup_lede.o
+
+//usage:#define nslookup_lede_trivial_usage
+//usage: "[HOST] [SERVER]"
Expand Down Expand Up @@ -753,7 +753,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
+}
+
+
+#if ENABLE_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
+static const char nslookup_longopts[] ALIGN1 =
+ "type\0" Required_argument "q"
+ "querytype\0" Required_argument "q"
Expand All @@ -778,7 +778,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
+ unsigned int types = 0;
+ HEADER *header;
+
+#if ENABLE_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS
+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
+ applet_long_options = nslookup_longopts;
+#endif
+
Expand Down
Loading

0 comments on commit 7185e1c

Please sign in to comment.