Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lede-project/source
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Jan 9, 2018
1 parent b780d3b commit 229cde6
Show file tree
Hide file tree
Showing 1,228 changed files with 18,783 additions and 30,023 deletions.
49 changes: 20 additions & 29 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ menu "Target Images"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
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_NONE
depends on TARGET_ROOTFS_INITRAMFS
help
Expand Down Expand Up @@ -61,15 +62,15 @@ menu "Target Images"

config TARGET_ROOTFS_TARGZ
bool "tar.gz"
default n if USES_TARGZ
default y 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 if USES_EXT4
default y if USES_EXT4
help
Build an ext4 root filesystem.

Expand Down Expand Up @@ -114,7 +115,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 @@ -141,7 +142,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 @@ -184,31 +185,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 @@ -219,61 +211,60 @@ 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
default "0"
depends on GRUB_IMAGES
default "5"
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
depends on GRUB_IMAGES || EFI_IMAGES
select GRUB_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000
default y

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

config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
default n
default y

comment "Image Options"

source "target/linux/*/image/Config.in"

config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends on GRUB_IMAGES || EFI_IMAGES
default 8
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
default 96
depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
default 256
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
4 changes: 2 additions & 2 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ config KERNEL_PROFILING

config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information"
default n
default y if !SMALL_FLASH
help
This will give you more information in stack traces from kernel oopses.

Expand Down Expand Up @@ -254,7 +254,7 @@ config KERNEL_DEVTMPFS
default n
help
devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
devices nodes for all registered devices ti simplify boot, but leaves more
devices nodes for all registered devices to simplify boot, but leaves more
complex tasks to userspace (e.g. udev).

if KERNEL_DEVTMPFS
Expand Down
2 changes: 1 addition & 1 deletion include/download.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ hash_var = $(if $(filter-out x,$(1)),MD5SUM,HASH)
endif

define DownloadMethod/unknown
@echo "ERROR: No download method available"; false
echo "ERROR: No download method available"; false
endef

define DownloadMethod/default
Expand Down
7 changes: 6 additions & 1 deletion include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/depends.mk
include $(INCLUDE_DIR)/quilt.mk

BUILD_TYPES += host
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
Expand Down Expand Up @@ -78,6 +78,10 @@ HOST_MAKE_FLAGS =

HOST_CONFIGURE_CMD = $(BASH) ./configure

ifeq ($(HOST_OS),Darwin)
HOST_CONFIG_SITE:=$(INCLUDE_DIR)/site/darwin
endif

define Host/Configure/Default
$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
if [ -x configure ]; then \
Expand Down Expand Up @@ -128,6 +132,7 @@ define Host/Exports/Default
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
endef
Host/Exports=$(Host/Exports/Default)
Expand Down
22 changes: 16 additions & 6 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ define Build/tplink-safeloader
endef

define Build/append-dtb
$(call Image/BuildDTB,$(if $(DEVICE_DTS_DIR),$(DEVICE_DTS_DIR),$(DTS_DIR))/$(DEVICE_DTS).dts,$@.dtb)
cat $@.dtb >> $@
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
endef

define Build/install-dtb
Expand All @@ -114,6 +113,11 @@ 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 $@ \
Expand Down Expand Up @@ -244,14 +248,20 @@ endef

define Build/tplink-v2-header
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
-c -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) -k $@ -o $@.new
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
-E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
-T $(TPLINK_HVERSION) -V "ver. 2.0" \
-k $@ -o $@.new $(1)
@mv $@.new $@
endef

define Build/tplink-v2-image
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
-a 0x4 -j -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) \
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) \
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
-T $(TPLINK_HVERSION) -V "ver. 2.0" -a 0x4 -j \
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1)
cat $@.new >> $@
rm -rf $@.new
endef
Expand All @@ -271,7 +281,7 @@ metadata_json = \
}'

define Build/append-metadata
$(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
endef

define Build/kernel2minor
Expand Down
20 changes: 20 additions & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,27 @@ define Device/Build/compile

endef

ifndef IB
define Device/Build/dtb
ifndef BUILD_DTS_$(1)
BUILD_DTS_$(1) := 1
$(KDIR)/image-$(1).dtb: FORCE
$(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)

image_prepare: $(KDIR)/image-$(1).dtb
endif

endef
endif

define Device/Build/kernel
$$(eval $$(foreach dts,$$(DEVICE_DTS), \
$$(call Device/Build/dtb,$$(notdir $$(dts)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dts) \
) \
))

$(KDIR)/$$(KERNEL_NAME):: image_prepare
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
$(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1))
Expand Down
10 changes: 5 additions & 5 deletions include/kernel-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ LINUX_RELEASE?=1

LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .108
LINUX_VERSION-4.9 = .72
LINUX_VERSION-4.14 = .6
LINUX_VERSION-4.9 = .73
LINUX_VERSION-4.14 = .12

LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.108 = 5a001198625ce9f7b0ef1e4b43e033aea859e1ef3509532412cce8f0375ba51a
LINUX_KERNEL_HASH-4.9.72 = 69f201f1eb9eade9a3cde26d3896a53df9fddf1e19f9fa7b36331b8b1976b83b
LINUX_KERNEL_HASH-4.14.6 = 0907678ba9ea146ddbdecd0a0b6363f56b896b5c61c9a15e809effb3ea346ccc
LINUX_KERNEL_HASH-4.9.73 = 558b65c53f6d6c421d897ad4b651e51ba341fe4dd97122ec922e23ebd2c16e2b
LINUX_KERNEL_HASH-4.14.12 = 6608f7d480efc5c1078888e9344f4e0b0cd9bef0b6541cbdaec7d138e03856af

ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
Expand All @@ -24,4 +24,4 @@ KERNEL_PATCHVER ?= $(KERNEL)

# disable the md5sum check for unknown kernel versions
LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
LINUX_KERNEL_HASH?=x
LINUX_KERNEL_HASH?=x
Loading

0 comments on commit 229cde6

Please sign in to comment.