Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lede-project/source
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Apr 23, 2018
1 parent 4e26d13 commit 8fe0636
Show file tree
Hide file tree
Showing 2,226 changed files with 120,926 additions and 168,930 deletions.
5,378 changes: 0 additions & 5,378 deletions 4m.config

This file was deleted.

2 changes: 1 addition & 1 deletion config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ menu "Global build settings"
default n

config BUILD_PATENTED
default y
default n
bool "Compile with support for patented functionality"
help
When this option is disabled, software which provides patented functionality
Expand Down
9 changes: 5 additions & 4 deletions config/Config-devel.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ menuconfig DEVEL
In this instance, the --reference option of git clone will
be used thus creating a quick local clone of your repo.

config KERNEL_GIT_BRANCH
string "Enter git branch to clone" if DEVEL
config KERNEL_GIT_REF
string "Enter git ref at which to checkout" if DEVEL
depends on (KERNEL_GIT_CLONE_URI != "")
default ""
help
Enter the branch name to checkout after cloning the git repository.
In this instance, the --branch option of git clone will be used.
Enter the git ref at which to checkout the git repository
after it is cloned, and before making it a tar-ball.
It can be a git hash or a branch name.
If unused, the clone's repository HEAD will be checked-out.

config BUILD_LOG
Expand Down
57 changes: 24 additions & 33 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ menu "Target Images"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx
default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS
help
Expand Down Expand Up @@ -53,6 +52,13 @@ menu "Target Images"
help
Kernel uses specified external cpio as INITRAMFS_SOURCE.

config TARGET_INITRAMFS_FORCE
bool "Force"
depends on TARGET_ROOTFS_INITRAMFS
default n
help
Ignore the initramfs passed by the bootloader.

comment "Root filesystem archives"

config TARGET_ROOTFS_CPIOGZ
Expand All @@ -63,15 +69,15 @@ menu "Target Images"

config TARGET_ROOTFS_TARGZ
bool "tar.gz"
default n
default n if USES_TARGZ
help
Build a compressed tar archive of the root filesystem.

comment "Root filesystem images"

menuconfig TARGET_ROOTFS_EXT4FS
bool "ext4"
default n
default n if USES_EXT4
help
Build an ext4 root filesystem.

Expand Down Expand Up @@ -116,7 +122,7 @@ menu "Target Images"
config TARGET_ROOTFS_ISO
bool "iso"
default n
depends on TARGET_x86
depends on TARGET_x86_generic
help
Create a bootable ISO image.

Expand All @@ -143,7 +149,7 @@ menu "Target Images"
int "Block size (in KiB)"
depends on TARGET_ROOTFS_SQUASHFS
default 64 if LOW_MEMORY_FOOTPRINT
default 1024
default 256

menuconfig TARGET_ROOTFS_UBIFS
bool "ubifs"
Expand Down Expand Up @@ -186,30 +192,22 @@ menu "Target Images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
default y

config EFI_IMAGES
bool "Build EFI GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
select PACKAGE_grub2-efi
default n

config GRUB_CONSOLE
bool "Use Console Terminal (in addition to Serial)"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
default y

config GRUB_SERIAL
string "Serial port device"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default "hvc0" if TARGET_x86_xen_domu
default "ttyS0" if ! TARGET_x86_xen_domu

config GRUB_BAUDRATE
int "Serial port baud rate"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default 38400 if TARGET_x86_generic
default 115200

Expand All @@ -220,44 +218,37 @@ menu "Target Images"

config GRUB_BOOTOPTS
string "Extra kernel boot options"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default "xencons=hvc" if TARGET_x86_xen_domu
help
If you don't know, just leave it blank.

config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default "0"
help
If you don't know, 5 seconds is a reasonable default.

config VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86 || TARGET_x86_64
depends on GRUB_IMAGES || EFI_IMAGES
select GRUB_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000

config VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86 || TARGET_x86_64
default y
depends on GRUB_IMAGES || EFI_IMAGES
select GRUB_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000

config VHD_IMAGES
bool "Build Hyper-V image files (VHD)"
depends on TARGET_x86 || TARGET_x86_64
default n
depends on GRUB_IMAGES || EFI_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-tulip
default y

config TARGET_IMAGES_PAD
bool "Pad images to filesystem size (for JFFS2)"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default y

config TARGET_IMAGES_GZIP
bool "GZip images"
Expand All @@ -270,19 +261,19 @@ menu "Target Images"

config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
default 16

config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)"
depends on GRUB_IMAGES || EFI_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
default 90
help
Select the root filesystem partition size.

config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES
help
Override the root partition on the final device. If left empty,
it will be mounted by PARTUUID which makes the kernel find the
Expand Down
9 changes: 7 additions & 2 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ config KERNEL_DEBUG_FS
write to these files. Many common debugging facilities, such as
ftrace, require the existence of debugfs.

