Skip to content
GitLab
Explore
Sign in
Register
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
4b3bb0cd
Commit
4b3bb0cd
authored
1 month ago
by
Mikhail Kshevetskiy
Browse files
Options
Downloads
Patches
Plain Diff
airoha: add atf-2.10 blobs to emmc production image
parent
5da02848
No related branches found
No related tags found
1 merge request
!1411
atf-2.10 building
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
airoha/image/iopsys-image-common.mk
+14
-3
14 additions, 3 deletions
airoha/image/iopsys-image-common.mk
with
14 additions
and
3 deletions
airoha/image/iopsys-image-common.mk
+
14
−
3
View file @
4b3bb0cd
...
@@ -293,6 +293,15 @@ define Build/append_emmc_production_image
...
@@ -293,6 +293,15 @@ define Build/append_emmc_production_image
$(
call
Build/pad-to,1K
)
$(
call
Build/pad-to,1K
)
mv
$@
$@.sysupgrade.itb
mv
$@
$@.sysupgrade.itb
mv
$@.bak
$@
mv
$@.bak
$@
# generate fit image with atf blobs to put inside production image (must fit in 2M)
touch
$@.its
mv
$@.its
$@.its.bak
$(Build/prepare-atf-blobs)
echo
'/dts-v1/;'
>
$@.its
$(
call
airoha-aarch64-atf-blobs-its, description
=
"ATF-2.10 BL31/BL32 images"
;)
mv
$@.its
$@.boot1.its
PATH
=
$(
LINUX_DIR
)
/scripts/dtc:
$(
PATH
)
mkimage
-E
-B
0x1000
-r
-f
$@
.boot1.its
$@
.boot1.fit
mv
$@.its.bak
$@.its
# create GPT image with env1, env2, sysupgrade partitions
# create GPT image with env1, env2, sysupgrade partitions
# * GPT image size will be calculated automatically (-d 0)
# * GPT image size will be calculated automatically (-d 0)
# * put Primary GPT entry table at 512K offset (-e 512K)
# * put Primary GPT entry table at 512K offset (-e 512K)
...
@@ -301,7 +310,7 @@ define Build/append_emmc_production_image
...
@@ -301,7 +310,7 @@ define Build/append_emmc_production_image
# * env2 partition will start at 2560K offset (just after env1)
# * env2 partition will start at 2560K offset (just after env1)
# * sysupgrade partition will start at 3M offset (just after env2).
# * sysupgrade partition will start at 3M offset (just after env2).
# ptgen uses sizes in KB, so divide sysupgrade image size to 1024
# ptgen uses sizes in KB, so divide sysupgrade image size to 1024
ptgen
-o
$@.img
-g
-d
0
-e
512K
-a
100
-N
env1
-p
512K@2M
-N
env2
-p
512K
-N
sysupgrade
-p
"$$(( $$(stat --format=%s $@.sysupgrade.itb) / 1024 ))K"
ptgen
-o
$@.img
-g
-d
0
-e
512K
-a
100
-N
env1
-p
512K@2M
-N
env2
-p
512K
-N
boot1
-p
2M
-N
sysupgrade
-p
"$$(( $$(stat --format=%s $@.sysupgrade.itb) / 1024 ))K"
# write bootloader with 2K offset to GPT image (after PMBR and PGPT header, but before Primary GPT entry table)
# write bootloader with 2K offset to GPT image (after PMBR and PGPT header, but before Primary GPT entry table)
dd
bs
=
2K
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$(
STAGING_DIR_IMAGE
)
/
$(
UBOOT_TARGET
)
-
$(
DEVICE_NAME
)
-u-boot-emmc
.fip
dd
bs
=
2K
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$(
STAGING_DIR_IMAGE
)
/
$(
UBOOT_TARGET
)
-
$(
DEVICE_NAME
)
-u-boot-emmc
.fip
# generate 1-st environment (-s 0)
# generate 1-st environment (-s 0)
...
@@ -324,8 +333,10 @@ define Build/append_emmc_production_image
...
@@ -324,8 +333,10 @@ define Build/append_emmc_production_image
-O "mmc dev 0 && part size mmc 0 sysupgrade __size && read mmc "0#sysupgrade" \$${loadaddr} 0 \$${__size} && env delete __size && source \$${loadaddr}
:
u-boot-script && run __script_emmc_write_production && env set once true && env save"
-O "mmc dev 0 && part size mmc 0 sysupgrade __size && read mmc "0#sysupgrade" \$${loadaddr} 0 \$${__size} && env delete __size && source \$${loadaddr}
:
u-boot-script && run __script_emmc_write_production && env set once true && env save"
# write 2-nd environment with 2560K offset (env2 partition) to GPT image
# write 2-nd environment with 2560K offset (env2 partition) to GPT image
dd
bs
=
2560K
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$@
.env2
dd
bs
=
2560K
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$@
.env2
# write sysupgrade image with 3M offset (sysupgrade partition) to GPT image
# write atf blob image with 3M offset (boot1 partition) to GPT image
dd
bs
=
3M
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$@
.sysupgrade.itb
dd
bs
=
3M
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$@
.boot1.fit
# write sysupgrade image with 5M offset (sysupgrade partition) to GPT image
dd
bs
=
5M
seek
=
1
conv
=
notrunc
of
=
$@
.img
if
=
$@
.sysupgrade.itb
# add GPT image to the current target file
# add GPT image to the current target file
cat
$@.img
>>
$@
cat
$@.img
>>
$@
# remove temporary files
# remove temporary files
...
...
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