Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
4e08c225
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4e08c225
编写于
10月 19, 2019
作者:
L
LEAN-ESX
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build: allow overriding default selection state for devices
上级
bf749afd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
150 addition
and
24 deletion
+150
-24
include/image.mk
include/image.mk
+145
-22
scripts/metadata.pm
scripts/metadata.pm
+3
-1
scripts/target-metadata.pl
scripts/target-metadata.pl
+1
-1
target/linux/rb532/image/Makefile
target/linux/rb532/image/Makefile
+1
-0
未找到文件。
include/image.mk
浏览文件 @
4e08c225
...
@@ -42,6 +42,8 @@ IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NU
...
@@ -42,6 +42,8 @@ IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NU
IMG_PREFIX_VERCODE
:=
$(
if
$(CONFIG_VERSION_CODE_FILENAMES)
,
$(
call
sanitize,
$(VERSION_CODE)
)
-
)
IMG_PREFIX_VERCODE
:=
$(
if
$(CONFIG_VERSION_CODE_FILENAMES)
,
$(
call
sanitize,
$(VERSION_CODE)
)
-
)
IMG_PREFIX
:=
$(VERSION_DIST_SANITIZED)
-
$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)
$(
if
$(SUBTARGET)
,-
$(SUBTARGET)
)
IMG_PREFIX
:=
$(VERSION_DIST_SANITIZED)
-
$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)
$(
if
$(SUBTARGET)
,-
$(SUBTARGET)
)
IMG_ROOTFS
:=
$(IMG_PREFIX)
-rootfs
IMG_COMBINED
:=
$(IMG_PREFIX)
-combined
MKFS_DEVTABLE_OPT
:=
-D
$(INCLUDE_DIR)
/device_table.txt
MKFS_DEVTABLE_OPT
:=
-D
$(INCLUDE_DIR)
/device_table.txt
...
@@ -104,7 +106,7 @@ define add_jffs2_mark
...
@@ -104,7 +106,7 @@ define add_jffs2_mark
echo
-ne
'\xde\xad\xc0\xde'
>>
$(1)
echo
-ne
'\xde\xad\xc0\xde'
>>
$(1)
endef
endef
PROFILE_SANITIZED
:=
$(
call
sanitize,
$(PROFILE
)
)
PROFILE_SANITIZED
:=
$(
call
tolower,
$(
subst
DEVICE_,,
$(
subst
$(space)
,-,
$(PROFILE)
)
))
define
split_args
define
split_args
$(foreach
data,
\
$(foreach
data,
\
...
@@ -152,6 +154,43 @@ ifdef CONFIG_TARGET_IMAGES_GZIP
...
@@ -152,6 +154,43 @@ ifdef CONFIG_TARGET_IMAGES_GZIP
endef
endef
endif
endif
# Disable noisy checks by default as in upstream
ifeq
($(strip $(call kernel_patchver_ge,4.7.0)),1)
DTC_FLAGS
+=
-Wno-unit_address_vs_reg
endif
ifeq
($(strip $(call kernel_patchver_ge,4.12.0)),1)
DTC_FLAGS
+=
\
-Wno-unit_address_vs_reg
\
-Wno-simple_bus_reg
\
-Wno-unit_address_format
\
-Wno-pci_bridge
\
-Wno-pci_device_bus_num
\
-Wno-pci_device_reg
endif
ifeq
($(strip $(call kernel_patchver_ge,4.17.0)),1)
DTC_FLAGS
+=
\
-Wno-avoid_unnecessary_addr_size
\
-Wno-alias_paths
endif
ifeq
($(strip $(call kernel_patchver_ge,4.18.0)),1)
DTC_FLAGS
+=
\
-Wno-graph_child_address
\
-Wno-graph_port
\
-Wno-unique_unit_address
endif
define
Image/pad-to
dd
if
=
$(1)
of
=
$(1)
.new
bs
=
$(2)
conv
=
sync
mv
$(1).new
$(1)
endef
ROOTFS_PARTSIZE
=
$(
shell
echo
$$
((
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
*
1024
*
1024
)))
define
Image/pad-root-squashfs
$(call
Image/pad-to,$(KDIR)/root.squashfs,$(if
$(1),$(1),$(ROOTFS_PARTSIZE)))
endef
# $(1) source dts file
# $(1) source dts file
# $(2) target dtb file
# $(2) target dtb file
# $(3) extra CPP flags
# $(3) extra CPP flags
...
@@ -164,7 +203,7 @@ define Image/BuildDTB
...
@@ -164,7 +203,7 @@ define Image/BuildDTB
-undef
-D__DTS__
$(3)
\
-undef
-D__DTS__
$(3)
\
-o
$(2).tmp
$(1)
-o
$(2).tmp
$(1)
$(LINUX_DIR)/scripts/dtc/dtc
-O
dtb
\
$(LINUX_DIR)/scripts/dtc/dtc
-O
dtb
\
-i$(dir
$(1))
$(4)
\
-i$(dir
$(1))
$(
DTC_FLAGS)
$(
4)
\
-o
$(2)
$(2).tmp
-o
$(2)
$(2).tmp
$(RM)
$(2).tmp
$(RM)
$(2).tmp
endef
endef
...
@@ -203,8 +242,7 @@ define Image/mkfs/squashfs
...
@@ -203,8 +242,7 @@ define Image/mkfs/squashfs
$(STAGING_DIR_HOST)/bin/mksquashfs4
$(call
mkfs_target_dir,$(1))
$@
\
$(STAGING_DIR_HOST)/bin/mksquashfs4
$(call
mkfs_target_dir,$(1))
$@
\
-nopad
-noappend
-root-owned
\
-nopad
-noappend
-root-owned
\
-comp
$(SQUASHFSCOMP)
$(SQUASHFSOPT)
\
-comp
$(SQUASHFSCOMP)
$(SQUASHFSOPT)
\
-processors
16
\
-processors
1
$(if
$(SOURCE_DATE_EPOCH),-fixed-time
$(SOURCE_DATE_EPOCH))
endef
endef
# $(1): board name
# $(1): board name
...
@@ -248,11 +286,9 @@ define Image/mkfs/ubifs
...
@@ -248,11 +286,9 @@ define Image/mkfs/ubifs
-o
$@
-d
$(
call
mkfs_target_dir,
$(1)
)
-o
$@
-d
$(
call
mkfs_target_dir,
$(1)
)
endef
endef
E2SIZE
=
$(
shell
echo
$$
((
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
*
1024
*
1024
)))
define
Image/mkfs/ext4
define
Image/mkfs/ext4
$(STAGING_DIR_HOST)/bin/make_ext4fs
\
$(STAGING_DIR_HOST)/bin/make_ext4fs
\
-l
$(
E2
SIZE)
-b
$(CONFIG_TARGET_EXT4_BLOCKSIZE)
\
-l
$(
ROOTFS_PART
SIZE)
-b
$(CONFIG_TARGET_EXT4_BLOCKSIZE)
\
$(if
$(CONFIG_TARGET_EXT4_RESERVED_PCT),-m
$(CONFIG_TARGET_EXT4_RESERVED_PCT))
\
$(if
$(CONFIG_TARGET_EXT4_RESERVED_PCT),-m
$(CONFIG_TARGET_EXT4_RESERVED_PCT))
\
$(if
$(CONFIG_TARGET_EXT4_JOURNAL),,-J)
\
$(if
$(CONFIG_TARGET_EXT4_JOURNAL),,-J)
\
$(if
$(SOURCE_DATE_EPOCH),-T
$(SOURCE_DATE_EPOCH))
\
$(if
$(SOURCE_DATE_EPOCH),-T
$(SOURCE_DATE_EPOCH))
\
...
@@ -264,9 +300,26 @@ define Image/Manifest
...
@@ -264,9 +300,26 @@ define Image/Manifest
$(BIN_DIR)/$(IMG_PREFIX)$(if
$(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
$(BIN_DIR)/$(IMG_PREFIX)$(if
$(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
endef
endef
define
Image/gzip-ext4-padded-squashfs
define
Image/Build/squashfs
$(call
Image/pad-root-squashfs)
endef
ifneq
($(CONFIG_TARGET_IMAGES_GZIP),)
define
Image/Build/gzip/ext4
$(call
Image/Build/gzip,ext4)
endef
define
Image/Build/gzip/squashfs
$(call
Image/Build/gzip,squashfs)
endef
endif
endef
ifdef
CONFIG_TARGET_ROOTFS_TARGZ
ifdef
CONFIG_TARGET_ROOTFS_TARGZ
define
Image/Build/targz
define
Image/Build/targz
$(TAR)
-cp
--numeric-owner
--owner
=
0
--group
=
0
--sort
=
name
\
$(TAR)
-cp
--numeric-owner
--owner
=
0
--group
=
0
--
mode
=
a-s
--
sort
=
name
\
$(
if
$(SOURCE_DATE_EPOCH)
,--mtime
=
"@
$(SOURCE_DATE_EPOCH)
"
)
\
$(
if
$(SOURCE_DATE_EPOCH)
,--mtime
=
"@
$(SOURCE_DATE_EPOCH)
"
)
\
-C
$(TARGET_DIR)
/
.
|
gzip
-9n
>
$(BIN_DIR)
/
$(IMG_PREFIX)
$(
if
$(PROFILE_SANITIZED)
,-
$(PROFILE_SANITIZED)
)
-rootfs
.tar.gz
-C
$(TARGET_DIR)
/
.
|
gzip
-9n
>
$(BIN_DIR)
/
$(IMG_PREFIX)
$(
if
$(PROFILE_SANITIZED)
,-
$(PROFILE_SANITIZED)
)
-rootfs
.tar.gz
endef
endef
...
@@ -274,13 +327,13 @@ endif
...
@@ -274,13 +327,13 @@ endif
ifdef
CONFIG_TARGET_ROOTFS_CPIOGZ
ifdef
CONFIG_TARGET_ROOTFS_CPIOGZ
define
Image/Build/cpiogz
define
Image/Build/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root
:
root | gzip -9n >$(BIN_DIR)/$(IMG_
PREFIX)-rootfs
.cpio.gz )
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root
:
root | gzip -9n >$(BIN_DIR)/$(IMG_
ROOTFS)
.cpio.gz )
endef
endef
endif
endif
mkfs_packages
=
$(
filter-out
@%,
$
(
PACKAGES_
$(
call
param_get,pkg,pkg
=
$(target_params)
)))
mkfs_packages
=
$(
filter-out
@%,
$
(
PACKAGES_
$(
call
param_get,pkg,pkg
=
$(target_params)
)))
mkfs_packages_add
=
$(
f
ilter-out
-%,
$(mkfs_packages
)
)
mkfs_packages_add
=
$(
f
oreach
pkg,
$(
filter-out
-%,
$(mkfs_packages)
)
,
$(pkg)
$(
call
GetABISuffix,
$(pkg)
))
mkfs_packages_remove
=
$(
patsubst
-%,%,
$(
filter
-%,
$(mkfs_packages
)
))
mkfs_packages_remove
=
$(
foreach
pkg,
$(
patsubst
-%,%,
$(
filter
-%,
$(mkfs_packages)
))
,
$(pkg)
$(
call
GetABISuffix,
$(pkg
)
))
mkfs_cur_target_dir
=
$(
call
mkfs_target_dir,pkg
=
$(target_params)
)
mkfs_cur_target_dir
=
$(
call
mkfs_target_dir,pkg
=
$(target_params)
)
opkg_target
=
\
opkg_target
=
\
...
@@ -308,7 +361,22 @@ $(KDIR)/root.%: kernel_prepare
...
@@ -308,7 +361,22 @@ $(KDIR)/root.%: kernel_prepare
define
Device/InitProfile
define
Device/InitProfile
PROFILES
:=
$(PROFILE)
PROFILES
:=
$(PROFILE)
DEVICE_TITLE
:=
DEVICE_TITLE
=
$
$(DEVICE_VENDOR)
$
$(DEVICE_MODEL)
$
$(
if
$
$(DEVICE_VARIANT)
,
$
$(DEVICE_VARIANT)
)
DEVICE_ALT0_TITLE
=
$
$(DEVICE_ALT0_VENDOR)
$
$(DEVICE_ALT0_MODEL)
$
$(
if
$
$(DEVICE_ALT0_VARIANT)
,
$
$(DEVICE_ALT0_VARIANT)
)
DEVICE_ALT1_TITLE
=
$
$(DEVICE_ALT1_VENDOR)
$
$(DEVICE_ALT1_MODEL)
$
$(
if
$
$(DEVICE_ALT1_VARIANT)
,
$
$(DEVICE_ALT1_VARIANT)
)
DEVICE_ALT2_TITLE
=
$
$(DEVICE_ALT2_VENDOR)
$
$(DEVICE_ALT2_MODEL)
$
$(
if
$
$(DEVICE_ALT2_VARIANT)
,
$
$(DEVICE_ALT2_VARIANT)
)
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
:=
DEVICE_PACKAGES
:=
DEVICE_PACKAGES
:=
DEVICE_DESCRIPTION
=
Build firmware images
for
$
$(DEVICE_TITLE)
DEVICE_DESCRIPTION
=
Build firmware images
for
$
$(DEVICE_TITLE)
endef
endef
...
@@ -358,15 +426,22 @@ define Device/Init
...
@@ -358,15 +426,22 @@ define Device/Init
IMAGE_METADATA
:=
IMAGE_METADATA
:=
FILESYSTEMS
:=
$(TARGET_FILESYSTEMS)
FILESYSTEMS
:=
$(TARGET_FILESYSTEMS)
UBOOT_PATH
:=
$(STAGING_DIR_IMAGE)
/uboot-
$(1)
DEFAULT
:=
endef
endef
DEFAULT_DEVICE_VARS
:=
\
DEFAULT_DEVICE_VARS
:=
\
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_SIZE KERNEL_INITRAMFS_IMAGE
\
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE
\
KERNEL_LOADADDR DEVICE_DTS DEVICE_DTS_CONFIG DEVICE_DTS_DIR BOARD_NAME
\
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE
\
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI
\
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS
\
BLOCKSIZE PAGESIZE SUBPAGESIZE VID_HDR_OFFSET
\
DEVICE_DTS_CONFIG DEVICE_DTS_DIR BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES
\
UBINIZE_OPTS UIMAGE_NAME UBINIZE_PARTS
\
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR
\
SUPPORTED_DEVICES IMAGE_METADATA
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
define
Device/ExportVar
define
Device/ExportVar
$(1)
:
$(2):=$$($(2))
$(1)
:
$(2):=$$($(2))
...
@@ -496,11 +571,37 @@ define Device/Build/image
...
@@ -496,11 +571,37 @@ define Device/Build/image
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
:
$(KDIR)/tmp/$(call IMAGE_NAME
,
$(1)
,
$(2))
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
:
$(KDIR)/tmp/$(call IMAGE_NAME
,
$(1)
,
$(2))
cp
$$
^
$$
@
cp
$$
^
$$
@
$(
if
$(CONFIG_JSON_ADD_IMAGE_INFO)
,
\
DEVICE_ID
=
"
$(DEVICE_NAME)
"
\
BIN_DIR
=
"
$(BIN_DIR)
"
\
IMAGE_NAME
=
"
$(IMAGE_NAME)
"
\
IMAGE_TYPE
=
$(
word
1,
$(
subst
., ,
$(2)
))
\
IMAGE_PREFIX
=
"
$(IMAGE_PREFIX)
"
\
DEVICE_VENDOR
=
"
$(DEVICE_VENDOR)
"
\
DEVICE_MODEL
=
"
$(DEVICE_MODEL)
"
\
DEVICE_VARIANT
=
"
$(DEVICE_VARIANT)
"
\
DEVICE_ALT0_VENDOR
=
"
$(DEVICE_ALT0_VENDOR)
"
\
DEVICE_ALT0_MODEL
=
"
$(DEVICE_ALT0_MODEL)
"
\
DEVICE_ALT0_VARIANT
=
"
$(DEVICE_ALT0_VARIANT)
"
\
DEVICE_ALT1_VENDOR
=
"
$(DEVICE_ALT1_VENDOR)
"
\
DEVICE_ALT1_MODEL
=
"
$(DEVICE_ALT1_MODEL)
"
\
DEVICE_ALT1_VARIANT
=
"
$(DEVICE_ALT1_VARIANT)
"
\
DEVICE_ALT2_VENDOR
=
"
$(DEVICE_ALT2_VENDOR)
"
\
DEVICE_ALT2_MODEL
=
"
$(DEVICE_ALT2_MODEL)
"
\
DEVICE_ALT2_VARIANT
=
"
$(DEVICE_ALT2_VARIANT)
"
\
DEVICE_TITLE
=
"
$(DEVICE_TITLE)
"
\
TARGET
=
"
$(BOARD)
"
\
SUBTARGET
=
"
$(SUBTARGET)
"
\
VERSION_NUMBER
=
"
$(VERSION_NUMBER)
"
\
VERSION_CODE
=
"
$(VERSION_CODE)
"
\
SUPPORTED_DEVICES
=
"
$(SUPPORTED_DEVICES)
"
\
$(TOPDIR)
/scripts/json_add_image_info.py
\
)
endef
endef
define
Device/Build/artifact
define
Device/Build/artifact
$$(_TARGET)
:
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
$$(_TARGET)
:
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
$(eval
$(call
Device/Export,$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)))
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
:
$$(KDIR_KERNEL_IMAGE)
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
:
$$(KDIR_KERNEL_IMAGE)
@
rm
-f
$$
@
@
rm
-f
$$
@
$
$(
call
concat_cmd,
$
(
ARTIFACT/
$(1)
))
$
$(
call
concat_cmd,
$
(
ARTIFACT/
$(1)
))
...
@@ -513,6 +614,8 @@ define Device/Build/artifact
...
@@ -513,6 +614,8 @@ define Device/Build/artifact
endef
endef
define
Device/Build
define
Device/Build
$(shell
rm
-f
$(BIN_DIR)/$(IMG_PREFIX)-$(1).json)
$(if
$(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call
Device/Build/initramfs,$(1)))
$(if
$(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call
Device/Build/initramfs,$(1)))
$(call
Device/Build/kernel,$(1))
$(call
Device/Build/kernel,$(1))
...
@@ -530,15 +633,35 @@ endef
...
@@ -530,15 +633,35 @@ endef
define
Device/DumpInfo
define
Device/DumpInfo
Target-Profile
:
DEVICE_$(1)
Target-Profile
:
DEVICE_$(1)
Target-Profile-Name
:
$(DEVICE_
TITLE
)
Target-Profile-Name
:
$(DEVICE_
DISPLAY
)
Target-Profile-Packages
:
$(DEVICE_PACKAGES)
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 $(DEFAULT),Target-Profile-Default
:
$(DEFAULT))
Target-Profile-Description
:
Target-Profile-Description
:
$(DEVICE_DESCRIPTION)
$(DEVICE_DESCRIPTION)
$(if $(strip $(DEVICE_ALT0_TITLE)),Alternative device titles
:
-
$(DEVICE_ALT0_TITLE))
$(if
$(strip
$(DEVICE_ALT1_TITLE)),-
$(DEVICE_ALT1_TITLE))
$(if
$(strip
$(DEVICE_ALT2_TITLE)),-
$(DEVICE_ALT2_TITLE))
@@
@@
endef
endef
define
Device/Dump
define
Device/Dump
ifneq
($$(strip $$(DEVICE_ALT0_TITLE)),)
DEVICE_DISPLAY
=
$
$(DEVICE_ALT0_TITLE)
(
$
$(DEVICE_TITLE)
)
$$(info
$$(call
Device/DumpInfo,$(1)))
endif
ifneq
($$(strip $$(DEVICE_ALT1_TITLE)),)
DEVICE_DISPLAY
=
$
$(DEVICE_ALT1_TITLE)
(
$
$(DEVICE_TITLE)
)
$$(info
$$(call
Device/DumpInfo,$(1)))
endif
ifneq
($$(strip $$(DEVICE_ALT2_TITLE)),)
DEVICE_DISPLAY
=
$
$(DEVICE_ALT2_TITLE)
(
$
$(DEVICE_TITLE)
)
$$(info
$$(call
Device/DumpInfo,$(1)))
endif
DEVICE_DISPLAY
=
$
$(DEVICE_TITLE)
$$(eval
$$(if
$$(DEVICE_TITLE),$$(info
$$(call
Device/DumpInfo,$(1)))))
$$(eval
$$(if
$$(DEVICE_TITLE),$$(info
$$(call
Device/DumpInfo,$(1)))))
endef
endef
...
@@ -581,7 +704,7 @@ define BuildImage
...
@@ -581,7 +704,7 @@ define BuildImage
$(
call
Image/Prepare
)
$(
call
Image/Prepare
)
legacy-images-prepare-make
:
image_prepare
legacy-images-prepare-make
:
image_prepare
$(MAKE)
legacy-images-prepare
$(MAKE)
legacy-images-prepare
BIN_DIR
=
"
$(BIN_DIR)
"
else
else
image_prepare
:
image_prepare
:
...
@@ -605,7 +728,7 @@ define BuildImage
...
@@ -605,7 +728,7 @@ define BuildImage
legacy-images-make
:
install-images
legacy-images-make
:
install-images
$(
call
Image/mkfs/ubifs/legacy
)
$(
call
Image/mkfs/ubifs/legacy
)
$(MAKE)
legacy-images
$(MAKE)
legacy-images
BIN_DIR
=
"
$(BIN_DIR)
"
install
:
install-images
install
:
install-images
$(
call
Image/Manifest
)
$(
call
Image/Manifest
)
...
...
scripts/metadata.pm
浏览文件 @
4e08c225
...
@@ -140,7 +140,8 @@ sub parse_target_metadata($) {
...
@@ -140,7 +140,8 @@ sub parse_target_metadata($) {
id
=>
$
1
,
id
=>
$
1
,
name
=>
$
1
,
name
=>
$
1
,
priority
=>
999
,
priority
=>
999
,
packages
=>
[]
packages
=>
[]
,
default
=>
"
y if TARGET_ALL_PROFILES
"
};
};
$
1
=~
/^DEVICE_/
and
$target
->
{
has_devices
}
=
1
;
$
1
=~
/^DEVICE_/
and
$target
->
{
has_devices
}
=
1
;
push
@
{
$target
->
{
profiles
}},
$profile
;
push
@
{
$target
->
{
profiles
}},
$profile
;
...
@@ -152,6 +153,7 @@ sub parse_target_metadata($) {
...
@@ -152,6 +153,7 @@ sub parse_target_metadata($) {
};
};
/^Target-Profile-Packages:\s*(.*)\s*$/
and
$profile
->
{
packages
}
=
[
split
(
/\s+/
,
$
1
)
];
/^Target-Profile-Packages:\s*(.*)\s*$/
and
$profile
->
{
packages
}
=
[
split
(
/\s+/
,
$
1
)
];
/^Target-Profile-Description:\s*(.*)\s*/
and
$profile
->
{
desc
}
=
get_multiline
(
*FILE
);
/^Target-Profile-Description:\s*(.*)\s*/
and
$profile
->
{
desc
}
=
get_multiline
(
*FILE
);
/^Target-Profile-Default:\s*(.+)\s*$/
and
$profile
->
{
default
}
=
$
1
;
}
}
close
FILE
;
close
FILE
;
foreach
my
$target
(
@target
)
{
foreach
my
$target
(
@target
)
{
...
...
scripts/target-metadata.pl
浏览文件 @
4e08c225
...
@@ -292,7 +292,7 @@ EOF
...
@@ -292,7 +292,7 @@ EOF
menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
bool "$profile->{name}"
bool "$profile->{name}"
depends on TARGET_$target->{conf}
depends on TARGET_$target->{conf}
default
y if TARGET_ALL_PROFILES
default
$profile->{default}
EOF
EOF
my
@pkglist
=
merge_package_lists
(
$target
->
{
packages
},
$profile
->
{
packages
});
my
@pkglist
=
merge_package_lists
(
$target
->
{
packages
},
$profile
->
{
packages
});
foreach
my
$pkg
(
@pkglist
)
{
foreach
my
$pkg
(
@pkglist
)
{
...
...
target/linux/rb532/image/Makefile
浏览文件 @
4e08c225
...
@@ -39,6 +39,7 @@ define Device/nand
...
@@ -39,6 +39,7 @@ define Device/nand
CMDLINE
:=
ubi.mtd
=
1 ubi.block
=
0,rootfs
root
=
/dev/ubiblock0_1
CMDLINE
:=
ubi.mtd
=
1 ubi.block
=
0,rootfs
root
=
/dev/ubiblock0_1
BOARD_NAME
:=
rb532
BOARD_NAME
:=
rb532
SUPPORTED_DEVICES
:=
rb532
SUPPORTED_DEVICES
:=
rb532
DEVICE_TITLE
:=
rb532 NAND
KERNEL_INITRAMFS
:=
append-kernel | patch-cmdline | lzma | lzma-loader-elf
KERNEL_INITRAMFS
:=
append-kernel | patch-cmdline | lzma | lzma-loader-elf
KERNEL
:=
$
$(KERNEL_INITRAMFS)
| kernel2minor
-s
2048
-i
0
-c
KERNEL
:=
$
$(KERNEL_INITRAMFS)
| kernel2minor
-s
2048
-i
0
-c
IMAGES
:=
sysupgrade.bin
IMAGES
:=
sysupgrade.bin
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录