config KERNEL_MIPS_FPU_EMULATOR
bool "Compile the kernel with MIPS FPU Emulator"
default y if TARGET_pistachio
depends on (mips || mipsel || mips64 || mips64el)

config KERNEL_ARM_PMU
bool
default n
depends on (arm || arm64)
depends on (arm || aarch64)

config KERNEL_PERF_EVENTS
bool "Compile the kernel with performance events and counters"
default n
select KERNEL_ARM_PMU if (arm || arm64)
select KERNEL_ARM_PMU if (arm || aarch64)

config KERNEL_PROFILING
bool "Compile the kernel with profiling enabled"
Expand Down
4 changes: 2 additions & 2 deletions feeds.conf.default
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
src-git packages https://git.openwrt.org/feed/packages.git
src-git luci https://git.openwrt.org/project/luci.git
src-git routing https://git.openwrt.org/feed/routing.git
#src-git telephony https://git.openwrt.org/feed/telephony.git
src-git telephony https://git.openwrt.org/feed/telephony.git
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git management https://github.com/openwrt-management/packages.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
#src-link custom /usr/src/openwrt/custom-feed
2 changes: 0 additions & 2 deletions include/feeds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ ifneq ($(CONFIG_PER_FEED_REPO),)
endif
endif

PACKAGE_DIR_ALL := $(TOPDIR)/staging_dir/packages/$(BOARD)

opkg_package_files = $(wildcard \
$(foreach dir,$(PACKAGE_SUBDIRS), \
$(foreach pkg,$(1), $(dir)/$(pkg)_*.ipk)))
Expand Down
2 changes: 2 additions & 0 deletions include/hardened-ld-pie.specs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*self_spec:
+ %{no-pie|static|r|shared:;:-pie}
7 changes: 7 additions & 0 deletions include/hardening.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

PKG_CHECK_FORMAT_SECURITY ?= 1
PKG_ASLR_PIE ?= 1
PKG_SSP ?= 1
PKG_FORTIFY_SOURCE ?= 1
PKG_RELRO ?= 1
Expand All @@ -15,6 +16,12 @@ ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
TARGET_CFLAGS += -Wformat -Werror=format-security
endif
endif
ifdef CONFIG_PKG_ASLR_PIE
ifeq ($(strip $(PKG_ASLR_PIE)),1)
TARGET_CFLAGS += -fPIC
TARGET_LDFLAGS += -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
endif
endif
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
ifeq ($(strip $(PKG_SSP)),1)
TARGET_CFLAGS += -fstack-protector
Expand Down
1 change: 1 addition & 0 deletions include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ endef
HOST_CONFIGURE_VARS = \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
CXX="$(HOSTCXX)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
CONFIG_SHELL="$(SHELL)"
Expand Down
29 changes: 13 additions & 16 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)) OpenWrt Linux-$(LINUX_VERSION))' -d $@ $@.new
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) 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 OpenWrt.$(REVISION) \
-B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(REVISION) \
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
-r "$(1)" \
-i $@ -o $@.new
Expand All @@ -77,16 +77,17 @@ define Build/append-squashfs-fakeroot-be
cat $@.fakesquashfs >> $@
endef

# append a fake/empty rootfs uImage header, to fool the bootloaders
# rootfs integrity check
define Build/append-uImage-fakeroot-hdr
rm -f $@.fakeroot
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
# for example
define Build/append-uImage-fakehdr
touch $@.fakehdr
$(STAGING_DIR_HOST)/bin/mkimage \
-A $(LINUX_KARCH) -O linux -T filesystem -C none \
-n '$(call toupper,$(LINUX_KARCH)) OpenWrt fakeroot' \
-A $(LINUX_KARCH) -O linux -T $(1) -C none \
-n '$(VERSION_DIST) fake $(1)' \
-d $@.fakehdr \
-s \
$@.fakeroot
cat $@.fakeroot >> $@
$@.fakehdr
cat $@.fakehdr >> $@
endef

define Build/tplink-safeloader
Expand All @@ -113,16 +114,12 @@ define Build/install-dtb
)
endef

define Build/install-zImage
$(CP) $(KDIR)/zImage \
$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage
endef

define Build/fit
$(TOPDIR)/scripts/mkits.sh \
-D $(DEVICE_NAME) -o $@.its -k $@ \
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@mv $@.new $@
Expand All @@ -138,7 +135,7 @@ define Build/lzma-no-dict
endef

define Build/gzip
gzip -9n -c $@ $(1) > $@.new
gzip --force -9n -c $@ $(1) > $@.new
@mv $@.new $@
endef

Expand Down
Loading

0 comments on commit 8fe0636

Please sign in to comment.