Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
meta-seconorth-distro
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
13
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SECO Northern Europe
Yocto
layers
meta-seconorth-distro
Commits
cd3fe4f4
Commit
cd3fe4f4
authored
3 years ago
by
Jonas Höppner
Browse files
Options
Downloads
Patches
Plain Diff
fng-install: Fix get partition number function to return 0 for p1
parent
0a9eff5f
No related branches found
No related tags found
1 merge request
!271
fng-install-u-boot: Install updated u-boot-environment and fw_env.conf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recipes-bsp/fng-install/common/fnginstall-common.sh
+11
-3
11 additions, 3 deletions
recipes-bsp/fng-install/common/fnginstall-common.sh
recipes-bsp/fng-install/fng-install-fngsystem/fngsystem-self-update.sh
+1
-1
1 addition, 1 deletion
...ng-install/fng-install-fngsystem/fngsystem-self-update.sh
with
12 additions
and
4 deletions
recipes-bsp/fng-install/common/fnginstall-common.sh
+
11
−
3
View file @
cd3fe4f4
...
...
@@ -1198,13 +1198,22 @@ get_partition_bootable()
return
1
}
#=============================
# Returns the number of the partition by name pattern
# Working on /dev/mmclkYpX: p1 is 0, p2 is 1 ...
# TODO adapt for sda1 sdb2 ...
#=============================
get_partition_number
()
{
__number
=
"
$1
"
out
=
${
2
#/dev/
}
out
=
${
out
#*p
}
if
string_begins_with
"
$out
"
"mmcblk"
;
then
out
=
${
out
#*p
}
# get the last number of mmcblk0pX
else
return
1
;
fi
is_number
"
$out
"
||
return
1
out
=
$((
out
-
1
))
eval
"
$__number
=
$out
"
return
0
}
...
...
@@ -1229,8 +1238,7 @@ dont_keep_partition()
KEEP_PARTITIONS_CNT
=
$PARTITION_COUNT
fi
get_partition_number num
"
$1
"
||
return
keep
=
$((
num
-
1
))
if
[
"
$keep
"
-lt
"
$KEEP_PARTITIONS_CNT
"
]
;
then
if
[
"
$num
"
-lt
"
$KEEP_PARTITIONS_CNT
"
]
;
then
KEEP_PARTITIONS_CNT
=
"
$keep
"
fi
}
...
...
This diff is collapsed.
Click to expand it.
recipes-bsp/fng-install/fng-install-fngsystem/fngsystem-self-update.sh
+
1
−
1
View file @
cd3fe4f4
...
...
@@ -232,7 +232,7 @@ if ! $REPARTITION_NEEDED;then
if
!
$REPARTITION_NEEDED
&&
[
-n
"
$TARGET_PARTITION
"
]
;
then
get_partition_number TARGET_PARTITION_NO
"
$TARGET_PARTITION
"
if
[
"
$TARGET_PARTITION_NO
"
-g
t
"
$KEEP_PARTITIONS_CNT
"
]
;
then
if
[
"
$TARGET_PARTITION_NO
"
-g
e
"
$KEEP_PARTITIONS_CNT
"
]
;
then
# format if TARGET partition gets recreated
FORMAT_PARTITIONS
=
true
fi
...
...
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