mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
20180113
This commit is contained in:
commit
5efa8647e5
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ key-build*
|
||||
.emacs.desktop*
|
||||
TAGS*~
|
||||
git-src
|
||||
.git-credentials
|
@ -4,7 +4,7 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
mainmenu "LEDE Configuration"
|
||||
mainmenu "OpenWrt Configuration"
|
||||
|
||||
config MODULES
|
||||
option modules
|
||||
|
2
Makefile
2
Makefile
@ -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:
|
||||
|
||||
|
@ -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
|
||||
@ -61,7 +62,7 @@ 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.
|
||||
|
||||
@ -69,7 +70,7 @@ menu "Target Images"
|
||||
|
||||
menuconfig TARGET_ROOTFS_EXT4FS
|
||||
bool "ext4"
|
||||
default n if USES_EXT4
|
||||
default y if USES_EXT4
|
||||
help
|
||||
Build an ext4 root filesystem.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -185,30 +186,21 @@ menu "Target Images"
|
||||
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
|
||||
|
||||
@ -219,14 +211,14 @@ 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.
|
||||
@ -234,21 +226,21 @@ menu "Target Images"
|
||||
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
|
||||
default y
|
||||
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"
|
||||
@ -261,19 +253,19 @@ menu "Target Images"
|
||||
|
||||
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 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
|
||||
|
@ -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.
|
||||
|
||||
@ -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
|
||||
@ -607,6 +607,17 @@ config KERNEL_SECCOMP
|
||||
help
|
||||
Build kernel with support for seccomp.
|
||||
|
||||
#
|
||||
# IPv4 configuration
|
||||
#
|
||||
|
||||
config KERNEL_IP_MROUTE
|
||||
bool "Enable IPv4 multicast routing"
|
||||
default y
|
||||
help
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
#
|
||||
# IPv6 configuration
|
||||
#
|
||||
@ -623,7 +634,11 @@ if KERNEL_IPV6
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IPV6_MROUTE
|
||||
def_bool y
|
||||
bool "Enable IPv6 multicast routing"
|
||||
default y
|
||||
help
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool n
|
||||
|
@ -105,14 +105,14 @@ ifneq ($(filter patch-libtool,$(PKG_FIXUP)),)
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool,$(PKG_FIXUP)),)
|
||||
PKG_BUILD_DEPENDS += libtool libintl libiconv
|
||||
PKG_BUILD_DEPENDS += libtool gettext libiconv
|
||||
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
|
||||
Hooks/Configure/Pre += autoreconf_target
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
|
||||
PKG_BUILD_DEPENDS += libtool libintl libiconv
|
||||
PKG_BUILD_DEPENDS += libtool gettext libiconv
|
||||
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
|
||||
Hooks/Configure/Pre += autoreconf_target
|
||||
endif
|
||||
|
@ -6,8 +6,10 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
OPENWRT_GIT = http://git.openwrt.org
|
||||
LEDE_GIT = https://git.lede-project.org
|
||||
PROJECT_GIT = https://git.openwrt.org
|
||||
|
||||
OPENWRT_GIT = $(PROJECT_GIT)
|
||||
LEDE_GIT = $(PROJECT_GIT)
|
||||
|
||||
ifdef PKG_SOURCE_VERSION
|
||||
PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
@ -103,7 +105,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
|
||||
|
@ -41,10 +41,10 @@ endef
|
||||
# 1: destination file
|
||||
define FeedSourcesAppend
|
||||
( \
|
||||
echo "src/gz %n_core %U/targets/%S/packages"; \
|
||||
echo "src/gz %d_core %U/targets/%S/packages"; \
|
||||
$(strip $(if $(CONFIG_PER_FEED_REPO), \
|
||||
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/packages/%A/$(feed)";) \
|
||||
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %d_$(feed) %U/packages/%A/$(feed)";) \
|
||||
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
|
||||
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/packages/%A/$(feed)";)))) \
|
||||
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %d_$(feed) %U/packages/%A/$(feed)";)))) \
|
||||
) >> $(1)
|
||||
endef
|
||||
|
@ -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))
|
||||
@ -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 \
|
||||
@ -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)
|
||||
|
@ -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
|
||||
|
||||
@ -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
|
||||
@ -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 >> $@
|
||||
@ -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
|
||||
@ -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 $@ \
|
||||
@ -225,6 +229,19 @@ define Build/combined-image
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/openmesh-image
|
||||
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
|
||||
"$@-fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)"
|
||||
$(TOPDIR)/scripts/combined-ext-image.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" "$@" \
|
||||
"$@-fwupgrade.cfg" "fwupgrade.cfg" \
|
||||
"$(call param_get_default,kernel,$(1),$(IMAGE_KERNEL))" "kernel" \
|
||||
"$(call param_get_default,rootfs,$(1),$@)" "rootfs"
|
||||
endef
|
||||
|
||||
define Build/sysupgrade-tar
|
||||
sh $(TOPDIR)/scripts/sysupgrade-tar.sh \
|
||||
--board $(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \
|
||||
@ -244,14 +261,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
|
||||
@ -271,7 +294,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
|
||||
|
@ -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
|
||||
@ -303,9 +303,9 @@ target-dir-%: FORCE
|
||||
$(opkg_target) update && \
|
||||
$(opkg_target) install \
|
||||
$(call opkg_package_files,$(mkfs_packages_add)))
|
||||
-$(CP) -T $(mkfs_cur_target_dir).opkg/ $(mkfs_cur_target_dir)/etc/opkg/
|
||||
rm -rf $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir).conf
|
||||
$(call prepare_rootfs,$(mkfs_cur_target_dir))
|
||||
-mv $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir)/etc/opkg
|
||||
rm -f $(mkfs_cur_target_dir).conf
|
||||
|
||||
$(KDIR)/root.%: kernel_prepare
|
||||
$(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
|
||||
@ -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))
|
||||
|
@ -63,6 +63,8 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
$(call Kernel/SetInitramfs/PreConfigure)
|
||||
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_FORCE=y' >> $(LINUX_DIR)/.config
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config
|
||||
echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config
|
||||
@ -78,6 +80,7 @@ define Kernel/SetNoInitramfs
|
||||
mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
|
||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
|
||||
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
|
||||
echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set
|
||||
endef
|
||||
|
||||
define Kernel/Configure/Default
|
||||
|
@ -3,12 +3,14 @@
|
||||
LINUX_RELEASE?=1
|
||||
|
||||
LINUX_VERSION-3.18 = .71
|
||||
LINUX_VERSION-4.4 = .93
|
||||
LINUX_VERSION-4.9 = .61
|
||||
LINUX_VERSION-4.4 = .111
|
||||
LINUX_VERSION-4.9 = .76
|
||||
LINUX_VERSION-4.14 = .13
|
||||
|
||||
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
|
||||
LINUX_KERNEL_HASH-4.4.93 = ed349314f16e78a6571b5f8884f6452782aef6c26b81bcc7ccdac44ecd917c36
|
||||
LINUX_KERNEL_HASH-4.9.61 = e0239675728ef0c3697d4b651a1d1a1dd7b2920ed2c5f05a23a23d4aa726d19e
|
||||
LINUX_KERNEL_HASH-4.4.111 = a201282e8eaf62b4f51edb2241e98ff805fe2d1b04a72a2328c5a6e2d77ec008
|
||||
LINUX_KERNEL_HASH-4.9.76 = b82b94332cffaaeade74495264c989dafb96d4748503f87a5b7c436f5de887de
|
||||
LINUX_KERNEL_HASH-4.14.13 = 4ab46d1b5a0f8ef83b80760f89ae4f5c88431b19b3cf79ffa0c66d6b33e45772
|
||||
|
||||
ifdef KERNEL_PATCHVER
|
||||
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
|
||||
|
@ -52,7 +52,7 @@ else
|
||||
LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null))
|
||||
LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown)
|
||||
|
||||
LINUX_UNAME_VERSION:=$(if $(word 3,$(subst ., ,$(KERNEL_BASE))),$(KERNEL_BASE),$(KERNEL_BASE).0)
|
||||
LINUX_UNAME_VERSION:=$(KERNEL_BASE)
|
||||
ifneq ($(findstring -rc,$(LINUX_VERSION)),)
|
||||
LINUX_UNAME_VERSION:=$(LINUX_UNAME_VERSION)-$(strip $(lastword $(subst -, ,$(LINUX_VERSION))))
|
||||
endif
|
||||
@ -64,7 +64,7 @@ else
|
||||
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x$(TESTING)
|
||||
else
|
||||
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release))
|
||||
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
|
||||
endif
|
||||
|
||||
MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION)
|
||||
@ -85,6 +85,8 @@ else ifneq (,$(findstring $(ARCH) , armeb ))
|
||||
LINUX_KARCH := arm
|
||||
else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
|
||||
LINUX_KARCH := mips
|
||||
else ifneq (,$(findstring $(ARCH) , powerpc64 ))
|
||||
LINUX_KARCH := powerpc
|
||||
else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
|
||||
LINUX_KARCH := sh
|
||||
else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
|
||||
@ -121,61 +123,53 @@ ifdef CONFIG_USE_SPARSE
|
||||
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
|
||||
endif
|
||||
|
||||
PKG_EXTMOD_SUBDIRS ?= .
|
||||
|
||||
define populate_module_symvers
|
||||
@mkdir -p $(PKG_INFO_DIR)
|
||||
cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \
|
||||
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
|
||||
cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \
|
||||
done
|
||||
endef
|
||||
|
||||
define collect_module_symvers
|
||||
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
|
||||
grep -F $$$$(readlink -f $(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
|
||||
done; \
|
||||
sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
|
||||
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers
|
||||
endef
|
||||
|
||||
define KernelPackage/hooks
|
||||
ifneq ($(PKG_NAME),kernel)
|
||||
Hooks/Compile/Pre += populate_module_symvers
|
||||
Hooks/Compile/Post += collect_module_symvers
|
||||
endif
|
||||
define KernelPackage/hooks
|
||||
endef
|
||||
endef
|
||||
|
||||
define KernelPackage/Defaults
|
||||
FILES:=
|
||||
AUTOLOAD:=
|
||||
MODPARAMS:=
|
||||
PKGFLAGS+=nonshared
|
||||
endef
|
||||
|
||||
# 1: name
|
||||
# 2: install prefix
|
||||
# 3: module priority prefix
|
||||
# 4: required for boot
|
||||
# 5: module list
|
||||
define ModuleAutoLoad
|
||||
$(SH_FUNC) \
|
||||
export modules=; \
|
||||
probe_module() { \
|
||||
local mods="$$$$$$$$1"; \
|
||||
local boot="$$$$$$$$2"; \
|
||||
local mod; \
|
||||
shift 2; \
|
||||
for mod in $$$$$$$$mods; do \
|
||||
$(if $(5), \
|
||||
mkdir -p $(2)/etc/modules.d; \
|
||||
echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
|
||||
done; \
|
||||
if [ -e $(2)/etc/modules.d/$(1) ]; then \
|
||||
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$(1) ]; then \
|
||||
($(foreach mod,$(5), \
|
||||
echo "$(mod)$(if $(MODPARAMS.$(mod)), $(MODPARAMS.$(mod)),$(if $(MODPARAMS), $(MODPARAMS)))"; )) > $(2)/etc/modules.d/$(3)$(1); \
|
||||
$(if $(4), \
|
||||
mkdir -p $(2)/etc/modules-boot.d; \
|
||||
ln -s ../modules.d/$(1) $(2)/etc/modules-boot.d/; \
|
||||
fi; \
|
||||
modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$mods"; \
|
||||
fi; \
|
||||
}; \
|
||||
add_module() { \
|
||||
local priority="$$$$$$$$1"; \
|
||||
local mods="$$$$$$$$2"; \
|
||||
local boot="$$$$$$$$3"; \
|
||||
local mod; \
|
||||
shift 3; \
|
||||
for mod in $$$$$$$$mods; do \
|
||||
mkdir -p $(2)/etc/modules.d; \
|
||||
echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
|
||||
done; \
|
||||
if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
|
||||
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$$$$$$$$priority-$(1) ]; then \
|
||||
mkdir -p $(2)/etc/modules-boot.d; \
|
||||
ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \
|
||||
fi; \
|
||||
modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \
|
||||
fi; \
|
||||
}; \
|
||||
$(3) \
|
||||
if [ -n "$$$$$$$$modules" ]; then \
|
||||
modules="$$$$$$$$(echo "$$$$$$$$modules" | tr ' ' '\n' | sort | uniq | paste -s -d' ' -)"; \
|
||||
mkdir -p $(2)/etc/modules.d; \
|
||||
mkdir -p $(2)/CONTROL; \
|
||||
echo "#!/bin/sh" > $(2)/CONTROL/postinst-pkg; \
|
||||
echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL/postinst-pkg; \
|
||||
echo ". /lib/functions.sh" >> $(2)/CONTROL/postinst-pkg; \
|
||||
echo "insert_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst-pkg; \
|
||||
chmod 0755 $(2)/CONTROL/postinst-pkg; \
|
||||
fi
|
||||
ln -sf ../modules.d/$(3)$(1) $(2)/etc/modules-boot.d/;))
|
||||
endef
|
||||
|
||||
ifeq ($(DUMP)$(TARGET_BUILD),)
|
||||
@ -228,6 +222,7 @@ $(call KernelPackage/$(1)/config)
|
||||
endif
|
||||
|
||||
$(call KernelPackage/depends)
|
||||
$(call KernelPackage/hooks)
|
||||
|
||||
ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),)
|
||||
ifneq ($(strip $(FILES)),)
|
||||
@ -243,7 +238,7 @@ $(call KernelPackage/$(1)/config)
|
||||
exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
$(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD))
|
||||
$(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD)))
|
||||
$(call KernelPackage/$(1)/install,$$(1))
|
||||
endef
|
||||
endif
|
||||
@ -265,12 +260,17 @@ endef
|
||||
|
||||
version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1))
|
||||
|
||||
# 1: priority (optional)
|
||||
# 2: module list
|
||||
# 3: boot flag
|
||||
define AutoLoad
|
||||
add_module "$(1)" "$(call version_filter,$(2))" "$(3)";
|
||||
$(if $(1),$(1),0) $(if $(3),1,0) $(call version_filter,$(2))
|
||||
endef
|
||||
|
||||
# 1: module list
|
||||
# 2: boot flag
|
||||
define AutoProbe
|
||||
probe_module "$(call version_filter,$(1))" "$(2)";
|
||||
$(call AutoLoad,,$(1),$(2))
|
||||
endef
|
||||
|
||||
version_field=$(if $(word $(1),$(2)),$(word $(1),$(2)),0)
|
||||
|
@ -262,6 +262,10 @@ $(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_i
|
||||
|
||||
$(eval $(call nf_add,IPT_U32,CONFIG_NETFILTER_XT_MATCH_U32, $(P_XT)xt_u32))
|
||||
|
||||
# checksum
|
||||
|
||||
$(eval $(call nf_add,IPT_CHECKSUM,CONFIG_NETFILTER_XT_TARGET_CHECKSUM, $(P_XT)xt_CHECKSUM))
|
||||
|
||||
|
||||
# netlink
|
||||
|
||||
@ -366,7 +370,6 @@ IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER-y)
|
||||
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
|
||||
IPT_BUILTIN += $(IPT_ULOG-y)
|
||||
IPT_BUILTIN += $(IPT_DEBUG-y)
|
||||
IPT_BUILTIN += $(IPT_TPROXY-y)
|
||||
IPT_BUILTIN += $(NFNETLINK-y)
|
||||
IPT_BUILTIN += $(NFNETLINK_LOG-y)
|
||||
|
@ -23,7 +23,7 @@ else
|
||||
endif
|
||||
|
||||
PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
|
||||
PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl
|
||||
PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
|
||||
|
||||
ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
|
||||
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
|
||||
|
@ -57,6 +57,8 @@ define Package/Default
|
||||
DEFAULT_VARIANT:=
|
||||
USERID:=
|
||||
ALTERNATIVES:=
|
||||
LICENSE:=$(PKG_LICENSE)
|
||||
LICENSE_FILES:=$(PKG_LICENSE_FILES)
|
||||
endef
|
||||
|
||||
Build/Patch:=$(Build/Patch/Default)
|
||||
|
@ -7,23 +7,17 @@
|
||||
|
||||
ifneq ($(DUMP),)
|
||||
|
||||
dumpinfo: FORCE
|
||||
|
||||
define Config/template
|
||||
Preconfig: $(1)
|
||||
Preconfig-Type: $(2)
|
||||
Preconfig-Default: $(3)
|
||||
Preconfig-Label: $(4)
|
||||
define SOURCE_INFO
|
||||
$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
|
||||
)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
|
||||
)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
define Config
|
||||
Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
|
||||
preconfig_$$(1) += $(1)
|
||||
endef
|
||||
|
||||
define Dumpinfo/Package
|
||||
$(info Package: $(1)
|
||||
$(info $(SOURCE_INFO)Package: $(1)
|
||||
$(if $(MENU),Menu: $(MENU)
|
||||
)$(if $(SUBMENU),Submenu: $(SUBMENU)
|
||||
)$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP)
|
||||
@ -36,18 +30,15 @@ Menu-Depends: $(MDEPENDS)
|
||||
Provides: $(PROVIDES)
|
||||
$(if $(VARIANT),Build-Variant: $(VARIANT)
|
||||
$(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT)
|
||||
))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
|
||||
)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
|
||||
)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
|
||||
)Section: $(SECTION)
|
||||
))Section: $(SECTION)
|
||||
Category: $(CATEGORY)
|
||||
$(if $(filter nonshared,$(PKGFLAGS)),,Repository: $(if $(FEED),$(FEED),base)
|
||||
)Title: $(TITLE)
|
||||
Maintainer: $(MAINTAINER)
|
||||
$(if $(USERID),Require-User: $(USERID)
|
||||
)Source: $(PKG_SOURCE)
|
||||
$(if $(PKG_LICENSE),License: $(PKG_LICENSE)
|
||||
)$(if $(PKG_LICENSE_FILES),LicenseFiles: $(PKG_LICENSE_FILES)
|
||||
$(if $(LICENSE),License: $(LICENSE)
|
||||
)$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES)
|
||||
)Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
|
||||
$(if $(KCONFIG),Kernel-Config: $(KCONFIG)
|
||||
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
|
||||
@ -59,33 +50,11 @@ $(if $(URL),$(URL)
|
||||
$(if $(Package/$(1)/config),Config:
|
||||
$(Package/$(1)/config)
|
||||
@@
|
||||
)$(foreach pc,$(preconfig_$(1)),
|
||||
$(Preconfig/$(pc))))
|
||||
))
|
||||
SOURCE_INFO :=
|
||||
endef
|
||||
|
||||
define Feature/Default
|
||||
TARGET_NAME:=
|
||||
TARGET_TITLE:=
|
||||
PRIORITY:=
|
||||
NAME:=
|
||||
endef
|
||||
|
||||
define Feature
|
||||
$(eval $(Feature/Default))
|
||||
$(eval $(Feature/$(1)))
|
||||
$(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
|
||||
endef
|
||||
|
||||
define Dumpinfo/Feature
|
||||
$(info Feature: $(TARGET_NAME)_$(1)
|
||||
Target-Name: $(TARGET_NAME)
|
||||
Target-Title: $(TARGET_TITLE)
|
||||
Feature-Name: $(NAME)
|
||||
$(if $(PRIORITY),Feature-Priority: $(PRIORITY)
|
||||
)Feature-Description:
|
||||
$(Feature/$(1)/description)
|
||||
@@
|
||||
)
|
||||
endef
|
||||
dumpinfo: FORCE
|
||||
$(if $(SOURCE_INFO),$(info $(SOURCE_INFO)))
|
||||
|
||||
endif
|
||||
|
@ -161,8 +161,8 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
|
||||
)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES))
|
||||
)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
|
||||
)$$(call addfield,Source,$(SOURCE)
|
||||
)$$(call addfield,License,$$(PKG_LICENSE)
|
||||
)$$(call addfield,LicenseFiles,$$(PKG_LICENSE_FILES)
|
||||
)$$(call addfield,License,$(LICENSE)
|
||||
)$$(call addfield,LicenseFiles,$(LICENSE_FILES)
|
||||
)$$(call addfield,Section,$(SECTION)
|
||||
)$$(call addfield,Require-User,$(USERID)
|
||||
)$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed
|
||||
|
@ -69,9 +69,9 @@ ifneq ($(PREV_STAMP_PREPARED),)
|
||||
STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
|
||||
CONFIG_AUTOREBUILD:=
|
||||
else
|
||||
STAMP_PREPARED:=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
|
||||
endif
|
||||
STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
|
||||
STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
|
||||
STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_DIR_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),)_installed
|
||||
@ -144,6 +144,9 @@ endef
|
||||
Build/Exports=$(Build/Exports/Default)
|
||||
|
||||
define Build/CoreTargets
|
||||
STAMP_PREPARED:=$$(STAMP_PREPARED)
|
||||
STAMP_CONFIGURED:=$$(STAMP_CONFIGURED)
|
||||
|
||||
$(if $(QUILT),$(Build/Quilt))
|
||||
$(call Build/Autoclean)
|
||||
$(call DefaultTargets)
|
||||
@ -165,11 +168,11 @@ define Build/CoreTargets
|
||||
|
||||
$(call Build/Exports,$(STAMP_CONFIGURED))
|
||||
$(STAMP_CONFIGURED): $(STAMP_PREPARED) $(STAMP_CONFIGURED_DEPENDS)
|
||||
rm -f $(STAMP_CONFIGURED_WILDCARD)
|
||||
$(CleanStaging)
|
||||
$(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep))
|
||||
$(Build/Configure)
|
||||
$(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep))
|
||||
rm -f $(STAMP_CONFIGURED_WILDCARD)
|
||||
touch $$@
|
||||
|
||||
$(call Build/Exports,$(STAMP_BUILT))
|
||||
|
@ -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))
|
||||
|
||||
@ -27,32 +27,36 @@ $(eval $(call TestHostCommand,proper-umask, \
|
||||
umask | grep -xE 00[012][012]))
|
||||
|
||||
$(eval $(call SetupHostCommand,gcc, \
|
||||
Please install the GNU C Compiler (gcc), \
|
||||
$(CC) --version | grep gcc, \
|
||||
gcc --version | grep gcc, \
|
||||
gcc49 --version | grep gcc, \
|
||||
Please install the GNU C Compiler (gcc) 4.8 or later \
|
||||
$(CC) -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \
|
||||
gcc -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \
|
||||
gcc48 --version | grep gcc, \
|
||||
gcc47 --version | grep gcc, \
|
||||
gcc46 --version | grep gcc, \
|
||||
gcc49 --version | grep gcc, \
|
||||
gcc5 --version | grep gcc, \
|
||||
gcc6 --version | grep gcc, \
|
||||
gcc7 --version | grep gcc, \
|
||||
gcc --version | grep Apple.LLVM ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-gcc, \
|
||||
Please reinstall the GNU C Compiler - it appears to be broken, \
|
||||
\nPlease reinstall the GNU C Compiler (4.8 or later) - \
|
||||
it appears to be broken, \
|
||||
echo 'int main(int argc, char **argv) { return 0; }' | \
|
||||
gcc -x c -o $(TMP_DIR)/a.out -))
|
||||
|
||||
$(eval $(call SetupHostCommand,g++, \
|
||||
Please install the GNU C++ Compiler (g++), \
|
||||
$(CXX) --version | grep g++, \
|
||||
g++ --version | grep g++, \
|
||||
g++49 --version | grep g++, \
|
||||
Please install the GNU C++ Compiler (g++) 4.8 or later \
|
||||
$(CXX) -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \
|
||||
g++ -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \
|
||||
g++48 --version | grep g++, \
|
||||
g++47 --version | grep g++, \
|
||||
g++46 --version | grep g++, \
|
||||
g++49 --version | grep g++, \
|
||||
g++5 --version | grep g++, \
|
||||
g++6 --version | grep g++, \
|
||||
g++7 --version | grep g++, \
|
||||
g++ --version | grep Apple.LLVM ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-g++, \
|
||||
Please reinstall the GNU C++ Compiler - it appears to be broken, \
|
||||
\nPlease reinstall the GNU C++ Compiler (4.8 or later) - \
|
||||
it appears to be broken, \
|
||||
echo 'int main(int argc, char **argv) { return 0; }' | \
|
||||
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
|
||||
$(TMP_DIR)/a.out))
|
||||
|
2
include/site/darwin
Normal file
2
include/site/darwin
Normal file
@ -0,0 +1,2 @@
|
||||
ac_cv_func_futimens=no
|
||||
ac_cv_func_utimensat=no
|
26
include/site/powerpc64
Normal file
26
include/site/powerpc64
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_char_p=8
|
||||
ac_cv_sizeof_double=8
|
||||
ac_cv_sizeof_float=4
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_long_double=16
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long_long_int=8
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_signed_char=1
|
||||
ac_cv_sizeof_unsigned_char=1
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_int=8
|
||||
ac_cv_sizeof_unsigned_long_long_int=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_unsigned_short_int=2
|
||||
ac_cv_sizeof_void_p=8
|
@ -13,11 +13,11 @@ __target_inc=1
|
||||
DEVICE_TYPE?=router
|
||||
|
||||
# Default packages - the really basic set
|
||||
DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd \
|
||||
DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd ip-full \
|
||||
iptables-mod-nat-extra kmod-nf-nathelper kmod-nf-nathelper-extra kmod-macvlan block-mount automount \
|
||||
default-settings ipset-lists luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \
|
||||
luci-app-filetransfer luci-app-shadowsocksr-pro luci-app-usb-printer luci-app-vsftpd luci-app-sfe \
|
||||
luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule luci-app-wol luci-app-nlbwmon
|
||||
luci-app-filetransfer luci-app-shadowsocksr-pro luci-app-usb-printer luci-app-vsftpd ddns-scripts_aliyun luci-app-xlnetacc \
|
||||
luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule luci-app-wol luci-app-sfe luci-app-nlbwmon
|
||||
# For nas targets
|
||||
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
|
||||
# For router targets
|
||||
@ -190,7 +190,7 @@ ifeq ($(DUMP),1)
|
||||
CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7
|
||||
CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8
|
||||
CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9
|
||||
CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15 -mtune=cortex-a15
|
||||
CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15
|
||||
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
|
||||
CPU_CFLAGS_fa526 = -mcpu=fa526
|
||||
CPU_CFLAGS_mpcore = -mcpu=mpcore
|
||||
@ -209,6 +209,10 @@ ifeq ($(DUMP),1)
|
||||
CPU_CFLAGS_440:=-mcpu=440
|
||||
CPU_CFLAGS_464fp:=-mcpu=464fp
|
||||
endif
|
||||
ifeq ($(ARCH),powerpc64)
|
||||
CPU_TYPE ?= powerpc64
|
||||
CPU_CFLAGS_powerpc64:=-mcpu=powerpc64
|
||||
endif
|
||||
ifeq ($(ARCH),sparc)
|
||||
CPU_TYPE = sparc
|
||||
CPU_CFLAGS_ultrasparc = -mcpu=ultrasparc
|
||||
|
@ -104,6 +104,9 @@ scripts/config/mconf:
|
||||
|
||||
$(eval $(call rdep,scripts/config,scripts/config/mconf))
|
||||
|
||||
scripts/config/qconf:
|
||||
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
|
||||
|
||||
scripts/config/conf:
|
||||
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
|
||||
|
||||
@ -136,6 +139,12 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
|
||||
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
|
||||
$< Config.in
|
||||
|
||||
xconfig: scripts/config/qconf prepare-tmpinfo FORCE
|
||||
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
|
||||
cp $(HOME)/.openwrt/defconfig .config; \
|
||||
fi
|
||||
$< Config.in
|
||||
|
||||
prepare_kernel_conf: .config FORCE
|
||||
|
||||
ifeq ($(wildcard staging_dir/host/bin/quilt),)
|
||||
|
@ -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 \
|
||||
@ -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/)
|
||||
@ -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' \
|
||||
|
@ -72,7 +72,6 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
|
||||
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
|
||||
done; \
|
||||
done || true
|
||||
@-$(MAKE) package/preconfig
|
||||
|
||||
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
||||
|
||||
@ -96,8 +95,6 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||
); done
|
||||
endif
|
||||
|
||||
$(curdir)/preconfig:
|
||||
|
||||
$(curdir)/flags-install:= -j1
|
||||
|
||||
$(eval $(call stampfile,$(curdir),package,prereq,.config))
|
||||
|
@ -9,9 +9,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=174
|
||||
PKG_RELEASE:=183
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
@ -21,7 +22,12 @@ PKG_LICENSE:=GPL-2.0
|
||||
# Extend depends from version.mk
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
|
||||
CONFIG_NAND_SUPPORT
|
||||
CONFIG_NAND_SUPPORT \
|
||||
CONFIG_CLEAN_IPKG \
|
||||
CONFIG_PER_FEED_REPO \
|
||||
CONFIG_PER_FEED_REPO_ADD_DISABLED \
|
||||
CONFIG_PER_FEED_REPO_ADD_COMMENTED \
|
||||
$(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed))
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -34,7 +40,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
|
||||
@ -148,6 +154,7 @@ define Package/base-files/install
|
||||
|
||||
mkdir -p $(1)/CONTROL
|
||||
mkdir -p $(1)/dev
|
||||
mkdir -p $(1)/etc/config
|
||||
mkdir -p $(1)/etc/crontabs
|
||||
mkdir -p $(1)/etc/rc.d
|
||||
mkdir -p $(1)/overlay
|
||||
@ -183,6 +190,11 @@ define Package/base-files/install
|
||||
$(if $(CONFIG_INCLUDE_CONFIG), \
|
||||
echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \
|
||||
cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config)
|
||||
|
||||
$(if $(CONFIG_CLEAN_IPKG),, \
|
||||
mkdir -p $(1)/etc/opkg; \
|
||||
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
|
||||
$(VERSION_SED) $(1)/etc/opkg/distfeeds.conf)
|
||||
endef
|
||||
|
||||
ifneq ($(DUMP),1)
|
||||
|
@ -24,8 +24,8 @@ generate_static_network() {
|
||||
json_select dsl
|
||||
if json_is_a atmbridge object; then
|
||||
json_select atmbridge
|
||||
local vpi vci encaps payload
|
||||
json_get_vars vpi vci encaps payload
|
||||
local vpi vci encaps payload nameprefix
|
||||
json_get_vars vpi vci encaps payload nameprefix
|
||||
uci -q batch <<-EOF
|
||||
delete network.atm
|
||||
set network.atm='atm-bridge'
|
||||
@ -33,6 +33,7 @@ generate_static_network() {
|
||||
set network.atm.vci='$vci'
|
||||
set network.atm.encaps='$encaps'
|
||||
set network.atm.payload='$payload'
|
||||
set network.atm.nameprefix='$nameprefix'
|
||||
EOF
|
||||
json_select ..
|
||||
fi
|
||||
@ -119,17 +120,14 @@ generate_network() {
|
||||
;;
|
||||
|
||||
pppoe)
|
||||
# fixup IPv6 slave interface
|
||||
ifname="pppoe-$1"
|
||||
|
||||
uci -q batch <<-EOF
|
||||
set network.$1.proto='pppoe'
|
||||
set network.$1.username='username'
|
||||
set network.$1.password='password'
|
||||
set network.$1.ipv6='auto'
|
||||
set network.$1.ipv6='1'
|
||||
delete network.${1}6
|
||||
set network.${1}6='interface'
|
||||
set network.${1}6.ifname='$ifname'
|
||||
set network.${1}6.ifname='@${1}'
|
||||
set network.${1}6.proto='dhcpv6'
|
||||
EOF
|
||||
;;
|
||||
@ -226,7 +224,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'
|
||||
@ -236,10 +234,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
|
||||
|
@ -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
|
||||
-----------------------------------------------------
|
||||
|
@ -1,13 +0,0 @@
|
||||
|
||||
config global
|
||||
option from_fstab '1'
|
||||
option anon_swap '1'
|
||||
option anon_mount '1'
|
||||
option auto_swap '1'
|
||||
option auto_mount '1'
|
||||
option delay_root '5'
|
||||
option check_fs '0'
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
START=98
|
||||
START=94
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
@ -22,10 +22,9 @@ load_gpio_switch()
|
||||
echo "$gpio_pin" >/sys/class/gpio/export
|
||||
# we need to wait a bit until the GPIO appears
|
||||
[ -d "$gpio_path" ] || sleep 1
|
||||
echo out >"$gpio_path/direction"
|
||||
}
|
||||
# write 0 or 1 to the "value" field
|
||||
{ [ "$value" = "0" ] && echo "0" || echo "1"; } >"$gpio_path/value"
|
||||
# set the pin to output with high or low pin value
|
||||
{ [ "$value" = "0" ] && echo "high" || echo "low"; } >"$gpio_path/direction"
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
|
@ -72,6 +72,7 @@ load_led() {
|
||||
[ -n "$dev" ] && {
|
||||
echo $dev > /sys/class/leds/${sysfs}/device_name
|
||||
echo $mode > /sys/class/leds/${sysfs}/mode
|
||||
echo $interval > /sys/class/leds/${sysfs}/interval
|
||||
}
|
||||
;;
|
||||
|
||||
|
@ -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' \
|
||||
|
@ -1,8 +1,7 @@
|
||||
DISTRIB_ID='%D'
|
||||
DISTRIB_RELEASE='%V'
|
||||
DISTRIB_REVISION='%R'
|
||||
DISTRIB_CODENAME='%n'
|
||||
DISTRIB_TARGET='%S'
|
||||
DISTRIB_ARCH='%A'
|
||||
DISTRIB_DESCRIPTION='%D %N %V %C'
|
||||
DISTRIB_DESCRIPTION='%D %V %C'
|
||||
DISTRIB_TAINTS='%t'
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
[ -e /tmp/.failsafe ] && export FAILSAFE=1
|
||||
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
|
||||
[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe
|
||||
|
||||
fgrep -sq '/ overlay ro,' /proc/mounts && {
|
||||
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
|
||||
echo 'Please try to remove files from /overlay/upper/... and reboot!'
|
||||
|
@ -41,14 +41,15 @@ disable() {
|
||||
}
|
||||
|
||||
enable() {
|
||||
err=1
|
||||
name="$(basename "${initscript}")"
|
||||
disable
|
||||
[ -n "$START" -o -n "$STOP" ] || {
|
||||
echo "/etc/init.d/$name does not have a START or STOP value"
|
||||
return 1
|
||||
}
|
||||
[ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
|
||||
[ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
|
||||
[ "$START" ] && \
|
||||
ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" && \
|
||||
err=0
|
||||
[ "$STOP" ] && \
|
||||
ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" && \
|
||||
err=0
|
||||
return $err
|
||||
}
|
||||
|
||||
enabled() {
|
||||
@ -88,6 +89,10 @@ service_triggers() {
|
||||
return 0
|
||||
}
|
||||
|
||||
service_data() {
|
||||
return 0
|
||||
}
|
||||
|
||||
service_running() {
|
||||
return 0
|
||||
}
|
||||
@ -122,12 +127,14 @@ ${INIT_TRACE:+set -x}
|
||||
}
|
||||
|
||||
stop() {
|
||||
procd_lock
|
||||
stop_service "$@"
|
||||
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||
}
|
||||
|
||||
reload() {
|
||||
if eval "type reload_service" 2>/dev/null >/dev/null; then
|
||||
procd_lock
|
||||
reload_service "$@"
|
||||
else
|
||||
start
|
||||
|
@ -1,5 +1,6 @@
|
||||
kernel.panic=3
|
||||
kernel.core_pattern=/tmp/%e.%t.%p.%s.core
|
||||
fs.suid_dumpable=2
|
||||
|
||||
net.ipv4.conf.default.arp_ignore=1
|
||||
net.ipv4.conf.all.arp_ignore=1
|
||||
|
@ -202,7 +202,7 @@ add_group_and_user() {
|
||||
if [ -n "$gname" ] && [ -n "$gid" ]; then
|
||||
group_exists "$gname" || group_add "$gname" "$gid"
|
||||
elif [ -n "$gname" ]; then
|
||||
group_add_next "$gname"; gid=$?
|
||||
gid="$(group_add_next "$gname")"
|
||||
fi
|
||||
|
||||
if [ -n "$uname" ]; then
|
||||
@ -235,12 +235,16 @@ default_postinst() {
|
||||
rm -fR $root/rootfs-overlay/
|
||||
fi
|
||||
|
||||
if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then
|
||||
kmodloader
|
||||
fi
|
||||
|
||||
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
|
||||
. /lib/functions/system.sh
|
||||
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
|
||||
for i in $(sed -ne 's!^/etc/uci-defaults/!!p' "/usr/lib/opkg/info/${pkgname}.list"); do (
|
||||
cd /etc/uci-defaults
|
||||
[ -f "$i" ] && . "$i" && rm -f "$i"
|
||||
[ -f "$i" ] && . ./"$i" && rm -f "$i"
|
||||
) done
|
||||
uci commit
|
||||
fi
|
||||
@ -292,9 +296,7 @@ group_add() {
|
||||
[ -f "${IPKG_INSTROOT}/etc/group" ] || return 1
|
||||
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/group
|
||||
echo "${name}:x:${gid}:" >> ${IPKG_INSTROOT}/etc/group
|
||||
rc=$?
|
||||
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/group
|
||||
return $rc
|
||||
}
|
||||
|
||||
group_exists() {
|
||||
@ -304,14 +306,17 @@ group_exists() {
|
||||
group_add_next() {
|
||||
local gid gids
|
||||
gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
||||
[ -n "$gid" ] && return $gid
|
||||
if [ -n "$gid" ]; then
|
||||
echo $gid
|
||||
return
|
||||
fi
|
||||
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
||||
gid=65536
|
||||
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
||||
gid=$((gid + 1))
|
||||
done
|
||||
group_add $1 $gid
|
||||
return $gid
|
||||
echo $gid
|
||||
}
|
||||
|
||||
group_add_user() {
|
||||
@ -344,9 +349,7 @@ user_add() {
|
||||
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
|
||||
echo "${name}:x:${uid}:${gid}:${desc}:${home}:${shell}" >> ${IPKG_INSTROOT}/etc/passwd
|
||||
echo "${name}:x:0:0:99999:7:::" >> ${IPKG_INSTROOT}/etc/shadow
|
||||
rc=$?
|
||||
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
|
||||
return $rc
|
||||
}
|
||||
|
||||
user_exists() {
|
||||
|
@ -1,6 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
|
||||
get_dt_led() {
|
||||
local label
|
||||
local ledpath
|
||||
local basepath="/proc/device-tree"
|
||||
local nodepath="$basepath/aliases/led-$1"
|
||||
|
||||
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
|
||||
[ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")
|
||||
|
||||
echo "$label"
|
||||
}
|
||||
|
||||
led_set_attr() {
|
||||
[ -f "/sys/class/leds/$1/$2" ] && echo "$3" > "/sys/class/leds/$1/$2"
|
||||
}
|
||||
|
@ -319,6 +319,7 @@ ucidef_add_atm_bridge() {
|
||||
local vci="$2"
|
||||
local encaps="$3"
|
||||
local payload="$4"
|
||||
local nameprefix="$5"
|
||||
|
||||
json_select_object dsl
|
||||
json_select_object atmbridge
|
||||
@ -326,6 +327,7 @@ ucidef_add_atm_bridge() {
|
||||
json_add_int vci "$vci"
|
||||
json_add_string encaps "$encaps"
|
||||
json_add_string payload "$payload"
|
||||
json_add_string nameprefix "$nameprefix"
|
||||
json_select ..
|
||||
json_select ..
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -117,24 +117,6 @@ export_bootdevice() {
|
||||
esac
|
||||
|
||||
case "$disk" in
|
||||
PARTUUID=[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]0002)
|
||||
uuid="${disk#PARTUUID=}"
|
||||
uuid="${uuid%0002}0002"
|
||||
for disk in $(find /dev -type b); do
|
||||
set -- $(dd if=$disk bs=1 skip=$((2*512+256+128+16)) count=16 2>/dev/null | hexdump -v -e '4/1 "%02x"' | awk '{ \
|
||||
for(i=1;i<9;i=i+2) first=substr($0,i,1) substr($0,i+1,1) first; \
|
||||
for(i=9;i<13;i=i+2) second=substr($0,i,1) substr($0,i+1,1) second; \
|
||||
for(i=13;i<16;i=i+2) third=substr($0,i,1) substr($0,i+1,1) third; \
|
||||
fourth = substr($0,17,4); \
|
||||
five = substr($0,21,12); \
|
||||
} END { print toupper(first"-"second"-"third"-"fourth"-"five) }')
|
||||
if [ "$1" = "$uuid" ]; then
|
||||
uevent="/sys/class/block/${disk##*/}/uevent"
|
||||
export SAVE_PARTITIONS=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
|
||||
uuid="${disk#PARTUUID=}"
|
||||
uuid="${uuid%-02}"
|
||||
@ -178,6 +160,14 @@ export_partdevice() {
|
||||
return 1
|
||||
}
|
||||
|
||||
hex_le32_to_cpu() {
|
||||
[ "$(echo 01 | hexdump -v -n 2 -e '/2 "%x"')" == "3031" ] && {
|
||||
echo "${1:0:2}${1:8:2}${1:6:2}${1:4:2}${1:2:2}"
|
||||
return
|
||||
}
|
||||
echo "$@"
|
||||
}
|
||||
|
||||
get_partitions() { # <device> <filename>
|
||||
local disk="$1"
|
||||
local filename="$2"
|
||||
@ -185,8 +175,8 @@ get_partitions() { # <device> <filename>
|
||||
if [ -b "$disk" -o -f "$disk" ]; then
|
||||
v "Reading partition table from $filename..."
|
||||
|
||||
local magic="$(hexdump -v -n 2 -s 0x1FE -e '1/2 "0x%04X"' "$disk")"
|
||||
if [ "$magic" != 0xAA55 ]; then
|
||||
local magic=$(dd if="$disk" bs=2 count=1 skip=255 2>/dev/null)
|
||||
if [ "$magic" != $'\x55\xAA' ]; then
|
||||
v "Invalid partition table on $disk"
|
||||
exit
|
||||
fi
|
||||
@ -197,9 +187,9 @@ get_partitions() { # <device> <filename>
|
||||
for part in 1 2 3 4; do
|
||||
set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
|
||||
|
||||
local type="$(($1 % 256))"
|
||||
local lba="$(($2))"
|
||||
local num="$(($3))"
|
||||
local type="$(( $(hex_le32_to_cpu $1) % 256))"
|
||||
local lba="$(( $(hex_le32_to_cpu $2) ))"
|
||||
local num="$(( $(hex_le32_to_cpu $3) ))"
|
||||
|
||||
[ $type -gt 0 ] || continue
|
||||
|
||||
|
@ -239,30 +239,23 @@ nand_upgrade_ubifs() {
|
||||
nand_do_upgrade_success
|
||||
}
|
||||
|
||||
nand_board_name() {
|
||||
if type 'platform_nand_board_name' >/dev/null 2>/dev/null; then
|
||||
platform_nand_board_name
|
||||
return
|
||||
fi
|
||||
|
||||
cat /tmp/sysinfo/board_name
|
||||
}
|
||||
|
||||
nand_upgrade_tar() {
|
||||
local tar_file="$1"
|
||||
local board_name="$(nand_board_name)"
|
||||
local kernel_mtd="$(find_mtd_index $CI_KERNPART)"
|
||||
|
||||
local kernel_length=`(tar xf $tar_file sysupgrade-$board_name/kernel -O | wc -c) 2> /dev/null`
|
||||
local rootfs_length=`(tar xf $tar_file sysupgrade-$board_name/root -O | wc -c) 2> /dev/null`
|
||||
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
board_dir=${board_dir%/}
|
||||
|
||||
local rootfs_type="$(identify_tar "$tar_file" sysupgrade-$board_name/root)"
|
||||
local kernel_length=`(tar xf $tar_file ${board_dir}/kernel -O | wc -c) 2> /dev/null`
|
||||
local rootfs_length=`(tar xf $tar_file ${board_dir}/root -O | wc -c) 2> /dev/null`
|
||||
|
||||
local rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)"
|
||||
|
||||
local has_kernel=1
|
||||
local has_env=0
|
||||
|
||||
[ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && {
|
||||
tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - $CI_KERNPART
|
||||
tar xf $tar_file ${board_dir}/kernel -O | mtd write - $CI_KERNPART
|
||||
}
|
||||
[ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=0
|
||||
|
||||
@ -271,12 +264,12 @@ nand_upgrade_tar() {
|
||||
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
|
||||
[ "$has_kernel" = "1" ] && {
|
||||
local kern_ubivol="$(nand_find_volume $ubidev $CI_KERNPART)"
|
||||
tar xf $tar_file sysupgrade-$board_name/kernel -O | \
|
||||
tar xf $tar_file ${board_dir}/kernel -O | \
|
||||
ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
|
||||
}
|
||||
|
||||
local root_ubivol="$(nand_find_volume $ubidev rootfs)"
|
||||
tar xf $tar_file sysupgrade-$board_name/root -O | \
|
||||
tar xf $tar_file ${board_dir}/root -O | \
|
||||
ubiupdatevol /dev/$root_ubivol -s $rootfs_length -
|
||||
|
||||
nand_do_upgrade_success
|
||||
|
@ -84,6 +84,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
|
||||
local loop="${2:-0}"
|
||||
local run=true
|
||||
local stat
|
||||
local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat)
|
||||
|
||||
echo -n "Sending $sig to remaining processes ... "
|
||||
|
||||
@ -96,8 +97,8 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
|
||||
read pid name state ppid rest < $stat
|
||||
name="${name#(}"; name="${name%)}"
|
||||
|
||||
# Skip PID1, ourself and our children
|
||||
[ $pid -ne 1 -a $pid -ne $$ -a $ppid -ne $$ ] || continue
|
||||
# Skip PID1, our parent, ourself and our children
|
||||
[ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue
|
||||
|
||||
local cmdline
|
||||
read cmdline < /proc/$pid/cmdline
|
||||
|
@ -55,7 +55,6 @@ Usage: $0 [<upgrade-option>...] <image file or URL>
|
||||
$0 [-q] [-i] <backup-command> <file>
|
||||
|
||||
upgrade-option:
|
||||
-d <delay> add a delay before rebooting
|
||||
-f <config> restore configuration from .tar.gz (file or url)
|
||||
-i interactive mode
|
||||
-c attempt to preserve all changed files in /etc/
|
||||
@ -108,14 +107,8 @@ add_uci_conffiles() {
|
||||
|
||||
add_overlayfiles() {
|
||||
local file="$1"
|
||||
if [ -d /overlay/upper ]; then
|
||||
local overlaydir="/overlay/upper"
|
||||
else
|
||||
local overlaydir="/overlay"
|
||||
fi
|
||||
find $overlaydir/etc/ -type f -o -type l | sed \
|
||||
find /overlay/upper/etc/ -type f -o -type l | sed \
|
||||
-e 's,^/overlay\/upper/,/,' \
|
||||
-e 's,^/overlay/,/,' \
|
||||
-e '\,/META_[a-zA-Z0-9]*$,d' \
|
||||
-e '\,/functions.sh$,d' \
|
||||
-e '\,/[^/]*-opkg$,d' \
|
||||
@ -126,9 +119,16 @@ add_overlayfiles() {
|
||||
# hooks
|
||||
sysupgrade_image_check="fwtool_check_image platform_check_image"
|
||||
sysupgrade_pre_upgrade="fwtool_pre_upgrade"
|
||||
[ $SAVE_OVERLAY = 0 -o ! -d /overlay/etc ] && \
|
||||
sysupgrade_init_conffiles="add_uci_conffiles" || \
|
||||
|
||||
if [ $SAVE_OVERLAY = 1 ]; then
|
||||
[ ! -d /overlay/upper/etc ] && {
|
||||
echo "Cannot find '/overlay/upper/etc', required for '-c'"
|
||||
exit 1
|
||||
}
|
||||
sysupgrade_init_conffiles="add_overlayfiles"
|
||||
else
|
||||
sysupgrade_init_conffiles="add_uci_conffiles"
|
||||
fi
|
||||
|
||||
include /lib/upgrade
|
||||
|
||||
@ -152,7 +152,7 @@ do_save_conffiles() {
|
||||
}
|
||||
|
||||
if [ $CONF_BACKUP_LIST -eq 1 ]; then
|
||||
add_uci_conffiles "$CONFFILES"
|
||||
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
|
||||
cat "$CONFFILES"
|
||||
rm -f "$CONFFILES"
|
||||
exit 0
|
||||
|
@ -1,8 +1,8 @@
|
||||
NAME="%D"
|
||||
VERSION="%V, %N"
|
||||
VERSION="%V"
|
||||
ID="%d"
|
||||
ID_LIKE="lede openwrt"
|
||||
PRETTY_NAME="%D %N %V"
|
||||
PRETTY_NAME="%D %V"
|
||||
VERSION_ID="%v"
|
||||
HOME_URL="%m"
|
||||
BUG_URL="%b"
|
||||
@ -15,4 +15,4 @@ LEDE_DEVICE_MANUFACTURER="%M"
|
||||
LEDE_DEVICE_MANUFACTURER_URL="%m"
|
||||
LEDE_DEVICE_PRODUCT="%P"
|
||||
LEDE_DEVICE_REVISION="%h"
|
||||
LEDE_RELEASE="%D %N %V %C"
|
||||
LEDE_RELEASE="%D %V %C"
|
||||
|
@ -158,18 +158,11 @@ 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.
|
||||
|
||||
config VERSION_NICK
|
||||
string
|
||||
prompt "Release version nickname"
|
||||
help
|
||||
This is the release codename embedded in the image.
|
||||
If unspecified, it defaults to the name of source branch.
|
||||
|
||||
config VERSION_NUMBER
|
||||
string
|
||||
prompt "Release version number"
|
||||
@ -199,15 +192,13 @@ if VERSIONOPT
|
||||
%v .. Configured release version number or "snapshot", lowercase
|
||||
%C .. Configured release revision code or value of %R, uppercase
|
||||
%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"
|
||||
|
||||
|
52
package/boot/arm-trusted-firmware-sunxi/Makefile
Normal file
52
package/boot/arm-trusted-firmware-sunxi/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# Copyright (C) 2017 Hauke Mehrtens
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-sunxi
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/apritzel/arm-trusted-firmware
|
||||
PKG_SOURCE_DATE:=2016-07-12
|
||||
PKG_SOURCE_VERSION:=87e8aedd80e6448a55b2328768d956fcb5f5d410
|
||||
PKG_MIRROR_HASH:=4e71a7d4bc0613533854c646b0fa574b18503c0ab28621aac67c70b9827562d8
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=license.md
|
||||
|
||||
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware for Allwinner
|
||||
DEPENDS:=@TARGET_sunxi_cortexa53
|
||||
endef
|
||||
|
||||
export GCC_HONOUR_COPTS=s
|
||||
|
||||
MAKE_VARS = \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
|
||||
MAKE_FLAGS += \
|
||||
PLAT=sun50iw1p1 \
|
||||
DEBUG=1 \
|
||||
bl31
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/build/sun50iw1p1/debug/bl31.bin $(STAGING_DIR_IMAGE)/bl31.bin
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-sunxi))
|
87
package/boot/at91bootstrap/Makefile
Normal file
87
package/boot/at91bootstrap/Makefile
Normal file
@ -0,0 +1,87 @@
|
||||
#
|
||||
# Copyright (C) 2016 Microchip Technology Inc.
|
||||
# <Sandeepsheriker.mallikarjun@microchip.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=at91bootstrap
|
||||
PKG_VERSION:=v3.8.8
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
|
||||
PKG_SOURCE_VERSION:=3d33a4e0707c61007a5278f6620453502f7500db
|
||||
|
||||
PKG_BUILD_DIR = \
|
||||
$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include at91bootstrap.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define AT91Bootstrap/Default
|
||||
BUILD_TARGET:=at91
|
||||
BUILD_SUBTARGET:=sama5
|
||||
HIDDEN:=1
|
||||
AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d2_xplaineddf_uboot
|
||||
TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
|
||||
BUILD_DEVICES:=at91-sama5d2_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d2_xplaineddf_qspi_uboot
|
||||
TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (QSPI Flash)
|
||||
BUILD_DEVICES:=at91-sama5d2_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d2_xplainedsd_uboot
|
||||
TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SDcard/EMMC)
|
||||
BUILD_DEVICES:=at91-sama5d2_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d3_xplainednf_uboot
|
||||
TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (Nand Flash)
|
||||
BUILD_DEVICES:=at91-sama5d3_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d3_xplainedsd_uboot
|
||||
TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (SDcard)
|
||||
BUILD_DEVICES:=at91-sama5d3_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d4_xplainednf_uboot_secure
|
||||
TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (Nand Flash)
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d4_xplaineddf_uboot_secure
|
||||
TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SPI Flash)
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
define AT91Bootstrap/sama5d4_xplainedsd_uboot_secure
|
||||
TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SDcard)
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
AT91BOOTSTRAP_TARGETS := \
|
||||
sama5d2_xplaineddf_uboot \
|
||||
sama5d2_xplaineddf_qspi_uboot \
|
||||
sama5d2_xplainedsd_uboot \
|
||||
sama5d3_xplainednf_uboot \
|
||||
sama5d3_xplainedsd_uboot \
|
||||
sama5d4_xplainednf_uboot_secure \
|
||||
sama5d4_xplaineddf_uboot_secure \
|
||||
sama5d4_xplainedsd_uboot_secure
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/AT91Bootstrap))
|
88
package/boot/at91bootstrap/at91bootstrap.mk
Normal file
88
package/boot/at91bootstrap/at91bootstrap.mk
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
PKG_TARGETS := bin
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
export GCC_HONOUR_COPTS=s
|
||||
|
||||
define Package/at91bootstrap/install/default
|
||||
$(CP) $(PKG_BUILD_DIR)/binaries/*uboot* $(1)/
|
||||
endef
|
||||
|
||||
Package/at91bootstrap/install = $(Package/at91bootstrap/install/default)
|
||||
|
||||
define AT91Bootstrap/Init
|
||||
BUILD_TARGET:=
|
||||
BUILD_SUBTARGET:=
|
||||
BUILD_DEVICES:=
|
||||
NAME:=
|
||||
DEPENDS:=
|
||||
HIDDEN:=
|
||||
DEFAULT:=
|
||||
VARIANT:=$(1)
|
||||
AT91BOOTSTRAP_CONFIG:=$(1)
|
||||
endef
|
||||
|
||||
TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
||||
|
||||
AT91BOOTSTRAP_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS='$(HOST_CFLAGS) $$$$(HOSTCPPFLAGS)' \
|
||||
HOSTLDFLAGS=""
|
||||
|
||||
define Build/AT91Bootstrap/Target
|
||||
$(eval $(call AT91Bootstrap/Init,$(1)))
|
||||
$(eval $(call AT91Bootstrap/Default,$(1)))
|
||||
$(eval $(call AT91Bootstrap/$(1),$(1)))
|
||||
|
||||
define Package/at91bootstrap-$(1)
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:= .$(NAME)
|
||||
VARIANT:=$(VARIANT)
|
||||
DEPENDS:=@!IN_SDK $(DEPENDS)
|
||||
HIDDEN:=$(HIDDEN)
|
||||
ifneq ($(BUILD_TARGET),)
|
||||
DEPENDS += @$(TARGET_DEP)
|
||||
ifneq ($(BUILD_DEVICES),)
|
||||
DEFAULT := y if ($(TARGET_DEP)_Default \
|
||||
$(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \
|
||||
$(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%, \
|
||||
$(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES)))
|
||||
endif
|
||||
endif
|
||||
$(if $(DEFAULT),DEFAULT:=$(DEFAULT))
|
||||
URL:=https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
|
||||
endef
|
||||
|
||||
define Package/at91bootstrap-$(1)/install
|
||||
$$(Package/at91bootstrap/install)
|
||||
endef
|
||||
endef
|
||||
|
||||
define Build/Configure/AT91Bootstrap
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
$(AT91BOOTSTRAP_CONFIG)_defconfig
|
||||
endef
|
||||
|
||||
|
||||
define Build/Compile/AT91Bootstrap
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
$(AT91BOOTSTRAP_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
define BuildPackage/AT91Bootstrap/Defaults
|
||||
Build/Configure/Default = $$$$(Build/Configure/AT91Bootstrap)
|
||||
Build/Compile/Default = $$$$(Build/Compile/AT91Bootstrap)
|
||||
endef
|
||||
|
||||
define BuildPackage/AT91Bootstrap
|
||||
$(eval $(call BuildPackage/AT91Bootstrap/Defaults))
|
||||
$(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \
|
||||
$(eval $(call Build/AT91Bootstrap/Target,$(type)))
|
||||
)
|
||||
$(eval $(call Build/DefaultTargets))
|
||||
$(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \
|
||||
$(call BuildPackage,at91bootstrap-$(type))
|
||||
)
|
||||
endef
|
@ -1,24 +1,34 @@
|
||||
#
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=grub
|
||||
PKG_CPE_ID:=cpe:/a:gnu:grub2
|
||||
PKG_VERSION:=2.02
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=grub-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/grub
|
||||
PKG_HASH:=810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=grub2/host
|
||||
|
||||
PKG_SSP:=0
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PATCH_DIR := ../patches
|
||||
HOST_PATCH_DIR := ../patches
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/grub2/Default
|
||||
define Package/grub2
|
||||
CATEGORY:=Boot Loaders
|
||||
SECTION:=boot
|
||||
TITLE:=GRand Unified Bootloader
|
||||
@ -26,6 +36,19 @@ define Package/grub2/Default
|
||||
DEPENDS:=@TARGET_x86||TARGET_x86_64
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv
|
||||
CATEGORY:=Utilities
|
||||
SECTION:=utils
|
||||
SUBMENU:=Boot Loaders
|
||||
TITLE:=Grub2 Environment editor
|
||||
URL:=http://www.gnu.org/software/grub/
|
||||
DEPENDS:=@TARGET_x86||TARGET_x86_64
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv/description
|
||||
Edit grub2 environment files.
|
||||
endef
|
||||
|
||||
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
@ -59,3 +82,11 @@ define Host/Configure
|
||||
$(Host/Configure/Default)
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,grub2))
|
||||
$(eval $(call BuildPackage,grub2-editenv))
|
@ -1,22 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=grub-efi
|
||||
|
||||
include ../common.mk
|
||||
|
||||
TAR_OPTIONS:= --transform 's/grub-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}/' $(TAR_OPTIONS)
|
||||
|
||||
PKG_BUILD_DEPENDS:=grub2-efi/host
|
||||
|
||||
CONFIGURE_ARGS += --with-platform=efi
|
||||
HOST_CONFIGURE_ARGS += --with-platform=efi --program-suffix=-efi
|
||||
|
||||
define Package/grub2-efi
|
||||
$(call Package/grub2/Default)
|
||||
HIDDEN:=1
|
||||
TITLE += (with EFI support)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,grub2-efi))
|
@ -1,33 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=grub
|
||||
|
||||
include ../common.mk
|
||||
|
||||
PKG_BUILD_DEPENDS:=grub2/host
|
||||
|
||||
define Package/grub2
|
||||
$(call Package/grub2/Default)
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv
|
||||
CATEGORY:=Utilities
|
||||
SECTION:=utils
|
||||
TITLE:=Grub2 Environment editor
|
||||
URL:=http://www.gnu.org/software/grub/
|
||||
DEPENDS:=@TARGET_x86||TARGET_x86_64
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv/description
|
||||
Edit grub2 environment files.
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,grub2))
|
||||
$(eval $(call BuildPackage,grub2-editenv))
|
@ -10,13 +10,14 @@
|
||||
#include <errno.h>
|
||||
--- a/src/mtd.h
|
||||
+++ b/src/mtd.h
|
||||
@@ -25,8 +25,10 @@
|
||||
@@ -25,8 +25,11 @@
|
||||
#ifndef MTD_H
|
||||
#define MTD_H
|
||||
|
||||
+#define _GNU_SOURCE
|
||||
#include <mtd/mtd-user.h>
|
||||
#include <endian.h>
|
||||
+#include <stdint.h>
|
||||
+#include <fcntl.h>
|
||||
|
||||
#include "BootControlBlocks.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rbcfg
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
* RouterBOOT configuration utility
|
||||
*
|
||||
* Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
* Copyright (C) 2017 Thibaut VARENE <varenet@parisc-linux.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
@ -29,6 +30,7 @@
|
||||
#define RB_ERR_INVALID 2
|
||||
#define RB_ERR_NOMEM 3
|
||||
#define RB_ERR_IO 4
|
||||
#define RB_ERR_NOTWANTED 5
|
||||
|
||||
#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0]))
|
||||
|
||||
@ -67,6 +69,11 @@ struct rbcfg_command {
|
||||
int (*exec)(int argc, const char *argv[]);
|
||||
};
|
||||
|
||||
struct rbcfg_soc {
|
||||
const char *needle;
|
||||
const int type;
|
||||
};
|
||||
|
||||
static void usage(void);
|
||||
|
||||
/* Globals */
|
||||
@ -135,12 +142,32 @@ static const struct rbcfg_value rbcfg_cpu_mode[] = {
|
||||
RB_CPU_MODE_REGULAR),
|
||||
};
|
||||
|
||||
static const struct rbcfg_value rbcfg_cpu_freq_dummy[] = {
|
||||
};
|
||||
|
||||
static const struct rbcfg_value rbcfg_cpu_freq_qca953x[] = {
|
||||
CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2),
|
||||
CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1),
|
||||
CFG_U32("0", "Factory", RB_CPU_FREQ_N0),
|
||||
CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1),
|
||||
CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2),
|
||||
};
|
||||
|
||||
static const struct rbcfg_value rbcfg_cpu_freq_ar9344[] = {
|
||||
CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2),
|
||||
CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1),
|
||||
CFG_U32("0", "Factory", RB_CPU_FREQ_N0),
|
||||
CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1),
|
||||
CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2),
|
||||
CFG_U32("+3", "+150MHz", RB_CPU_FREQ_H3),
|
||||
};
|
||||
|
||||
static const struct rbcfg_value rbcfg_booter[] = {
|
||||
CFG_U32("regular", "load regular booter", RB_BOOTER_REGULAR),
|
||||
CFG_U32("backup", "force backup-booter loading", RB_BOOTER_BACKUP),
|
||||
};
|
||||
|
||||
static const struct rbcfg_env rbcfg_envs[] = {
|
||||
static struct rbcfg_env rbcfg_envs[] = {
|
||||
{
|
||||
.name = "boot_delay",
|
||||
.id = RB_ID_BOOT_DELAY,
|
||||
@ -177,6 +204,12 @@ static const struct rbcfg_env rbcfg_envs[] = {
|
||||
.type = RBCFG_ENV_TYPE_U32,
|
||||
.values = rbcfg_cpu_mode,
|
||||
.num_values = ARRAY_SIZE(rbcfg_cpu_mode),
|
||||
}, {
|
||||
.name = "cpu_freq",
|
||||
.id = RB_ID_CPU_FREQ,
|
||||
.type = RBCFG_ENV_TYPE_U32,
|
||||
.values = rbcfg_cpu_freq_dummy,
|
||||
.num_values = ARRAY_SIZE(rbcfg_cpu_freq_dummy),
|
||||
}, {
|
||||
.name = "uart_speed",
|
||||
.id = RB_ID_UART_SPEED,
|
||||
@ -240,8 +273,10 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len,
|
||||
buf += 2;
|
||||
buflen -= 2;
|
||||
|
||||
if (id == RB_ID_TERMINATOR)
|
||||
if (id == RB_ID_TERMINATOR) {
|
||||
ret = RB_ERR_NOTWANTED;
|
||||
break;
|
||||
}
|
||||
|
||||
if (buflen < len)
|
||||
break;
|
||||
@ -257,7 +292,7 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len,
|
||||
buflen -= len;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
if (RB_ERR_NOTFOUND == ret)
|
||||
fprintf(stderr, "no tag found with id=%u\n", tag_id);
|
||||
|
||||
return ret;
|
||||
@ -748,6 +783,96 @@ usage(void)
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
#define RBCFG_SOC_UNKNOWN 0
|
||||
#define RBCFG_SOC_QCA953X 1
|
||||
#define RBCFG_SOC_AR9344 2
|
||||
|
||||
static const struct rbcfg_soc rbcfg_socs[] = {
|
||||
{
|
||||
.needle = "QCA953",
|
||||
.type = RBCFG_SOC_QCA953X,
|
||||
}, {
|
||||
.needle = "AR9344",
|
||||
.type = RBCFG_SOC_AR9344,
|
||||
},
|
||||
};
|
||||
|
||||
#define CPUINFO_BUFSIZE 128 /* lines of interest are < 80 chars */
|
||||
|
||||
static int cpuinfo_find_soc(void)
|
||||
{
|
||||
FILE *fp;
|
||||
char temp[CPUINFO_BUFSIZE];
|
||||
char *haystack, *needle;
|
||||
int i, found = 0, soc_type = RBCFG_SOC_UNKNOWN;
|
||||
|
||||
fp = fopen("/proc/cpuinfo", "r");
|
||||
if (!fp)
|
||||
goto end;
|
||||
|
||||
/* first, extract the system type line */
|
||||
needle = "system type";
|
||||
while(fgets(temp, CPUINFO_BUFSIZE, fp)) {
|
||||
if (!strncmp(temp, needle, strlen(needle))) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
|
||||
/* failsafe in case cpuinfo format changes */
|
||||
if (!found)
|
||||
goto end;
|
||||
|
||||
/* skip the field header */
|
||||
haystack = strchr(temp, ':');
|
||||
|
||||
/* then, try to identify known SoC, stop at first match */
|
||||
for (i = 0; i < ARRAY_SIZE(rbcfg_socs); i++) {
|
||||
if ((strstr(haystack, rbcfg_socs[i].needle))) {
|
||||
soc_type = rbcfg_socs[i].type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return soc_type;
|
||||
}
|
||||
|
||||
static void fixup_rbcfg_envs(void)
|
||||
{
|
||||
int i, num_val, soc_type;
|
||||
const struct rbcfg_value * env_value;
|
||||
|
||||
/* detect SoC */
|
||||
soc_type = cpuinfo_find_soc();
|
||||
|
||||
/* update rbcfg_envs */
|
||||
switch (soc_type) {
|
||||
case RBCFG_SOC_QCA953X:
|
||||
env_value = rbcfg_cpu_freq_qca953x;
|
||||
num_val = ARRAY_SIZE(rbcfg_cpu_freq_qca953x);
|
||||
break;
|
||||
case RBCFG_SOC_AR9344:
|
||||
env_value = rbcfg_cpu_freq_ar9344;
|
||||
num_val = ARRAY_SIZE(rbcfg_cpu_freq_ar9344);
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
|
||||
if (RB_ID_CPU_FREQ == rbcfg_envs[i].id) {
|
||||
if (RBCFG_SOC_UNKNOWN == soc_type)
|
||||
rbcfg_envs[i].id = RB_ID_TERMINATOR;
|
||||
else {
|
||||
rbcfg_envs[i].values = env_value;
|
||||
rbcfg_envs[i].num_values = num_val;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
const struct rbcfg_command *cmd = NULL;
|
||||
@ -756,6 +881,8 @@ int main(int argc, const char *argv[])
|
||||
|
||||
rbcfg_name = (char *) argv[0];
|
||||
|
||||
fixup_rbcfg_envs();
|
||||
|
||||
if (argc < 2) {
|
||||
usage();
|
||||
return EXIT_FAILURE;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define RB_ID_BOOT_PROTOCOL 9
|
||||
#define RB_ID_SOFT_10 10
|
||||
#define RB_ID_SOFT_11 11
|
||||
#define RB_ID_CPU_FREQ 12
|
||||
#define RB_ID_BOOTER 13
|
||||
|
||||
#define RB_UART_SPEED_115200 0
|
||||
@ -71,6 +72,13 @@
|
||||
#define RB_BOOT_PROTOCOL_BOOTP 0
|
||||
#define RB_BOOT_PROTOCOL_DHCP 1
|
||||
|
||||
#define RB_CPU_FREQ_L2 (0 << 3)
|
||||
#define RB_CPU_FREQ_L1 (1 << 3)
|
||||
#define RB_CPU_FREQ_N0 (2 << 3)
|
||||
#define RB_CPU_FREQ_H1 (3 << 3)
|
||||
#define RB_CPU_FREQ_H2 (4 << 3)
|
||||
#define RB_CPU_FREQ_H3 (5 << 3)
|
||||
|
||||
#define RB_BOOTER_REGULAR 0
|
||||
#define RB_BOOTER_BACKUP 1
|
||||
|
||||
|
@ -17,26 +17,79 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=at91
|
||||
BUILD_SUBTARGET:=legacy
|
||||
HIDDEN:=1
|
||||
UBOOT_IMAGE:=u-boot.bin boot.bin
|
||||
endef
|
||||
|
||||
define U-Boot/at91sam9m10g45ek_nandflash
|
||||
NAME:=AT91SAM9M10G45-EK board (NandFlash)
|
||||
BUILD_SUBTARGET:=legacy
|
||||
BUILD_DEVICES:=at91sam9m10g45ek
|
||||
endef
|
||||
|
||||
define U-Boot/at91sam9x5ek_nandflash
|
||||
NAME:=AT91SAM9X5-EK board (NandFlash)
|
||||
BUILD_SUBTARGET:=legacy
|
||||
BUILD_DEVICES:=at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d3_xplained_nandflash
|
||||
NAME:=SAMA5D3 Xplained board (NandFlash)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d3_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d3_xplained_mmc
|
||||
NAME:=SAMA5D3 Xplained board (SDcard)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d3_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d2_xplained_spiflash
|
||||
NAME:=SAMA5D2 Xplained board (SPI Flash)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d2_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d2_xplained_mmc
|
||||
NAME:=SAMA5D2 Xplained board (SDcard/EMMC)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d2_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d4_xplained_spiflash
|
||||
NAME:=SAMA5D4 Xplained board (SPI Flash)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d4_xplained_mmc
|
||||
NAME:=SAMA5D4 Xplained board (SDcard)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
define U-Boot/sama5d4_xplained_nandflash
|
||||
NAME:=SAMA5D4 Xplained board (NandFlash)
|
||||
BUILD_SUBTARGET:=sama5
|
||||
BUILD_DEVICES:=at91-sama5d4_xplained
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
at91sam9m10g45ek_nandflash \
|
||||
at91sam9x5ek_nandflash
|
||||
at91sam9x5ek_nandflash \
|
||||
sama5d3_xplained_nandflash \
|
||||
sama5d3_xplained_mmc \
|
||||
sama5d2_xplained_mmc \
|
||||
sama5d2_xplained_spiflash \
|
||||
sama5d4_xplained_mmc \
|
||||
sama5d4_xplained_spiflash \
|
||||
sama5d4_xplained_nandflash
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
KCFLAGS="$(filter-out -fstack-protector, $(TARGET_CFLAGS))"
|
||||
KCFLAGS="$(filter-out -fstack-protector -mfloat-abi=hard, $(TARGET_CFLAGS)) -mfloat-abi=soft"
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
|
@ -19,7 +19,7 @@ PKG_SOURCE_URL:=\
|
||||
ftp://ftp.denx.de/pub/u-boot
|
||||
PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
|
||||
|
||||
PKG_BUILD_DEPENDS:=+fstools
|
||||
PKG_BUILD_DEPENDS:=fstools
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
||||
PKG_LICENSE_FILES:=Licenses/README
|
||||
|
@ -19,6 +19,7 @@ alfa-ap120c|\
|
||||
all0258n|\
|
||||
ap121f|\
|
||||
ap90q|\
|
||||
ap91-5g|\
|
||||
arduino-yun|\
|
||||
cap324|\
|
||||
cap4200ag|\
|
||||
@ -30,6 +31,7 @@ cr5000|\
|
||||
eap300v2|\
|
||||
ens202ext|\
|
||||
gl-ar300m|\
|
||||
gl-ar750|\
|
||||
hornet-ub|\
|
||||
hornet-ub-x2|\
|
||||
jwap230|\
|
||||
@ -39,11 +41,13 @@ mr600|\
|
||||
mr600v2|\
|
||||
mr900|\
|
||||
mr900v2|\
|
||||
n5q|\
|
||||
nbg6716|\
|
||||
om5p|\
|
||||
om5p-ac|\
|
||||
om5p-acv2|\
|
||||
om5p-an|\
|
||||
r36a|\
|
||||
sr3200|\
|
||||
tube2h|\
|
||||
wndr3700|\
|
||||
@ -66,6 +70,7 @@ dap-2695-a1|\
|
||||
wzr-hp-ag300h)
|
||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
dr342|\
|
||||
dr531)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
|
||||
;;
|
||||
@ -76,6 +81,9 @@ rambutan)
|
||||
qihoo-c301)
|
||||
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
wi2a-ac200i)
|
||||
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
|
@ -31,13 +31,17 @@ ubootenv_mtdinfo () {
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
ap148 | db149)
|
||||
ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
||||
;;
|
||||
ea8500)
|
||||
linksys,ea8500)
|
||||
ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
nbg6817)
|
||||
openmesh,a42)
|
||||
ubootenv_add_uci_config "/dev/mtd5" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
qcom,ipq8064-ap148 |\
|
||||
qcom,ipq8064-db149)
|
||||
ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
ubootenv_add_uci_config "/dev/mtdblock9" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
esac
|
||||
|
@ -13,18 +13,16 @@ touch /etc/config/ubootenv
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dockstar|\
|
||||
guruplug-server-plus|\
|
||||
ib62x0|\
|
||||
linksys-viper|\
|
||||
nsa310b|\
|
||||
nsa325|\
|
||||
pogo_e02|\
|
||||
sheevaplug|\
|
||||
sheevaplug-esata)
|
||||
cloudengines,pogoe02|\
|
||||
cloudengines,pogoplugv4|\
|
||||
linksys,viper|\
|
||||
raidsonic,ib-nas62x0|\
|
||||
seagate,dockstar|\
|
||||
zyxel,nsa310b|\
|
||||
zyxel,nsa325)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
linksys-audi)
|
||||
linksys,audi)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000"
|
||||
;;
|
||||
esac
|
||||
|
@ -13,19 +13,19 @@ touch /etc/config/ubootenv
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
BTHOMEHUBV2B)
|
||||
bt,homehub-v2b)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
||||
;;
|
||||
BTHOMEHUBV3A)
|
||||
bt,homehub-v3a)
|
||||
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
|
||||
;;
|
||||
GIGASX76X)
|
||||
siemens,gigaset-sx76x)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
||||
;;
|
||||
P2812HNUF1)
|
||||
zyxel,p-2812hnu-f1)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
|
||||
;;
|
||||
WBMR300)
|
||||
buffalo,wbmr-300hpd)
|
||||
idx="$(find_mtd_index ubootconfig)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
|
||||
|
@ -20,7 +20,6 @@ all5002)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
linkits7688|\
|
||||
linkits7688d|\
|
||||
miwifi-nano|\
|
||||
sk-wb8|\
|
||||
wsr-1166|\
|
||||
@ -28,6 +27,9 @@ wsr-600|\
|
||||
zbt-wg2626)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
|
||||
;;
|
||||
mir3g)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
|
@ -7,65 +7,76 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2017.03
|
||||
PKG_VERSION:=2017.09
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=f54baf3f9325bf444c7905f3a5b6f83680edb1e6e1a4d5f8a5ad80abe885113f
|
||||
PKG_HASH:=b2d15f2cf5f72e706025cde73d67247c6da8cd35f7e10891eefe7d9095089744
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=kirkwood
|
||||
BUILD_DEVICES:=$(patsubst %_second_stage,%,$(1))
|
||||
endef
|
||||
|
||||
define U-Boot/dockstar
|
||||
NAME:=Seagate DockStar
|
||||
BUILD_DEVICES:=seagate_dockstar
|
||||
endef
|
||||
|
||||
define U-Boot/dockstar_second_stage
|
||||
NAME:=Seagate DockStar (second stage)
|
||||
BUILD_DEVICES:=seagate_dockstar
|
||||
endef
|
||||
|
||||
define U-Boot/goflexhome
|
||||
NAME:=the Seagate GoFlexHome/GoFlexNet
|
||||
BUILD_DEVICES:=seagate_goflexhome seagate_goflexnet
|
||||
endef
|
||||
|
||||
define U-Boot/ib62x0
|
||||
NAME:=RaidSonic ICY BOX NAS6210 and NAS6220
|
||||
BUILD_DEVICES:=raidsonic_ib-nas62x0
|
||||
endef
|
||||
|
||||
define U-Boot/ib62x0_second_stage
|
||||
NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 (second stage)
|
||||
BUILD_DEVICES:=raidsonic_ib-nas62x0
|
||||
endef
|
||||
|
||||
define U-Boot/iconnect
|
||||
NAME:=Iomega iConnect Wireless
|
||||
BUILD_DEVICES:=iom_iconnect-1.1
|
||||
endef
|
||||
|
||||
define U-Boot/iconnect_second_stage
|
||||
NAME:=Iomega iConnect Wireless (second stage)
|
||||
BUILD_DEVICES:=iom_iconnect-1.1
|
||||
endef
|
||||
|
||||
define U-Boot/nsa310
|
||||
NAME:=Zyxel NSA310
|
||||
BUILD_DEVICES:=zyxel_nsa310b
|
||||
endef
|
||||
|
||||
define U-Boot/nsa325
|
||||
NAME:=Zyxel NSA325v1 and v2
|
||||
BUILD_DEVICES:=zyxel_nsa325
|
||||
endef
|
||||
|
||||
define U-Boot/pogo_e02
|
||||
NAME:=Cloud Engines Pogoplug E02
|
||||
BUILD_DEVICES:=cloudengines_pogoe02
|
||||
endef
|
||||
|
||||
define U-Boot/pogo_e02_second_stage
|
||||
NAME:=Cloud Engines Pogoplug E02 (second stage)
|
||||
BUILD_DEVICES:=cloudengines_pogoe02
|
||||
endef
|
||||
|
||||
define U-Boot/sheevaplug
|
||||
NAME:=SheevaPlug
|
||||
define U-Boot/pogoplugv4
|
||||
NAME:=Cloud Engines Pogoplug V4
|
||||
BUILD_DEVICES:=cloudengines_pogoplugv4
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
@ -76,7 +87,7 @@ UBOOT_TARGETS := \
|
||||
nsa310 \
|
||||
nsa325 \
|
||||
pogo_e02 pogo_e02_second_stage \
|
||||
sheevaplug
|
||||
pogoplugv4
|
||||
|
||||
define Build/Configure
|
||||
$(if $(findstring _second_stage,$(BUILD_VARIANT)),
|
||||
|
@ -27,7 +27,7 @@ diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
|
||||
index 9205b1e..819bd3b 100644
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig
|
||||
@@ -53,6 +53,9 @@ config TARGET_GOFLEXHOME
|
||||
@@ -56,6 +56,9 @@ config TARGET_GOFLEXHOME
|
||||
config TARGET_NAS220
|
||||
bool "BlackArmor NAS220"
|
||||
|
||||
@ -37,7 +37,7 @@ index 9205b1e..819bd3b 100644
|
||||
config TARGET_NSA310S
|
||||
bool "Zyxel NSA310S"
|
||||
|
||||
@@ -77,6 +80,7 @@ source "board/raidsonic/ib62x0/Kconfig"
|
||||
@@ -80,6 +83,7 @@ source "board/raidsonic/ib62x0/Kconfig"
|
||||
source "board/Seagate/dockstar/Kconfig"
|
||||
source "board/Seagate/goflexhome/Kconfig"
|
||||
source "board/Seagate/nas220/Kconfig"
|
||||
@ -528,7 +528,7 @@ new file mode 100644
|
||||
index 0000000..d26ef35
|
||||
--- /dev/null
|
||||
+++ b/configs/nsa310_defconfig
|
||||
@@ -0,0 +1,22 @@
|
||||
@@ -0,0 +1,34 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_KIRKWOOD=y
|
||||
+CONFIG_TARGET_NSA310=y
|
||||
@ -544,19 +544,31 @@ index 0000000..d26ef35
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_MII=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_DATE=y
|
||||
+CONFIG_CMD_EXT2=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_JFFS2=y
|
||||
+CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_CMD_ENV=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_EFI_PARTITION=y
|
||||
+CONFIG_ENV_IS_IN_NAND=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
diff --git a/include/configs/nsa310.h b/include/configs/nsa310.h
|
||||
new file mode 100644
|
||||
index 0000000..86ef825
|
||||
--- /dev/null
|
||||
+++ b/include/configs/nsa310.h
|
||||
@@ -0,0 +1,144 @@
|
||||
@@ -0,0 +1,126 @@
|
||||
+/* Copyright (C) 2015-2016 bodhi <mibodhi@gmail.com>
|
||||
+ *
|
||||
+ * Based on
|
||||
@ -594,7 +606,7 @@ index 0000000..86ef825
|
||||
+ */
|
||||
+#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
|
||||
+#define CONFIG_KW88F6281 /* SOC Name */
|
||||
+#define CONFIG_MACH_NSA310 /* Machine type */
|
||||
+
|
||||
+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
|
||||
+
|
||||
+/*
|
||||
@ -605,14 +617,8 @@ index 0000000..86ef825
|
||||
+/*
|
||||
+ * Commands configuration
|
||||
+ */
|
||||
+#define CONFIG_CMD_ENV
|
||||
+#define CONFIG_CMD_IDE
|
||||
+#define CONFIG_CMD_NAND
|
||||
+#define CONFIG_CMD_DATE
|
||||
+#define CONFIG_SYS_LONGHELP
|
||||
+#define CONFIG_PREBOOT
|
||||
+#define CONFIG_SYS_HUSH_PARSER
|
||||
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
|
||||
+
|
||||
+/*
|
||||
+ * mv-common.h should be defined after CMD configs since it used them
|
||||
@ -624,10 +630,7 @@ index 0000000..86ef825
|
||||
+ * Environment variables configurations
|
||||
+ */
|
||||
+#ifdef CONFIG_CMD_NAND
|
||||
+#define CONFIG_ENV_IS_IN_NAND 1
|
||||
+#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
|
||||
+#else
|
||||
+#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
|
||||
+#endif
|
||||
+
|
||||
+/* max 4k env size is enough, but in case of nand
|
||||
@ -665,7 +668,6 @@ index 0000000..86ef825
|
||||
+#define CONFIG_NET_MULTI
|
||||
+#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
|
||||
+#define CONFIG_PHY_BASE_ADR 0x1
|
||||
+#define CONFIG_PHY_GIGE
|
||||
+#define CONFIG_RESET_PHY_R
|
||||
+#endif /* CONFIG_CMD_NET */
|
||||
+
|
||||
@ -680,24 +682,16 @@ index 0000000..86ef825
|
||||
+/*
|
||||
+ * File system
|
||||
+ */
|
||||
+#define CONFIG_CMD_EXT4
|
||||
+#define CONFIG_CMD_JFFS2
|
||||
+#define CONFIG_JFFS2_NAND
|
||||
+#define CONFIG_JFFS2_LZO
|
||||
+#define CONFIG_CMD_UBIFS
|
||||
+#define CONFIG_RBTREE
|
||||
+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
|
||||
+#define CONFIG_MTD_PARTITIONS
|
||||
+#define CONFIG_CMD_MTDPARTS
|
||||
+#define CONFIG_LZO
|
||||
+
|
||||
+/*
|
||||
+ * Date Time
|
||||
+ */
|
||||
+#ifdef CONFIG_CMD_DATE
|
||||
+#define CONFIG_RTC_MV
|
||||
+#define CONFIG_CMD_SNTP
|
||||
+#define CONFIG_CMD_DNS
|
||||
+#endif /* CONFIG_CMD_DATE */
|
||||
+
|
||||
+#endif /* _CONFIG_NSA310_H */
|
||||
|
@ -2,7 +2,7 @@ diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
|
||||
index 819bd3b..6a2d578 100644
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig
|
||||
@@ -59,6 +59,9 @@ config TARGET_NSA310
|
||||
@@ -62,6 +62,9 @@ config TARGET_NSA310
|
||||
config TARGET_NSA310S
|
||||
bool "Zyxel NSA310S"
|
||||
|
||||
@ -12,7 +12,7 @@ index 819bd3b..6a2d578 100644
|
||||
endchoice
|
||||
|
||||
config SYS_SOC
|
||||
@@ -82,5 +85,6 @@ source "board/Seagate/goflexhome/Kconfig"
|
||||
@@ -85,5 +88,6 @@ source "board/Seagate/goflexhome/Kconfig
|
||||
source "board/Seagate/nas220/Kconfig"
|
||||
source "board/zyxel/nsa310/Kconfig"
|
||||
source "board/zyxel/nsa310s/Kconfig"
|
||||
@ -511,7 +511,7 @@ new file mode 100644
|
||||
index 0000000..48e09cc
|
||||
--- /dev/null
|
||||
+++ b/configs/nsa325_defconfig
|
||||
@@ -0,0 +1,22 @@
|
||||
@@ -0,0 +1,34 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_KIRKWOOD=y
|
||||
+CONFIG_TARGET_NSA325=y
|
||||
@ -527,19 +527,31 @@ index 0000000..48e09cc
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_MII=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_CMD_DATE=y
|
||||
+CONFIG_CMD_EXT2=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_JFFS2=y
|
||||
+CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_CMD_ENV=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_EFI_PARTITION=y
|
||||
+CONFIG_ENV_IS_IN_NAND=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
diff --git a/include/configs/nsa325.h b/include/configs/nsa325.h
|
||||
new file mode 100644
|
||||
index 0000000..e5a8e2a
|
||||
--- /dev/null
|
||||
+++ b/include/configs/nsa325.h
|
||||
@@ -0,0 +1,148 @@
|
||||
@@ -0,0 +1,129 @@
|
||||
+/*
|
||||
+ * (C) Copyright 2016 bodhi <mibodhi@gmail.com>
|
||||
+ *
|
||||
@ -579,7 +591,6 @@ index 0000000..e5a8e2a
|
||||
+ * High Level Configuration Options (easy to change)
|
||||
+ */
|
||||
+#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
|
||||
+#define CONFIG_KIRKWOOD 1 /* SOC Family Name */
|
||||
+#define CONFIG_KW88F6281 1 /* SOC Name */
|
||||
+
|
||||
+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
|
||||
@ -592,14 +603,8 @@ index 0000000..e5a8e2a
|
||||
+/*
|
||||
+ * Commands configuration
|
||||
+ */
|
||||
+#define CONFIG_CMD_ENV
|
||||
+#define CONFIG_CMD_IDE
|
||||
+#define CONFIG_CMD_NAND
|
||||
+#define CONFIG_CMD_DATE
|
||||
+#define CONFIG_SYS_LONGHELP
|
||||
+#define CONFIG_PREBOOT
|
||||
+#define CONFIG_SYS_HUSH_PARSER
|
||||
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
|
||||
+
|
||||
+/*
|
||||
+ * mv-common.h should be defined after CMD configs since it used them
|
||||
@ -611,10 +616,7 @@ index 0000000..e5a8e2a
|
||||
+ * Environment variables configurations
|
||||
+ */
|
||||
+#ifdef CONFIG_CMD_NAND
|
||||
+#define CONFIG_ENV_IS_IN_NAND 1
|
||||
+#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
|
||||
+#else
|
||||
+#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
|
||||
+#endif
|
||||
+/*
|
||||
+ * max 4k env size is enough, but in case of nand
|
||||
@ -650,7 +652,6 @@ index 0000000..e5a8e2a
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
|
||||
+#define CONFIG_PHY_BASE_ADR 0x1
|
||||
+#define CONFIG_PHY_GIGE
|
||||
+#define CONFIG_NETCONSOLE
|
||||
+#endif /* CONFIG_CMD_NET */
|
||||
+
|
||||
@ -665,24 +666,16 @@ index 0000000..e5a8e2a
|
||||
+/*
|
||||
+ * File system
|
||||
+ */
|
||||
+#define CONFIG_CMD_EXT4
|
||||
+#define CONFIG_CMD_JFFS2
|
||||
+#define CONFIG_JFFS2_NAND
|
||||
+#define CONFIG_JFFS2_LZO
|
||||
+#define CONFIG_CMD_UBIFS
|
||||
+#define CONFIG_RBTREE
|
||||
+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
|
||||
+#define CONFIG_MTD_PARTITIONS
|
||||
+#define CONFIG_CMD_MTDPARTS
|
||||
+#define CONFIG_LZO
|
||||
+
|
||||
+/*
|
||||
+ * Date Time
|
||||
+ */
|
||||
+#ifdef CONFIG_CMD_DATE
|
||||
+#define CONFIG_RTC_MV
|
||||
+#define CONFIG_CMD_SNTP
|
||||
+#define CONFIG_CMD_DNS
|
||||
+#endif /* CONFIG_CMD_DATE */
|
||||
+
|
||||
+#define CONFIG_KIRKWOOD_GPIO /* Enable GPIO Support */
|
||||
|
1574
package/boot/uboot-kirkwood/patches/010-pogoplug_v4.patch
Normal file
1574
package/boot/uboot-kirkwood/patches/010-pogoplug_v4.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@
|
||||
+#define CONFIG_SYS_MVFS
|
||||
|
||||
/*
|
||||
* Commands configuration
|
||||
@@ -45,29 +46,29 @@
|
||||
* mv-common.h should be defined after CMD configs since it used them
|
||||
@@ -37,29 +38,29 @@
|
||||
* it has to be rounded to sector size
|
||||
*/
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* 128k */
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- a/include/configs/iconnect.h
|
||||
+++ b/include/configs/iconnect.h
|
||||
@@ -51,30 +51,29 @@
|
||||
#define CONFIG_ENV_IS_NOWHERE
|
||||
@@ -44,30 +44,29 @@
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
#endif
|
||||
#define CONFIG_ENV_SIZE 0x20000
|
||||
-#define CONFIG_ENV_OFFSET 0x80000
|
||||
@ -42,8 +42,8 @@
|
||||
* Ethernet driver configuration
|
||||
--- a/configs/iconnect_defconfig
|
||||
+++ b/configs/iconnect_defconfig
|
||||
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="iconnect => "
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="iconnect => "
|
||||
CONFIG_CMD_NAND=y
|
||||
CONFIG_CMD_USB=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_DHCP=y
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/configs/ib62x0.h
|
||||
+++ b/include/configs/ib62x0.h
|
||||
@@ -54,27 +54,22 @@
|
||||
@@ -49,27 +49,22 @@
|
||||
*/
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/configs/pogo_e02.h
|
||||
+++ b/include/configs/pogo_e02.h
|
||||
@@ -49,23 +49,30 @@
|
||||
@@ -44,23 +44,30 @@
|
||||
#endif
|
||||
|
||||
#define CONFIG_ENV_SIZE 0x20000 /* 128k */
|
||||
|
@ -1,16 +1,15 @@
|
||||
--- a/include/configs/goflexhome.h
|
||||
+++ b/include/configs/goflexhome.h
|
||||
@@ -77,20 +77,18 @@
|
||||
@@ -70,20 +70,18 @@
|
||||
*/
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
|
||||
- "ubi part root; " \
|
||||
- "ubifsmount ubi:root; " \
|
||||
- "ubifsload 0x800000 ${kernel}; " \
|
||||
- "bootm 0x800000"
|
||||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
"bootm 0x800000"
|
||||
|
||||
#define CONFIG_MTDPARTS \
|
||||
- "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig
|
||||
@@ -87,4 +87,7 @@ source "board/Seagate/nas220/Kconfig"
|
||||
@@ -90,4 +90,7 @@ source "board/zyxel/nsa310/Kconfig"
|
||||
source "board/zyxel/nsa310s/Kconfig"
|
||||
source "board/zyxel/nsa325/Kconfig"
|
||||
|
||||
@ -10,16 +10,16 @@
|
||||
endif
|
||||
--- a/include/configs/dockstar.h
|
||||
+++ b/include/configs/dockstar.h
|
||||
@@ -89,4 +89,6 @@
|
||||
#define CONFIG_CMD_MTDPARTS
|
||||
#define CONFIG_LZO
|
||||
@@ -76,4 +76,6 @@
|
||||
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
|
||||
#define CONFIG_MTD_PARTITIONS
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_DOCKSTAR_H */
|
||||
--- a/include/configs/ib62x0.h
|
||||
+++ b/include/configs/ib62x0.h
|
||||
@@ -99,4 +99,6 @@
|
||||
@@ -94,4 +94,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
@ -28,16 +28,16 @@
|
||||
#endif /* _CONFIG_IB62x0_H */
|
||||
--- a/include/configs/iconnect.h
|
||||
+++ b/include/configs/iconnect.h
|
||||
@@ -94,4 +94,6 @@
|
||||
@@ -83,4 +83,6 @@
|
||||
#define CONFIG_MTD_DEVICE
|
||||
#define CONFIG_MTD_PARTITIONS
|
||||
#define CONFIG_CMD_MTDPARTS
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_ICONNECT_H */
|
||||
--- /dev/null
|
||||
+++ b/include/configs/openwrt-kirkwood-common.h
|
||||
@@ -0,0 +1,40 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013 Luka Perkov <luka@openwrt.org>
|
||||
+ *
|
||||
@ -47,9 +47,6 @@
|
||||
+#ifndef __OPENWRT_KIRKWOOD_COMMON_H
|
||||
+#define __OPENWRT_KIRKWOOD_COMMON_H
|
||||
+
|
||||
+/* Commands */
|
||||
+#define CONFIG_CMD_BOOTZ
|
||||
+
|
||||
+/* Ethernet */
|
||||
+#if defined(CONFIG_CMD_NET)
|
||||
+#define CONFIG_SERVERIP 192.168.1.2
|
||||
@ -63,14 +60,8 @@
|
||||
+#define CONFIG_ENV_IS_NOWHERE
|
||||
+#endif
|
||||
+
|
||||
+/* Flattened uImage Tree */
|
||||
+#define CONFIG_FIT 1
|
||||
+#define CONFIG_FIT_VERBOSE 1
|
||||
+
|
||||
+/* Various */
|
||||
+#define CONFIG_BZIP2
|
||||
+#define CONFIG_LZMA
|
||||
+#define CONFIG_LZO
|
||||
+
|
||||
+/* Unnecessary */
|
||||
+#undef CONFIG_BOOTM_NETBSD
|
||||
@ -80,25 +71,16 @@
|
||||
+#endif /* __OPENWRT_KIRKWOOD_COMMON_H */
|
||||
--- a/include/configs/pogo_e02.h
|
||||
+++ b/include/configs/pogo_e02.h
|
||||
@@ -93,4 +93,6 @@
|
||||
#define CONFIG_CMD_MTDPARTS
|
||||
#define CONFIG_LZO
|
||||
@@ -83,4 +83,6 @@
|
||||
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
|
||||
#define CONFIG_MTD_PARTITIONS
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_POGO_E02_H */
|
||||
--- a/include/configs/sheevaplug.h
|
||||
+++ b/include/configs/sheevaplug.h
|
||||
@@ -99,4 +99,6 @@
|
||||
#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
|
||||
#endif /* CONFIG_CMD_IDE */
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_SHEEVAPLUG_H */
|
||||
--- a/include/configs/goflexhome.h
|
||||
+++ b/include/configs/goflexhome.h
|
||||
@@ -112,4 +112,6 @@
|
||||
@@ -105,4 +105,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
@ -107,10 +89,80 @@
|
||||
#endif /* _CONFIG_GOFLEXHOME_H */
|
||||
--- a/include/configs/nsa310.h
|
||||
+++ b/include/configs/nsa310.h
|
||||
@@ -141,4 +141,6 @@
|
||||
#define CONFIG_CMD_DNS
|
||||
@@ -123,4 +123,6 @@
|
||||
#define CONFIG_RTC_MV
|
||||
#endif /* CONFIG_CMD_DATE */
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_NSA310_H */
|
||||
--- a/configs/dockstar_defconfig
|
||||
+++ b/configs/dockstar_defconfig
|
||||
@@ -25,3 +25,8 @@ CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/goflexhome_defconfig
|
||||
+++ b/configs/goflexhome_defconfig
|
||||
@@ -29,3 +29,8 @@ CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/ib62x0_defconfig
|
||||
+++ b/configs/ib62x0_defconfig
|
||||
@@ -27,5 +27,9 @@ CONFIG_SYS_NS16550=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
-CONFIG_LZMA=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/iconnect_defconfig
|
||||
+++ b/configs/iconnect_defconfig
|
||||
@@ -24,5 +24,9 @@ CONFIG_SYS_NS16550=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
-CONFIG_LZMA=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/nsa310_defconfig
|
||||
+++ b/configs/nsa310_defconfig
|
||||
@@ -30,5 +30,8 @@ CONFIG_CMD_UBI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_LZMA=y
|
||||
CONFIG_LZO=y
|
||||
--- a/configs/pogo_e02_defconfig
|
||||
+++ b/configs/pogo_e02_defconfig
|
||||
@@ -25,3 +25,8 @@ CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
|
@ -26,205 +26,205 @@ endef
|
||||
define U-Boot/arv4519pw_ram
|
||||
NAME:=Arcadyan arv4519pw (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4519PW
|
||||
BUILD_DEVICES:=arcadyan_arv4519pw
|
||||
DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv4519pw_nor
|
||||
NAME:=Arcadyan arv4519pw (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4519PW
|
||||
BUILD_DEVICES:=arcadyan_arv4519pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv4519pw_brn
|
||||
NAME:=Arcadyan arv4519pw (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4519PW
|
||||
BUILD_DEVICES:=arcadyan_arv4519pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv7506pw11_ram
|
||||
NAME:=Arcadyan ARV7506PW11 (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7506PW11
|
||||
BUILD_DEVICES:=arcadyan_arv7506pw11
|
||||
DDR_SETTINGS:=board/arcadyan/arv7506pw11/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv7506pw11_nor
|
||||
NAME:=Arcadyan ARV7506PW11 (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7506PW11
|
||||
BUILD_DEVICES:=arcadyan_arv7506pw11
|
||||
endef
|
||||
|
||||
define U-Boot/arv7506pw11_brn
|
||||
NAME:=Arcadyan ARV7506PW11 (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7506PW11
|
||||
BUILD_DEVICES:=arcadyan_arv7506pw11
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw_ram
|
||||
NAME:=Arcadyan arv7510pw (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4510PW
|
||||
BUILD_DEVICES:=arcadyan_arv4510pw
|
||||
DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw_nor
|
||||
NAME:=Arcadyan arv7510pw (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4510PW
|
||||
BUILD_DEVICES:=arcadyan_arv4510pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw_brn
|
||||
NAME:=Arcadyan arv7510pw (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV4510PW
|
||||
BUILD_DEVICES:=arcadyan_arv4510pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw22_ram
|
||||
NAME:=Arcadyan arv7510pw22 (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7510PW22
|
||||
BUILD_DEVICES:=arcadyan_arv7510pw22
|
||||
DDR_SETTINGS:=board/arcadyan/arv7510pw22/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw22_nor
|
||||
NAME:=Arcadyan arv7510pw22 (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7510PW22
|
||||
BUILD_DEVICES:=arcadyan_arv7510pw22
|
||||
endef
|
||||
|
||||
define U-Boot/arv7510pw22_brn
|
||||
NAME:=Arcadyan arv7510pw22 (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7510PW22
|
||||
BUILD_DEVICES:=arcadyan_arv7510pw22
|
||||
endef
|
||||
|
||||
define U-Boot/arv7518pw_ram
|
||||
NAME:=Arcadyan arv7518pw (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7518PW
|
||||
BUILD_DEVICES:=arcadyan_arv7518pw
|
||||
DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv7518pw_nor
|
||||
NAME:=Arcadyan arv7518pw (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7518PW
|
||||
BUILD_DEVICES:=arcadyan_arv7518pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv7518pw_brn
|
||||
NAME:=Arcadyan arv7518pw (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV7518PW
|
||||
BUILD_DEVICES:=arcadyan_arv7518pw
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw_ram
|
||||
NAME:=Arcadyan arv752dpw (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h
|
||||
BUILD_DEVICES:=ARV752DPW
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw_nor
|
||||
NAME:=Arcadyan arv752dpw (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV752DPW
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw_brn
|
||||
NAME:=Arcadyan arv752dpw (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV752DPW
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw22_ram
|
||||
NAME:=Arcadyan arv752dpw22 (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV752DPW22
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw22
|
||||
DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw22_nor
|
||||
NAME:=Arcadyan arv752dpw22 (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV752DPW22
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw22
|
||||
endef
|
||||
|
||||
define U-Boot/arv752dpw22_brn
|
||||
NAME:=Arcadyan arv752dpw22 (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV752DPW22
|
||||
BUILD_DEVICES:=arcadyan_arv752dpw22
|
||||
endef
|
||||
|
||||
define U-Boot/arv8539pw22_ram
|
||||
NAME:=Speedport W 504V Typ A (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV8539PW22
|
||||
BUILD_DEVICES:=arcadyan_arv8539pw22
|
||||
DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/arv8539pw22_nor
|
||||
NAME:=Speedport W 504V Typ A (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV8539PW22
|
||||
BUILD_DEVICES:=arcadyan_arv8539pw22
|
||||
endef
|
||||
|
||||
define U-Boot/arv8539pw22_brn
|
||||
NAME:=Speedport W 504V Typ A (BRN)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ARV8539PW22
|
||||
BUILD_DEVICES:=arcadyan_arv8539pw22
|
||||
endef
|
||||
|
||||
define U-Boot/gigasx76x_ram
|
||||
NAME:=Siemens Gigaset sx76x (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=GIGASX76X
|
||||
BUILD_DEVICES:=siemens_gigaset-sx76x
|
||||
DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/gigasx76x_nor
|
||||
NAME:=Siemens Gigaset sx76x (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=GIGASX76X
|
||||
BUILD_DEVICES:=siemens_gigaset-sx76x
|
||||
endef
|
||||
|
||||
define U-Boot/acmp252_ram
|
||||
NAME:=AudioCodes MP-252 (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ACMP252
|
||||
BUILD_DEVICES:=audiocodes_mp-252
|
||||
DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/acmp252_nor
|
||||
NAME:=AudioCodes MP-252 (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=ACMP252
|
||||
BUILD_DEVICES:=audiocodes_mp-252
|
||||
endef
|
||||
|
||||
define U-Boot/bthomehubv5a_ram
|
||||
NAME:=BT Home Hub 5A (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=BTHOMEHUBV5A
|
||||
BUILD_DEVICES:=bt_homehub-v5a
|
||||
DDR_SETTINGS:=board/bt/bthomehubv5a/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/easy50712_ram
|
||||
NAME:=Lantiq EASY50712 (RAM)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=EASY50712
|
||||
BUILD_DEVICES:=lantiq_easy50712
|
||||
DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/easy50712_nor
|
||||
NAME:=Lantiq EASY50712 (NOR)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=EASY50712
|
||||
BUILD_DEVICES:=lantiq_easy50712
|
||||
endef
|
||||
|
||||
define U-Boot/easy50712_norspl
|
||||
NAME:=Lantiq EASY50712 (NOR SPL)
|
||||
BUILD_SUBTARGET:=xway
|
||||
BUILD_DEVICES:=EASY50712
|
||||
BUILD_DEVICES:=lantiq_easy50712
|
||||
UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
|
||||
DEPENDS+=@BROKEN
|
||||
endef
|
||||
@ -232,20 +232,20 @@ endef
|
||||
define U-Boot/easy80920_ram
|
||||
NAME:=Lantiq EASY80920 (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=EASY80920NOR EASY80920NAND
|
||||
BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
|
||||
DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/easy80920_nor
|
||||
NAME:=Lantiq EASY80920 (NOR)
|
||||
BUILD_DEVICES:=EASY80920NOR EASY80920NAND
|
||||
BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
endef
|
||||
|
||||
define U-Boot/easy80920_norspl
|
||||
NAME:=Lantiq EASY80920 (NOR SPL)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=EASY80920NOR EASY80920NAND
|
||||
BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
|
||||
UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
|
||||
DEPENDS+=@BROKEN
|
||||
endef
|
||||
@ -253,7 +253,7 @@ endef
|
||||
define U-Boot/easy80920_sfspl
|
||||
NAME:=Lantiq EASY80920 (SPI SPL)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=EASY80920NOR EASY80920NAND
|
||||
BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
|
||||
UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
|
||||
DEPENDS+=@BROKEN
|
||||
endef
|
||||
@ -261,20 +261,20 @@ endef
|
||||
define U-Boot/fb3370_eva
|
||||
NAME:=AVM FRITZ3370 (EVA)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=FRITZ3370
|
||||
BUILD_DEVICES:=avm_fritz3370
|
||||
endef
|
||||
|
||||
define U-Boot/fb3370_ram
|
||||
NAME:=AVM FRITZ3370 (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=FRITZ3370
|
||||
BUILD_DEVICES:=avm_fritz3370
|
||||
DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/fb3370_sfspl
|
||||
NAME:=AVM FRITZ3370 (SPI SPL)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=FRITZ3370
|
||||
BUILD_DEVICES:=avm_fritz3370
|
||||
UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
|
||||
DEPENDS+=@BROKEN
|
||||
endef
|
||||
@ -282,14 +282,14 @@ endef
|
||||
define U-Boot/p2812hnufx_ram
|
||||
NAME:=ZyXEL P-2812HNU-Fx (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=P2812HNUF1
|
||||
BUILD_DEVICES:=zyxel_p-2812hnu-f1
|
||||
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/p2812hnufx_nandspl
|
||||
NAME:=ZyXEL P-2812HNU-Fx (NAND SPL)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=P2812HNUF1
|
||||
BUILD_DEVICES:=zyxel_p-2812hnu-f1
|
||||
UBOOT_IMAGE:=u-boot.ltq.lzo.nandspl
|
||||
DEPENDS+=@BROKEN
|
||||
endef
|
||||
@ -297,38 +297,38 @@ endef
|
||||
define U-Boot/vgv7510kw22_brn
|
||||
NAME:=Arcadyan VGV7510KW22 (BRN)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7510KW22NOR
|
||||
BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
|
||||
endef
|
||||
|
||||
define U-Boot/vgv7510kw22_nor
|
||||
NAME:=Arcadyan VGV7510KW22 (NOR)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7510KW22NOR
|
||||
BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
|
||||
endef
|
||||
|
||||
define U-Boot/vgv7510kw22_ram
|
||||
NAME:=Arcadyan VGV7510KW22 (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7510KW22NOR
|
||||
BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
|
||||
DDR_SETTINGS:=board/arcadyan/vgv7510kw22/ddr_settings.h
|
||||
endef
|
||||
|
||||
define U-Boot/vgv7519_brn
|
||||
NAME:=Arcadyan VGV7519 (BRN)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7519NOR VGV7519BRN
|
||||
BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
|
||||
endef
|
||||
|
||||
define U-Boot/vgv7519_nor
|
||||
NAME:=Arcadyan VGV7519 (NOR)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7519NOR VGV7519BRN
|
||||
BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
|
||||
endef
|
||||
|
||||
define U-Boot/vgv7519_ram
|
||||
NAME:=Arcadyan VGV7519 (RAM)
|
||||
BUILD_SUBTARGET:=xrx200
|
||||
BUILD_DEVICES:=VGV7519NOR VGV7519BRN
|
||||
BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
|
||||
DDR_SETTINGS:=board/arcadyan/vgv7519/ddr_settings.h
|
||||
endef
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape-32bit
|
||||
PKG_VERSION:=v1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_MIRROR_HASH:=a29edbeddde4b3007ac349c2a5ee434719049ac4753e459dbb1bab21e1c585da
|
||||
PKG_SOURCE_URL:=https://github.com/fsl-jyt/uboot-ls-32b.git
|
||||
PKG_SOURCE_VERSION:=6476195551ea83193afd06d0c441483c04729c8d
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
||||
PKG_LICENSE_FILES:=Licenses/README
|
||||
|
||||
PKG_MAINTAINER:=Jiang Yutang <jiangyutang1978@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
define Package/uboot-layerscape-32b
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_layerscape_32b
|
||||
TITLE:=32-bit U-Boot for Layerscape boards
|
||||
DEFAULT:=y
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-32b-uboot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-32b-uboot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin.swap $(STAGING_DIR_IMAGE)/ls1012ardb-32b-uboot.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,uboot-layerscape-32b))
|
53
package/boot/uboot-layerscape-armv8_32b/Makefile
Normal file
53
package/boot/uboot-layerscape-armv8_32b/Makefile
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape-armv8_32b
|
||||
PKG_SOURCE_DATE:=2017-10-24
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# Layerscape ARMv8 platforms use 64-bit u-boot to support both 32-bit and 64-bit
|
||||
# kernel/rootfs. Since OpenWrt could only provide 32-bit toolchain for 32-bit targets,
|
||||
# 64-bit u-boot images git tree is provided here whose source code actually is
|
||||
# uboot-layerscape's source code.
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git
|
||||
PKG_SOURCE_VERSION:=43cb4c0fcab237f8daa39c393cc1441b76b99fcf
|
||||
PKG_MIRROR_HASH:=ff7d1fcb85dda2be6a9e3785821b5791c7189d2d412b160a9621bb2dcad24dea
|
||||
|
||||
PKG_MAINTAINER:=Yangbo Lu <yangbo.lu@nxp.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
define Package/uboot-layerscape-armv8_32b
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_layerscape_armv8_32b
|
||||
TITLE:=U-Boot for ARMv8 32-bit based Layerscape boards
|
||||
DEFAULT:=y
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-armv8_32b-uboot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-armv8_32b-uboot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/ls1012afrdm-uboot.bin $(STAGING_DIR_IMAGE)/ls1012afrdm-armv8_32b-uboot.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,uboot-layerscape-armv8_32b))
|
@ -9,20 +9,20 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape
|
||||
PKG_VERSION:=v1.0
|
||||
PKG_SOURCE_DATE:=2017-08-24
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_MIRROR_HASH:=462fea9bdf03ec4bc23f2f1bb3917c2ec57017eca1e11b8a609bf60cd51a94e7
|
||||
PKG_SOURCE_URL:=https://github.com/fsl-jyt/u-boot.git
|
||||
PKG_SOURCE_VERSION:=69b5ea576a2b0448391a910114d6c05859bf78d0
|
||||
PKG_SOURCE_URL:=https://github.com/qoriq-open-source/u-boot.git
|
||||
PKG_SOURCE_VERSION:=fbedf04c1bad675eadbac86febdcf759441a02af
|
||||
PKG_MIRROR_HASH:=29922f83ce3e8dde163eafcfd07f3595e2779b7a3e8eb43640f058f58248718d
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=layerscape
|
||||
BUILD_SUBTARGET:=64b
|
||||
BUILD_SUBTARGET:=armv8_64b
|
||||
BUILD_DEVICES:=$(1)
|
||||
UBOOT_IMAGE:=u-boot-dtb.bin
|
||||
HIDDEN:=y
|
||||
@ -40,17 +40,34 @@ endef
|
||||
define U-Boot/ls1012ardb
|
||||
NAME:=NXP ls1012ardb 64b Dev Board
|
||||
UBOOT_CONFIG:=ls1012ardb_qspi
|
||||
UBOOT_IMAGE:=u-boot-swap.bin
|
||||
endef
|
||||
|
||||
define U-Boot/ls1088ardb
|
||||
NAME:=NXP ls1088ardb 64b Dev Board
|
||||
UBOOT_CONFIG:=ls1088ardb_qspi
|
||||
endef
|
||||
|
||||
define U-Boot/ls2088ardb
|
||||
NAME:=NXP ls2088ardb 64b Dev Board
|
||||
UBOOT_CONFIG:=ls2080ardb
|
||||
endef
|
||||
|
||||
define U-Boot/ls1012afrdm
|
||||
NAME:=NXP ls1012afrdm 64b Dev Board
|
||||
UBOOT_CONFIG:=ls1012afrdm_qspi
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
ls1043ardb \
|
||||
ls1046ardb \
|
||||
ls1012ardb
|
||||
ls1012ardb \
|
||||
ls1088ardb \
|
||||
ls2088ardb \
|
||||
ls1012afrdm
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-64b-uboot.bin
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(BUILD_SUBTARGET)-uboot.bin
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
|
@ -0,0 +1,51 @@
|
||||
From 74be1b50f96b3ada0a4fc18f0283659739edbadf Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Fri, 22 Sep 2017 11:00:12 +0800
|
||||
Subject: [PATCH 1/3] armv8: ls1043a: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1043a_common.h | 20 +++++++++++++++++++-
|
||||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
|
||||
index 0b3fb4e..5c01111 100644
|
||||
--- a/include/configs/ls1043a_common.h
|
||||
+++ b/include/configs/ls1043a_common.h
|
||||
@@ -336,7 +336,19 @@
|
||||
"sd_bootcmd=echo Trying load from SD ..;" \
|
||||
"mmcinfo; mmc read $load_addr " \
|
||||
"$kernel_addr_sd $kernel_size_sd ;" \
|
||||
- " bootm $load_addr#$board\0"
|
||||
+ " bootm $load_addr#$board\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock8 " \
|
||||
+ "rootfstype=squashfs,jffs2 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
|
||||
+ "mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
|
||||
+ "16M(kernel),32M(rootfs),64M(otherbank)\0" \
|
||||
+ "lede_run=cp.b 60f00000 $fdtaddr 100000 && " \
|
||||
+ "cp.b 61000000 $loadaddr 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
@@ -351,6 +363,12 @@
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND "run lede_boot"
|
||||
+
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \
|
||||
"earlycon=uart8250,mmio,0x21c0500 " \
|
||||
MTDPARTS_DEFAULT
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,57 @@
|
||||
From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Fri, 22 Sep 2017 11:36:43 +0800
|
||||
Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1046a_common.h | 15 ++++++++++++++-
|
||||
include/configs/ls1046ardb.h | 6 ++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
|
||||
index 4fc2f94..53bd41b 100644
|
||||
--- a/include/configs/ls1046a_common.h
|
||||
+++ b/include/configs/ls1046a_common.h
|
||||
@@ -276,7 +276,20 @@
|
||||
"sd_bootcmd=echo Trying load from SD ..;" \
|
||||
"mmcinfo; mmc read $load_addr " \
|
||||
"$kernel_addr_sd $kernel_size_sd ;" \
|
||||
- " bootm $load_addr#$board\0"
|
||||
+ " bootm $load_addr#$board\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock9 " \
|
||||
+ "rootfstype=ext4 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
|
||||
+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
|
||||
+ "16M(kernel),30M(ext4rfs),2M(user)\0" \
|
||||
+ "lede_run=sf probe 0:0 && " \
|
||||
+ "sf read $fdtaddr f00000 100000 && " \
|
||||
+ "sf read $loadaddr 1000000 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
|
||||
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \
|
||||
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
|
||||
index f8c15a6..c3b50b1 100644
|
||||
--- a/include/configs/ls1046ardb.h
|
||||
+++ b/include/configs/ls1046ardb.h
|
||||
@@ -251,6 +251,12 @@
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND "run lede_boot"
|
||||
+
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
#define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \
|
||||
"15m(u-boot),48m(kernel.itb);" \
|
||||
"7e800000.flash:16m(nand_uboot)," \
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,51 @@
|
||||
From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Thu, 28 Sep 2017 11:25:58 +0800
|
||||
Subject: [PATCH 3/3] armv8: ls1012ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1012ardb.h | 21 ++++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h
|
||||
index 5fe3218..242cdf0 100644
|
||||
--- a/include/configs/ls1012ardb.h
|
||||
+++ b/include/configs/ls1012ardb.h
|
||||
@@ -127,13 +127,32 @@
|
||||
"$kernel_addr $kernel_size; env exists secureboot " \
|
||||
"&& sf read $kernelheader_addr_r $kernelheader_addr " \
|
||||
"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
|
||||
- "bootm $load_addr#$board\0"
|
||||
+ "bootm $load_addr#$board\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock8 " \
|
||||
+ "rootfstype=ext4 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
|
||||
+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
|
||||
+ "16M(kernel),30M(ext4rfs),2M(user)\0" \
|
||||
+ "lede_run=pfe stop && sf probe 0:0 && " \
|
||||
+ "sf read $fdtaddr f00000 100000 && " \
|
||||
+ "sf read $loadaddr 1000000 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
|
||||
#define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND "run lede_boot"
|
||||
+
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
|
||||
#include <asm/fsl_secure_boot.h>
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Mon, 16 Oct 2017 11:57:36 +0800
|
||||
Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1088ardb.h | 27 ++++++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
|
||||
index 7bd152d..4cefa40 100644
|
||||
--- a/include/configs/ls1088ardb.h
|
||||
+++ b/include/configs/ls1088ardb.h
|
||||
@@ -404,7 +404,20 @@
|
||||
"env exists secureboot && mmc read $kernelheader_addr_r " \
|
||||
"$kernelhdr_addr_sd $kernelhdr_size_sd " \
|
||||
" && esbc_validate ${kernelheader_addr_r};" \
|
||||
- "bootm $load_addr#$BOARD\0"
|
||||
+ "bootm $load_addr#$BOARD\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock10 " \
|
||||
+ "rootfstype=ext4 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
|
||||
+ "mtdparts=20c0000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \
|
||||
+ "16M(kernel),30M(ext4rfs),2M(user)\0" \
|
||||
+ "lede_run=sf probe 0:0 && " \
|
||||
+ "sf read $fdtaddr f00000 100000 && " \
|
||||
+ "sf read $loadaddr 1000000 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#if defined(CONFIG_QSPI_BOOT)
|
||||
@@ -429,6 +442,18 @@
|
||||
"run distro_bootcmd;run sd_bootcmd;" \
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
+
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "sf probe 0:0;sf read 0x80000000 0xA00000 0x300000;" \
|
||||
+ "sf read 0x80300000 0xE00000 0x100000;" \
|
||||
+ "fsl_mc start mc 0x80000000 0x80300000;" \
|
||||
+ "sf read 0x80400000 0xd00000 0x100000;" \
|
||||
+ "fsl_mc apply dpl 0x80400000;" \
|
||||
+ "run lede_boot;"
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
/* MAC/PHY configuration */
|
||||
#ifdef CONFIG_FSL_MC_ENET
|
||||
#define CONFIG_PHYLIB_10G
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Mon, 16 Oct 2017 12:37:05 +0800
|
||||
Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls2080ardb.h | 23 ++++++++++++++++++++++-
|
||||
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
|
||||
index 8a34990..8ae3944 100644
|
||||
--- a/include/configs/ls2080ardb.h
|
||||
+++ b/include/configs/ls2080ardb.h
|
||||
@@ -432,7 +432,19 @@ unsigned long get_board_sys_clk(void);
|
||||
"env exists secureboot && mmc read $kernelheader_addr_r " \
|
||||
"$kernelhdr_addr_sd $kernelhdr_size_sd " \
|
||||
" && esbc_validate ${kernelheader_addr_r};" \
|
||||
- "bootm $load_addr#$board\0"
|
||||
+ "bootm $load_addr#$board\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock9 " \
|
||||
+ "rootfstype=squashfs,jffs2 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 " \
|
||||
+ "mtdparts=580000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \
|
||||
+ "16M(kernel),32M(rootfs),64M(otherbank)\0" \
|
||||
+ "lede_run=cp.b 580f00000 $fdtaddr 100000 && " \
|
||||
+ "cp.b 581000000 $loadaddr 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#ifdef CONFIG_QSPI_BOOT
|
||||
@@ -463,6 +475,15 @@ unsigned long get_board_sys_clk(void);
|
||||
"env exists secureboot && esbc_halt;"
|
||||
#endif
|
||||
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "fsl_mc start mc 0x580a00000 0x580e00000;" \
|
||||
+ "fsl_mc apply dpl 0x580d00000;" \
|
||||
+ "run lede_boot;"
|
||||
+
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
#undef CONFIG_BOOTARGS
|
||||
#define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \
|
||||
"earlycon=uart8250,mmio,0x21c0600 " \
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,49 @@
|
||||
From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Tue, 24 Oct 2017 17:48:08 +0800
|
||||
Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1012afrdm.h | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
|
||||
index a3f8824d27..36dff19bdd 100644
|
||||
--- a/include/configs/ls1012afrdm.h
|
||||
+++ b/include/configs/ls1012afrdm.h
|
||||
@@ -73,12 +73,31 @@
|
||||
"qspi_bootcmd=echo Trying load from qspi..;" \
|
||||
"sf probe && sf read $load_addr " \
|
||||
"$kernel_addr $kernel_size && bootm $load_addr#$board\0" \
|
||||
+ "lede_setenv=setenv loadaddr 82000000 && " \
|
||||
+ "setenv fdtaddr 8f000000 && " \
|
||||
+ "setenv bootargs root=/dev/mtdblock8 " \
|
||||
+ "rootfstype=ext4 noinitrd " \
|
||||
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
|
||||
+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
|
||||
+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
|
||||
+ "16M(kernel),30M(ext4rfs),2M(user)\0" \
|
||||
+ "lede_run=pfe stop && sf probe 0:0 && " \
|
||||
+ "sf read $fdtaddr f00000 100000 && " \
|
||||
+ "sf read $loadaddr 1000000 1000000 && " \
|
||||
+ "bootm $loadaddr - $fdtaddr\0" \
|
||||
+ "lede_boot=run lede_setenv;run lede_run\0"
|
||||
|
||||
#undef CONFIG_BOOTCOMMAND
|
||||
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
|
||||
#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
|
||||
#endif
|
||||
|
||||
+#undef CONFIG_BOOTCOMMAND
|
||||
+#define CONFIG_BOOTCOMMAND "run lede_boot"
|
||||
+
|
||||
+#undef CONFIG_BOOTDELAY
|
||||
+#define CONFIG_BOOTDELAY 3
|
||||
+
|
||||
/*
|
||||
* USB
|
||||
*/
|
||||
--
|
||||
2.14.1
|
||||
|
@ -16,6 +16,8 @@ PKG_HASH:=f54baf3f9325bf444c7905f3a5b6f83680edb1e6e1a4d5f8a5ad80abe885113f
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
UBOOT_MAKE_FLAGS:=
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=mvebu
|
||||
HIDDEN:=1
|
||||
|
@ -11,18 +11,14 @@ Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
|
||||
configs/clearfog_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
|
||||
index 41e94e6daf..f3572971be 100644
|
||||
--- a/configs/clearfog_defconfig
|
||||
+++ b/configs/clearfog_defconfig
|
||||
@@ -34,6 +34,7 @@ CONFIG_CMD_EXT2=y
|
||||
CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
@@ -23,7 +23,7 @@ CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_USB=y
|
||||
-# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
CONFIG_EFI_PARTITION=y
|
||||
# CONFIG_PARTITION_UUIDS is not set
|
||||
# CONFIG_SPL_PARTITION_UUIDS is not set
|
||||
--
|
||||
2.12.2
|
||||
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_CMD_DHCP=y
|
||||
CONFIG_CMD_MII=y
|
||||
|
@ -0,0 +1,153 @@
|
||||
From 59be82ef7e7ec4be6e1597d8aef65dd3d8c3a0d9 Mon Sep 17 00:00:00 2001
|
||||
From: Jelle van der Waa <jelle@vdwaa.nl>
|
||||
Date: Mon, 8 May 2017 21:31:19 +0200
|
||||
Subject: [PATCH 1/2] rsa: Fix build with OpenSSL 1.1.x
|
||||
|
||||
The rsa_st struct has been made opaque in 1.1.x, add forward compatible
|
||||
code to access the n, e, d members of rsa_struct.
|
||||
|
||||
EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be
|
||||
called to reinitialise an already created structure.
|
||||
---
|
||||
lib/rsa/rsa-sign.c | 44 ++++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 38 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/lib/rsa/rsa-sign.c
|
||||
+++ b/lib/rsa/rsa-sign.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <image.h>
|
||||
#include <time.h>
|
||||
+#include <openssl/bn.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
@@ -20,6 +21,19 @@
|
||||
#define HAVE_ERR_REMOVE_THREAD_STATE
|
||||
#endif
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+static void RSA_get0_key(const RSA *r,
|
||||
+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
|
||||
+{
|
||||
+ if (n != NULL)
|
||||
+ *n = r->n;
|
||||
+ if (e != NULL)
|
||||
+ *e = r->e;
|
||||
+ if (d != NULL)
|
||||
+ *d = r->d;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int rsa_err(const char *msg)
|
||||
{
|
||||
unsigned long sslErr = ERR_get_error();
|
||||
@@ -286,16 +300,22 @@ static int rsa_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
ret = SSL_library_init();
|
||||
+#else
|
||||
+ ret = OPENSSL_init_ssl(0, NULL);
|
||||
+#endif
|
||||
if (!ret) {
|
||||
fprintf(stderr, "Failure to init SSL library\n");
|
||||
return -1;
|
||||
}
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
SSL_load_error_strings();
|
||||
|
||||
OpenSSL_add_all_algorithms();
|
||||
OpenSSL_add_all_digests();
|
||||
OpenSSL_add_all_ciphers();
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -335,12 +355,15 @@ err_set_rsa:
|
||||
err_engine_init:
|
||||
ENGINE_free(e);
|
||||
err_engine_by_id:
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
ENGINE_cleanup();
|
||||
+#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void rsa_remove(void)
|
||||
{
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
ERR_free_strings();
|
||||
#ifdef HAVE_ERR_REMOVE_THREAD_STATE
|
||||
@@ -349,6 +372,7 @@ static void rsa_remove(void)
|
||||
ERR_remove_state(0);
|
||||
#endif
|
||||
EVP_cleanup();
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void rsa_engine_remove(ENGINE *e)
|
||||
@@ -409,7 +433,11 @@ static int rsa_sign_with_key(RSA *rsa, s
|
||||
ret = rsa_err("Could not obtain signature");
|
||||
goto err_sign;
|
||||
}
|
||||
- EVP_MD_CTX_cleanup(context);
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+ EVP_MD_CTX_cleanup(context);
|
||||
+ #else
|
||||
+ EVP_MD_CTX_reset(context);
|
||||
+ #endif
|
||||
EVP_MD_CTX_destroy(context);
|
||||
EVP_PKEY_free(key);
|
||||
|
||||
@@ -479,6 +507,7 @@ static int rsa_get_exponent(RSA *key, ui
|
||||
{
|
||||
int ret;
|
||||
BIGNUM *bn_te;
|
||||
+ const BIGNUM *key_e;
|
||||
uint64_t te;
|
||||
|
||||
ret = -EINVAL;
|
||||
@@ -487,17 +516,18 @@ static int rsa_get_exponent(RSA *key, ui
|
||||
if (!e)
|
||||
goto cleanup;
|
||||
|
||||
- if (BN_num_bits(key->e) > 64)
|
||||
+ RSA_get0_key(key, NULL, &key_e, NULL);
|
||||
+ if (BN_num_bits(key_e) > 64)
|
||||
goto cleanup;
|
||||
|
||||
- *e = BN_get_word(key->e);
|
||||
+ *e = BN_get_word(key_e);
|
||||
|
||||
- if (BN_num_bits(key->e) < 33) {
|
||||
+ if (BN_num_bits(key_e) < 33) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- bn_te = BN_dup(key->e);
|
||||
+ bn_te = BN_dup(key_e);
|
||||
if (!bn_te)
|
||||
goto cleanup;
|
||||
|
||||
@@ -527,6 +557,7 @@ int rsa_get_params(RSA *key, uint64_t *e
|
||||
{
|
||||
BIGNUM *big1, *big2, *big32, *big2_32;
|
||||
BIGNUM *n, *r, *r_squared, *tmp;
|
||||
+ const BIGNUM *key_n;
|
||||
BN_CTX *bn_ctx = BN_CTX_new();
|
||||
int ret = 0;
|
||||
|
||||
@@ -548,7 +579,8 @@ int rsa_get_params(RSA *key, uint64_t *e
|
||||
if (0 != rsa_get_exponent(key, exponent))
|
||||
ret = -1;
|
||||
|
||||
- if (!BN_copy(n, key->n) || !BN_set_word(big1, 1L) ||
|
||||
+ RSA_get0_key(key, &key_n, NULL, NULL);
|
||||
+ if (!BN_copy(n, key_n) || !BN_set_word(big1, 1L) ||
|
||||
!BN_set_word(big2, 2L) || !BN_set_word(big32, 32L))
|
||||
ret = -1;
|
||||
|
@ -0,0 +1,96 @@
|
||||
From 65030804dc57f3488e4ffe21e72fc65cd245cb98 Mon Sep 17 00:00:00 2001
|
||||
From: Jelle van der Waa <jelle@vdwaa.nl>
|
||||
Date: Mon, 8 May 2017 21:31:20 +0200
|
||||
Subject: [PATCH 2/2] tools: kwbimage fix build with OpenSSL 1.1.x
|
||||
|
||||
The rsa_st struct has been made opaque in 1.1.x, add forward compatible
|
||||
code to access the n, e, d members of rsa_struct.
|
||||
|
||||
EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be
|
||||
called to reinitialise an already created structure.
|
||||
|
||||
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
|
||||
---
|
||||
tools/kwbimage.c | 36 ++++++++++++++++++++++++++++++------
|
||||
1 file changed, 30 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/tools/kwbimage.c
|
||||
+++ b/tools/kwbimage.c
|
||||
@@ -18,10 +18,30 @@
|
||||
#include "kwbimage.h"
|
||||
|
||||
#ifdef CONFIG_KWB_SECURE
|
||||
+#include <openssl/bn.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+static void RSA_get0_key(const RSA *r,
|
||||
+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
|
||||
+{
|
||||
+ if (n != NULL)
|
||||
+ *n = r->n;
|
||||
+ if (e != NULL)
|
||||
+ *e = r->e;
|
||||
+ if (d != NULL)
|
||||
+ *d = r->d;
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
|
||||
+{
|
||||
+ EVP_MD_CTX_reset(ctx);
|
||||
+}
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
static struct image_cfg_element *image_cfg;
|
||||
@@ -470,12 +490,16 @@ static int kwb_export_pubkey(RSA *key, s
|
||||
char *keyname)
|
||||
{
|
||||
int size_exp, size_mod, size_seq;
|
||||
+ const BIGNUM *key_e, *key_n;
|
||||
uint8_t *cur;
|
||||
char *errmsg = "Failed to encode %s\n";
|
||||
|
||||
- if (!key || !key->e || !key->n || !dst) {
|
||||
+ RSA_get0_key(key, NULL, &key_e, NULL);
|
||||
+ RSA_get0_key(key, &key_n, NULL, NULL);
|
||||
+
|
||||
+ if (!key || !key_e || !key_n || !dst) {
|
||||
fprintf(stderr, "export pk failed: (%p, %p, %p, %p)",
|
||||
- key, key->e, key->n, dst);
|
||||
+ key, key_e, key_n, dst);
|
||||
fprintf(stderr, errmsg, keyname);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -490,8 +514,8 @@ static int kwb_export_pubkey(RSA *key, s
|
||||
* do the encoding manually.
|
||||
*/
|
||||
|
||||
- size_exp = BN_num_bytes(key->e);
|
||||
- size_mod = BN_num_bytes(key->n);
|
||||
+ size_exp = BN_num_bytes(key_e);
|
||||
+ size_mod = BN_num_bytes(key_n);
|
||||
size_seq = 4 + size_mod + 4 + size_exp;
|
||||
|
||||
if (size_mod > 256) {
|
||||
@@ -520,14 +544,14 @@ static int kwb_export_pubkey(RSA *key, s
|
||||
*cur++ = 0x82;
|
||||
*cur++ = (size_mod >> 8) & 0xFF;
|
||||
*cur++ = size_mod & 0xFF;
|
||||
- BN_bn2bin(key->n, cur);
|
||||
+ BN_bn2bin(key_n, cur);
|
||||
cur += size_mod;
|
||||
/* Exponent */
|
||||
*cur++ = 0x02; /* INTEGER */
|
||||
*cur++ = 0x82;
|
||||
*cur++ = (size_exp >> 8) & 0xFF;
|
||||
*cur++ = size_exp & 0xFF;
|
||||
- BN_bn2bin(key->e, cur);
|
||||
+ BN_bn2bin(key_e, cur);
|
||||
|
||||
if (hashf) {
|
||||
struct hash_v1 pk_hash;
|
@ -9,9 +9,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2016.03
|
||||
PKG_VERSION:=2017.07
|
||||
|
||||
PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
|
||||
PKG_HASH:=5374bfdc8acb9a38c025371b1ff20f45e7533668e84e685d0df5d9e7c0e4feff
|
||||
|
||||
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
||||
|
||||
@ -26,93 +26,162 @@ define U-Boot/Default
|
||||
endef
|
||||
|
||||
define U-Boot/A10-OLinuXino-Lime
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=A10 OLinuXino LIME
|
||||
BUILD_DEVICES:=sun4i-a10-olinuxino-lime
|
||||
endef
|
||||
|
||||
define U-Boot/A13-OLinuXino
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=A13 OlinuXino
|
||||
BUILD_DEVICES:=sun5i-a13-olinuxino
|
||||
endef
|
||||
|
||||
define U-Boot/A20-OLinuXino-Lime
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=A20 OLinuXino LIME
|
||||
BUILD_DEVICES:=sun7i-a20-olinuxino-lime
|
||||
endef
|
||||
|
||||
define U-Boot/A20-OLinuXino-Lime2
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=A20 OLinuXino LIME2
|
||||
BUILD_DEVICES:=sun7i-a20-olinuxino-lime2
|
||||
endef
|
||||
|
||||
define U-Boot/A20-OLinuXino-Lime2-eMMC
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=A20 OLinuXino LIME2 eMMC
|
||||
BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc
|
||||
endef
|
||||
|
||||
define U-Boot/A20-OLinuXino_MICRO
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=A20 OLinuXino MICRO
|
||||
BUILD_DEVICES:=sun7i-a20-olinuxino-micro
|
||||
endef
|
||||
|
||||
define U-Boot/Bananapi
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Bananapi
|
||||
BUILD_DEVICES:=sun7i-a20-bananapi
|
||||
endef
|
||||
|
||||
define U-Boot/Bananapro
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Bananapro
|
||||
BUILD_DEVICES:=sun7i-a20-bananapro
|
||||
endef
|
||||
|
||||
define U-Boot/Cubieboard
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=Cubieboard
|
||||
BUILD_DEVICES:=sun4i-a10-cubieboard
|
||||
endef
|
||||
|
||||
define U-Boot/Cubieboard2
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Cubieboard2
|
||||
BUILD_DEVICES:=sun7i-a20-cubieboard2
|
||||
endef
|
||||
|
||||
define U-Boot/Cubietruck
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Cubietruck
|
||||
BUILD_DEVICES:=sun7i-a20-cubietruck
|
||||
endef
|
||||
|
||||
define U-Boot/Hummingbird_A31
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Hummingbird A31 board
|
||||
endef
|
||||
|
||||
define U-Boot/Marsboard_A10
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=Marsboard
|
||||
BUILD_DEVICES:=sun4i-a10-marsboard
|
||||
endef
|
||||
|
||||
define U-Boot/Mele_M9
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Mele M9 (A31)
|
||||
BUILD_DEVICES:=sun6i-a31-m9
|
||||
endef
|
||||
|
||||
define U-Boot/OLIMEX_A13_SOM
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=Olimex A13 SOM
|
||||
BUILD_DEVICES:=sun5i-a13-olimex-som
|
||||
endef
|
||||
|
||||
define U-Boot/Linksprite_pcDuino
|
||||
BUILD_SUBTARGET:=cortexa8
|
||||
NAME:=Linksprite pcDuino
|
||||
BUILD_DEVICES:=sun4i-a10-pcduino
|
||||
endef
|
||||
|
||||
define U-Boot/Linksprite_pcDuino3
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Linksprite pcDuino3
|
||||
BUILD_DEVICES:=sun7i-a20-pcduino3
|
||||
endef
|
||||
|
||||
define U-Boot/Lamobo_R1
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Lamobo R1
|
||||
BUILD_DEVICES:=sun7i-a20-lamobo-r1
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi_m1_plus
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=NanoPi M1 Plus (H3)
|
||||
BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi_neo
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=U-Boot for NanoPi NEO (H3)
|
||||
BUILD_DEVICES:=sun8i-h3-nanopi-neo
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi_r1
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Orange Pi R1 (H2+)
|
||||
BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi_plus
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Orange Pi Plus (H3)
|
||||
BUILD_DEVICES:=sun8i-h3-orangepi-plus
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi_2
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Orange Pi 2 (H3)
|
||||
BUILD_DEVICES:=sun8i-h3-orangepi-2
|
||||
endef
|
||||
|
||||
define U-Boot/pangolin
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Theobroma A31-yQ7 devboard
|
||||
UENV:=pangolin
|
||||
endef
|
||||
|
||||
define U-Boot/pine64_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Pine64 Plus A64
|
||||
BUILD_DEVICES:=sun50i-a64-pine64-plus
|
||||
DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi
|
||||
UENV:=a64
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
A10-OLinuXino-Lime \
|
||||
A13-OLinuXino \
|
||||
A20-OLinuXino-Lime \
|
||||
A20-OLinuXino-Lime2 \
|
||||
A20-OLinuXino-Lime2-eMMC \
|
||||
A20-OLinuXino_MICRO \
|
||||
Bananapi \
|
||||
Bananapro \
|
||||
@ -120,19 +189,32 @@ UBOOT_TARGETS := \
|
||||
Cubieboard2 \
|
||||
Cubietruck \
|
||||
Hummingbird_A31 \
|
||||
Marsboard_A10 \
|
||||
Mele_M9 \
|
||||
OLIMEX_A13_SOM \
|
||||
Linksprite_pcDuino \
|
||||
Linksprite_pcDuino3 \
|
||||
Lamobo_R1 \
|
||||
nanopi_m1_plus \
|
||||
nanopi_neo \
|
||||
orangepi_r1 \
|
||||
orangepi_plus \
|
||||
pangolin
|
||||
orangepi_2 \
|
||||
pangolin \
|
||||
pine64_plus
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
UBOOT_MAKE_FLAGS += \
|
||||
BL31=$(STAGING_DIR_IMAGE)/bl31.bin
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
ifeq ($(SUBTARGET),cortexa53)
|
||||
cat $(PKG_BUILD_DIR)/spl/sunxi-spl.bin $(PKG_BUILD_DIR)/u-boot.itb > $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
|
||||
else
|
||||
$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
|
||||
endif
|
||||
mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
|
||||
$(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
|
||||
endef
|
||||
|
@ -1,8 +1,7 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/OLIMEX_A13_SOM_defconfig
|
||||
@@ -0,0 +1,18 @@
|
||||
@@ -0,0 +1,17 @@
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
|
@ -1,16 +1,16 @@
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
@@ -254,6 +254,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
sun6i-a31-m9.dtb \
|
||||
sun6i-a31-mele-a1000g-quad.dtb \
|
||||
sun6i-a31-mixtile-loftq.dtb \
|
||||
+ sun6i-a31-pangolin.dtb \
|
||||
sun6i-a31s-colorfly-e708-q1.dtb \
|
||||
sun6i-a31s-cs908.dtb \
|
||||
sun6i-a31s-primo81.dtb \
|
||||
sun6i-a31s-sinovoip-bpi-m2.dtb
|
||||
sun6i-a31s-inet-q972.dtb \
|
||||
--- a/arch/arm/dts/sun6i-a31.dtsi
|
||||
+++ b/arch/arm/dts/sun6i-a31.dtsi
|
||||
@@ -643,6 +643,13 @@
|
||||
@@ -679,6 +679,13 @@
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
@ -358,17 +358,9 @@
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SUNXI_SPI=y
|
||||
--- a/board/sunxi/Kconfig
|
||||
+++ b/board/sunxi/Kconfig
|
||||
@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I
|
||||
separate ahb reset control registers, custom pmic bus, new style
|
||||
watchdog, etc.
|
||||
|
||||
-
|
||||
choice
|
||||
prompt "Sunxi SoC Variant"
|
||||
optional
|
||||
@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
|
||||
--- a/arch/arm/mach-sunxi/Kconfig
|
||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||
@@ -746,6 +746,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
|
||||
Set the SCL pin for the LCD i2c interface. This takes a string in the
|
||||
format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
||||
From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 16 Mar 2016 20:44:51 +0100
|
||||
Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i
|
||||
|
||||
The clock_sun6i.c implementation was not deasserting the reset for
|
||||
the regular i2c controllers, this commit fixes this.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Ian Campbell <ijc@hellion.org.uk>
|
||||
---
|
||||
arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
|
||||
+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
|
||||
@@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- /* set the apb clock gate for twi */
|
||||
- if (state)
|
||||
+ /* set the apb clock gate and reset for twi */
|
||||
+ if (state) {
|
||||
setbits_le32(&ccm->apb2_gate,
|
||||
CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
|
||||
- else
|
||||
+ setbits_le32(&ccm->apb2_reset_cfg,
|
||||
+ 1 << (APB2_RESET_TWI_SHIFT + port));
|
||||
+ } else {
|
||||
+ clrbits_le32(&ccm->apb2_reset_cfg,
|
||||
+ 1 << (APB2_RESET_TWI_SHIFT + port));
|
||||
clrbits_le32(&ccm->apb2_gate,
|
||||
CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
From 1eae8f66ff749409eb96e2f3f3387c56232d0b8a Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 16 Mar 2016 13:46:22 +0100
|
||||
Subject: [PATCH] sunxi: Enable realtek phy support
|
||||
|
||||
Enable building of drivers/net/phy/realtek.c so that realtek phys
|
||||
get properly initialized.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Ian Campbell <ijc@hellion.org.uk>
|
||||
---
|
||||
include/configs/sunxi-common.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/include/configs/sunxi-common.h
|
||||
+++ b/include/configs/sunxi-common.h
|
||||
@@ -314,6 +314,7 @@ extern int soft_i2c_gpio_scl;
|
||||
#define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */
|
||||
#define CONFIG_PHY_ADDR 1
|
||||
#define CONFIG_MII /* MII PHY management */
|
||||
+#define CONFIG_PHY_REALTEK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_HCD
|
@ -1,127 +0,0 @@
|
||||
From fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 17 Mar 2016 13:53:03 +0100
|
||||
Subject: [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer
|
||||
being called
|
||||
|
||||
cpu_eth_init is no longer called for dm enabled eth drivers, this
|
||||
was causing the sunxi gmac eth controller to no longer work in u-boot.
|
||||
|
||||
This commit fixes this by calling the clock, reset and pinmux setup
|
||||
function from s_init() and enabling the phy power pin (if any) from
|
||||
board_init().
|
||||
|
||||
The enabling of phy power cannot be done from s_init because it uses dm
|
||||
and dm is not ready yet at this point.
|
||||
|
||||
Note that the mdelay is dropped as the phy gets enabled much earlier
|
||||
now, so it is no longer needed.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Ian Campbell <ijc@hellion.org.uk>
|
||||
Tested-by: Karsten Merker <merker@debian.org>
|
||||
Tested-by: Michael Haas <haas@computerlinguist.org>
|
||||
---
|
||||
arch/arm/cpu/armv7/sunxi/board.c | 28 +---------------------------
|
||||
arch/arm/include/asm/arch-sunxi/sys_proto.h | 6 +++++-
|
||||
board/sunxi/board.c | 5 +++++
|
||||
board/sunxi/gmac.c | 14 +-------------
|
||||
4 files changed, 12 insertions(+), 41 deletions(-)
|
||||
|
||||
--- a/arch/arm/cpu/armv7/sunxi/board.c
|
||||
+++ b/arch/arm/cpu/armv7/sunxi/board.c
|
||||
@@ -136,6 +136,7 @@ void s_init(void)
|
||||
timer_init();
|
||||
gpio_init();
|
||||
i2c_init_board();
|
||||
+ eth_init_board();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
@@ -243,30 +244,3 @@ void enable_caches(void)
|
||||
dcache_enable();
|
||||
}
|
||||
#endif
|
||||
-
|
||||
-#ifdef CONFIG_CMD_NET
|
||||
-/*
|
||||
- * Initializes on-chip ethernet controllers.
|
||||
- * to override, implement board_eth_init()
|
||||
- */
|
||||
-int cpu_eth_init(bd_t *bis)
|
||||
-{
|
||||
- __maybe_unused int rc;
|
||||
-
|
||||
-#ifdef CONFIG_MACPWR
|
||||
- gpio_request(CONFIG_MACPWR, "macpwr");
|
||||
- gpio_direction_output(CONFIG_MACPWR, 1);
|
||||
- mdelay(200);
|
||||
-#endif
|
||||
-
|
||||
-#ifdef CONFIG_SUNXI_GMAC
|
||||
- rc = sunxi_gmac_initialize(bis);
|
||||
- if (rc < 0) {
|
||||
- printf("sunxi: failed to initialize gmac\n");
|
||||
- return rc;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
|
||||
+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
|
||||
@@ -24,6 +24,10 @@ void sdelay(unsigned long);
|
||||
void return_to_fel(uint32_t lr, uint32_t sp);
|
||||
|
||||
/* Board / SoC level designware gmac init */
|
||||
-int sunxi_gmac_initialize(bd_t *bis);
|
||||
+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
|
||||
+void eth_init_board(void);
|
||||
+#else
|
||||
+static inline void eth_init_board(void) {}
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
--- a/board/sunxi/board.c
|
||||
+++ b/board/sunxi/board.c
|
||||
@@ -90,6 +90,11 @@ int board_init(void)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+#ifdef CONFIG_MACPWR
|
||||
+ gpio_request(CONFIG_MACPWR, "macpwr");
|
||||
+ gpio_direction_output(CONFIG_MACPWR, 1);
|
||||
+#endif
|
||||
+
|
||||
/* Uses dm gpio code so do this here and not in i2c_init_board() */
|
||||
return soft_i2c_board_init();
|
||||
}
|
||||
--- a/board/sunxi/gmac.c
|
||||
+++ b/board/sunxi/gmac.c
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
-int sunxi_gmac_initialize(bd_t *bis)
|
||||
+void eth_init_board(void)
|
||||
{
|
||||
int pin;
|
||||
struct sunxi_ccm_reg *const ccm =
|
||||
@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis)
|
||||
for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++)
|
||||
sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC);
|
||||
#endif
|
||||
-
|
||||
-#ifdef CONFIG_DM_ETH
|
||||
- return 0;
|
||||
-#else
|
||||
-# ifdef CONFIG_RGMII
|
||||
- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII);
|
||||
-# elif defined CONFIG_GMII
|
||||
- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII);
|
||||
-# else
|
||||
- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII);
|
||||
-# endif
|
||||
-#endif
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
From 948603d4d637a0e04a3214253b911cfc4ed11220 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 21 Mar 2016 14:44:35 +0100
|
||||
Subject: [PATCH] sunxi: Fix 2nd usb controller on sun4i/sun7i no longer
|
||||
working
|
||||
|
||||
The 2nd usb controller on sun4i/sun7i has its base address 0x8000
|
||||
bytes from the 1st one, rather then 0x1000. Also the ahb clk gates
|
||||
are interleaved with the ohci clk-gates introducing a hole between
|
||||
the clks for usb1 and usb2.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Ian Campbell <ijc@hellion.org.uk>
|
||||
---
|
||||
drivers/usb/host/ehci-sunxi.c | 13 +++++++++++--
|
||||
drivers/usb/host/ohci-sunxi.c | 15 ++++++++++++---
|
||||
2 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/ehci-sunxi.c
|
||||
+++ b/drivers/usb/host/ehci-sunxi.c
|
||||
@@ -17,6 +17,14 @@
|
||||
#include <dm.h>
|
||||
#include "ehci.h"
|
||||
|
||||
+#ifdef CONFIG_SUNXI_GEN_SUN4I
|
||||
+#define BASE_DIST 0x8000
|
||||
+#define AHB_CLK_DIST 2
|
||||
+#else
|
||||
+#define BASE_DIST 0x1000
|
||||
+#define AHB_CLK_DIST 1
|
||||
+#endif
|
||||
+
|
||||
struct ehci_sunxi_priv {
|
||||
struct ehci_ctrl ehci;
|
||||
int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
|
||||
@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice
|
||||
#ifdef CONFIG_MACH_SUN8I_H3
|
||||
priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0;
|
||||
#endif
|
||||
- priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1;
|
||||
- priv->ahb_gate_mask <<= priv->phy_index - 1;
|
||||
+ priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST;
|
||||
+ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
|
||||
+ priv->phy_index++; /* Non otg phys start at 1 */
|
||||
|
||||
setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
|
||||
#ifdef CONFIG_SUNXI_GEN_SUN6I
|
||||
--- a/drivers/usb/host/ohci-sunxi.c
|
||||
+++ b/drivers/usb/host/ohci-sunxi.c
|
||||
@@ -17,6 +17,14 @@
|
||||
#include <usb.h>
|
||||
#include "ohci.h"
|
||||
|
||||
+#ifdef CONFIG_SUNXI_GEN_SUN4I
|
||||
+#define BASE_DIST 0x8000
|
||||
+#define AHB_CLK_DIST 2
|
||||
+#else
|
||||
+#define BASE_DIST 0x1000
|
||||
+#define AHB_CLK_DIST 1
|
||||
+#endif
|
||||
+
|
||||
struct ohci_sunxi_priv {
|
||||
ohci_t ohci;
|
||||
int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
|
||||
@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice
|
||||
priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0;
|
||||
#endif
|
||||
priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK;
|
||||
- priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1;
|
||||
- priv->ahb_gate_mask <<= priv->phy_index - 1;
|
||||
- priv->usb_gate_mask <<= priv->phy_index - 1;
|
||||
+ priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST;
|
||||
+ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
|
||||
+ priv->usb_gate_mask <<= priv->phy_index;
|
||||
+ priv->phy_index++; /* Non otg phys start at 1 */
|
||||
|
||||
setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
|
||||
setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user