mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-14 11:13:29 +00:00
x64: fix grub2 booting
This commit is contained in:
parent
b28e1c5402
commit
a3f1e837fd
@ -3,6 +3,20 @@
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
|
||||
config EXPERIMENTAL
|
||||
bool "Enable experimental features by default"
|
||||
default n
|
||||
help
|
||||
Set this option to build with latest bleeding edge features
|
||||
which may or may not work as expected.
|
||||
If you would like to help the development of OpenWrt, you are
|
||||
encouraged to set this option and provide feedback (both
|
||||
positive and negative). But do so only if you know how to
|
||||
recover your device in case of flashing potentially non-working
|
||||
firmware.
|
||||
|
||||
If you plan to use this build in production, say NO!
|
||||
|
||||
menu "Global build settings"
|
||||
|
||||
config JSON_OVERVIEW_IMAGE_INFO
|
||||
@ -49,17 +63,18 @@ menu "Global build settings"
|
||||
config TESTING_KERNEL
|
||||
bool "Use the testing kernel version"
|
||||
depends on HAS_TESTING_KERNEL
|
||||
default n
|
||||
default EXPERIMENTAL
|
||||
help
|
||||
If the target supports a newer kernel version than the default,
|
||||
you can use this config option to enable it
|
||||
|
||||
|
||||
config DISPLAY_SUPPORT
|
||||
bool "Show packages that require graphics support (local or remote)"
|
||||
default n
|
||||
|
||||
config BUILD_PATENTED
|
||||
default y
|
||||
default n
|
||||
bool "Compile with support for patented functionality"
|
||||
help
|
||||
When this option is disabled, software which provides patented functionality
|
||||
@ -86,11 +101,19 @@ menu "Global build settings"
|
||||
This removes all ipkg/opkg status data files from the target directory
|
||||
before building the root filesystem.
|
||||
|
||||
config IPK_FILES_CHECKSUMS
|
||||
bool
|
||||
prompt "Record files checksums in package metadata"
|
||||
default n
|
||||
help
|
||||
This makes file checksums part of package metadata. It increases size
|
||||
but provides you with pkg_check command to check for flash coruptions.
|
||||
|
||||
config INCLUDE_CONFIG
|
||||
bool "Include build configuration in firmware" if DEVEL
|
||||
default n
|
||||
help
|
||||
If enabled, config.seed will be stored in /etc/build.config of firmware.
|
||||
If enabled, buildinfo files will be stored in /etc/build.* of firmware.
|
||||
|
||||
config REPRODUCIBLE_DEBUG_INFO
|
||||
bool "Make debug information reproducible"
|
||||
|
@ -7,7 +7,7 @@ menuconfig DEVEL
|
||||
default n
|
||||
|
||||
config BROKEN
|
||||
bool "Show broken platforms / packages" if DEVEL
|
||||
bool "Show broken platforms / packages / devices" if DEVEL
|
||||
default n
|
||||
|
||||
config BINARY_FOLDER
|
||||
@ -63,7 +63,7 @@ menuconfig DEVEL
|
||||
|
||||
config CCACHE
|
||||
bool "Use ccache" if DEVEL
|
||||
default y
|
||||
default n
|
||||
help
|
||||
Compiler cache; see https://ccache.samba.org/
|
||||
|
||||
@ -115,6 +115,13 @@ menuconfig DEVEL
|
||||
help
|
||||
If enabled, log files will be written to the ./log directory.
|
||||
|
||||
config BUILD_LOG_DIR
|
||||
string "Log folder" if DEVEL
|
||||
default ""
|
||||
help
|
||||
Store build logs in this directory.
|
||||
If not set, uses './logs'
|
||||
|
||||
config SRC_TREE_OVERRIDE
|
||||
bool "Enable package source tree override" if DEVEL
|
||||
help
|
||||
|
@ -14,7 +14,6 @@ menu "Target Images"
|
||||
prompt "Compression"
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
|
||||
@ -94,7 +93,6 @@ menu "Target Images"
|
||||
menuconfig TARGET_ROOTFS_EXT4FS
|
||||
bool "ext4"
|
||||
default y if USES_EXT4
|
||||
default n if TARGET_x86
|
||||
help
|
||||
Build an ext4 root filesystem.
|
||||
|
||||
@ -136,13 +134,6 @@ menu "Target Images"
|
||||
help
|
||||
Create an ext4 filesystem with a journal.
|
||||
|
||||
config TARGET_ROOTFS_ISO
|
||||
bool "iso"
|
||||
default n
|
||||
depends on TARGET_x86_generic
|
||||
help
|
||||
Create a bootable ISO image.
|
||||
|
||||
config TARGET_ROOTFS_JFFS2
|
||||
bool "jffs2"
|
||||
depends on USES_JFFS2
|
||||
@ -207,32 +198,32 @@ menu "Target Images"
|
||||
config GRUB_IMAGES
|
||||
bool "Build 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
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||
select PACKAGE_grub2
|
||||
default y
|
||||
|
||||
config EFI_IMAGES
|
||||
bool "Build EFI GRUB images (Linux x86 or x86_64 host only)"
|
||||
config GRUB_EFI_IMAGES
|
||||
bool "Build GRUB EFI 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
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||
select PACKAGE_grub2
|
||||
select PACKAGE_grub2-efi
|
||||
select PACKAGE_kmod-fs-vfat
|
||||
default y
|
||||
|
||||
config GRUB_CONSOLE
|
||||
bool "Use Console Terminal (in addition to Serial)"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default y
|
||||
|
||||
config GRUB_SERIAL
|
||||
string "Serial port device"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
default "hvc0" if TARGET_x86_xen_domu
|
||||
default "ttyS0" if ! TARGET_x86_xen_domu
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "ttyS0"
|
||||
|
||||
config GRUB_BAUDRATE
|
||||
int "Serial port baud rate"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default 38400 if TARGET_x86_generic
|
||||
default 115200
|
||||
|
||||
@ -243,67 +234,46 @@ menu "Target Images"
|
||||
|
||||
config GRUB_BOOTOPTS
|
||||
string "Extra kernel boot options"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
default "xencons=hvc" if TARGET_x86_xen_domu
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
help
|
||||
If you don't know, just leave it blank.
|
||||
|
||||
config GRUB_TIMEOUT
|
||||
string "Seconds to wait before booting the default entry"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
default "0"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "5"
|
||||
help
|
||||
If you don't know, 5 seconds is a reasonable default.
|
||||
|
||||
config GRUB_TITLE
|
||||
string "Title for the menu entry in GRUB"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "OpenWrt"
|
||||
help
|
||||
This is the title of the GRUB menu entry.
|
||||
If unspecified, it defaults to OpenWrt.
|
||||
|
||||
config ISO_IMAGES
|
||||
bool "Build LiveCD image (ISO)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
|
||||
config VDI_IMAGES
|
||||
bool "Build VirtualBox image files (VDI)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
select GRUB_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
select PACKAGE_kmod-e1000
|
||||
|
||||
config VMDK_IMAGES
|
||||
bool "Build VMware image files (VMDK)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
select GRUB_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
select PACKAGE_kmod-e1000
|
||||
default y
|
||||
|
||||
config VHD_IMAGES
|
||||
bool "Build Hyper-V image files (VHD)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-tulip
|
||||
default n
|
||||
|
||||
config QCOW2_IMAGES
|
||||
bool "Build PVE/KVM image files (QCOW2)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-e1000
|
||||
default n
|
||||
|
||||
config TARGET_IMAGES_PAD
|
||||
bool "Pad images to filesystem size (for JFFS2)"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
default y
|
||||
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
|
||||
default y
|
||||
default n if TARGET_x86
|
||||
|
||||
comment "Image Options"
|
||||
|
||||
@ -311,21 +281,21 @@ menu "Target Images"
|
||||
|
||||
config TARGET_KERNEL_PARTSIZE
|
||||
int "Kernel partition size (in MB)"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES || USES_BOOT_PART
|
||||
depends on USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 64 if TARGET_bcm27xx
|
||||
default 16
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MB)"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml
|
||||
default 160
|
||||
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
|
||||
default 104
|
||||
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 || GRUB_EFI_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
|
||||
|
@ -48,8 +48,7 @@ config KERNEL_DEBUG_FS
|
||||
|
||||
config KERNEL_MIPS_FP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
depends on (mips || mipsel || mips64 || mips64el)
|
||||
default y if TARGET_pistachio
|
||||
|
||||
config KERNEL_ARM_PMU
|
||||
bool
|
||||
@ -87,6 +86,126 @@ config KERNEL_PROFILING
|
||||
Enable the extended profiling support mechanisms used by profilers such
|
||||
as OProfile.
|
||||
|
||||
config KERNEL_UBSAN
|
||||
bool "Compile the kernel with undefined behaviour sanity checker"
|
||||
help
|
||||
This option enables undefined behaviour sanity checker
|
||||
Compile-time instrumentation is used to detect various undefined
|
||||
behaviours in runtime. Various types of checks may be enabled
|
||||
via boot parameter ubsan_handle
|
||||
(see: Documentation/dev-tools/ubsan.rst).
|
||||
|
||||
config KERNEL_UBSAN_SANITIZE_ALL
|
||||
bool "Enable instrumentation for the entire kernel"
|
||||
depends on KERNEL_UBSAN
|
||||
default y
|
||||
help
|
||||
This option activates instrumentation for the entire kernel.
|
||||
If you don't enable this option, you have to explicitly specify
|
||||
UBSAN_SANITIZE := y for the files/directories you want to check for UB.
|
||||
Enabling this option will get kernel image size increased
|
||||
significantly.
|
||||
|
||||
config KERNEL_UBSAN_ALIGNMENT
|
||||
bool "Enable checking of pointers alignment"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
This option enables detection of unaligned memory accesses.
|
||||
Enabling this option on architectures that support unaligned
|
||||
accesses may produce a lot of false positives.
|
||||
|
||||
config KERNEL_UBSAN_NULL
|
||||
bool "Enable checking of null pointers"
|
||||
depends on KERNEL_UBSAN
|
||||
help
|
||||
This option enables detection of memory accesses via a
|
||||
null pointer.
|
||||
|
||||
config KERNEL_KASAN
|
||||
bool "Compile the kernel with KASan: runtime memory debugger"
|
||||
select KERNEL_SLUB_DEBUG
|
||||
depends on (x86_64 || aarch64)
|
||||
help
|
||||
Enables kernel address sanitizer - runtime memory debugger,
|
||||
designed to find out-of-bounds accesses and use-after-free bugs.
|
||||
This is strictly a debugging feature and it requires a gcc version
|
||||
of 4.9.2 or later. Detection of out of bounds accesses to stack or
|
||||
global variables requires gcc 5.0 or later.
|
||||
This feature consumes about 1/8 of available memory and brings about
|
||||
~x3 performance slowdown.
|
||||
For better error detection enable CONFIG_STACKTRACE.
|
||||
Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
|
||||
(the resulting kernel does not boot).
|
||||
|
||||
config KERNEL_KASAN_EXTRA
|
||||
bool "KAsan: extra checks"
|
||||
depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
This enables further checks in the kernel address sanitizer, for now
|
||||
it only includes the address-use-after-scope check that can lead
|
||||
to excessive kernel stack usage, frame size warnings and longer
|
||||
compile time.
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
|
||||
|
||||
|
||||
choice
|
||||
prompt "Instrumentation type"
|
||||
depends on KERNEL_KASAN
|
||||
default KERNEL_KASAN_OUTLINE
|
||||
|
||||
config KERNEL_KASAN_OUTLINE
|
||||
bool "Outline instrumentation"
|
||||
help
|
||||
Before every memory access compiler insert function call
|
||||
__asan_load*/__asan_store*. These functions performs check
|
||||
of shadow memory. This is slower than inline instrumentation,
|
||||
however it doesn't bloat size of kernel's .text section so
|
||||
much as inline does.
|
||||
|
||||
config KERNEL_KASAN_INLINE
|
||||
bool "Inline instrumentation"
|
||||
help
|
||||
Compiler directly inserts code checking shadow memory before
|
||||
memory accesses. This is faster than outline (in some workloads
|
||||
it gives about x2 boost over outline instrumentation), but
|
||||
make kernel's .text size much bigger.
|
||||
This requires a gcc version of 5.0 or later.
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_KCOV
|
||||
bool "Compile the kernel with code coverage for fuzzing"
|
||||
select KERNEL_DEBUG_FS
|
||||
help
|
||||
KCOV exposes kernel code coverage information in a form suitable
|
||||
for coverage-guided fuzzing (randomized testing).
|
||||
|
||||
If RANDOMIZE_BASE is enabled, PC values will not be stable across
|
||||
different machines and across reboots. If you need stable PC values,
|
||||
disable RANDOMIZE_BASE.
|
||||
|
||||
For more details, see Documentation/kcov.txt.
|
||||
|
||||
config KERNEL_KCOV_ENABLE_COMPARISONS
|
||||
bool "Enable comparison operands collection by KCOV"
|
||||
depends on KERNEL_KCOV
|
||||
help
|
||||
KCOV also exposes operands of every comparison in the instrumented
|
||||
code along with operand sizes and PCs of the comparison instructions.
|
||||
These operands can be used by fuzzing engines to improve the quality
|
||||
of fuzzing coverage.
|
||||
|
||||
config KERNEL_KCOV_INSTRUMENT_ALL
|
||||
bool "Instrument all code by default"
|
||||
depends on KERNEL_KCOV
|
||||
default y if KERNEL_KCOV
|
||||
help
|
||||
If you are doing generic system call fuzzing (like e.g. syzkaller),
|
||||
then you will want to instrument the whole kernel and you should
|
||||
say y here. If you are doing more targeted fuzzing (like e.g.
|
||||
filesystem fuzzing with AFL) then you will want to enable coverage
|
||||
for more specific subsets of files, and should say n here.
|
||||
|
||||
config KERNEL_TASKSTATS
|
||||
bool "Compile the kernel with task resource/io statistics and accounting"
|
||||
default n
|
||||
@ -270,7 +389,6 @@ config KERNEL_BLK_DEV_BSG
|
||||
|
||||
config KERNEL_TRANSPARENT_HUGEPAGE
|
||||
bool
|
||||
default n
|
||||
|
||||
choice
|
||||
prompt "Transparent Hugepage Support sysfs defaults"
|
||||
@ -318,6 +436,74 @@ config KERNEL_PROVE_LOCKING
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
default n
|
||||
|
||||
config KERNEL_LOCKUP_DETECTOR
|
||||
bool "Compile the kernel with detect Hard and Soft Lockups"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Say Y here to enable the kernel to act as a watchdog to detect
|
||||
hard and soft lockups.
|
||||
|
||||
Softlockups are bugs that cause the kernel to loop in kernel
|
||||
mode for more than 20 seconds, without giving other tasks a
|
||||
chance to run. The current stack trace is displayed upon
|
||||
detection and the system will stay locked up.
|
||||
|
||||
Hardlockups are bugs that cause the CPU to loop in kernel mode
|
||||
for more than 10 seconds, without letting other interrupts have a
|
||||
chance to run. The current stack trace is displayed upon detection
|
||||
and the system will stay locked up.
|
||||
|
||||
The overhead should be minimal. A periodic hrtimer runs to
|
||||
generate interrupts and kick the watchdog task every 4 seconds.
|
||||
An NMI is generated every 10 seconds or so to check for hardlockups.
|
||||
|
||||
The frequency of hrtimer and NMI events and the soft and hard lockup
|
||||
thresholds can be controlled through the sysctl watchdog_thresh.
|
||||
|
||||
config KERNEL_DETECT_HUNG_TASK
|
||||
bool "Compile the kernel with detect Hung Tasks"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
default KERNEL_LOCKUP_DETECTOR
|
||||
help
|
||||
Say Y here to enable the kernel to detect "hung tasks",
|
||||
which are bugs that cause the task to be stuck in
|
||||
uninterruptible "D" state indefinitely.
|
||||
|
||||
When a hung task is detected, the kernel will print the
|
||||
current stack trace (which you should report), but the
|
||||
task will stay in uninterruptible state. If lockdep is
|
||||
enabled then all held locks will also be reported. This
|
||||
feature has negligible overhead.
|
||||
|
||||
config KERNEL_WQ_WATCHDOG
|
||||
bool "Compile the kernel with detect Workqueue Stalls"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Say Y here to enable stall detection on workqueues. If a
|
||||
worker pool doesn't make forward progress on a pending work
|
||||
item for over a given amount of time, 30s by default, a
|
||||
warning message is printed along with dump of workqueue
|
||||
state. This can be configured through kernel parameter
|
||||
"workqueue.watchdog_thresh" and its sysfs counterpart.
|
||||
|
||||
config KERNEL_DEBUG_ATOMIC_SLEEP
|
||||
bool "Compile the kernel with sleep inside atomic section checking"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
If you say Y here, various routines which may sleep will become very
|
||||
noisy if they are called inside atomic sections: when a spinlock is
|
||||
held, inside an rcu read side critical section, inside preempt disabled
|
||||
sections, inside an interrupt, etc...
|
||||
|
||||
config KERNEL_DEBUG_VM
|
||||
bool "Compile the kernel with debug VM"
|
||||
depends on KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
Enable this to turn on extended checks in the virtual-memory system
|
||||
that may impact performance.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config KERNEL_PRINTK_TIME
|
||||
bool "Enable printk timestamps"
|
||||
default y
|
||||
@ -460,7 +646,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_CPUSETS
|
||||
bool "Cpuset support"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
help
|
||||
This option will let you create and manage CPUSETs which
|
||||
allow dynamically partitioning a system into sets of CPUs and
|
||||
@ -474,14 +660,14 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_CGROUP_CPUACCT
|
||||
bool "Simple CPU accounting cgroup subsystem"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
help
|
||||
Provides a simple Resource Controller for monitoring the
|
||||
total CPU consumed by the tasks in a cgroup.
|
||||
|
||||
config KERNEL_RESOURCE_COUNTERS
|
||||
bool "Resource counters"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
help
|
||||
This option enables controller independent resource accounting
|
||||
infrastructure that works with cgroups.
|
||||
@ -492,7 +678,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG
|
||||
bool "Memory Resource Controller for Control Groups"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
select KERNEL_FREEZER
|
||||
depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
|
||||
help
|
||||
@ -516,7 +702,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG_SWAP
|
||||
bool "Memory Resource Controller Swap Extension"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
depends on KERNEL_MEMCG
|
||||
help
|
||||
Add swap management feature to memory resource controller. When you
|
||||
@ -551,7 +737,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_MEMCG_KMEM
|
||||
bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
depends on KERNEL_MEMCG
|
||||
help
|
||||
The Kernel Memory extension for Memory Resource Controller can limit
|
||||
@ -572,7 +758,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
menuconfig KERNEL_CGROUP_SCHED
|
||||
bool "Group CPU scheduler"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
help
|
||||
This feature lets CPU scheduler recognize task groups and control CPU
|
||||
bandwidth allocation to such task groups. It uses cgroups to group
|
||||
@ -582,11 +768,11 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_FAIR_GROUP_SCHED
|
||||
bool "Group scheduling for SCHED_OTHER"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
|
||||
config KERNEL_CFS_BANDWIDTH
|
||||
bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
|
||||
default n
|
||||
default y
|
||||
depends on KERNEL_FAIR_GROUP_SCHED
|
||||
help
|
||||
This option allows users to define CPU bandwidth rates (limits) for
|
||||
@ -597,7 +783,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_RT_GROUP_SCHED
|
||||
bool "Group scheduling for SCHED_RR/FIFO"
|
||||
default y if !SMALL_FLASH
|
||||
default y
|
||||
help
|
||||
This feature lets you explicitly allocate real CPU bandwidth
|
||||
to task groups. If enabled, it will also make it impossible to
|
||||
@ -632,7 +818,7 @@ if KERNEL_CGROUPS
|
||||
|
||||
config KERNEL_BLK_DEV_THROTTLING
|
||||
bool "Enable throttling policy"
|
||||
default y if TARGET_bcm27xx
|
||||
default y
|
||||
|
||||
config KERNEL_BLK_DEV_THROTTLING_LOW
|
||||
bool "Block throttling .low limit interface support (EXPERIMENTAL)"
|
||||
@ -667,7 +853,7 @@ endif
|
||||
|
||||
config KERNEL_NAMESPACES
|
||||
bool "Enable kernel namespaces"
|
||||
default n
|
||||
default y if !SMALL_FLASH
|
||||
|
||||
if KERNEL_NAMESPACES
|
||||
|
||||
@ -736,13 +922,13 @@ config KERNEL_POSIX_MQUEUE
|
||||
|
||||
config KERNEL_SECCOMP_FILTER
|
||||
bool
|
||||
default n
|
||||
default y if !SMALL_FLASH
|
||||
|
||||
config KERNEL_SECCOMP
|
||||
bool "Enable seccomp support"
|
||||
depends on !(TARGET_uml)
|
||||
select KERNEL_SECCOMP_FILTER
|
||||
default n
|
||||
default y if !SMALL_FLASH
|
||||
help
|
||||
Build kernel with support for seccomp.
|
||||
|
||||
@ -877,7 +1063,7 @@ menu "Filesystem ACL and attr support options"
|
||||
select KERNEL_FS_POSIX_ACL
|
||||
default y if USE_FS_ACL_ATTR
|
||||
|
||||
config KERNEL_HFSPLUG_FS_POSIX_ACL
|
||||
config KERNEL_HFSPLUS_FS_POSIX_ACL
|
||||
bool "Enable POSIX ACL for HFS+ Filesystems"
|
||||
select KERNEL_FS_POSIX_ACL
|
||||
default y if USE_FS_ACL_ATTR
|
||||
|
@ -6,4 +6,3 @@ src-git telephony https://git.openwrt.org/feed/telephony.git
|
||||
#src-git targets https://github.com/openwrt/targets.git
|
||||
#src-git oldpackages http://git.openwrt.org/packages.git
|
||||
#src-link custom /usr/src/openwrt/custom-feed
|
||||
#src-git helloworld https://github.com/fw876/helloworld
|
||||
|
@ -1,5 +1,13 @@
|
||||
cmake_bool = $(patsubst %,-D%:BOOL=$(if $($(1)),ON,OFF),$(2))
|
||||
|
||||
PKG_USE_NINJA ?= 1
|
||||
HOST_USE_NINJA ?= 1
|
||||
ifeq ($(PKG_USE_NINJA),1)
|
||||
PKG_BUILD_PARALLEL ?= 1
|
||||
endif
|
||||
ifeq ($(HOST_USE_NINJA),1)
|
||||
HOST_BUILD_PARALLEL ?= 1
|
||||
endif
|
||||
PKG_INSTALL:=1
|
||||
|
||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
@ -44,6 +52,34 @@ CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_
|
||||
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
|
||||
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
|
||||
|
||||
ifeq ($(HOST_USE_NINJA),1)
|
||||
CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
|
||||
define Host/Compile/Default
|
||||
+$(NINJA) -C $(HOST_BUILD_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Host/Install/Default
|
||||
+$(NINJA) -C $(HOST_BUILD_DIR) install
|
||||
endef
|
||||
|
||||
define Host/Uninstall/Default
|
||||
+$(NINJA) -C $(HOST_BUILD_DIR) uninstall
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_USE_NINJA),1)
|
||||
CMAKE_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
|
||||
define Build/Compile/Default
|
||||
+$(NINJA) -C $(CMAKE_BINARY_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Build/Install/Default
|
||||
+DESTDIR="$(PKG_INSTALL_DIR)" $(NINJA) -C $(CMAKE_BINARY_DIR) install
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Configure/Default
|
||||
mkdir -p $(CMAKE_BINARY_DIR)
|
||||
(cd $(CMAKE_BINARY_DIR); \
|
||||
|
@ -43,5 +43,11 @@ endef
|
||||
|
||||
# 1: package name
|
||||
define GetABISuffix
|
||||
$(if $(filter-out kmod-%,$(1)),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
|
||||
$(call FormatABISuffix,$(1),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: abi version
|
||||
define FormatABISuffix
|
||||
$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2)))
|
||||
endef
|
||||
|
@ -11,6 +11,133 @@ define rootfs_align
|
||||
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
|
||||
endef
|
||||
|
||||
|
||||
define Build/append-dtb
|
||||
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
||||
endef
|
||||
|
||||
define Build/append-dtb-elf
|
||||
$(TARGET_CROSS)objcopy \
|
||||
--set-section-flags=.appended_dtb=alloc,contents \
|
||||
--update-section \
|
||||
.appended_dtb=$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@
|
||||
endef
|
||||
|
||||
define Build/append-kernel
|
||||
dd if=$(IMAGE_KERNEL) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-image
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
|
||||
endef
|
||||
|
||||
ifdef IB
|
||||
define Build/append-image-stage
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1) >> $@
|
||||
endef
|
||||
else
|
||||
define Build/append-image-stage
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) of=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)
|
||||
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0)
|
||||
json_quote=$(subst ','\'',$(subst ",\",$(1)))
|
||||
#")')
|
||||
|
||||
legacy_supported_message=$(SUPPORTED_DEVICES) - Image version mismatch: image $(compat_version), \
|
||||
device 1.0. Please wipe config during upgrade (force required) or reinstall. \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),Reason: $(DEVICE_COMPAT_MESSAGE),Please check documentation ...)
|
||||
|
||||
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
|
||||
metadata_json = \
|
||||
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"metadata_version": "1.1", \
|
||||
"compat_version": "$(call json_quote,$(compat_version))", \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
||||
$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
|
||||
[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma) \
|
||||
"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
|
||||
$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \
|
||||
"version": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"target": "$(call json_quote,$(TARGETID))", \
|
||||
"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
} \
|
||||
}'
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
ucert -A -c "$@.ucert" -x "$@.sig" ;\
|
||||
fwtool -S "$@.ucert" "$@" ;\
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-string
|
||||
echo -n $(1) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-ubi
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh \
|
||||
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
|
||||
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
|
||||
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
|
||||
$(IMAGE_ROOTFS) \
|
||||
$@.tmp \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
|
||||
$(UBINIZE_OPTS)
|
||||
cat $@.tmp >> $@
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/append-uboot
|
||||
dd if=$(UBOOT_PATH) >> $@
|
||||
endef
|
||||
|
||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
|
||||
# for example
|
||||
define Build/append-uImage-fakehdr
|
||||
$(eval type=$(word 1,$(1)))
|
||||
$(eval magic=$(word 2,$(1)))
|
||||
touch $@.fakehdr
|
||||
$(STAGING_DIR_HOST)/bin/mkimage \
|
||||
-A $(LINUX_KARCH) -O linux -T $(type) -C none \
|
||||
-n '$(VERSION_DIST) fake $(type)' \
|
||||
$(if $(magic),-M $(magic)) \
|
||||
-d $@.fakehdr \
|
||||
-s \
|
||||
$@.fakehdr
|
||||
cat $@.fakehdr >> $@
|
||||
endef
|
||||
|
||||
define Build/buffalo-dhp-image
|
||||
$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/buffalo-enc
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval version=$(word 2,$(1)))
|
||||
@ -39,9 +166,25 @@ define Build/buffalo-tag-dhp
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/buffalo-dhp-image
|
||||
$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
|
||||
mv $@.new $@
|
||||
define Build/check-size
|
||||
@imagesize="$$(stat -c%s $@)"; \
|
||||
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
|
||||
[ $$limitsize -ge $$imagesize ] || { \
|
||||
echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \
|
||||
rm -f $@; \
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/elecom-product-header
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
|
||||
|
||||
( \
|
||||
echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
|
||||
echo -n "0.00" | dd bs=16 count=1 conv=sync; \
|
||||
dd if=$(fw); \
|
||||
) > $(fw).new
|
||||
mv $(fw).new $(fw)
|
||||
endef
|
||||
|
||||
define Build/elx-header
|
||||
@ -69,113 +212,6 @@ define Build/eva-image
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/seama
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ \
|
||||
-m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/seama-seal
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ -s $@.seama \
|
||||
-m "signature=$(SEAMA_SIGNATURE)"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/zyxel-ras-image
|
||||
let \
|
||||
newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
|
||||
$(STAGING_DIR_HOST)/bin/mkrasimage \
|
||||
-b $(RAS_BOARD) \
|
||||
-v $(RAS_VERSION) \
|
||||
-r $@ \
|
||||
-s $$newsize \
|
||||
-o $@.new \
|
||||
$(if $(findstring separate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \
|
||||
&& mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-chk
|
||||
$(STAGING_DIR_HOST)/bin/mkchkimg \
|
||||
-o $@.new \
|
||||
-k $@ \
|
||||
-b $(NETGEAR_BOARD_ID) \
|
||||
$(if $(NETGEAR_REGION),-r $(NETGEAR_REGION),)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-dni
|
||||
$(STAGING_DIR_HOST)/bin/mkdniimg \
|
||||
-B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
|
||||
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
|
||||
-r "$(1)" \
|
||||
-i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-string
|
||||
echo -n $(1) >> $@
|
||||
endef
|
||||
|
||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
|
||||
# for example
|
||||
define Build/append-uImage-fakehdr
|
||||
$(eval type=$(word 1,$(1)))
|
||||
$(eval magic=$(word 2,$(1)))
|
||||
touch $@.fakehdr
|
||||
$(STAGING_DIR_HOST)/bin/mkimage \
|
||||
-A $(LINUX_KARCH) -O linux -T $(type) -C none \
|
||||
-n '$(VERSION_DIST) fake $(type)' \
|
||||
$(if $(magic),-M $(magic)) \
|
||||
-d $@.fakehdr \
|
||||
-s \
|
||||
$@.fakehdr
|
||||
cat $@.fakehdr >> $@
|
||||
endef
|
||||
|
||||
define Build/tplink-safeloader
|
||||
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||
-B $(TPLINK_BOARD_ID) \
|
||||
-V $(REVISION) \
|
||||
-k $(IMAGE_KERNEL) \
|
||||
-r $@ \
|
||||
-o $@.new \
|
||||
-j \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/append-dtb
|
||||
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
||||
endef
|
||||
|
||||
define Build/append-dtb-elf
|
||||
$(TARGET_CROSS)objcopy \
|
||||
--set-section-flags=.appended_dtb=alloc,contents \
|
||||
--update-section \
|
||||
.appended_dtb=$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@
|
||||
endef
|
||||
|
||||
define Build/install-dtb
|
||||
$(call locked, \
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \
|
||||
), \
|
||||
install-dtb-$(IMG_PREFIX) \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/initrd_compression
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \
|
||||
@ -204,28 +240,20 @@ define Build/fit
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/lzma
|
||||
$(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1))
|
||||
endef
|
||||
|
||||
define Build/lzma-no-dict
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/gzip
|
||||
gzip -f -9n -c $@ $(1) > $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/zip
|
||||
mkdir $@.tmp
|
||||
mv $@ $@.tmp/$(1)
|
||||
|
||||
zip -j -X \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
||||
$@ $@.tmp/$(if $(1),$(1),$@)
|
||||
rm -rf $@.tmp
|
||||
define Build/install-dtb
|
||||
$(call locked, \
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \
|
||||
), \
|
||||
install-dtb-$(IMG_PREFIX) \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/jffs2
|
||||
@ -256,75 +284,6 @@ define Build/kernel-bin
|
||||
cp $< $@
|
||||
endef
|
||||
|
||||
define Build/patch-cmdline
|
||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $@ '$(CMDLINE)'
|
||||
endef
|
||||
|
||||
define Build/append-kernel
|
||||
dd if=$(IMAGE_KERNEL) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-ubi
|
||||
sh $(TOPDIR)/scripts/ubinize-image.sh \
|
||||
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
|
||||
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
|
||||
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
|
||||
$(IMAGE_ROOTFS) \
|
||||
$@.tmp \
|
||||
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
|
||||
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
|
||||
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
|
||||
$(UBINIZE_OPTS)
|
||||
cat $@.tmp >> $@
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/append-uboot
|
||||
dd if=$(UBOOT_PATH) >> $@
|
||||
endef
|
||||
|
||||
define Build/pad-to
|
||||
$(call Image/pad-to,$@,$(1))
|
||||
endef
|
||||
|
||||
define Build/pad-extra
|
||||
dd if=/dev/zero bs=$(1) count=1 >> $@
|
||||
endef
|
||||
|
||||
define Build/pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
|
||||
$(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
|
||||
endef
|
||||
|
||||
define Build/pad-offset
|
||||
let \
|
||||
size="$$(stat -c%s $@)" \
|
||||
pad="$(subst k,* 1024,$(word 1, $(1)))" \
|
||||
offset="$(subst k,* 1024,$(word 2, $(1)))" \
|
||||
pad="(pad - ((size + offset) % pad)) % pad" \
|
||||
newsize='size + pad'; \
|
||||
dd if=$@ of=$@.new bs=$$newsize count=1 conv=sync
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/xor-image
|
||||
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
|
||||
mv $@.xor $@
|
||||
endef
|
||||
|
||||
define Build/check-size
|
||||
@imagesize="$$(stat -c%s $@)"; \
|
||||
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
|
||||
[ $$limitsize -ge $$imagesize ] || { \
|
||||
echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \
|
||||
rm -f $@; \
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/linksys-image
|
||||
$(TOPDIR)/scripts/linksys-image.sh \
|
||||
"$(call param_get_default,type,$(1),$(DEVICE_NAME))" \
|
||||
@ -332,6 +291,33 @@ define Build/linksys-image
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/lzma
|
||||
$(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1))
|
||||
endef
|
||||
|
||||
define Build/lzma-no-dict
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-chk
|
||||
$(STAGING_DIR_HOST)/bin/mkchkimg \
|
||||
-o $@.new \
|
||||
-k $@ \
|
||||
-b $(NETGEAR_BOARD_ID) \
|
||||
$(if $(NETGEAR_REGION),-r $(NETGEAR_REGION),)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-dni
|
||||
$(STAGING_DIR_HOST)/bin/mkdniimg \
|
||||
-B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
|
||||
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
|
||||
-r "$(1)" \
|
||||
-i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/openmesh-image
|
||||
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
|
||||
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
|
||||
@ -345,11 +331,43 @@ define Build/openmesh-image
|
||||
"$(call param_get_default,rootfs,$(1),$@)" "rootfs"
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-mmc
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
define Build/pad-extra
|
||||
dd if=/dev/zero bs=$(1) count=1 >> $@
|
||||
endef
|
||||
|
||||
define Build/pad-offset
|
||||
let \
|
||||
size="$$(stat -c%s $@)" \
|
||||
pad="$(subst k,* 1024,$(word 1, $(1)))" \
|
||||
offset="$(subst k,* 1024,$(word 2, $(1)))" \
|
||||
pad="(pad - ((size + offset) % pad)) % pad" \
|
||||
newsize='size + pad'; \
|
||||
dd if=$@ of=$@.new bs=$$newsize count=1 conv=sync
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
|
||||
$(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
|
||||
endef
|
||||
|
||||
define Build/pad-to
|
||||
$(call Image/pad-to,$@,$(1))
|
||||
endef
|
||||
|
||||
define Build/patch-cmdline
|
||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $@ '$(CMDLINE)'
|
||||
endef
|
||||
|
||||
# Convert a raw image into a $1 type image.
|
||||
# E.g. | qemu-image vdi
|
||||
define Build/qemu-image
|
||||
if command -v qemu-img; then \
|
||||
qemu-img convert -f raw -O $1 $@ $@.new; \
|
||||
mv $@.new $@; \
|
||||
else \
|
||||
echo "WARNING: Install qemu-img to create VDI/VMDK images" >&2; exit 1; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-nand
|
||||
@ -366,6 +384,18 @@ define Build/qsdk-ipq-factory-nor
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/seama
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ \
|
||||
-m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/seama-seal
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ -s $@.seama \
|
||||
-m "signature=$(SEAMA_SIGNATURE)"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/senao-header
|
||||
$(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
|
||||
mv $@.new $@
|
||||
@ -379,6 +409,18 @@ define Build/sysupgrade-tar
|
||||
$@
|
||||
endef
|
||||
|
||||
define Build/tplink-safeloader
|
||||
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||
-B $(TPLINK_BOARD_ID) \
|
||||
-V $(REVISION) \
|
||||
-k $(IMAGE_KERNEL) \
|
||||
-r $@ \
|
||||
-o $@.new \
|
||||
-j \
|
||||
$(wordlist 2,$(words $(1)),$(1)) \
|
||||
$(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/tplink-v1-header
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||
@ -426,22 +468,6 @@ define Build/tplink-v2-image
|
||||
rm -rf $@.new
|
||||
endef
|
||||
|
||||
json_quote=$(subst ','\'',$(subst ",\",$(1)))
|
||||
#")')
|
||||
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
|
||||
metadata_json = \
|
||||
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"metadata_version": "1.0", \
|
||||
"supported_devices":[$(call metadata_devices,$(1))], \
|
||||
"version": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"target": "$(call json_quote,$(TARGETID))", \
|
||||
"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
} \
|
||||
}'
|
||||
|
||||
define Build/uImage
|
||||
mkimage \
|
||||
-A $(LINUX_KARCH) \
|
||||
@ -457,12 +483,30 @@ define Build/uImage
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
ucert -A -c "$@.ucert" -x "$@.sig" ;\
|
||||
fwtool -S "$@.ucert" "$@" ;\
|
||||
}
|
||||
define Build/xor-image
|
||||
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
|
||||
mv $@.xor $@
|
||||
endef
|
||||
|
||||
define Build/zip
|
||||
mkdir $@.tmp
|
||||
mv $@ $@.tmp/$(1)
|
||||
|
||||
zip -j -X \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
||||
$@ $@.tmp/$(if $(1),$(1),$@)
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Build/zyxel-ras-image
|
||||
let \
|
||||
newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
|
||||
$(STAGING_DIR_HOST)/bin/mkrasimage \
|
||||
-b $(RAS_BOARD) \
|
||||
-v $(RAS_VERSION) \
|
||||
-r $@ \
|
||||
-s $$newsize \
|
||||
-o $@.new \
|
||||
$(if $(findstring separate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \
|
||||
&& mv $@.new $@
|
||||
endef
|
||||
|
@ -41,6 +41,7 @@ IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$
|
||||
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
|
||||
IMG_COMBINED:=$(IMG_PREFIX)-combined
|
||||
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8)
|
||||
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
|
||||
|
||||
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
|
||||
|
||||
@ -89,7 +90,6 @@ fs-types-$(CONFIG_TARGET_ROOTFS_SQUASHFS) += squashfs
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
|
||||
fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
|
||||
fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
|
||||
|
||||
@ -229,7 +229,7 @@ define Image/mkfs/squashfs-common
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
|
||||
-nopad -noappend -root-owned \
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
|
||||
-processors $(shell nproc)
|
||||
-processors 1
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
@ -302,7 +302,7 @@ endif
|
||||
|
||||
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
|
||||
define Image/Build/cpiogz
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
|
||||
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -364,14 +364,14 @@ define Device/Init
|
||||
|
||||
IMAGES :=
|
||||
ARTIFACTS :=
|
||||
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
|
||||
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
|
||||
IMAGE_SIZE :=
|
||||
KERNEL_PREFIX = $$(IMAGE_PREFIX)
|
||||
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
|
||||
KERNEL_SUFFIX := -kernel.bin
|
||||
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
|
||||
KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX)
|
||||
KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs
|
||||
KERNEL_INITRAMFS_PREFIX = $$(DEVICE_IMG_PREFIX)-initramfs
|
||||
KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX)
|
||||
KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
|
||||
KERNEL_INSTALL :=
|
||||
@ -401,6 +401,8 @@ define Device/Init
|
||||
BOARD_NAME :=
|
||||
UIMAGE_MAGIC :=
|
||||
UIMAGE_NAME :=
|
||||
DEVICE_COMPAT_VERSION := 1.0
|
||||
DEVICE_COMPAT_MESSAGE :=
|
||||
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||
IMAGE_METADATA :=
|
||||
|
||||
@ -408,6 +410,7 @@ define Device/Init
|
||||
|
||||
UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-$(1)
|
||||
|
||||
BROKEN :=
|
||||
DEFAULT :=
|
||||
endef
|
||||
|
||||
@ -416,9 +419,11 @@ DEFAULT_DEVICE_VARS := \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_FDT_NUM \
|
||||
SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH \
|
||||
IMAGE_SIZE DEVICE_PACKAGES DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
|
||||
UBOOT_PATH IMAGE_SIZE \
|
||||
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
|
||||
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
||||
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
|
||||
@ -473,6 +478,7 @@ define Device/Build/initramfs
|
||||
$$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,))
|
||||
|
||||
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
|
||||
$(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
|
||||
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
cp $$^ $$@
|
||||
|
||||
@ -487,10 +493,10 @@ define Device/Build/initramfs
|
||||
DEVICE_ID="$(1)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
IMAGE_NAME="$$(notdir $$^)" \
|
||||
DEVICE_IMG_NAME="$$(notdir $$^)" \
|
||||
IMAGE_TYPE="kernel" \
|
||||
IMAGE_FILESYSTEM="initramfs" \
|
||||
IMAGE_PREFIX="$$(IMAGE_PREFIX)" \
|
||||
DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$$(DEVICE_MODEL)" \
|
||||
DEVICE_VARIANT="$$(DEVICE_VARIANT)" \
|
||||
@ -562,9 +568,10 @@ endef
|
||||
define Device/Build/image
|
||||
GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz))
|
||||
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
|
||||
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json, \
|
||||
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX))
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1)))
|
||||
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
|
||||
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)),$(1)))
|
||||
$(3)-images: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
|
||||
ROOTFS/$(1)/$(3) := \
|
||||
$(KDIR)/root.$(1)$$(strip \
|
||||
@ -575,28 +582,28 @@ define Device/Build/image
|
||||
ifndef IB
|
||||
$$(ROOTFS/$(1)/$(3)): $(if $(TARGET_PER_DEVICE_ROOTFS),target-dir-$$(ROOTFS_ID/$(3)))
|
||||
endif
|
||||
$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3))
|
||||
$(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3))
|
||||
@rm -f $$@
|
||||
[ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ]
|
||||
$$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2))))
|
||||
|
||||
.IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
|
||||
.IGNORE: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))
|
||||
|
||||
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
|
||||
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2))
|
||||
gzip -c -9n $$^ > $$@
|
||||
|
||||
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
|
||||
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2)): $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2))
|
||||
cp $$^ $$@
|
||||
|
||||
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
|
||||
@mkdir -p $$(shell dirname $$@)
|
||||
DEVICE_ID="$(DEVICE_NAME)" \
|
||||
BIN_DIR="$(BIN_DIR)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
IMAGE_NAME="$(IMAGE_NAME)" \
|
||||
DEVICE_IMG_NAME="$(DEVICE_IMG_NAME)" \
|
||||
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
|
||||
IMAGE_FILESYSTEM="$(1)" \
|
||||
IMAGE_PREFIX="$(IMAGE_PREFIX)" \
|
||||
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
|
||||
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
|
||||
DEVICE_MODEL="$(DEVICE_MODEL)" \
|
||||
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
|
||||
@ -621,15 +628,15 @@ define Device/Build/image
|
||||
endef
|
||||
|
||||
define Device/Build/artifact
|
||||
$$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)))
|
||||
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
|
||||
$$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
$(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)))
|
||||
$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images
|
||||
@rm -f $$@
|
||||
$$(call concat_cmd,$(ARTIFACT/$(1)))
|
||||
|
||||
.IGNORE: $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
.IGNORE: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
|
||||
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1): $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
|
||||
$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)
|
||||
cp $$^ $$@
|
||||
|
||||
endef
|
||||
@ -646,7 +653,7 @@ define Device/Build
|
||||
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))
|
||||
|
||||
$$(eval $$(foreach artifact,$$(ARTIFACTS), \
|
||||
$$(call Device/Build/artifact,$$(artifact))))
|
||||
$$(call Device/Build/artifact,$$(artifact),$(1))))
|
||||
|
||||
endef
|
||||
|
||||
@ -656,6 +663,7 @@ Target-Profile-Name: $(DEVICE_DISPLAY)
|
||||
Target-Profile-Packages: $(DEVICE_PACKAGES)
|
||||
Target-Profile-hasImageMetadata: $(if $(foreach image,$(IMAGES),$(findstring append-metadata,$(IMAGE/$(image)))),1,0)
|
||||
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
|
||||
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))
|
||||
$(if $(DEFAULT),Target-Profile-Default: $(DEFAULT))
|
||||
Target-Profile-Description:
|
||||
$(DEVICE_DESCRIPTION)
|
||||
|
@ -160,7 +160,11 @@ define BuildKernel
|
||||
rm -f $(STAMP_CONFIGURED)
|
||||
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
|
||||
$(_SINGLE)$(KERNEL_MAKE) \
|
||||
$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
|
||||
$(if $(findstring Darwin,$(HOST_OS)), \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
HOSTLDLIBS_mconf="-L$(STAGING_DIR_HOST)/lib -lncurses" \
|
||||
filechk_conf_cfg=" :" \
|
||||
) \
|
||||
YACC=$(STAGING_DIR_HOST)/bin/bison \
|
||||
$$@
|
||||
$(call LINUX_RECONF_DIFF,$(LINUX_DIR)/.config) > $(LINUX_RECONFIG_TARGET)
|
||||
|
@ -170,7 +170,7 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifeq ($(CONFIG_EXTERNAL_CPIO),y)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
endif
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
|
BIN
include/logo.png
Normal file
BIN
include/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 80 KiB |
398
include/logo.svg
Normal file
398
include/logo.svg
Normal file
@ -0,0 +1,398 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="2000mm"
|
||||
height="595.20099mm"
|
||||
viewBox="0 0 2000.0002 595.20098"
|
||||
version="1.1"
|
||||
id="svg971"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="logo.svg">
|
||||
<defs
|
||||
id="defs965">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath78">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path76" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath106">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path104" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath130">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path128" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath154">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path152" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath174">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path172" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath194">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path192" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath214">
|
||||
<path
|
||||
d="M 0,0 H 792 V 612 H 0 Z"
|
||||
id="path212" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="1579.8791"
|
||||
inkscape:cy="728.41283"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata968">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(312.17635,44.559227)">
|
||||
<g
|
||||
id="g72"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g74"
|
||||
clip-path="url(#clipPath78)">
|
||||
<g
|
||||
id="g80"
|
||||
transform="translate(173.1753,319.1396)">
|
||||
<path
|
||||
d="m 0,0 c 0,-5.745 -4.627,-10.263 -10.545,-10.263 -5.918,0 -10.544,4.518 -10.544,10.263 0,5.771 4.626,10.367 10.544,10.367 C -4.627,10.367 0,5.771 0,0 m -3.685,0 c 0,3.995 -3.013,7.024 -6.86,7.024 -3.846,0 -6.859,-3.029 -6.859,-7.024 0,-3.995 3.013,-6.946 6.859,-6.946 3.847,0 6.86,2.95 6.86,6.946"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path82" />
|
||||
</g>
|
||||
<g
|
||||
id="g84"
|
||||
transform="translate(189.0894,315.771)">
|
||||
<path
|
||||
d="m 0,0 c 0,-4.099 -3.174,-6.894 -6.591,-6.894 -1.829,0 -3.308,0.523 -4.438,1.41 v -8.329 H -14.58 V 6.528 h 3.552 V 5.484 C -9.898,6.397 -8.419,6.92 -6.59,6.92 -3.174,6.92 0,4.1 0,0 m -3.443,0 c 0,2.402 -1.614,3.917 -3.766,3.917 -1.91,0 -3.82,-1.515 -3.82,-3.917 0,-2.402 1.91,-3.889 3.82,-3.889 2.152,-0.002 3.766,1.486 3.766,3.889"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path86" />
|
||||
</g>
|
||||
<g
|
||||
id="g88"
|
||||
transform="translate(203.958,314.8574)">
|
||||
<path
|
||||
d="m 0,0 h -10.222 c 0.349,-1.88 1.721,-3.029 3.362,-3.029 1.049,0 2.367,0.131 3.336,1.723 l 3.174,-0.652 c -1.183,-2.716 -3.577,-4.022 -6.51,-4.022 -3.793,0 -6.887,2.794 -6.887,6.894 0,4.099 3.094,6.918 6.94,6.918 3.578,0 6.671,-2.689 6.806,-6.659 z m -10.115,2.429 h 6.485 c -0.457,1.671 -1.749,2.402 -3.174,2.402 -1.347,0 -2.88,-0.784 -3.311,-2.402"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path90" />
|
||||
</g>
|
||||
<g
|
||||
id="g92"
|
||||
transform="translate(218.446,317.2075)">
|
||||
<path
|
||||
d="m 0,0 v -7.938 h -3.551 v 7.207 c 0,1.827 -1.076,3.055 -2.717,3.055 -2.017,0 -3.335,-1.306 -3.335,-4.492 v -5.77 h -3.551 v 13.03 h 3.55 V 3.917 c 1.049,1.018 2.447,1.566 4.223,1.566 C -2.152,5.483 0,3.238 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path94" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g96"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1281.2351,460.31368)">
|
||||
<path
|
||||
d="M 0,0 H -2.851 L -7.854,12.874 -12.885,0 h -2.824 l -6.699,19.846 h 3.82 l 4.492,-13.109 5.138,13.109 h 2.179 L -1.641,6.737 2.851,19.846 h 3.846 z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path98" />
|
||||
</g>
|
||||
<g
|
||||
id="g100"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g102"
|
||||
clip-path="url(#clipPath106)">
|
||||
<g
|
||||
id="g108"
|
||||
transform="translate(255.7183,322.3774)">
|
||||
<path
|
||||
d="m 0,0 -0.188,-3.316 h -0.78 c -3.282,0 -4.789,-1.959 -4.789,-5.588 v -4.204 h -3.551 v 13.03 h 3.551 V -2.35 c 0.996,1.515 2.556,2.454 4.816,2.454 0.349,0 0.618,0 0.941,-0.104"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path110" />
|
||||
</g>
|
||||
<g
|
||||
id="g112"
|
||||
transform="translate(263.2698,314.0737)">
|
||||
<path
|
||||
d="m 0,0 c 0,-1.279 0.619,-1.985 1.695,-1.985 0.618,0 1.533,0.262 2.234,0.627 L 4.952,-4.23 C 3.553,-4.961 2.584,-5.197 1.455,-5.197 c -3.201,0 -5.004,1.776 -5.004,4.937 v 5.665 h -2.879 v 2.821 h 2.879 v 4.726 l 3.55,1.045 V 8.226 H 5.193 V 5.405 H 0 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path114" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g116"
|
||||
transform="matrix(12.354182,0,0,-12.354182,612.14009,549.73584)">
|
||||
<path
|
||||
d="M 0,0 H -0.799 L -1.549,2 -2.304,0 H -3.1 l -1.224,3.689 h 1.02 l 0.635,-1.99 0.795,1.99 h 0.65 l 0.79,-1.99 0.64,1.99 h 1.02 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path118" />
|
||||
</g>
|
||||
<g
|
||||
id="g120"
|
||||
transform="matrix(12.354182,0,0,-12.354182,674.30011,539.84385)">
|
||||
<path
|
||||
d="m 0,0 h 0.785 v -0.801 h -2.53 V 0 h 0.785 v 2.083 h -0.785 v 0.805 h 2.53 V 2.083 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path122" />
|
||||
</g>
|
||||
<g
|
||||
id="g124"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g126"
|
||||
clip-path="url(#clipPath130)">
|
||||
<g
|
||||
id="g132"
|
||||
transform="translate(196.9004,302.0308)">
|
||||
<path
|
||||
d="M 0,0 -0.7,0.801 H -1.449 V 0 H -2.41 v 3.689 h 1.771 c 1,0 1.605,-0.573 1.605,-1.427 0,-0.549 -0.255,-0.991 -0.695,-1.238 L 1.206,0 Z m -0.675,1.602 c 0.4,0 0.73,0.262 0.73,0.66 0,0.388 -0.33,0.628 -0.73,0.628 H -1.449 V 1.604 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path134" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g136"
|
||||
transform="matrix(12.354182,0,0,-12.354182,820.47493,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 h 1.941 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path138" />
|
||||
</g>
|
||||
<g
|
||||
id="g140"
|
||||
transform="matrix(12.354182,0,0,-12.354182,886.62894,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.805 v 3.689 h 0.96 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path142" />
|
||||
</g>
|
||||
<g
|
||||
id="g144"
|
||||
transform="matrix(12.354182,0,0,-12.354182,953.79261,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path146" />
|
||||
</g>
|
||||
<g
|
||||
id="g148"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g150"
|
||||
clip-path="url(#clipPath154)">
|
||||
<g
|
||||
id="g156"
|
||||
transform="translate(219.3787,304.7295)">
|
||||
<path
|
||||
d="m 0,0 -0.94,-0.185 c -0.08,0.374 -0.34,0.481 -0.565,0.481 -0.225,0 -0.41,-0.111 -0.41,-0.316 0,-0.146 0.08,-0.238 0.245,-0.286 l 0.74,-0.228 c 0.625,-0.199 0.965,-0.481 0.965,-1.058 0,-0.83 -0.75,-1.18 -1.495,-1.18 -0.825,0 -1.495,0.422 -1.59,1.126 l 0.985,0.194 c 0.08,-0.364 0.304,-0.519 0.635,-0.519 0.28,0 0.45,0.126 0.45,0.321 0,0.145 -0.08,0.247 -0.29,0.3 l -0.705,0.199 c -0.575,0.16 -0.965,0.447 -0.965,1.044 0,0.752 0.609,1.165 1.44,1.165 0.79,0 1.375,-0.369 1.5,-1.058"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path158" />
|
||||
</g>
|
||||
<g
|
||||
id="g160"
|
||||
transform="translate(224.4026,304.7295)">
|
||||
<path
|
||||
d="m 0,0 -0.94,-0.185 c -0.08,0.374 -0.34,0.481 -0.565,0.481 -0.225,0 -0.41,-0.111 -0.41,-0.316 0,-0.146 0.08,-0.238 0.245,-0.286 l 0.74,-0.228 c 0.625,-0.199 0.965,-0.481 0.965,-1.058 0,-0.83 -0.75,-1.18 -1.495,-1.18 -0.825,0 -1.495,0.422 -1.591,1.126 l 0.986,0.194 c 0.08,-0.364 0.304,-0.519 0.635,-0.519 0.28,0 0.45,0.126 0.45,0.321 0,0.145 -0.08,0.247 -0.29,0.3 l -0.705,0.2 c -0.575,0.16 -0.965,0.446 -0.965,1.044 0,0.752 0.608,1.165 1.44,1.165 C -0.71,1.058 -0.125,0.689 0,0"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path162" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g164"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1170.9286,521.84896)">
|
||||
<path
|
||||
d="M 0,0 H 1.785 V -0.801 H 0 V -2.257 H -0.96 V 1.432 H 1.915 V 0.631 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path166" />
|
||||
</g>
|
||||
<g
|
||||
id="g168"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g170"
|
||||
clip-path="url(#clipPath174)">
|
||||
<g
|
||||
id="g176"
|
||||
transform="translate(238.2297,302.0308)">
|
||||
<path
|
||||
d="M 0,0 -0.7,0.801 H -1.45 V 0 h -0.96 v 3.689 h 1.77 c 1,0 1.605,-0.573 1.605,-1.427 C 0.965,1.713 0.71,1.271 0.27,1.024 L 1.205,0 Z m -0.675,1.602 c 0.4,0 0.73,0.262 0.73,0.66 0,0.388 -0.33,0.628 -0.73,0.628 H -1.45 V 1.604 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path178" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g180"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1331.0682,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path182" />
|
||||
</g>
|
||||
<g
|
||||
id="g184"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1398.3947,549.73584)">
|
||||
<path
|
||||
d="m 0,0 h -2.9 v 3.689 h 2.87 V 2.888 H -1.94 V 2.257 h 1.88 V 1.456 H -1.94 V 0.801 h 1.941 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path186" />
|
||||
</g>
|
||||
<g
|
||||
id="g188"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g190"
|
||||
clip-path="url(#clipPath194)">
|
||||
<g
|
||||
id="g196"
|
||||
transform="translate(254.0122,305.7197)">
|
||||
<path
|
||||
d="M 0,0 C 1.21,0 2.01,-0.739 2.01,-1.844 2.01,-2.95 1.211,-3.689 0,-3.689 H -1.695 V 0 Z m -0.01,-2.888 c 0.655,0 1.055,0.417 1.055,1.044 0,0.626 -0.4,1.043 -1.055,1.043 h -0.723 v -2.087 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path198" />
|
||||
</g>
|
||||
<g
|
||||
id="g200"
|
||||
transform="translate(262.0693,303.8706)">
|
||||
<path
|
||||
d="m 0,0 c 0,-1.078 -0.91,-1.913 -2.03,-1.913 -1.12,0 -2.035,0.835 -2.035,1.913 0,1.077 0.91,1.917 2.035,1.917 C -0.905,1.917 0,1.073 0,0 m -0.965,0 c 0,0.606 -0.47,1.077 -1.066,1.077 -0.595,0 -1.065,-0.471 -1.065,-1.077 0,-0.607 0.47,-1.078 1.065,-1.078 0.596,0 1.066,0.466 1.066,1.078"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path202" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g204"
|
||||
transform="matrix(12.354182,0,0,-12.354182,1629.3552,549.73584)">
|
||||
<path
|
||||
d="M 0,0 H -0.94 V 1.752 L -2.06,0.256 H -2.35 L -3.47,1.75 v -1.751 h -0.94 v 3.689 h 0.615 l 1.59,-2.17 1.59,2.17 H 0 Z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path206" />
|
||||
</g>
|
||||
<g
|
||||
id="g208"
|
||||
transform="matrix(12.354182,0,0,-12.354182,-1687.2697,4281.0797)">
|
||||
<g
|
||||
id="g210"
|
||||
clip-path="url(#clipPath214)">
|
||||
<g
|
||||
id="g216"
|
||||
transform="translate(271.6895,328.4058)">
|
||||
<path
|
||||
d="M 0,0 -0.99,1.042 H -1.398 V 0 h -0.455 v 2.468 h 0.95 c 0.533,0 0.856,-0.296 0.856,-0.712 0.008,-0.283 -0.169,-0.54 -0.441,-0.642 L 0.569,0 Z m -0.903,1.441 c 0.267,0 0.405,0.137 0.405,0.315 0,0.179 -0.141,0.311 -0.405,0.311 H -1.398 V 1.44 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path218" />
|
||||
</g>
|
||||
<g
|
||||
id="g220"
|
||||
transform="translate(270.8284,327.209)">
|
||||
<path
|
||||
d="m 0,0 c -1.307,0 -2.366,1.028 -2.367,2.296 0,1.269 1.059,2.298 2.366,2.298 1.307,0 2.366,-1.028 2.367,-2.296 V 2.297 C 2.365,1.029 1.306,0.002 0,0 m 0,4.269 c -1.122,0 -2.031,-0.883 -2.031,-1.972 0,-1.089 0.909,-1.971 2.031,-1.971 1.122,0 2.031,0.882 2.031,1.971 C 2.03,3.386 1.121,4.268 0,4.269 Z"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path222" />
|
||||
</g>
|
||||
<g
|
||||
id="g224"
|
||||
transform="translate(130.3613,326.9673)">
|
||||
<path
|
||||
d="m 0,0 c -1.713,0 -3.102,-1.348 -3.102,-3.011 0,-1.663 1.389,-3.011 3.102,-3.011 1.713,0 3.102,1.348 3.102,3.011 C 3.099,-1.35 1.712,-0.003 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path226" />
|
||||
</g>
|
||||
<g
|
||||
id="g228"
|
||||
transform="translate(111.3059,342.4536)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 4.051,3.933 9.653,6.36 15.826,6.36 6.174,0 11.776,-2.428 15.827,-6.36 L 38.111,0 C 33.236,4.732 26.494,7.682 19.055,7.682 11.617,7.682 4.875,4.732 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path230" />
|
||||
</g>
|
||||
<g
|
||||
id="g232"
|
||||
transform="translate(117.1301,336.7998)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 2.564,2.488 6.109,4.025 10.001,4.025 3.892,0 7.44,-1.537 10.004,-4.025 L 26.463,0 C 23.076,3.288 18.391,5.348 13.232,5.348 8.072,5.348 3.388,3.289 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path234" />
|
||||
</g>
|
||||
<g
|
||||
id="g236"
|
||||
transform="translate(122.9229,331.1763)">
|
||||
<path
|
||||
d="m 0,0 3.229,-3.134 c 2.326,2.253 6.093,2.253 8.419,0 L 14.877,0 C 12.905,1.915 10.228,2.988 7.438,2.98 4.558,2.98 1.93,1.844 0,0"
|
||||
style="fill:#00ace2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path238" />
|
||||
</g>
|
||||
<g
|
||||
id="g240"
|
||||
transform="translate(141.8201,332.0371)">
|
||||
<path
|
||||
d="m 0,0 c 1.709,-2.274 2.722,-5.07 2.722,-8.081 0,-7.589 -6.362,-13.766 -14.181,-13.766 -7.818,0 -14.18,6.177 -14.18,13.766 0,3.011 1.013,5.807 2.722,8.081 l -3.26,3.165 c -2.533,-3.103 -4.021,-7.006 -4.021,-11.246 0,-10.017 8.42,-18.19 18.739,-18.19 10.32,0 18.739,8.173 18.739,18.19 0,4.24 -1.519,8.143 -4.02,11.246 z"
|
||||
style="fill:#002843;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path242" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
@ -105,10 +105,6 @@ $(eval $(call nf_add,IPT_PHYSDEV,CONFIG_NETFILTER_XT_MATCH_PHYSDEV, $(P_XT)xt_ph
|
||||
$(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_STRING, $(P_XT)xt_string))
|
||||
$(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_BPF, $(P_XT)xt_bpf))
|
||||
|
||||
# imq
|
||||
|
||||
$(eval $(call nf_add,IPT_IMQ,CONFIG_IP_NF_TARGET_IMQ, $(P_V4)ipt_IMQ))
|
||||
$(eval $(call nf_add,IPT_IMQ,CONFIG_NETFILTER_XT_TARGET_IMQ, $(P_XT)xt_IMQ))
|
||||
|
||||
# ipopt
|
||||
|
||||
|
@ -99,7 +99,7 @@ _endef=endef
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/ipkg
|
||||
ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION))
|
||||
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
|
||||
PDIR_$(1):=$(call FeedPackageDir,$(1))
|
||||
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||
|
@ -223,7 +223,7 @@ define Build/CoreTargets
|
||||
$(STAMP_INSTALLED) : export PATH=$$(TARGET_PATH_PKG)
|
||||
$(STAMP_INSTALLED): $(STAMP_BUILT)
|
||||
rm -rf $(TMP_DIR)/stage-$(PKG_DIR_NAME)
|
||||
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
|
||||
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages
|
||||
$(foreach hook,$(Hooks/InstallDev/Pre),\
|
||||
$(call $(hook),$(TMP_DIR)/stage-$(PKG_DIR_NAME),$(TMP_DIR)/stage-$(PKG_DIR_NAME)/host)$(sep)\
|
||||
)
|
||||
@ -342,9 +342,9 @@ clean-build: $(if $(wildcard $(PKG_BUILD_DIR)/.autoremove),force-clean-build)
|
||||
|
||||
clean: force-clean-build
|
||||
$(CleanStaging)
|
||||
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR_HOST))
|
||||
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR)/host)
|
||||
$(Build/Clean)
|
||||
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) $(STAGING_DIR_HOST)/packages/$(STAGING_FILES_LIST)
|
||||
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)
|
||||
|
||||
dist:
|
||||
$(Build/Dist)
|
||||
|
@ -102,9 +102,9 @@ $(eval $(call SetupHostCommand,patch,Please install GNU 'patch', \
|
||||
gpatch --version 2>&1 | grep 'Free Software Foundation', \
|
||||
patch --version 2>&1 | grep 'Free Software Foundation'))
|
||||
|
||||
$(eval $(call SetupHostCommand,diff,Please install diffutils, \
|
||||
gdiff --version 2>&1 | grep diff, \
|
||||
diff --version 2>&1 | grep diff))
|
||||
$(eval $(call SetupHostCommand,diff,Please install GNU diffutils, \
|
||||
gdiff --version 2>&1 | grep GNU, \
|
||||
diff --version 2>&1 | grep GNU))
|
||||
|
||||
$(eval $(call SetupHostCommand,cp,Please install GNU fileutils, \
|
||||
gcp --help 2>&1 | grep 'Copy SOURCE', \
|
||||
|
0
include/shell.sh
Executable file → Normal file
0
include/shell.sh
Executable file → Normal file
@ -10,13 +10,22 @@ __target_inc=1
|
||||
DEVICE_TYPE?=router
|
||||
|
||||
# Default packages - the really basic set
|
||||
DEFAULT_PACKAGES:=base-files libc libgcc dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd \
|
||||
block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget-ssl libustream-openssl ca-certificates \
|
||||
default-settings luci luci-app-ddns luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot luci-newapi \
|
||||
luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic \
|
||||
luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \
|
||||
luci-app-sfe luci-app-nlbwmon luci-app-accesscontrol luci-app-cpufreq \
|
||||
ddns-scripts_aliyun ddns-scripts_dnspod
|
||||
DEFAULT_PACKAGES:=\
|
||||
base-files \
|
||||
ca-bundle \
|
||||
dropbear \
|
||||
fstools \
|
||||
libc \
|
||||
libgcc \
|
||||
libustream-openssl \
|
||||
logd \
|
||||
mtd \
|
||||
netifd \
|
||||
opkg \
|
||||
uci \
|
||||
uclient-fetch \
|
||||
urandom-seed \
|
||||
urngd
|
||||
|
||||
ifneq ($(CONFIG_SELINUX),)
|
||||
DEFAULT_PACKAGES+=busybox-selinux procd-selinux
|
||||
@ -24,11 +33,28 @@ else
|
||||
DEFAULT_PACKAGES+=busybox procd
|
||||
endif
|
||||
|
||||
# For the basic set
|
||||
DEFAULT_PACKAGES.basic:=
|
||||
# For nas targets
|
||||
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
|
||||
DEFAULT_PACKAGES.nas:=\
|
||||
block-mount \
|
||||
fdisk \
|
||||
lsblk \
|
||||
mdadm
|
||||
# For router targets
|
||||
DEFAULT_PACKAGES.router:=dnsmasq-full iptables ppp ppp-mod-pppoe firewall
|
||||
DEFAULT_PACKAGES.bootloader:=
|
||||
DEFAULT_PACKAGES.router:=\
|
||||
dnsmasq-full \
|
||||
firewall \
|
||||
iptables \
|
||||
kmod-ipt-offload \
|
||||
ppp \
|
||||
ppp-mod-pppoe \
|
||||
luci-newapi block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget-ssl \
|
||||
default-settings luci luci-app-ddns luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot luci-newapi \
|
||||
luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic \
|
||||
luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \
|
||||
luci-app-flowoffload luci-app-nlbwmon luci-app-accesscontrol luci-app-cpufreq \
|
||||
ddns-scripts_aliyun ddns-scripts_dnspod
|
||||
|
||||
ifneq ($(DUMP),)
|
||||
all: dumpinfo
|
||||
|
@ -44,7 +44,8 @@ TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
||||
UBOOT_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)"
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
|
||||
|
||||
define Build/U-Boot/Target
|
||||
$(eval $(call U-Boot/Init,$(1)))
|
||||
|
@ -40,7 +40,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) $(TAR_CMD)
|
||||
endif
|
||||
ifeq ($(EXT),cpio)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) (cd $(1)/..; cpio -i -d)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) (cd $(1)/..; $(STAGING_DIR_HOST)/bin/cpio -i -d)
|
||||
endif
|
||||
ifeq ($(EXT),zip)
|
||||
UNPACK_CMD=$(UNZIP_CMD)
|
||||
|
@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),SNAPSHOT)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/snapshots)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
@ -105,3 +105,4 @@ VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
|
||||
-e 's,%s,$(call sed_escape,$(VERSION_SUPPORT_URL)),g' \
|
||||
-e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \
|
||||
-e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g'
|
||||
|
||||
|
@ -47,6 +47,7 @@ define Package/base-files/conffiles
|
||||
/etc/config/
|
||||
/etc/config/network
|
||||
/etc/config/system
|
||||
/etc/crontabs/
|
||||
/etc/dropbear/
|
||||
/etc/ethers
|
||||
/etc/group
|
||||
@ -108,12 +109,14 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||
|
||||
endef
|
||||
|
||||
ifndef CONFIG_BUILDBOT
|
||||
define Package/base-files/install-key
|
||||
mkdir -p $(1)/etc/opkg/keys
|
||||
$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
|
||||
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NAND_SUPPORT),)
|
||||
define Package/base-files/nand-support
|
||||
@ -189,12 +192,19 @@ 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)
|
||||
cat $(BIN_DIR)/config.buildinfo >>$(1)/etc/build.config; \
|
||||
cat $(BIN_DIR)/feeds.buildinfo >>$(1)/etc/build.feeds; \
|
||||
cat $(BIN_DIR)/version.buildinfo >>$(1)/etc/build.version)
|
||||
|
||||
$(if $(CONFIG_CLEAN_IPKG),, \
|
||||
mkdir -p $(1)/etc/opkg; \
|
||||
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
|
||||
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
|
||||
$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
|
||||
rm -f $(1)/sbin/pkg_check)
|
||||
|
||||
$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
|
||||
rm -f $(1)/etc/banner.failsafe,)
|
||||
endef
|
||||
|
||||
ifneq ($(DUMP),1)
|
||||
|
@ -6,7 +6,7 @@ CFG=$1
|
||||
|
||||
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
|
||||
for a in $(ls /etc/board.d/*); do
|
||||
[ -x $a ] || continue;
|
||||
[ -s $a ] || continue;
|
||||
$(. $a)
|
||||
done
|
||||
}
|
||||
|
@ -109,26 +109,17 @@ generate_network() {
|
||||
ports="$ifname"
|
||||
}
|
||||
|
||||
[ -n "$ports" -a -z "$bridge" ] && {
|
||||
uci -q batch <<-EOF
|
||||
add network device
|
||||
set network.@device[-1].name='br-$1'
|
||||
set network.@device[-1].type='bridge'
|
||||
set network.@device[-1].macaddr='$macaddr'
|
||||
EOF
|
||||
for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
|
||||
ifname=br-$1
|
||||
type=
|
||||
macaddr=""
|
||||
[ -n "$ports" ] && {
|
||||
type="bridge"
|
||||
ifname="$ports"
|
||||
}
|
||||
|
||||
[ -n "$bridge" ] && {
|
||||
[ -z "$ports" ] && ports="$ifname"
|
||||
if [ -z "$vlan" ]; then
|
||||
bridge_vlan_id=$((bridge_vlan_id + 1))
|
||||
vlan=$bridge_vlan_id
|
||||
fi
|
||||
generate_bridge_vlan $1 $bridge "$ports" $vlan
|
||||
generate_bridge_vlan $1 $bridge "$ifname" $vlan
|
||||
ifname=$bridge.$vlan
|
||||
type=""
|
||||
}
|
||||
@ -306,10 +297,10 @@ generate_static_system() {
|
||||
set system.ntp='timeserver'
|
||||
set system.ntp.enabled='1'
|
||||
set system.ntp.enable_server='0'
|
||||
add_list system.ntp.server='ntp1.aliyun.com'
|
||||
add_list system.ntp.server='time1.cloud.tencent.com'
|
||||
add_list system.ntp.server='time.ustc.edu.cn'
|
||||
add_list system.ntp.server='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
|
||||
@ -319,6 +310,13 @@ generate_static_system() {
|
||||
uci -q set "system.@system[-1].hostname=$hostname"
|
||||
fi
|
||||
|
||||
local compat_version
|
||||
if json_get_var compat_version compat_version; then
|
||||
uci -q set "system.@system[-1].compat_version=$compat_version"
|
||||
else
|
||||
uci -q set "system.@system[-1].compat_version=1.0"
|
||||
fi
|
||||
|
||||
if json_is_a ntpserver array; then
|
||||
local keys key
|
||||
json_get_keys keys ntpserver
|
||||
@ -481,6 +479,8 @@ generate_gpioswitch() {
|
||||
json_init
|
||||
json_load "$(cat ${CFG})"
|
||||
|
||||
umask 077
|
||||
|
||||
if [ ! -s /etc/config/network ]; then
|
||||
bridge_name=""
|
||||
touch /etc/config/network
|
||||
|
1
package/base-files/files/etc/board.d/99-default_network
Executable file → Normal file
1
package/base-files/files/etc/board.d/99-default_network
Executable file → Normal file
@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2013-2015 OpenWrt.org
|
||||
#
|
||||
|
0
package/base-files/files/etc/diag.sh
Executable file → Normal file
0
package/base-files/files/etc/diag.sh
Executable file → Normal file
0
package/base-files/files/etc/hotplug.d/net/00-sysctl
Executable file → Normal file
0
package/base-files/files/etc/hotplug.d/net/00-sysctl
Executable file → Normal file
@ -33,7 +33,6 @@ boot() {
|
||||
mkdir -p /tmp/resolv.conf.d
|
||||
touch /tmp/resolv.conf.d/resolv.conf.auto
|
||||
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
|
||||
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf.auto
|
||||
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
|
||||
grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
|
||||
grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
[ -e /tmp/.failsafe ] && export FAILSAFE=1
|
||||
|
||||
[ -f /etc/banner ] && cat /etc/banner
|
||||
@ -13,6 +12,7 @@ export PATH="%PATH%"
|
||||
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
||||
export HOME=${HOME:-/root}
|
||||
export PS1='\u@\h:\w\$ '
|
||||
export ENV=/etc/shinit
|
||||
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
@ -20,16 +20,6 @@ case "$TERM" in
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -x /bin/more ] || alias more=less
|
||||
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
||||
|
||||
alias ll='ls -alF --color=auto'
|
||||
|
||||
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
||||
|
||||
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
|
||||
[ -n "$FAILSAFE" ] || {
|
||||
for FILE in /etc/profile.d/*.sh; do
|
||||
[ -e "$FILE" ] && . "$FILE"
|
||||
@ -48,12 +38,3 @@ in order to prevent unauthorized SSH logins.
|
||||
--------------------------------------------------
|
||||
EOF
|
||||
fi
|
||||
|
||||
service() {
|
||||
[ -f "/etc/init.d/$1" ] || {
|
||||
echo "service "'"'"$1"'"'" not found, the following services are available:"
|
||||
ls "/etc/init.d"
|
||||
return 1
|
||||
}
|
||||
/etc/init.d/$@
|
||||
}
|
||||
|
0
package/base-files/files/etc/rc.local
Executable file → Normal file
0
package/base-files/files/etc/rc.local
Executable file → Normal file
0
package/base-files/files/etc/shinit
Executable file → Normal file
0
package/base-files/files/etc/shinit
Executable file → Normal file
@ -8,6 +8,8 @@ fs.suid_dumpable=2
|
||||
fs.protected_hardlinks=1
|
||||
fs.protected_symlinks=1
|
||||
|
||||
net.core.bpf_jit_enable=1
|
||||
|
||||
net.ipv4.conf.default.arp_ignore=1
|
||||
net.ipv4.conf.all.arp_ignore=1
|
||||
net.ipv4.ip_forward=1
|
||||
|
0
package/base-files/files/etc/uci-defaults/10_migrate-shadow
Executable file → Normal file
0
package/base-files/files/etc/uci-defaults/10_migrate-shadow
Executable file → Normal file
0
package/base-files/files/etc/uci-defaults/12_network-generate-ula
Executable file → Normal file
0
package/base-files/files/etc/uci-defaults/12_network-generate-ula
Executable file → Normal file
0
package/base-files/files/etc/uci-defaults/13_fix-group-user
Executable file → Normal file
0
package/base-files/files/etc/uci-defaults/13_fix-group-user
Executable file → Normal file
@ -69,7 +69,7 @@ config () {
|
||||
local cfgtype="$1"
|
||||
local name="$2"
|
||||
|
||||
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
|
||||
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$((CONFIG_NUM_SECTIONS + 1))
|
||||
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
|
||||
append CONFIG_SECTIONS "$name"
|
||||
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
|
||||
@ -92,7 +92,7 @@ list() {
|
||||
|
||||
config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0
|
||||
[ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}"
|
||||
len=$(($len + 1))
|
||||
len=$((len + 1))
|
||||
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
|
||||
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
|
||||
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
|
||||
@ -106,9 +106,14 @@ config_unset() {
|
||||
# config_get <variable> <section> <option> [<default>]
|
||||
# config_get <section> <option>
|
||||
config_get() {
|
||||
case "$3" in
|
||||
"") eval echo "\${CONFIG_${1}_${2}:-\${4}}";;
|
||||
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
|
||||
case "$2${3:-$1}" in
|
||||
*[!A-Za-z0-9_]*) : ;;
|
||||
*)
|
||||
case "$3" in
|
||||
"") eval echo "\"\${CONFIG_${1}_${2}:-\${4}}\"";;
|
||||
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -149,7 +154,7 @@ config_foreach() {
|
||||
[ -z "$CONFIG_SECTIONS" ] && return 0
|
||||
for section in ${CONFIG_SECTIONS}; do
|
||||
config_get cfgtype "$section" TYPE
|
||||
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
|
||||
[ -n "$___type" ] && [ "x$cfgtype" != "x$___type" ] && continue
|
||||
eval "$___function \"\$section\" \"\$@\""
|
||||
done
|
||||
}
|
||||
@ -168,7 +173,7 @@ config_list_foreach() {
|
||||
while [ $c -le "$len" ]; do
|
||||
config_get val "${section}" "${option}_ITEM$c"
|
||||
eval "$function \"\$val\" \"\$@\""
|
||||
c="$(($c + 1))"
|
||||
c="$((c + 1))"
|
||||
done
|
||||
}
|
||||
|
||||
@ -235,6 +240,7 @@ add_group_and_user() {
|
||||
default_postinst() {
|
||||
local root="${IPKG_INSTROOT}"
|
||||
local pkgname="$(basename ${1%.*})"
|
||||
local filelist="/usr/lib/opkg/info/${pkgname}.list"
|
||||
local ret=0
|
||||
|
||||
add_group_and_user "${pkgname}"
|
||||
@ -249,23 +255,28 @@ 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" ]; then
|
||||
if grep -m1 -q -s "^/etc/modules.d/" "$filelist"; 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 $(grep -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
( [ -f "$i" ] && cd "$(dirname $i)" && . "$i" ) && rm -f "$i"
|
||||
done
|
||||
uci commit
|
||||
fi
|
||||
if grep -m1 -q -s "^/etc/sysctl.d/" "$filelist"; then
|
||||
/etc/init.d/sysctl restart
|
||||
fi
|
||||
|
||||
[ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null
|
||||
if grep -m1 -q -s "^/etc/uci-defaults/" "$filelist"; then
|
||||
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
|
||||
for i in $(grep -s "^/etc/uci-defaults/" "$filelist"); do
|
||||
( [ -f "$i" ] && cd "$(dirname $i)" && . "$i" ) && rm -f "$i"
|
||||
done
|
||||
uci commit
|
||||
fi
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
fi
|
||||
|
||||
local shell="$(command -v bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable
|
||||
else
|
||||
@ -323,9 +334,9 @@ group_add_next() {
|
||||
echo $gid
|
||||
return
|
||||
fi
|
||||
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
||||
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
|
||||
gid=65536
|
||||
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
||||
while echo "$gids" | grep -q "^$gid$"; do
|
||||
gid=$((gid + 1))
|
||||
done
|
||||
group_add $1 $gid
|
||||
@ -335,8 +346,8 @@ group_add_next() {
|
||||
group_add_user() {
|
||||
local grp delim=","
|
||||
grp=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group)
|
||||
[ -z "$(echo $grp | cut -d: -f4 | grep $2)" ] || return
|
||||
[ -n "$(echo $grp | grep ":$")" ] && delim=""
|
||||
echo "$grp" | cut -d: -f4 | grep -q $2 && return
|
||||
echo "$grp" | grep -q ":$" && delim=""
|
||||
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
|
||||
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
|
||||
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
|
||||
@ -351,9 +362,9 @@ user_add() {
|
||||
local shell="${6:-/bin/false}"
|
||||
local rc
|
||||
[ -z "$uid" ] && {
|
||||
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
|
||||
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
|
||||
uid=65536
|
||||
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
|
||||
while echo "$uids" | grep -q "^$uid$"; do
|
||||
uid=$((uid + 1))
|
||||
done
|
||||
}
|
||||
@ -373,4 +384,14 @@ board_name() {
|
||||
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
|
||||
}
|
||||
|
||||
[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
||||
cmdline_get_var() {
|
||||
local var=$1
|
||||
local cmdlinevar tmp
|
||||
|
||||
for cmdlinevar in $(cat /proc/cmdline); do
|
||||
tmp=${cmdlinevar##${var}}
|
||||
[ "=" = "${tmp:0:1}" ] && echo ${tmp:1}
|
||||
done
|
||||
}
|
||||
|
||||
[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
||||
|
0
package/base-files/files/lib/functions/leds.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/leds.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/network.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/network.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/preinit.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/preinit.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/service.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/service.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/system.sh
Executable file → Normal file
0
package/base-files/files/lib/functions/system.sh
Executable file → Normal file
@ -72,6 +72,12 @@ ucidef_set_model_name() {
|
||||
json_select ..
|
||||
}
|
||||
|
||||
ucidef_set_compat_version() {
|
||||
json_select_object system
|
||||
json_add_string compat_version "${1:-1.0}"
|
||||
json_select ..
|
||||
}
|
||||
|
||||
ucidef_set_interface_lan() {
|
||||
ucidef_set_interface "lan" ifname "$1" protocol "${2:-static}"
|
||||
}
|
||||
@ -639,6 +645,5 @@ board_config_update() {
|
||||
}
|
||||
|
||||
board_config_flush() {
|
||||
json_dump -i > /tmp/.board.json
|
||||
mv /tmp/.board.json ${CFG}
|
||||
json_dump -i -o ${CFG}
|
||||
}
|
||||
|
0
package/base-files/files/lib/preinit/02_default_set_state
Executable file → Normal file
0
package/base-files/files/lib/preinit/02_default_set_state
Executable file → Normal file
0
package/base-files/files/lib/preinit/02_sysinfo
Executable file → Normal file
0
package/base-files/files/lib/preinit/02_sysinfo
Executable file → Normal file
0
package/base-files/files/lib/preinit/10_indicate_failsafe
Executable file → Normal file
0
package/base-files/files/lib/preinit/10_indicate_failsafe
Executable file → Normal file
0
package/base-files/files/lib/preinit/10_indicate_preinit
Executable file → Normal file
0
package/base-files/files/lib/preinit/10_indicate_preinit
Executable file → Normal file
5
package/base-files/files/lib/preinit/30_failsafe_wait
Executable file → Normal file
5
package/base-files/files/lib/preinit/30_failsafe_wait
Executable file → Normal file
@ -30,6 +30,8 @@ fs_wait_for_key () {
|
||||
lock $keypress_wait
|
||||
{
|
||||
while [ $timer -gt 0 ]; do
|
||||
pi_failsafe_net_message=true \
|
||||
preinit_net_echo "Please press button now to enter failsafe"
|
||||
echo "$timer" >$keypress_sec
|
||||
timer=$(($timer - 1))
|
||||
sleep 1
|
||||
@ -87,9 +89,6 @@ failsafe_wait() {
|
||||
}
|
||||
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
|
||||
if [ "$FAILSAFE" != "true" ]; then
|
||||
pi_failsafe_net_message=true
|
||||
preinit_net_echo "Please press button now to enter failsafe"
|
||||
pi_failsafe_net_message=false
|
||||
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
|
||||
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "$(cat /tmp/failsafe_button)" was pressed -"
|
||||
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
|
||||
|
0
package/base-files/files/lib/preinit/40_run_failsafe_hook
Executable file → Normal file
0
package/base-files/files/lib/preinit/40_run_failsafe_hook
Executable file → Normal file
0
package/base-files/files/lib/preinit/50_indicate_regular_preinit
Executable file → Normal file
0
package/base-files/files/lib/preinit/50_indicate_regular_preinit
Executable file → Normal file
0
package/base-files/files/lib/preinit/70_initramfs_test
Executable file → Normal file
0
package/base-files/files/lib/preinit/70_initramfs_test
Executable file → Normal file
18
package/base-files/files/lib/preinit/80_mount_root
Executable file → Normal file
18
package/base-files/files/lib/preinit/80_mount_root
Executable file → Normal file
@ -1,14 +1,32 @@
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
|
||||
missing_lines() {
|
||||
local file1 file2 line
|
||||
file1="$1"
|
||||
file2="$2"
|
||||
oIFS="$IFS"
|
||||
IFS=":"
|
||||
while read line; do
|
||||
set -- $line
|
||||
grep -q "^$1:" "$file2" || echo "$*"
|
||||
done < "$file1"
|
||||
IFS="$oIFS"
|
||||
}
|
||||
|
||||
do_mount_root() {
|
||||
mount_root
|
||||
boot_run_hook preinit_mount_root
|
||||
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
|
||||
echo "- config restore -"
|
||||
cp /etc/passwd /etc/group /etc/shadow /tmp
|
||||
cd /
|
||||
[ -f /sysupgrade.tgz ] && tar xzf /sysupgrade.tgz
|
||||
[ -f /tmp/sysupgrade.tar ] && tar xf /tmp/sysupgrade.tar
|
||||
missing_lines /tmp/passwd /etc/passwd >> /etc/passwd
|
||||
missing_lines /tmp/group /etc/group >> /etc/group
|
||||
missing_lines /tmp/shadow /etc/shadow >> /etc/shadow
|
||||
rm /tmp/passwd /tmp/group /tmp/shadow
|
||||
# Prevent configuration corruption on a power loss
|
||||
sync
|
||||
}
|
||||
|
6
package/base-files/files/lib/preinit/99_10_failsafe_login
Executable file → Normal file
6
package/base-files/files/lib/preinit/99_10_failsafe_login
Executable file → Normal file
@ -1,11 +1,6 @@
|
||||
# Copyright (C) 2006-2015 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
|
||||
failsafe_netlogin () {
|
||||
dropbearkey -t rsa -s 1024 -f /tmp/dropbear_failsafe_host_key
|
||||
dropbear -r /tmp/dropbear_failsafe_host_key <> /dev/null 2>&1
|
||||
}
|
||||
|
||||
failsafe_shell() {
|
||||
local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')"
|
||||
[ -n "$console" ] || console=console
|
||||
@ -16,5 +11,4 @@ failsafe_shell() {
|
||||
done &
|
||||
}
|
||||
|
||||
boot_hook_add failsafe failsafe_netlogin
|
||||
boot_hook_add failsafe failsafe_shell
|
||||
|
0
package/base-files/files/lib/preinit/99_10_run_init
Executable file → Normal file
0
package/base-files/files/lib/preinit/99_10_run_init
Executable file → Normal file
238
package/base-files/files/lib/upgrade/common.sh
Executable file → Normal file
238
package/base-files/files/lib/upgrade/common.sh
Executable file → Normal file
@ -1,7 +1,9 @@
|
||||
RAM_ROOT=/tmp/root
|
||||
|
||||
export BACKUP_FILE=sysupgrade.tgz # file extracted by preinit
|
||||
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
|
||||
libs() { ldd $* 2>/dev/null | sed -E 's/(.* => )?(.*) .*/\2/'; }
|
||||
|
||||
install_file() { # <file> [ <file> ... ]
|
||||
local target dest dir
|
||||
@ -59,8 +61,20 @@ ask_bool() {
|
||||
[ "$answer" -gt 0 ]
|
||||
}
|
||||
|
||||
_v() {
|
||||
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$*" >&2
|
||||
}
|
||||
|
||||
_vn() {
|
||||
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo -n "$*" >&2
|
||||
}
|
||||
|
||||
v() {
|
||||
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
_v "$(date) upgrade: $@"
|
||||
}
|
||||
|
||||
vn() {
|
||||
_vn "$(date) upgrade: $@"
|
||||
}
|
||||
|
||||
json_string() {
|
||||
@ -87,7 +101,18 @@ get_image() { # <source> [ <command> ]
|
||||
esac
|
||||
fi
|
||||
|
||||
cat "$from" 2>/dev/null | $cmd
|
||||
$cmd <"$from"
|
||||
}
|
||||
|
||||
get_image_dd() {
|
||||
local from="$1"; shift
|
||||
|
||||
(
|
||||
exec 3>&2
|
||||
( exec 3>&2; get_image "$from" 2>&1 1>&3 | grep -v -F ' Broken pipe' ) 2>&1 1>&3 \
|
||||
| ( exec 3>&2; dd "$@" 2>&1 1>&3 | grep -v -E ' records (in|out)') 2>&1 1>&3
|
||||
exec 3>&-
|
||||
)
|
||||
}
|
||||
|
||||
get_magic_word() {
|
||||
@ -98,65 +123,81 @@ get_magic_long() {
|
||||
(get_image "$@" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2>/dev/null
|
||||
}
|
||||
|
||||
get_magic_gpt() {
|
||||
(get_image "$@" | dd bs=8 count=1 skip=64) 2>/dev/null
|
||||
}
|
||||
|
||||
get_magic_vfat() {
|
||||
(get_image "$@" | dd bs=3 count=1 skip=18) 2>/dev/null
|
||||
}
|
||||
|
||||
get_magic_fat32() {
|
||||
(get_image "$@" | dd bs=1 count=5 skip=82) 2>/dev/null
|
||||
}
|
||||
|
||||
part_magic_efi() {
|
||||
local magic=$(get_magic_gpt "$@")
|
||||
[ "$magic" = "EFI PART" ]
|
||||
}
|
||||
|
||||
part_magic_fat() {
|
||||
local magic=$(get_magic_vfat "$@")
|
||||
local magic_fat32=$(get_magic_fat32 "$@")
|
||||
[ "$magic" = "FAT" ] || [ "$magic_fat32" = "FAT32" ]
|
||||
}
|
||||
|
||||
export_bootdevice() {
|
||||
local cmdline uuid disk uevent line
|
||||
local cmdline uuid blockdev uevent line class
|
||||
local MAJOR MINOR DEVNAME DEVTYPE
|
||||
local rootpart="$(cmdline_get_var root)"
|
||||
|
||||
if read cmdline < /proc/cmdline; then
|
||||
case "$cmdline" in
|
||||
*block2mtd=*)
|
||||
disk="${cmdline##*block2mtd=}"
|
||||
disk="${disk%%,*}"
|
||||
;;
|
||||
*root=*)
|
||||
disk="${cmdline##*root=}"
|
||||
disk="${disk%% *}"
|
||||
;;
|
||||
esac
|
||||
case "$rootpart" 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])
|
||||
uuid="${rootpart#PARTUUID=}"
|
||||
uuid="${uuid%-[a-f0-9][a-f0-9]}"
|
||||
for blockdev in $(find /dev -type b); do
|
||||
set -- $(dd if=$blockdev bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
|
||||
if [ "$4$3$2$1" = "$uuid" ]; then
|
||||
uevent="/sys/class/block/${blockdev##*/}/uevent"
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
PARTUUID=????????-????-????-????-??????????02)
|
||||
uuid="${rootpart#PARTUUID=}"
|
||||
uuid="${uuid%02}00"
|
||||
for disk in $(find /dev -type b); do
|
||||
set -- $(dd if=$disk bs=1 skip=568 count=16 2>/dev/null | hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"')
|
||||
if [ "$4$3$2$1-$6$5-$8$7-$9" = "$uuid" ]; then
|
||||
uevent="/sys/class/block/${disk##*/}/uevent"
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
/dev/*)
|
||||
uevent="/sys/class/block/${rootpart##*/}/../uevent"
|
||||
;;
|
||||
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[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])
|
||||
rootpart=0x${rootpart#0x}
|
||||
for class in /sys/class/block/*; do
|
||||
while read line; do
|
||||
export -n "$line"
|
||||
done < "$class/uevent"
|
||||
if [ $((rootpart/256)) = $MAJOR -a $((rootpart%256)) = $MINOR ]; then
|
||||
uevent="$class/../uevent"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
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}"
|
||||
for disk in $(find /dev -type b); do
|
||||
set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
|
||||
if [ "$4$3$2$1" = "$uuid" ]; then
|
||||
uevent="/sys/class/block/${disk##*/}/uevent"
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
/dev/*)
|
||||
uevent="/sys/class/block/${disk##*/}/uevent"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -e "$uevent" ]; then
|
||||
while read line; do
|
||||
export -n "$line"
|
||||
done < "$uevent"
|
||||
export BOOTDEV_MAJOR=$MAJOR
|
||||
export BOOTDEV_MINOR=$MINOR
|
||||
return 0
|
||||
fi
|
||||
if [ -e "$uevent" ]; then
|
||||
while read line; do
|
||||
export -n "$line"
|
||||
done < "$uevent"
|
||||
export BOOTDEV_MAJOR=$MAJOR
|
||||
export BOOTDEV_MINOR=$MINOR
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
@ -187,6 +228,15 @@ hex_le32_to_cpu() {
|
||||
echo "$@"
|
||||
}
|
||||
|
||||
get_partition_by_name() {
|
||||
for partname in /sys/class/block/$1/*/name; do
|
||||
[ "$(cat ${partname})" = "$2" ] && {
|
||||
basename ${partname%%/name}
|
||||
break
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
get_partitions() { # <device> <filename>
|
||||
local disk="$1"
|
||||
local filename="$2"
|
||||
@ -203,27 +253,34 @@ get_partitions() { # <device> <filename>
|
||||
rm -f "/tmp/partmap.$filename"
|
||||
|
||||
local part
|
||||
for part in 1 2 3 4; do
|
||||
set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
|
||||
part_magic_efi "$disk" && {
|
||||
#export_partdevice will fail when partition number is greater than 15, as
|
||||
#the partition major device number is not equal to the disk major device number
|
||||
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
||||
set -- $(hexdump -v -n 48 -s "$((0x380 + $part * 0x80))" -e '4/4 "%08x"" "4/4 "%08x"" "4/4 "0x%08X "' "$disk")
|
||||
|
||||
local type="$(( $(hex_le32_to_cpu $1) % 256))"
|
||||
local lba="$(( $(hex_le32_to_cpu $2) ))"
|
||||
local num="$(( $(hex_le32_to_cpu $3) ))"
|
||||
local type="$1"
|
||||
local lba="$(( $(hex_le32_to_cpu $4) * 0x100000000 + $(hex_le32_to_cpu $3) ))"
|
||||
local end="$(( $(hex_le32_to_cpu $6) * 0x100000000 + $(hex_le32_to_cpu $5) ))"
|
||||
local num="$(( $end - $lba ))"
|
||||
|
||||
[ $type -gt 0 ] || continue
|
||||
[ "$type" = "00000000000000000000000000000000" ] && continue
|
||||
|
||||
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
|
||||
done
|
||||
fi
|
||||
}
|
||||
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
|
||||
done
|
||||
} || {
|
||||
for part in 1 2 3 4; do
|
||||
set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
|
||||
|
||||
jffs2_copy_config() {
|
||||
if grep rootfs_data /proc/mtd >/dev/null; then
|
||||
# squashfs+jffs2
|
||||
mtd -e rootfs_data jffs2write "$CONF_TAR" rootfs_data
|
||||
else
|
||||
# jffs2
|
||||
mtd jffs2write "$CONF_TAR" rootfs
|
||||
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
|
||||
|
||||
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
|
||||
done
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
@ -238,34 +295,11 @@ indicate_upgrade() {
|
||||
# $(2): (optional) pipe command to extract firmware, e.g. dd bs=n skip=m
|
||||
default_do_upgrade() {
|
||||
sync
|
||||
if [ "$SAVE_CONFIG" -eq 1 ]; then
|
||||
get_image "$1" "$2" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}"
|
||||
echo 3 > /proc/sys/vm/drop_caches
|
||||
if [ -n "$UPGRADE_BACKUP" ]; then
|
||||
get_image "$1" "$2" | mtd $MTD_ARGS $MTD_CONFIG_ARGS -j "$UPGRADE_BACKUP" write - "${PART_NAME:-image}"
|
||||
else
|
||||
get_image "$1" "$2" | mtd write - "${PART_NAME:-image}"
|
||||
get_image "$1" "$2" | mtd $MTD_ARGS write - "${PART_NAME:-image}"
|
||||
fi
|
||||
[ $? -ne 0 ] && exit 1
|
||||
}
|
||||
|
||||
do_upgrade_stage2() {
|
||||
v "Performing system upgrade..."
|
||||
if [ -n "$do_upgrade" ]; then
|
||||
eval "$do_upgrade"
|
||||
elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
|
||||
platform_do_upgrade "$IMAGE"
|
||||
else
|
||||
default_do_upgrade "$IMAGE"
|
||||
fi
|
||||
|
||||
if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then
|
||||
platform_copy_config
|
||||
fi
|
||||
|
||||
v "Upgrade completed"
|
||||
sleep 1
|
||||
|
||||
v "Rebooting system..."
|
||||
umount -a
|
||||
reboot -f
|
||||
sleep 5
|
||||
echo b 2>/dev/null >/proc/sysrq-trigger
|
||||
}
|
||||
|
25
package/base-files/files/lib/upgrade/do_stage2
Executable file
25
package/base-files/files/lib/upgrade/do_stage2
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
include /lib/upgrade
|
||||
|
||||
v "Performing system upgrade..."
|
||||
if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
|
||||
platform_do_upgrade "$IMAGE"
|
||||
else
|
||||
default_do_upgrade "$IMAGE"
|
||||
fi
|
||||
|
||||
if [ -n "$UPGRADE_BACKUP" ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then
|
||||
platform_copy_config
|
||||
fi
|
||||
|
||||
v "Upgrade completed"
|
||||
sleep 1
|
||||
|
||||
v "Rebooting system..."
|
||||
umount -a
|
||||
reboot -f
|
||||
sleep 5
|
||||
echo b 2>/dev/null >/proc/sysrq-trigger
|
54
package/base-files/files/lib/upgrade/fwtool.sh
Executable file → Normal file
54
package/base-files/files/lib/upgrade/fwtool.sh
Executable file → Normal file
@ -9,16 +9,17 @@ fwtool_check_signature() {
|
||||
fi
|
||||
}
|
||||
|
||||
if ! fwtool -q -t -s /tmp/sysupgrade.ucert "$1"; then
|
||||
echo "Image signature not found"
|
||||
if ! fwtool -q -s /tmp/sysupgrade.ucert "$1"; then
|
||||
v "Image signature not present"
|
||||
[ "$REQUIRE_IMAGE_SIGNATURE" = 1 -a "$FORCE" != 1 ] && {
|
||||
echo "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
|
||||
v "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
|
||||
}
|
||||
[ "$REQUIRE_IMAGE_SIGNATURE" = 1 ] && return 1
|
||||
return 0
|
||||
fi
|
||||
|
||||
ucert -V -m "$1" -c "/tmp/sysupgrade.ucert" -P /etc/opkg/keys
|
||||
fwtool -q -T -s /dev/null "$1" | \
|
||||
ucert -V -m - -c "/tmp/sysupgrade.ucert" -P /etc/opkg/keys
|
||||
|
||||
return $?
|
||||
}
|
||||
@ -29,36 +30,63 @@ fwtool_check_image() {
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
if ! fwtool -q -i /tmp/sysupgrade.meta "$1"; then
|
||||
echo "Image metadata not found"
|
||||
v "Image metadata not present"
|
||||
[ "$REQUIRE_IMAGE_METADATA" = 1 -a "$FORCE" != 1 ] && {
|
||||
echo "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
|
||||
v "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
|
||||
}
|
||||
[ "$REQUIRE_IMAGE_METADATA" = 1 ] && return 1
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_load "$(cat /tmp/sysupgrade.meta)" || {
|
||||
echo "Invalid image metadata"
|
||||
v "Invalid image metadata"
|
||||
return 1
|
||||
}
|
||||
|
||||
device="$(cat /tmp/sysinfo/board_name)"
|
||||
devicecompat="$(uci -q get system.@system[0].compat_version)"
|
||||
[ -n "$devicecompat" ] || devicecompat="1.0"
|
||||
|
||||
json_select supported_devices || return 1
|
||||
json_get_var imagecompat compat_version
|
||||
json_get_var compatmessage compat_message
|
||||
[ -n "$imagecompat" ] || imagecompat="1.0"
|
||||
|
||||
# select correct supported list based on compat_version
|
||||
# (using this ensures that compatibility check works for devices
|
||||
# not knowing about compat-version)
|
||||
local supported=supported_devices
|
||||
[ "$imagecompat" != "1.0" ] && supported=new_supported_devices
|
||||
json_select $supported || return 1
|
||||
|
||||
json_get_keys dev_keys
|
||||
for k in $dev_keys; do
|
||||
json_get_var dev "$k"
|
||||
[ "$dev" = "$device" ] && return 0
|
||||
if [ "$dev" = "$device" ]; then
|
||||
# major compat version -> no sysupgrade
|
||||
if [ "${devicecompat%.*}" != "${imagecompat%.*}" ]; then
|
||||
v "The device is supported, but this image is incompatible for sysupgrade based on the image version ($devicecompat->$imagecompat)."
|
||||
[ -n "$compatmessage" ] && v "$compatmessage"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# minor compat version -> sysupgrade with -n required
|
||||
if [ "${devicecompat#.*}" != "${imagecompat#.*}" ] && [ "$SAVE_CONFIG" = "1" ]; then
|
||||
v "The device is supported, but the config is incompatible to the new image ($devicecompat->$imagecompat). Please upgrade without keeping config (sysupgrade -n)."
|
||||
[ -n "$compatmessage" ] && v "$compatmessage"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Device $device not supported by this image"
|
||||
echo -n "Supported devices:"
|
||||
v "Device $device not supported by this image"
|
||||
local devices="Supported devices:"
|
||||
for k in $dev_keys; do
|
||||
json_get_var dev "$k"
|
||||
echo -n " $dev"
|
||||
devices="$devices $dev"
|
||||
done
|
||||
echo
|
||||
v "$devices"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
22
package/base-files/files/lib/upgrade/nand.sh
Executable file → Normal file
22
package/base-files/files/lib/upgrade/nand.sh
Executable file → Normal file
@ -108,7 +108,7 @@ nand_restore_config() {
|
||||
rmdir /tmp/new_root
|
||||
return 1
|
||||
fi
|
||||
mv "$1" "/tmp/new_root/sysupgrade.tgz"
|
||||
mv "$1" "/tmp/new_root/$BACKUP_FILE"
|
||||
umount /tmp/new_root
|
||||
sync
|
||||
rmdir /tmp/new_root
|
||||
@ -117,10 +117,11 @@ nand_restore_config() {
|
||||
nand_upgrade_prepare_ubi() {
|
||||
local rootfs_length="$1"
|
||||
local rootfs_type="$2"
|
||||
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
|
||||
[ -n "$rootfs_data_max" ] && rootfs_data_max=$((rootfs_data_max))
|
||||
|
||||
local kernel_length="$3"
|
||||
local has_env="${4:-0}"
|
||||
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
|
||||
[ -n "$rootfs_data_max" ] && rootfs_data_max=$(($rootfs_data_max))
|
||||
|
||||
[ -n "$rootfs_length" -o -n "$kernel_length" ] || return 1
|
||||
|
||||
@ -194,7 +195,7 @@ nand_upgrade_prepare_ubi() {
|
||||
if [ "$rootfs_type" != "ubifs" ]; then
|
||||
local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
|
||||
local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
|
||||
local avail_size=$(( $availeb * $ebsize ))
|
||||
local avail_size=$((availeb * ebsize))
|
||||
local rootfs_data_size_param="-m"
|
||||
if [ -n "$rootfs_data_max" ] &&
|
||||
[ "$rootfs_data_max" != "0" ] &&
|
||||
@ -315,21 +316,8 @@ nand_upgrade_tar() {
|
||||
|
||||
# Recognize type of passed file and start the upgrade process
|
||||
nand_do_upgrade() {
|
||||
if [ -n "$IS_PRE_UPGRADE" ]; then
|
||||
# Previously, nand_do_upgrade was called from the platform_pre_upgrade
|
||||
# hook; this piece of code handles scripts that haven't been
|
||||
# updated. All scripts should gradually move to call nand_do_upgrade
|
||||
# from platform_do_upgrade instead.
|
||||
export do_upgrade="nand_do_upgrade '$1'"
|
||||
return
|
||||
fi
|
||||
|
||||
local file_type=$(identify $1)
|
||||
|
||||
if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
|
||||
platform_nand_pre_upgrade "$1"
|
||||
fi
|
||||
|
||||
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
|
||||
|
||||
case "$file_type" in
|
||||
|
@ -6,24 +6,13 @@
|
||||
export IMAGE="$1"
|
||||
COMMAND="$2"
|
||||
|
||||
export ARGV="$IMAGE"
|
||||
export ARGC=1
|
||||
|
||||
export SAVE_CONFIG=1
|
||||
export SAVE_PARTITIONS=1
|
||||
|
||||
export INTERACTIVE=0
|
||||
export VERBOSE=1
|
||||
export CONFFILES=/tmp/sysupgrade.conffiles
|
||||
export CONF_TAR=/tmp/sysupgrade.tgz
|
||||
|
||||
RAMFS_COPY_BIN= # extra programs for temporary ramfs root
|
||||
RAMFS_COPY_DATA= # extra data files
|
||||
|
||||
|
||||
[ -f "$CONF_TAR" ] || export SAVE_CONFIG=0
|
||||
[ -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap ] && export SAVE_PARTITIONS=0
|
||||
|
||||
include /lib/upgrade
|
||||
|
||||
|
||||
@ -44,6 +33,9 @@ supivot() { # <new_root> <old_root>
|
||||
}
|
||||
|
||||
switch_to_ramfs() {
|
||||
RAMFS_COPY_LOSETUP="$(command -v losetup)"
|
||||
RAMFS_COPY_LVM="$(command -v lvm)"
|
||||
|
||||
for binary in \
|
||||
/bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \
|
||||
pivot_root mount_root reboot sync kill sleep \
|
||||
@ -53,24 +45,31 @@ switch_to_ramfs() {
|
||||
mtd partx losetup mkfs.ext4 nandwrite flash_erase \
|
||||
ubiupdatevol ubiattach ubiblock ubiformat \
|
||||
ubidetach ubirsvol ubirmvol ubimkvol \
|
||||
snapshot snapshot_tool \
|
||||
snapshot snapshot_tool date \
|
||||
$RAMFS_COPY_LOSETUP $RAMFS_COPY_LVM \
|
||||
$RAMFS_COPY_BIN
|
||||
do
|
||||
local file="$(command -v "$binary" 2>/dev/null)"
|
||||
[ -n "$file" ] && install_bin "$file"
|
||||
done
|
||||
install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA
|
||||
install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh /lib/upgrade/do_stage2 /usr/share/libubox/jshn.sh $RAMFS_COPY_DATA
|
||||
|
||||
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
|
||||
|
||||
supivot $RAM_ROOT /mnt || {
|
||||
echo "Failed to switch over to ramfs. Please reboot."
|
||||
v "Failed to switch over to ramfs. Please reboot."
|
||||
exit 1
|
||||
}
|
||||
|
||||
/bin/mount -o remount,ro /mnt
|
||||
/bin/umount -l /mnt
|
||||
|
||||
[ "$RAMFS_COPY_LOSETUP" ] && losetup -D
|
||||
[ "$RAMFS_COPY_LVM" ] && {
|
||||
mkdir -p /tmp/lvm/cache
|
||||
$RAMFS_COPY_LVM vgchange -aln --ignorelockingfailure
|
||||
}
|
||||
|
||||
grep /overlay /proc/mounts > /dev/null && {
|
||||
/bin/mount -o noatime,remount,ro /overlay
|
||||
/bin/umount -l /overlay
|
||||
@ -86,7 +85,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
|
||||
local stat
|
||||
local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat)
|
||||
|
||||
echo -n "Sending $sig to remaining processes ... "
|
||||
vn "Sending $sig to remaining processes ..."
|
||||
|
||||
while $run; do
|
||||
run=false
|
||||
@ -106,7 +105,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
|
||||
# Skip kernel threads
|
||||
[ -n "$cmdline" ] || continue
|
||||
|
||||
echo -n "$name "
|
||||
_vn " $name"
|
||||
kill -$sig $pid 2>/dev/null
|
||||
|
||||
[ $loop -eq 1 ] && run=true
|
||||
@ -114,12 +113,12 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
|
||||
|
||||
let loop_limit--
|
||||
[ $loop_limit -eq 0 ] && {
|
||||
echo
|
||||
echo "Failed to kill all processes."
|
||||
_v
|
||||
v "Failed to kill all processes."
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
echo
|
||||
_v
|
||||
}
|
||||
|
||||
indicate_upgrade
|
||||
@ -134,16 +133,14 @@ kill_remaining KILL 1
|
||||
|
||||
sleep 1
|
||||
|
||||
echo 3 > /proc/sys/vm/drop_caches
|
||||
|
||||
if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
|
||||
IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE"
|
||||
|
||||
# Needs to be unset again because of busybox weirdness ...
|
||||
IS_PRE_UPGRADE=
|
||||
platform_pre_upgrade "$IMAGE"
|
||||
fi
|
||||
|
||||
if [ -n "$(rootfs_type)" ]; then
|
||||
echo "Switching to ramdisk..."
|
||||
v "Switching to ramdisk..."
|
||||
switch_to_ramfs
|
||||
fi
|
||||
|
||||
|
@ -15,4 +15,4 @@ if [ \! -z "$1" -a -d /etc/hotplug.d/$1 ]; then
|
||||
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
|
||||
[ -f $script ] && . $script
|
||||
); done
|
||||
fi
|
||||
fi
|
||||
|
130
package/base-files/files/sbin/pkg_check
Executable file
130
package/base-files/files/sbin/pkg_check
Executable file
@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Package checksums checking script
|
||||
# (C) 2018 CZ.NIC, z.s.p.o.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
ERRFATAL="no"
|
||||
QUIET="yes"
|
||||
MISSING=""
|
||||
SUMMARY=""
|
||||
NL="
|
||||
"
|
||||
|
||||
# Arguments parsing
|
||||
while expr "x$1" : "x-" > /dev/null; do
|
||||
if [ "x$1" = "x-s" ]; then
|
||||
ERRFATAL="yes"
|
||||
shift
|
||||
elif [ "x$1" = "x-v" ]; then
|
||||
QUIET=" no"
|
||||
shift
|
||||
else
|
||||
echo "Usage: $(basename $0) [-s] [-v] [pkg1 pkg2 ...]"
|
||||
echo
|
||||
echo " -s Stop on first change"
|
||||
echo " -v Verbose"
|
||||
if [ "x$1" = "x-h" ]; then
|
||||
exit 0
|
||||
else
|
||||
echo
|
||||
echo "ERROR: Unknown option '$1'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Check all packages by default
|
||||
if [ -z "$1" ]; then
|
||||
set $(cd /usr/lib/opkg/info/; for i in *.files-sha256sum; do basename $i .files-sha256sum; done)
|
||||
fi
|
||||
|
||||
# Iterate over packages
|
||||
while [ "$1" ]; do
|
||||
if [ \! -f "/usr/lib/opkg/info/$1.files-sha256sum" ]; then
|
||||
if [ "$ERRFATAL" = no ]; then
|
||||
echo " * No checksums for $1 - skipping"
|
||||
echo
|
||||
else
|
||||
echo " * No checksums for $1 - exiting"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$MISSING" ]; then
|
||||
MISSING="$1"
|
||||
else
|
||||
MISSING="$MISSING, $1"
|
||||
fi
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
[ $QUIET = yes ] || echo " * Checking package $1:"
|
||||
ERR=""
|
||||
CHECK="$(sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null)"
|
||||
|
||||
# Are the changed files config files?
|
||||
if [ $? -ne 0 ] && [ "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ]; then
|
||||
NEWCHECK="$(echo "$CHECK" | grep '^.*: OK$')"
|
||||
for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do
|
||||
if [ "$(grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null)" ] || \
|
||||
[ "$(echo "$i" | grep "^/etc/uci-defaults/")" ]; then
|
||||
NEWCHECK="${NEWCHECK}${NL}${i}: CONFIGURED"
|
||||
else
|
||||
NEWCHECK="${NEWCHECK}${NL}${i}: FAILED"
|
||||
ERR="y"
|
||||
fi
|
||||
done
|
||||
CHECK="$NEWCHECK"
|
||||
fi
|
||||
|
||||
# Do we have changed files or not?
|
||||
if [ -z "$ERR" ]; then
|
||||
[ $QUIET = yes ] || [ ! -s "/usr/lib/opkg/info/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
|
||||
[ $QUIET = yes ] || echo " * Package $1 is ok"
|
||||
[ $QUIET = yes ] || echo
|
||||
else
|
||||
if [ $QUIET = yes ]; then
|
||||
echo " * Changes found in package $1:"
|
||||
echo "$CHECK" | sed -n 's|^\(.*:[[:blank:]]*FAILED\)$| - \1|p'
|
||||
else
|
||||
echo "$CHECK" | sed 's|^| - |'
|
||||
echo " * Changes found in package $1!"
|
||||
fi
|
||||
if [ "$ERRFATAL" = yes ]; then
|
||||
echo
|
||||
echo "Exiting on first change found!"
|
||||
exit 1
|
||||
fi
|
||||
for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do
|
||||
SUMMARY="${SUMMARY}${NL} - $1: $i"
|
||||
done
|
||||
echo
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# If there are changed files, report them
|
||||
if [ "$SUMMARY" ]; then
|
||||
echo "Some packages contain changed files!"
|
||||
echo "Maybe something worth looking into?"
|
||||
echo "Here is the list of packages and changed files:"
|
||||
echo "$SUMMARY"
|
||||
fi
|
||||
if [ "$MISSING" ]; then
|
||||
echo "Following packages are missing checksums: $MISSING"
|
||||
fi
|
||||
if [ "$MISSING" ] || [ "$SUMMARY" ]; then
|
||||
exit 1
|
||||
fi
|
@ -5,6 +5,7 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
# initialize defaults
|
||||
export MTD_ARGS=""
|
||||
export MTD_CONFIG_ARGS=""
|
||||
export INTERACTIVE=0
|
||||
export VERBOSE=1
|
||||
@ -126,7 +127,7 @@ list_changed_conffiles() {
|
||||
list_conffiles | while read file csum; do
|
||||
[ -r "$file" ] || continue
|
||||
|
||||
echo "${csum} ${file}" | sha256sum -sc - || echo "$file"
|
||||
echo "${csum} ${file}" | busybox sha256sum -sc - || echo "$file"
|
||||
done
|
||||
}
|
||||
|
||||
@ -196,9 +197,6 @@ add_overlayfiles() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# hooks
|
||||
sysupgrade_image_check="fwtool_check_signature fwtool_check_image platform_check_image"
|
||||
|
||||
if [ $SAVE_OVERLAY = 1 ]; then
|
||||
[ ! -d /overlay/upper/etc ] && {
|
||||
echo "Cannot find '/overlay/upper/etc', required for '-c'" >&2
|
||||
@ -223,7 +221,7 @@ include /lib/upgrade
|
||||
do_save_conffiles() {
|
||||
local conf_tar="$1"
|
||||
|
||||
[ -z "$(rootfs_type)" ] && {
|
||||
[ "$(rootfs_type)" = "tmpfs" ] && {
|
||||
echo "Cannot save config while running from ramdisk." >&2
|
||||
ask_bool 0 "Abort" && exit
|
||||
rm -f "$conf_tar"
|
||||
@ -255,7 +253,7 @@ do_save_conffiles() {
|
||||
|
||||
v "Saving config files..."
|
||||
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
|
||||
tar c${TAR_V}zpf "$conf_tar" -T "$CONFFILES" 2>/dev/null
|
||||
tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Failed to create the configuration backup."
|
||||
rm -f "$conf_tar"
|
||||
@ -302,7 +300,7 @@ type platform_check_image >/dev/null 2>/dev/null || {
|
||||
case "$IMAGE" in
|
||||
http://*|\
|
||||
https://*)
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE"
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
|
||||
IMAGE=/tmp/sysupgrade.img
|
||||
;;
|
||||
esac
|
||||
@ -322,20 +320,19 @@ case "$IMAGE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
export ARGV="$IMAGE"
|
||||
export ARGC=1
|
||||
|
||||
for check in $sysupgrade_image_check; do
|
||||
( $check "$IMAGE" ) || {
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
echo "Image check '$check' failed but --force given - will update anyway!" >&2
|
||||
break
|
||||
else
|
||||
echo "Image check '$check' failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
done
|
||||
json_load "$(/usr/libexec/validate_firmware_image "$IMAGE")" || {
|
||||
echo "Failed to check image"
|
||||
exit 1
|
||||
}
|
||||
json_get_var valid "valid"
|
||||
[ "$valid" -eq 0 ] && {
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
echo "Image check failed but --force given - will update anyway!" >&2
|
||||
else
|
||||
echo "Image check failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "$CONF_IMAGE" ]; then
|
||||
case "$(get_magic_word $CONF_IMAGE cat)" in
|
||||
@ -360,16 +357,10 @@ if [ $TEST -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $SAVE_PARTITIONS -eq 0 ]; then
|
||||
touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap
|
||||
else
|
||||
rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
|
||||
fi
|
||||
|
||||
install_bin /sbin/upgraded
|
||||
v "Commencing upgrade. Closing all shell sessions."
|
||||
|
||||
COMMAND='. /lib/functions.sh; include /lib/upgrade; do_upgrade_stage2'
|
||||
COMMAND='/lib/upgrade/do_stage2'
|
||||
|
||||
if [ -n "$FAILSAFE" ]; then
|
||||
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
||||
|
@ -79,6 +79,7 @@ wifi_fixup_hwmode() {
|
||||
case "$hwmode" in
|
||||
11bg) hwmode=bg;;
|
||||
11a) hwmode=a;;
|
||||
11ad) hwmode=ad;;
|
||||
11b) hwmode=b;;
|
||||
11g) hwmode=g;;
|
||||
11n*)
|
||||
|
0
package/boot/at91bootstrap/at91bootstrap.mk
Executable file → Normal file
0
package/boot/at91bootstrap/at91bootstrap.mk
Executable file → Normal file
158
package/boot/grub2/Makefile
Normal file
158
package/boot/grub2/Makefile
Normal file
@ -0,0 +1,158 @@
|
||||
#
|
||||
# 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.06~rc1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub
|
||||
PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=grub2/host
|
||||
|
||||
PKG_ASLR_PIE:=0
|
||||
PKG_SSP:=0
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/grub2/Default
|
||||
CATEGORY:=Boot Loaders
|
||||
SECTION:=boot
|
||||
TITLE:=GRand Unified Bootloader ($(1))
|
||||
URL:=http://www.gnu.org/software/grub/
|
||||
DEPENDS:=@TARGET_x86
|
||||
VARIANT:=$(1)
|
||||
endef
|
||||
|
||||
Package/grub2=$(call Package/grub2/Default,pc)
|
||||
Package/grub2-efi=$(call Package/grub2/Default,efi)
|
||||
|
||||
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
|
||||
VARIANT:=pc
|
||||
endef
|
||||
|
||||
define Package/grub2-editenv/description
|
||||
Edit grub2 environment files.
|
||||
endef
|
||||
|
||||
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
grub_build_mkfont_excuse="don't want fonts"
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
--disable-device-mapper \
|
||||
--disable-libzfs \
|
||||
--disable-liblzma \
|
||||
--disable-grub-mkfont \
|
||||
--with-platform=$(BUILD_VARIANT)
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
grub_build_mkfont_excuse="don't want fonts"
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-grub-mkfont \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--sbindir="$(STAGING_DIR_HOST)/bin" \
|
||||
--disable-werror \
|
||||
--disable-libzfs \
|
||||
--disable-nls \
|
||||
--with-platform=none
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
TARGET_RANLIB=$(TARGET_RANLIB) \
|
||||
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS))
|
||||
|
||||
define Host/Configure
|
||||
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
|
||||
$(Host/Configure/Default)
|
||||
endef
|
||||
|
||||
define Package/grub2/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
|
||||
$(CP) $(PKG_BUILD_DIR)/grub-core/boot.img $(STAGING_DIR_IMAGE)/grub2/
|
||||
$(CP) $(PKG_BUILD_DIR)/grub-core/cdboot.img $(STAGING_DIR_IMAGE)/grub2/
|
||||
sed 's#msdos1#gpt1#g' ./files/grub-early.cfg >$(PKG_BUILD_DIR)/grub-early.cfg
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O i386-pc \
|
||||
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
|
||||
at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot serial vga
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O i386-pc \
|
||||
-c ./files/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
|
||||
at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O i386-pc \
|
||||
-c ./files/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/eltorito.img \
|
||||
at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial test vga
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O i386-pc \
|
||||
-c ./files/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/legacy-core.img \
|
||||
biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
|
||||
endef
|
||||
|
||||
define Package/grub2-efi/install
|
||||
sed 's#msdos1#gpt1#g' ./files/grub-early.cfg >$(PKG_BUILD_DIR)/grub-early.cfg
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O $(CONFIG_ARCH)-efi \
|
||||
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
||||
at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga
|
||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||
-d $(PKG_BUILD_DIR)/grub-core \
|
||||
-p /boot/grub \
|
||||
-O $(CONFIG_ARCH)-efi \
|
||||
-c ./files/grub-early.cfg \
|
||||
-o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
||||
at_keyboard boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga
|
||||
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-efi))
|
||||
$(eval $(call BuildPackage,grub2-editenv))
|
@ -1,76 +0,0 @@
|
||||
#
|
||||
# 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_CPE_ID:=cpe:/a:gnu:grub2
|
||||
PKG_VERSION:=2.06~rc1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=grub-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub
|
||||
PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_ASLR_PIE:=0
|
||||
PKG_SSP:=0
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PATCH_DIR := ../patches
|
||||
HOST_PATCH_DIR := ../patches
|
||||
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/grub2/Default
|
||||
CATEGORY:=Boot Loaders
|
||||
SECTION:=boot
|
||||
TITLE:=GRand Unified Bootloader
|
||||
URL:=http://www.gnu.org/software/grub/
|
||||
DEPENDS:=@TARGET_x86||TARGET_x86_64
|
||||
endef
|
||||
|
||||
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
grub_build_mkfont_excuse="don't want fonts"
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
--disable-device-mapper \
|
||||
--disable-libzfs \
|
||||
--disable-liblzma \
|
||||
--disable-grub-mkfont \
|
||||
--with-platform=none
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
grub_build_mkfont_excuse="don't want fonts"
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-grub-mkfont \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--sbindir="$(STAGING_DIR_HOST)/bin" \
|
||||
--disable-werror \
|
||||
--disable-libzfs \
|
||||
--disable-nls
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
TARGET_RANLIB=$(TARGET_RANLIB) \
|
||||
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS))
|
||||
|
||||
define Host/Configure
|
||||
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
|
||||
$(Host/Configure/Default)
|
||||
endef
|
@ -1,23 +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
|
||||
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
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))
|
@ -32,7 +32,7 @@ Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
|
||||
@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
- if (key == GRUB_TERM_BACKSPACE)
|
||||
+ if (key == GRUB_TERM_BACKSPACE && cur_len)
|
||||
{
|
||||
|
0
package/boot/kexec-tools/files/kdump.config
Executable file → Normal file
0
package/boot/kexec-tools/files/kdump.config
Executable file → Normal file
0
package/boot/kexec-tools/files/kdump.defaults
Executable file → Normal file
0
package/boot/kexec-tools/files/kdump.defaults
Executable file → Normal file
@ -5,7 +5,8 @@ STOP=90
|
||||
|
||||
BOOT_IMAGE=/boot/vmlinuz
|
||||
|
||||
extra_command "status" "Print crashkernel status"
|
||||
EXTRA_COMMANDS="status"
|
||||
EXTRA_HELP=" status Print crashkernel status"
|
||||
|
||||
verify_kdump() {
|
||||
local cfg="$1"
|
||||
|
@ -51,23 +51,10 @@ define Package/mt7623n-preloader/description
|
||||
Preloader image for mt7623n based boards like Banana Pi R2.
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_mediatek_mt7622
|
||||
TITLE:=mt7622-preloader
|
||||
DEFAULT:=y if TARGET_mediatek
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader/description
|
||||
Preloader image for mt7622 based boards like Banana Pi R64.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz $(PKG_BUILD_DIR)/mt7622_bpir64-preloader.bin.gz
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@ -80,4 +67,3 @@ define Build/InstallDev
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mt7623n-preloader))
|
||||
$(eval $(call BuildPackage,mt7622-preloader))
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tfa-layerscape
|
||||
PKG_VERSION:=LSDK-20.04-update-290520
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2019.04
|
||||
PKG_VERSION:=2020.04
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
|
||||
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 630b39c46b29de1874149c6b2c18c64966a0fabf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Sun, 1 Mar 2020 22:47:31 +0100
|
||||
Subject: [PATCH] apalis_imx6_defconfig: enable some useful commands
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
partition table info, EXT4 write support, support for FAT and generic FS
|
||||
commands like load/ls that work for multiple FS types.
|
||||
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
---
|
||||
configs/apalis_imx6_defconfig | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/configs/apalis_imx6_defconfig
|
||||
+++ b/configs/apalis_imx6_defconfig
|
||||
@@ -44,6 +44,7 @@ CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PART=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_SDP=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
@@ -53,6 +54,10 @@ CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_EXT4_WRITE=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
@ -1,123 +0,0 @@
|
||||
From 42cc2cffb6d550fbb21dad033d2564d4da571015 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Sat, 1 Dec 2018 12:46:37 +0100
|
||||
Subject: [PATCH] imx6: apalis: Make the boot process more generic
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
I'm preparing support for Apalis imx6 boards in OpenWrt and I've ended
|
||||
up with quite huge patchset against upstream U-Boot 2018.03, so I'm
|
||||
trying to propose more generic way of boot process handling.
|
||||
|
||||
In OpenWrt we usually have kernel, dtbs and U-Boot boot script in boot
|
||||
partition with ext4fs, so for some use cases it would be handy to be
|
||||
able to replace some of the files in the boot partion, that's why I've
|
||||
added write support to the ext4.
|
||||
|
||||
I've added `set_blkcnt` environment variable which is needed for every
|
||||
`mmc write` command as we need to always specify size in block count.
|
||||
This is copy&pasted from official Toradex's flashing scripts, so all the
|
||||
credits for this work belongs to them.
|
||||
|
||||
Currently the rootfs location is passed via mmcblk number and the
|
||||
problem with this approach is that the mmcblk number for the boot device
|
||||
changes depending on the kernel version and imx6 SoC type. In order to
|
||||
avoid such issues, use the UUID method to specify the rootfs location.
|
||||
|
||||
I've added new boot sequence, where we first try to load and run boot
|
||||
script defined in the new `script` variable, so the boot process could
|
||||
be more generic and overridden by the distro. When the boot script isn't
|
||||
loaded, it will use the previous boot sequence so it should be backward
|
||||
compatible.
|
||||
|
||||
For the recovery purposes and better end user experience I've added boot
|
||||
from SDP as the last boot command if every other boot option fails. I
|
||||
plan to use SDP as official flashing/recovery procedure in OpenWrt for
|
||||
Apalis imx6 boards.
|
||||
|
||||
I've copy&pasted almost everything from the `f086812a mx6sxsabresd: Use
|
||||
PARTUUID to specify the rootfs location` commit, so credits for the rest
|
||||
of this patch belongs to Fabio.
|
||||
|
||||
Cc: Stefan Agner <stefan.agner@toradex.com>
|
||||
Cc: Max Krummenacher <max.krummenacher@toradex.com>
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
---
|
||||
configs/apalis_imx6_defconfig | 2 ++
|
||||
include/configs/apalis_imx6.h | 26 +++++++++++++++++++++-----
|
||||
2 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/configs/apalis_imx6_defconfig
|
||||
+++ b/configs/apalis_imx6_defconfig
|
||||
@@ -40,6 +40,7 @@ CONFIG_CMD_DFU=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PART=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_SDP=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
@@ -49,6 +50,7 @@ CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
--- a/include/configs/apalis_imx6.h
|
||||
+++ b/include/configs/apalis_imx6.h
|
||||
@@ -138,9 +138,9 @@
|
||||
"imx6q-colibri-cam-eval-v3.dtb fat 0 1"
|
||||
|
||||
#define EMMC_BOOTCMD \
|
||||
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
|
||||
+ "emmcargs=ip=off root=PARTUUID=${uuid} rw,noatime rootfstype=ext3 " \
|
||||
"rootwait\0" \
|
||||
- "emmcboot=run setup; " \
|
||||
+ "emmcboot=run setup; run finduuid;" \
|
||||
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
|
||||
"${vidargs}; echo Booting from internal eMMC chip...; " \
|
||||
"run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
|
||||
@@ -197,10 +197,17 @@
|
||||
#define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
|
||||
#endif
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
|
||||
+ "script=boot.scr\0" \
|
||||
+ "finduuid=part uuid mmc 0:2 uuid\0" \
|
||||
+ "loadbootscript=" \
|
||||
+ "load mmc 0:1 ${loadaddr} ${script};\0" \
|
||||
+ "bootscript=echo Running bootscript from mmc ...; " \
|
||||
+ "source\0" \
|
||||
+ "bootcmd_default=run emmcboot ; echo ; echo emmcboot failed ; " \
|
||||
"run nfsboot ; echo ; echo nfsboot failed ; " \
|
||||
"usb start ;" \
|
||||
- "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
|
||||
+ "setenv stdout serial,vga ; setenv stdin serial,usbkbd;" \
|
||||
+ "sdp 0\0" \
|
||||
"boot_file=uImage\0" \
|
||||
"console=ttymxc0\0" \
|
||||
"defargs=enable_wait_mode=off vmalloc=400M\0" \
|
||||
@@ -228,7 +235,16 @@
|
||||
"vidargs=mxc_hdmi.only_cea=1 " \
|
||||
"video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 " \
|
||||
"video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \
|
||||
- "fbmem=32M\0 "
|
||||
+ "fbmem=32M\0 " \
|
||||
+ "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200\0"
|
||||
+
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "mmc dev 0;" \
|
||||
+ "if run loadbootscript; then " \
|
||||
+ "run bootscript; " \
|
||||
+ "else " \
|
||||
+ "run bootcmd_default; " \
|
||||
+ "fi; "
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#undef CONFIG_SYS_CBSIZE
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- a/configs/wandboard_defconfig
|
||||
+++ b/configs/wandboard_defconfig
|
||||
@@ -30,7 +30,7 @@ CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SATA=y
|
||||
CONFIG_CMD_USB=y
|
||||
-CONFIG_CMD_CACHE=y
|
||||
+# CONFIG_CMD_CACHE is not set
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
@@ -44,3 +44,5 @@ CONFIG_USB=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||
CONFIG_OF_LIBFDT=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
@ -1,7 +1,7 @@
|
||||
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
|
||||
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
|
||||
@@ -290,6 +290,12 @@ static void setup_iomux_enet(void)
|
||||
udelay(100);
|
||||
@@ -286,6 +286,12 @@ static void setup_iomux_enet(void)
|
||||
gpio_free_list_nodev(&desc, 1);
|
||||
}
|
||||
|
||||
+void board_boot_order(u32 *spl_boot_list)
|
||||
@ -13,14 +13,3 @@
|
||||
int board_phy_config(struct phy_device *phydev)
|
||||
{
|
||||
if (phydev->drv->config)
|
||||
--- a/arch/arm/mach-imx/spl.c
|
||||
+++ b/arch/arm/mach-imx/spl.c
|
||||
@@ -176,7 +176,7 @@ int g_dnl_bind_fixup(struct usb_device_d
|
||||
/* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
- switch (spl_boot_device()) {
|
||||
+ switch (boot_device) {
|
||||
/* for MMC return either RAW or FAT mode */
|
||||
case BOOT_DEVICE_MMC1:
|
||||
case BOOT_DEVICE_MMC2:
|
||||
|
@ -0,0 +1,23 @@
|
||||
From 00ad8b42dfe801107db25ead8249cb10afcd0f94 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Sun, 1 Mar 2020 22:10:23 +0100
|
||||
Subject: [PATCH] mx6cuboxi_defconfig: force mmc boot
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
---
|
||||
configs/mx6cuboxi_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/configs/mx6cuboxi_defconfig
|
||||
+++ b/configs/mx6cuboxi_defconfig
|
||||
@@ -9,6 +9,7 @@ CONFIG_ENV_SIZE=0x2000
|
||||
CONFIG_ENV_OFFSET=0xFE000
|
||||
CONFIG_DM_GPIO=y
|
||||
CONFIG_SPL_MMC_SUPPORT=y
|
||||
+CONFIG_SPL_FORCE_MMC_BOOT=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_SPL=y
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape
|
||||
PKG_VERSION:=LSDK-20.04-update-290520
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot
|
||||
|
@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2019.10
|
||||
PKG_VERSION:=2020.04
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014
|
||||
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 821d083ae4cfb795eab385eda43a20cdc8c3cacd Mon Sep 17 00:00:00 2001
|
||||
From 83ee930c18b068c9a16b66c01aaa5d6e06570152 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Heimpold <mhei@heimpold.de>
|
||||
Date: Sun, 3 Nov 2019 00:50:21 +0100
|
||||
Date: Sun, 19 Apr 2020 02:46:46 +0200
|
||||
Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards
|
||||
|
||||
The Duckbill devices are small, pen-drive sized boards based on
|
||||
@ -28,12 +28,12 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/mach-imx/mxs/Kconfig | 5 +
|
||||
board/i2se/duckbill/Kconfig | 15 +++
|
||||
board/i2se/duckbill/MAINTAINERS | 6 ++
|
||||
board/i2se/duckbill/MAINTAINERS | 6 +
|
||||
board/i2se/duckbill/Makefile | 10 ++
|
||||
board/i2se/duckbill/duckbill.c | 186 ++++++++++++++++++++++++++++++++
|
||||
board/i2se/duckbill/iomux.c | 156 +++++++++++++++++++++++++++
|
||||
configs/duckbill_defconfig | 40 +++++++
|
||||
include/configs/duckbill.h | 179 ++++++++++++++++++++++++++++++
|
||||
board/i2se/duckbill/duckbill.c | 189 ++++++++++++++++++++++++++++++++
|
||||
board/i2se/duckbill/iomux.c | 157 ++++++++++++++++++++++++++
|
||||
configs/duckbill_defconfig | 43 ++++++++
|
||||
include/configs/duckbill.h | 172 +++++++++++++++++++++++++++++
|
||||
8 files changed, 597 insertions(+)
|
||||
create mode 100644 board/i2se/duckbill/Kconfig
|
||||
create mode 100644 board/i2se/duckbill/MAINTAINERS
|
||||
@ -44,7 +44,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
create mode 100644 include/configs/duckbill.h
|
||||
|
||||
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
|
||||
index 68072d5a1f..82aaa3ef76 100644
|
||||
index b90d7b6e41..e7d8bc6792 100644
|
||||
--- a/arch/arm/mach-imx/mxs/Kconfig
|
||||
+++ b/arch/arm/mach-imx/mxs/Kconfig
|
||||
@@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT
|
||||
@ -58,14 +58,14 @@ index 68072d5a1f..82aaa3ef76 100644
|
||||
config TARGET_MX28EVK
|
||||
bool "Support mx28evk"
|
||||
select BOARD_EARLY_INIT_F
|
||||
@@ -67,6 +71,7 @@ config SYS_SOC
|
||||
@@ -70,6 +74,7 @@ config SYS_SOC
|
||||
|
||||
source "board/bluegiga/apx4devkit/Kconfig"
|
||||
source "board/freescale/mx28evk/Kconfig"
|
||||
+source "board/i2se/duckbill/Kconfig"
|
||||
source "board/liebherr/xea/Kconfig"
|
||||
source "board/ppcag/bg0900/Kconfig"
|
||||
source "board/schulercontrol/sc_sps_1/Kconfig"
|
||||
source "board/technologic/ts4600/Kconfig"
|
||||
diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000000..98c1e4689f
|
||||
@ -101,13 +101,13 @@ index 0000000000..5496baa330
|
||||
+F: configs/duckbill_defconfig
|
||||
diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile
|
||||
new file mode 100644
|
||||
index 0000000000..0079eb413c
|
||||
index 0000000000..11bac98e4c
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/Makefile
|
||||
@@ -0,0 +1,10 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+# (C) Copyright 2014-2019
|
||||
+# (C) Copyright 2014-2020
|
||||
+# Michael Heimpold, mhei@heimpold.de.
|
||||
+
|
||||
+ifndef CONFIG_SPL_BUILD
|
||||
@ -117,15 +117,15 @@ index 0000000000..0079eb413c
|
||||
+endif
|
||||
diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c
|
||||
new file mode 100644
|
||||
index 0000000000..f93c372611
|
||||
index 0000000000..93defc6c28
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/duckbill.c
|
||||
@@ -0,0 +1,186 @@
|
||||
@@ -0,0 +1,189 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * I2SE Duckbill board
|
||||
+ *
|
||||
+ * (C) Copyright 2014-2019 Michael Heimpold <mhei@heimpold.de>
|
||||
+ * Copyright (C) 2014-2020 Michael Heimpold <mhei@heimpold.de>
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
@ -177,14 +177,14 @@ index 0000000000..f93c372611
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_CMD_MMC
|
||||
+#ifdef CONFIG_CMD_MMC
|
||||
+int board_mmc_init(bd_t *bis)
|
||||
+{
|
||||
+ return mxsmmc_initialize(bis, 0, NULL, NULL);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+int board_eth_init(bd_t *bis)
|
||||
+{
|
||||
+ unsigned int reset_gpio;
|
||||
@ -198,6 +198,7 @@ index 0000000000..f93c372611
|
||||
+ reset_gpio = MX28_PAD_GPMI_ALE__GPIO_0_26;
|
||||
+
|
||||
+ /* Reset PHY */
|
||||
+ gpio_request(reset_gpio, "enet0_phy_rst");
|
||||
+ gpio_direction_output(reset_gpio, 0);
|
||||
+ udelay(200);
|
||||
+ gpio_set_value(reset_gpio, 1);
|
||||
@ -270,6 +271,7 @@ index 0000000000..f93c372611
|
||||
+ char *s;
|
||||
+
|
||||
+ /* Board revision detection */
|
||||
+ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision");
|
||||
+ gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17);
|
||||
+
|
||||
+ /* MX28_PAD_LCD_D17__GPIO_1_17: v1 = pull-down, v2 = pull-up */
|
||||
@ -290,6 +292,7 @@ index 0000000000..f93c372611
|
||||
+ led_red_gpio = MX28_PAD_AUART1_RX__GPIO_3_4;
|
||||
+ else
|
||||
+ led_red_gpio = MX28_PAD_SAIF0_LRCLK__GPIO_3_21;
|
||||
+ gpio_request(led_red_gpio, "led_red");
|
||||
+ gpio_direction_output(led_red_gpio, 1);
|
||||
+
|
||||
+ if (system_rev == 1)
|
||||
@ -309,15 +312,15 @@ index 0000000000..f93c372611
|
||||
+}
|
||||
diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c
|
||||
new file mode 100644
|
||||
index 0000000000..1db3c52c34
|
||||
index 0000000000..c6cc211181
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/iomux.c
|
||||
@@ -0,0 +1,156 @@
|
||||
@@ -0,0 +1,157 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * I2SE Duckbill IOMUX setup
|
||||
+ *
|
||||
+ * Copyright (C) 2013-2019 Michael Heimpold <mhei@heimpold.de>
|
||||
+ * Copyright (C) 2013-2020 Michael Heimpold <mhei@heimpold.de>
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
@ -462,6 +465,7 @@ index 0000000000..1db3c52c34
|
||||
+{
|
||||
+ mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup));
|
||||
+
|
||||
+ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision");
|
||||
+ gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17);
|
||||
+
|
||||
+ if (gpio_get_value(MX28_PAD_LCD_D17__GPIO_1_17))
|
||||
@ -471,10 +475,10 @@ index 0000000000..1db3c52c34
|
||||
+}
|
||||
diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..5a8c561b4e
|
||||
index 0000000000..b2d7fbcf77
|
||||
--- /dev/null
|
||||
+++ b/configs/duckbill_defconfig
|
||||
@@ -0,0 +1,40 @@
|
||||
@@ -0,0 +1,43 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_MX28=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x40002000
|
||||
@ -483,6 +487,8 @@ index 0000000000..5a8c561b4e
|
||||
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_TARGET_DUCKBILL=y
|
||||
+CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
+CONFIG_ENV_SIZE=0x20000
|
||||
+CONFIG_ENV_OFFSET=0x20000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_SPL_TEXT_BASE=0x00001000
|
||||
@ -496,7 +502,6 @@ index 0000000000..5a8c561b4e
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+# CONFIG_CMD_ELF is not set
|
||||
+CONFIG_CMD_UNZIP=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_FUSE=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
@ -509,21 +514,23 @@ index 0000000000..5a8c561b4e
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_DOS_PARTITION=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x40000
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_MXS_GPIO=y
|
||||
+CONFIG_MMC_MXS=y
|
||||
+CONFIG_MII=y
|
||||
+CONFIG_CONS_INDEX=0
|
||||
+CONFIG_OF_LIBFDT=y
|
||||
+# CONFIG_EFI_LOADER is not set
|
||||
diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h
|
||||
new file mode 100644
|
||||
index 0000000000..e7fce8843e
|
||||
index 0000000000..565d8c58b7
|
||||
--- /dev/null
|
||||
+++ b/include/configs/duckbill.h
|
||||
@@ -0,0 +1,179 @@
|
||||
@@ -0,0 +1,172 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2014-2019 Michael Heimpold <mhei@heimpold.de>
|
||||
+ * Copyright (C) 2014-2020 Michael Heimpold <mhei@heimpold.de>
|
||||
+ *
|
||||
+ */
|
||||
+#ifndef __CONFIGS_DUCKBILL_H__
|
||||
@ -543,11 +550,7 @@ index 0000000000..e7fce8843e
|
||||
+
|
||||
+/* Environment is in MMC */
|
||||
+#define CONFIG_ENV_OVERWRITE
|
||||
+#define CONFIG_ENV_SIZE (128 * 1024)
|
||||
+#define CONFIG_ENV_OFFSET (128 * 1024)
|
||||
+#define CONFIG_ENV_OFFSET_REDUND (256 * 1024)
|
||||
+#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
|
||||
+
|
||||
+/* FEC Ethernet on SoC */
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
@ -624,9 +627,6 @@ index 0000000000..e7fce8843e
|
||||
+ "else " \
|
||||
+ "echo Firmware Update OK; " \
|
||||
+ "fi; setenv error\0" \
|
||||
+ "erase_mmc=mmc erase 0 2\0" \
|
||||
+ "erase_env1=mmc erase 100 100\0" \
|
||||
+ "erase_env2=mmc erase 200 100\0" \
|
||||
+ "image=zImage\0" \
|
||||
+ "console=ttyAMA0\0" \
|
||||
+ "fdt_addr=0x41000000\0" \
|
||||
@ -639,8 +639,8 @@ index 0000000000..e7fce8843e
|
||||
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
+ "root=${mmcroot} " \
|
||||
+ "rootwait bootsys=${bootsys} panic=1 ${extraargs}\0" \
|
||||
+ "loadimage=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
|
||||
+ "loadfdt=ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \
|
||||
+ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
|
||||
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \
|
||||
+ "mmcboot=echo Booting from mmc ...; " \
|
||||
+ "setexpr mmcpart 1 + ${bootsys}; " \
|
||||
+ "setenv mmcroot /dev/mmcblk0p${mmcpart}; " \
|
||||
|
0
package/boot/uboot-oxnas/src/board/ox820/MAINTAINERS
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/MAINTAINERS
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/lowlevel_init.S
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/lowlevel_init.S
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/spl_start.S
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/spl_start.S
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/u-boot-spl.lds
Executable file → Normal file
0
package/boot/uboot-oxnas/src/board/ox820/u-boot-spl.lds
Executable file → Normal file
0
package/boot/uboot-oxnas/src/configs/ox820_defconfig
Executable file → Normal file
0
package/boot/uboot-oxnas/src/configs/ox820_defconfig
Executable file → Normal file
34
package/boot/uboot-ramips/Makefile
Normal file
34
package/boot/uboot-ramips/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2020.04
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=ramips
|
||||
UBOOT_IMAGE:=u-boot.bin
|
||||
endef
|
||||
|
||||
define U-Boot/ravpower_rp-wd009
|
||||
BUILD_DEVICES:=ravpower_rp-wd009
|
||||
BUILD_SUBTARGET:=mt76x8
|
||||
NAME:=RAVPower RP-WD009
|
||||
UBOOT_CONFIG:=ravpower-rp-wd009-ram
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
ravpower_rp-wd009
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(VARIANT)-$(UBOOT_IMAGE)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
@ -0,0 +1,290 @@
|
||||
From 593db38363297247df731566c2aa307a5d795005 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 18 Jun 2020 00:13:11 +0200
|
||||
Subject: [PATCH] add support for RAVPower RP-WD009
|
||||
|
||||
---
|
||||
arch/mips/dts/Makefile | 3 +-
|
||||
arch/mips/dts/ravpower-rp-wd009.dts | 50 +++++++++++++++++++++
|
||||
arch/mips/mach-mtmips/Kconfig | 9 ++++
|
||||
board/ravpower/rp-wd009/Kconfig | 12 +++++
|
||||
board/ravpower/rp-wd009/Makefile | 3 ++
|
||||
board/ravpower/rp-wd009/board.c | 16 +++++++
|
||||
configs/ravpower-rp-wd009-ram_defconfig | 59 +++++++++++++++++++++++++
|
||||
include/configs/ravpower-rp-wd009.h | 48 ++++++++++++++++++++
|
||||
8 files changed, 199 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/mips/dts/ravpower-rp-wd009.dts
|
||||
create mode 100644 board/ravpower/rp-wd009/Kconfig
|
||||
create mode 100644 board/ravpower/rp-wd009/Makefile
|
||||
create mode 100644 board/ravpower/rp-wd009/board.c
|
||||
create mode 100644 configs/ravpower-rp-wd009-ram_defconfig
|
||||
create mode 100644 include/configs/ravpower-rp-wd009.h
|
||||
|
||||
diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
|
||||
index c9d75596f2..23868ae1d2 100644
|
||||
--- a/arch/mips/dts/Makefile
|
||||
+++ b/arch/mips/dts/Makefile
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
dtb-$(CONFIG_ARCH_MTMIPS) += \
|
||||
gardena-smart-gateway-mt7688.dtb \
|
||||
- linkit-smart-7688.dtb
|
||||
+ linkit-smart-7688.dtb \
|
||||
+ ravpower-rp-wd009.dtb
|
||||
dtb-$(CONFIG_TARGET_AP121) += ap121.dtb
|
||||
dtb-$(CONFIG_TARGET_AP143) += ap143.dtb
|
||||
dtb-$(CONFIG_TARGET_AP152) += ap152.dtb
|
||||
diff --git a/arch/mips/dts/ravpower-rp-wd009.dts b/arch/mips/dts/ravpower-rp-wd009.dts
|
||||
new file mode 100644
|
||||
index 0000000000..b271d5bfbc
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/dts/ravpower-rp-wd009.dts
|
||||
@@ -0,0 +1,50 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "mt7628a.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "ravpower,rp-wd009", "ralink,mt7628a-soc";
|
||||
+ model = "RAVPower RP-WD009";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ spi0 = &spi0;
|
||||
+ };
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x0 0x4000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+ num-cs = <2>;
|
||||
+
|
||||
+ spi-flash@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ spi-max-frequency = <40000000>;
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ephy_router_mode>;
|
||||
+};
|
||||
diff --git a/arch/mips/mach-mtmips/Kconfig b/arch/mips/mach-mtmips/Kconfig
|
||||
index c8dcf19c0d..85ac8878ab 100644
|
||||
--- a/arch/mips/mach-mtmips/Kconfig
|
||||
+++ b/arch/mips/mach-mtmips/Kconfig
|
||||
@@ -32,6 +32,14 @@ config BOARD_GARDENA_SMART_GATEWAY_MT7688
|
||||
GARDENA smart Gateway boards have a MT7688 SoC with 128 MiB of RAM
|
||||
and 8 MiB of flash (SPI NOR) and additional SPI NAND storage.
|
||||
|
||||
+config BOARD_RAVPOWER_RP_WD009
|
||||
+ bool "RAVPower RP-WD009"
|
||||
+ depends on SOC_MT7628
|
||||
+ select BOARD_LATE_INIT
|
||||
+ select SUPPORTS_BOOT_RAM
|
||||
+ help
|
||||
+ RAVPower RP-WD009
|
||||
+
|
||||
config BOARD_LINKIT_SMART_7688
|
||||
bool "LinkIt Smart 7688"
|
||||
depends on SOC_MT7628
|
||||
@@ -133,6 +141,7 @@ config SUPPORTS_BOOT_RAM
|
||||
bool
|
||||
|
||||
source "board/gardena/smart-gateway-mt7688/Kconfig"
|
||||
+source "board/ravpower/rp-wd009/Kconfig"
|
||||
source "board/seeed/linkit-smart-7688/Kconfig"
|
||||
|
||||
endmenu
|
||||
diff --git a/board/ravpower/rp-wd009/Kconfig b/board/ravpower/rp-wd009/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000000..111f8e4478
|
||||
--- /dev/null
|
||||
+++ b/board/ravpower/rp-wd009/Kconfig
|
||||
@@ -0,0 +1,12 @@
|
||||
+if BOARD_RAVPOWER_RP_WD009
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "rp-wd009"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "ravpower"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "ravpower-rp-wd009"
|
||||
+
|
||||
+endif
|
||||
diff --git a/board/ravpower/rp-wd009/Makefile b/board/ravpower/rp-wd009/Makefile
|
||||
new file mode 100644
|
||||
index 0000000000..70cd7a8e56
|
||||
--- /dev/null
|
||||
+++ b/board/ravpower/rp-wd009/Makefile
|
||||
@@ -0,0 +1,3 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+obj-y += board.o
|
||||
diff --git a/board/ravpower/rp-wd009/board.c b/board/ravpower/rp-wd009/board.c
|
||||
new file mode 100644
|
||||
index 0000000000..eabcf85735
|
||||
--- /dev/null
|
||||
+++ b/board/ravpower/rp-wd009/board.c
|
||||
@@ -0,0 +1,16 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+int board_early_init_f(void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int board_late_init(void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/configs/ravpower-rp-wd009-ram_defconfig b/configs/ravpower-rp-wd009-ram_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..08cbf40638
|
||||
--- /dev/null
|
||||
+++ b/configs/ravpower-rp-wd009-ram_defconfig
|
||||
@@ -0,0 +1,59 @@
|
||||
+CONFIG_MIPS=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x80010000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ARCH_MTMIPS=y
|
||||
+CONFIG_MIPS_BOOT_FDT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||
+CONFIG_USE_BOOTCOMMAND=y
|
||||
+CONFIG_BOOTCOMMAND="sf probe && mtd read firmware 82000000 && bootm 82000000"
|
||||
+CONFIG_USE_PREBOOT=y
|
||||
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_BOARD_RAVPOWER_RP_WD009=y
|
||||
+CONFIG_BOARD_EARLY_INIT_F=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+# CONFIG_CMD_ELF is not set
|
||||
+# CONFIG_CMD_XIMG is not set
|
||||
+CONFIG_CMD_MEMINFO=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+# CONFIG_CMD_LOADS is not set
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_SPI=y
|
||||
+CONFIG_CMD_WDT=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_MII=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
|
||||
+CONFIG_MTDPARTS_DEFAULT="spi0.0:192k(factory-uboot),64k(config),64k(factory),1536k(loader),64k(params),64k(user_backup),64k(user),14272k(firmware),64k(mode)"
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="ravpower-rp-wd009"
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+# CONFIG_DM_DEVICE_REMOVE is not set
|
||||
+CONFIG_HAVE_BLOCK_DEVICE=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_SPANSION=y
|
||||
+CONFIG_SPI_FLASH_STMICRO=y
|
||||
+CONFIG_SPI_FLASH_WINBOND=y
|
||||
+CONFIG_SPI_FLASH_XMC=y
|
||||
+CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_MTD_UBI_BEB_LIMIT=22
|
||||
+CONFIG_MT7628_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_MT7621_SPI=y
|
||||
+CONFIG_SYSRESET_SYSCON=y
|
||||
+CONFIG_WDT=y
|
||||
+CONFIG_WDT_MT7621=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_BAUDRATE=57600
|
||||
diff --git a/include/configs/ravpower-rp-wd009.h b/include/configs/ravpower-rp-wd009.h
|
||||
new file mode 100644
|
||||
index 0000000000..bb4145197c
|
||||
--- /dev/null
|
||||
+++ b/include/configs/ravpower-rp-wd009.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __CONFIG_RAVPOWER_RP_WD009_H
|
||||
+#define __CONFIG_RAVPOWER_RP_WD009_H
|
||||
+
|
||||
+/* CPU */
|
||||
+#define CONFIG_SYS_MIPS_TIMER_FREQ 290000000
|
||||
+
|
||||
+/* RAM */
|
||||
+#define CONFIG_SYS_SDRAM_BASE 0x80000000
|
||||
+
|
||||
+#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE + 0x100000
|
||||
+
|
||||
+#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
|
||||
+
|
||||
+#ifdef CONFIG_BOOT_RAM
|
||||
+#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
+#endif
|
||||
+
|
||||
+/* UART */
|
||||
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
|
||||
+ 230400, 460800, 921600 }
|
||||
+
|
||||
+/* RAM */
|
||||
+#define CONFIG_SYS_MEMTEST_START 0x80100000
|
||||
+#define CONFIG_SYS_MEMTEST_END 0x80400000
|
||||
+
|
||||
+/* Memory usage */
|
||||
+#define CONFIG_SYS_MAXARGS 64
|
||||
+#define CONFIG_SYS_MALLOC_LEN (16 * 1024 * 1024)
|
||||
+#define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024)
|
||||
+#define CONFIG_SYS_CBSIZE 512
|
||||
+
|
||||
+/* U-Boot */
|
||||
+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
|
||||
+
|
||||
+/* Environment settings */
|
||||
+
|
||||
+/*
|
||||
+ * Environment is right behind U-Boot in flash. Make sure U-Boot
|
||||
+ * doesn't grow into the environment area.
|
||||
+ */
|
||||
+#define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET
|
||||
+
|
||||
+#endif /* __CONFIG_RAVPOWER_RP_WD009_H */
|
||||
--
|
||||
2.27.0
|
||||
|
@ -270,15 +270,6 @@ define U-Boot/nanopi_neo2
|
||||
ATF:=a64
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi_r1s_h5
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=NanoPi R1S (H5)
|
||||
BUILD_DEVICES:=friendlyarm_nanopi-r1s-h5
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_r1s_h5:arm-trusted-firmware-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
|
||||
define U-Boot/pine64_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Pine64 Plus A64
|
||||
@ -366,7 +357,6 @@ UBOOT_TARGETS := \
|
||||
nanopi_neo_plus2 \
|
||||
nanopi_neo2 \
|
||||
nanopi_r1 \
|
||||
nanopi_r1s_h5 \
|
||||
orangepi_zero \
|
||||
orangepi_r1 \
|
||||
orangepi_one \
|
||||
|
@ -1,217 +0,0 @@
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -555,6 +555,7 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||
sun50i-h5-libretech-all-h5-cc.dtb \
|
||||
sun50i-h5-nanopi-neo2.dtb \
|
||||
sun50i-h5-nanopi-neo-plus2.dtb \
|
||||
+ sun50i-h5-nanopi-r1s-h5.dtb \
|
||||
sun50i-h5-orangepi-zero-plus.dtb \
|
||||
sun50i-h5-orangepi-pc2.dtb \
|
||||
sun50i-h5-orangepi-prime.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
|
||||
@@ -0,0 +1,188 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (C) 2021 AmadeusGhost <amadeus@jmu.edu.cn>
|
||||
+ *
|
||||
+ * Based on sun50i-h5-nanopi-neo2.dts, which is:
|
||||
+ * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "sun50i-h5.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyARM NanoPi R1S H5";
|
||||
+ compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &emac;
|
||||
+ ethernet1 = &rtl8189etv;
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ sys {
|
||||
+ label = "nanopi:red:sys";
|
||||
+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wan {
|
||||
+ label = "nanopi:green:wan";
|
||||
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ lan {
|
||||
+ label = "nanopi:green:lan";
|
||||
+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ r-gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ reg_gmac_3v3: gmac-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "gmac-3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <100000>;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ reg_vcc3v3: vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_usb0_vbus: usb0-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb0-vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpux: gpio-regulator {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ regulator-name = "vdd-cpux";
|
||||
+ regulator-type = "voltage";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1300000>;
|
||||
+ regulator-ramp-delay = <50>; /* 4ms */
|
||||
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios-states = <0x1>;
|
||||
+ states = <1100000 0x0>, <1300000 0x1>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
||||
+ post-power-on-delay-ms = <200>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpux>;
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&emac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emac_rgmii_pins>;
|
||||
+ phy-supply = <®_gmac_3v3>;
|
||||
+ phy-handle = <&ext_rgmii_phy>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&external_mdio {
|
||||
+ ext_rgmii_phy: ethernet-phy@7 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <7>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ eeprom@51 {
|
||||
+ compatible = "microchip,24c02";
|
||||
+ reg = <0x51>;
|
||||
+ pagesize = <16>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ vqmmc-supply = <®_vcc3v3>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rtl8189etv: sdio_wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ohci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ohci2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pa_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ dr_mode = "peripheral";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ /* USB Type-A port's VBUS is always on */
|
||||
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
|
||||
+ usb0_vbus-supply = <®_usb0_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi_r1s_h5_defconfig
|
||||
@@ -0,0 +1,13 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_MACH_SUN50I_H5=y
|
||||
+CONFIG_DRAM_CLK=672
|
||||
+CONFIG_DRAM_ZQ=3881977
|
||||
+# CONFIG_DRAM_ODT_EN is not set
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-r1s-h5"
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
@ -1,55 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=armbian-firmware
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-05-05
|
||||
PKG_SOURCE_URL:=https://github.com/armbian/firmware.git
|
||||
PKG_SOURCE_VERSION:=761658e1701c77a0a84706754e6db1a25ee60b82
|
||||
PKG_MIRROR_HASH:=b2db0195617a21ac8db4ce73c03ebec7feefa8df550c2da25544013ae5a32499
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/armbian-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=https://github.com/armbian/firmware
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/brcmfmac-firmware-43456-sdio
|
||||
$(Package/armbian-firmware-default)
|
||||
TITLE:=Broadcom BCM43456 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/brcmfmac-firmware-43456-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43456-sdio.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-firmware-43456-sdio))
|
||||
|
||||
define Package/brcmfmac-nvram-43456-sdio
|
||||
$(Package/armbian-firmware-default)
|
||||
TITLE:=Broadcom BCM43456 NVRAM firmware
|
||||
endef
|
||||
|
||||
define Package/brcmfmac-nvram-43456-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43456-sdio.txt
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-nvram-43456-sdio))
|
@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk
|
||||
UNPACK_CMD=unzip -q -p $(DL_DIR)/$(PKG_SOURCE) $(PKG_SOURCE_UNZIP) | gzip -dc | $(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
PKG_NAME:=cypress-firmware
|
||||
PKG_VERSION:=v5.4.18-2021_0527
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=v5.4.18-2020_0402
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_UNZIP:=cypress-firmware-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=cypress-fmac-$(PKG_VERSION).zip
|
||||
PKG_SOURCE_URL:=https://community.cypress.com/gfawx74859/attachments/gfawx74859/WiFiBluetoothLinux/1911/2/
|
||||
PKG_HASH:=6dd1fe42791cb56fa4162d0a384cdca4052a428a259200afdc1eb2caa53543aa
|
||||
PKG_SOURCE_URL:=https://community.cypress.com/gfawx74859/attachments/gfawx74859/resourcelibrary/1016/1/
|
||||
PKG_HASH:=b12b0570f462c2f3c26dde98b10235a845a7109037def1e7e51af728bcc1a958
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
@ -41,10 +41,10 @@ endef
|
||||
define Package/cypress-firmware-43012-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -59,7 +59,7 @@ endef
|
||||
define Package/cypress-firmware-43340-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43340-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43340-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43340-sdio.bin
|
||||
endef
|
||||
|
||||
@ -76,7 +76,7 @@ endef
|
||||
define Package/cypress-firmware-43362-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43362-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43362-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43362-sdio.bin
|
||||
endef
|
||||
|
||||
@ -91,7 +91,7 @@ endef
|
||||
define Package/cypress-firmware-4339-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4339-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4339-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
|
||||
endef
|
||||
|
||||
@ -108,10 +108,10 @@ endef
|
||||
define Package/cypress-firmware-43430-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -128,10 +128,10 @@ endef
|
||||
define Package/cypress-firmware-43455-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -146,10 +146,10 @@ endef
|
||||
define Package/cypress-firmware-4354-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -164,10 +164,10 @@ endef
|
||||
define Package/cypress-firmware-4356-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.clm_blob
|
||||
endef
|
||||
|
||||
@ -182,10 +182,10 @@ endef
|
||||
define Package/cypress-firmware-4356-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -200,15 +200,51 @@ endef
|
||||
define Package/cypress-firmware-43570-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43570-pcie))
|
||||
|
||||
# Cypress 4359 PCIe Firmware
|
||||
define Package/cypress-firmware-4359-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4359 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4359-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4359-pcie))
|
||||
|
||||
# Cypress 4359 SDIO Firmware
|
||||
define Package/cypress-firmware-4359-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4359 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4359-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4359-sdio))
|
||||
|
||||
# Cypress 4373 SDIO Firmware
|
||||
define Package/cypress-firmware-4373-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
@ -218,10 +254,10 @@ endef
|
||||
define Package/cypress-firmware-4373-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@ -236,10 +272,10 @@ endef
|
||||
define Package/cypress-firmware-4373-usb/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-usb.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-usb.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-usb.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373.clm_blob
|
||||
endef
|
||||
|
||||
@ -254,12 +290,29 @@ endef
|
||||
define Package/cypress-firmware-54591-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac54591-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac54591-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-54591-pcie))
|
||||
|
||||
# Cypress 89459 PCIe Firmware
|
||||
define Package/cypress-firmware-89459-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW89459 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-89459-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-89459-pcie))
|
||||
|
@ -14,6 +14,12 @@ endef
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
# Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git
|
||||
# to generate the board-* files here.
|
||||
#
|
||||
# This is intended to be used on an interim basis until device-specific
|
||||
# board data for new devices is available through the upstream compilation
|
||||
#
|
||||
# Please send a mail with your device-specific board files upstream.
|
||||
# You can find instructions and examples on the linux-wireless wiki:
|
||||
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
|
||||
@ -25,19 +31,26 @@ ALLWIFIBOARDS:= \
|
||||
avm_fritzrepeater-1200 \
|
||||
buffalo_wtr-m2133hp \
|
||||
cellc_rtl30vw \
|
||||
century_wr142ac \
|
||||
devolo_magic-2-wifi-next \
|
||||
dlink_dap2610 \
|
||||
edgecore_ecw5410 \
|
||||
edgecore_oap100 \
|
||||
engenius_eap2200 \
|
||||
engenius_emd1 \
|
||||
engenius_emr3500 \
|
||||
ezviz_cs-w3-wd1200g-eup \
|
||||
glinet_gl-ap1300 \
|
||||
glinet_gl-s1300 \
|
||||
hiwifi_c526a \
|
||||
hugo_ac1200 \
|
||||
linksys_ea8300 \
|
||||
linksys_mr8300-v0 \
|
||||
luma_wrtq-329acn \
|
||||
mikrotik_hap-ac2 \
|
||||
mikrotik_sxtsq-5-ac \
|
||||
mobipromo_cm520-79f \
|
||||
nec_wg2600hp3 \
|
||||
netgear_wac510 \
|
||||
plasmacloud_pa1200 \
|
||||
plasmacloud_pa2200 \
|
||||
p2w_r619ac \
|
||||
qxwlan_e2600ac
|
||||
|
||||
@ -106,19 +119,26 @@ $(eval $(call generate-ipq-wifi-package,asus_rt-acrh17,ASUS RT-ACRH17/RT-AC82U/R
|
||||
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
|
||||
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
|
||||
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
|
||||
$(eval $(call generate-ipq-wifi-package,century_wr142ac,Century WR142AC))
|
||||
$(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next))
|
||||
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
|
||||
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
|
||||
$(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
|
||||
$(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
|
||||
$(eval $(call generate-ipq-wifi-package,hiwifi_c526a,HiWiFi C526A))
|
||||
$(eval $(call generate-ipq-wifi-package,hugo_ac1200,Hugo AC1200))
|
||||
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
|
||||
$(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))
|
||||
$(eval $(call generate-ipq-wifi-package,luma_wrtq-329acn,Luma WRTQ-329ACN))
|
||||
$(eval $(call generate-ipq-wifi-package,mikrotik_hap-ac2,Mikrotik hAP ac2))
|
||||
$(eval $(call generate-ipq-wifi-package,mikrotik_sxtsq-5-ac,MikroTik SXTsq 5 ac))
|
||||
$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
|
||||
$(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
|
||||
$(eval $(call generate-ipq-wifi-package,netgear_wac510,Netgear WAC510))
|
||||
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200))
|
||||
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200))
|
||||
$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
|
||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
||||
|
||||
|
BIN
package/firmware/ipq-wifi/board-devolo_magic-2-wifi-next.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-devolo_magic-2-wifi-next.qca4019
Normal file
Binary file not shown.
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-glinet_gl-ap1300.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-glinet_gl-ap1300.qca4019
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user