Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
targets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feed
targets
Commits
01ef0f30
Commit
01ef0f30
authored
8 years ago
by
Kenneth Johansson
Browse files
Options
Downloads
Patches
Plain Diff
Add y2 image for mediatek target.
parent
417e45c6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iopsys-ramips/Config.in
+24
-0
24 additions, 0 deletions
iopsys-ramips/Config.in
iopsys-ramips/image/Makefile
+58
-0
58 additions, 0 deletions
iopsys-ramips/image/Makefile
with
82 additions
and
0 deletions
iopsys-ramips/Config.in
+
24
−
0
View file @
01ef0f30
...
...
@@ -21,6 +21,18 @@ config TARGET_IBOARDID
VG50 -> VG50
D201 -> DG201
config MEDIATEK_CHIP_ID
string
default "7621" if TARGET_iopsys_ramips_ex400
config TARGET_MODEL_NAME
string
prompt "Model name + configuration" if TARGET_iopsys_ramips_Default
default "EX400-WU8U" if TARGET_iopsys_ramips_ex400
help
First part of image name
# hack to ensure that Device/Default is run
config TARGET_ROOTFS_INITRAMFS
bool
...
...
@@ -31,3 +43,15 @@ config BUSYBOX_DEFAULT_BRCTL
bool
default n if TARGET_iopsys_ramips
config TARGET_VERSION
string
prompt "Model version"
help
Second part of image name
config TARGET_CUSTOMER
string
prompt "Customer ID"
help
A Customer id that is added to software file name
This diff is collapsed.
Click to expand it.
iopsys-ramips/image/Makefile
+
58
−
0
View file @
01ef0f30
...
...
@@ -17,6 +17,11 @@ loadaddr-$(CONFIG_TARGET_iopsys_ramips_ex400) := 0x80001000
KERNEL_LOADADDR
:=
$(
loadaddr-y
)
IHGSP_VERSION
:=
$(
CONFIG_TARGET_MODEL_NAME
)
_
$(
CONFIG_TARGET_CUSTOMER
)$(
CONFIG_TARGET_VERSION
)
-
$(
shell
date
'+%y%m%d_%H%M'
)
IHGSP_BUILD_VERSION
:=
$(
shell
echo
$(
IHGSP_VERSION
)
|
sed
s/
\"
//g
)
BUILD_DIR_ROOT
:=
$(
BUILD_DIR
)
/root-
$(
shell
echo
$(
CONFIG_TARGET_BOARD
)
|
sed
s/
\"
//g
)
KERNEL_DTB
=
kernel-bin | patch-dtb | lzma
define
Device/Default
KERNEL
:=
$(
KERNEL_DTB
)
| uImage lzma | Install_uimage_dtb
...
...
@@ -50,11 +55,64 @@ define Build/Install_uimage_dtb
cp
$(KDIR)/uImage.lzma
$(TARGET_DIR)/boot/uImage
endef
HEADER_VERSION
:=
3
define
Image/Build/Header
# Args: $1=header $2=cfe $3=kernel $4=ubifs $5=ubi $6=pkginfo
# Any unused arguments should be passed as 'void'
echo
"In Image/Build/Header $(1) $(2) $(3) $(4) $(5) $(6)"
truncate
--size
=
0
$(
KDIR
)
/void
echo
"IntenoBlob"
>
$(KDIR)/hdr
echo
"version $(HEADER_VERSION)"
>>
$(KDIR)/hdr
echo
"integrity MD5SUM"
>>
$(KDIR)/hdr
echo
"board $(CONFIG_TARGET_IBOARDID)"
>>
$(KDIR)/hdr
echo
"chip $(CONFIG_MEDIATEK_CHIP_ID)"
>>
$(KDIR)/hdr
echo
"arch all $(CONFIG_TARGET_ARCH_PACKAGES)"
>>
$(KDIR)/hdr
echo
"model $(CONFIG_TARGET_MODEL_NAME)"
>>
$(KDIR)/hdr
echo
"release $(CONFIG_TARGET_VERSION)"
>>
$(KDIR)/hdr
echo
"customer $(CONFIG_TARGET_CUSTOMER)"
>>
$(KDIR)/hdr
echo
"ubifs $$$$(ls -l $(KDIR)/$(4) | awk '{print $$$$5}')"
>>
$(KDIR)/hdr
echo
"ubi $$$$(ls -l $(KDIR)/$(5) | awk '{print $$$$5}')"
>>
$(KDIR)/hdr
echo
"pkginfo $$$$(ls -l $(KDIR)/$(6) | awk '{print $$$$5}')"
>>
$(KDIR)/hdr
ifeq
($(CONFIG_SMIMEOPT),y)
echo
"sig 256"
>>
$(KDIR)/hdr
endif
cat
$(KDIR)/hdr
/dev/zero
|
head
--bytes
=
1024
>
$(
KDIR
)
/
$(
1
)
endef
# how should we copy the root.ubifs to ./bin/iopsys-ramips ??? this is working sort of but still copies multiple times.
define
Image/Build
@echo "BUG
:
this is run multiple times
,
why ?? C [$(1)]"
# extract package info
cat
$(
BUILD_DIR_ROOT
)
/usr/lib/opkg/status
\
|
awk
'/^Package:/ {printf "%s ",$$$$2} /^Version:/ {printf "%s\n",$$$$2}'
\
|
sort
\
|
awk
'{printf "===Package start===\nPackage: %s\nVersion: %s\n",$$$$1,$$$$2}'
\
>
$(
KDIR
)
/pkginfo
# copy ubifs and craete y2 image
cp
$(
KDIR
)
/root.ubifs
$(
BIN_DIR
)
/
$(
IMG_PREFIX
)
.ubifs
# Make header
(
_cfe.y2
)
ls
-l
$(
KDIR
)
/root.ubifs
$(
call Image/Build/Header,header.y2,void,void,root.ubifs,void,pkginfo
)
cat
$(
KDIR
)
/header.y2
\
$(
KDIR
)
/root.ubifs
\
$(
KDIR
)
/pkginfo
>
$(
BIN_DIR
)
/
$(
IHGSP_BUILD_VERSION
)
.y2
# If build is signed also sign the cfe,kernel,fs part of the image.
ifeq
($(CONFIG_SMIMEOPT),y)
cat
$(KDIR)/root.ubifs
|
\
openssl
dgst
-sha256
-sign
$(CONFIG_OPKGSMIME_KEY)
\
-passin file
:
$(call qstrip
,
$(CONFIG_OPKGSMIME_PASSFILE))
\
>> $(BIN_DIR)/$(IHGSP_BUILD_VERSION).y2
endif
# Attach checksum to combined image (.y2)
md5sum
$(BIN_DIR)/$(IHGSP_BUILD_VERSION).y2
|awk
'{printf "%s",$$$$1}'
\
>>
$(BIN_DIR)/$(IHGSP_BUILD_VERSION).y2
endef
ifeq
($(SUBTARGET),ex400)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment