Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
81a6ab9e
Commit
81a6ab9e
authored
Jul 09, 2013
by
Gleb F-Malinovskiy
Committed by
Michael Shigorin
Jul 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2fs: double /boot size
Factor of 2 is not enough for kernel upgrade due to filesystem overhead. Add BOOT_SIZE_FACTOR on top of that.
parent
d79061fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tar2fs
bin/tar2fs
+5
-3
No files found.
bin/tar2fs
View file @
81a6ab9e
...
...
@@ -20,7 +20,9 @@ fi
[
-n
"
$GLOBAL_DEBUG
"
]
||
message
"WORKDIR:
$WORKDIR
"
MB
=
1048576
# a parted's "megabyte" in bytes is *broken*
SIZE_FACTOR
=
2
# multiply the sizes found by this value
BOOT_SIZE_FACTOR
=
2
# multiply /boot size by this value additionally
CUR_BOUNDARY
=
0
# align first partition at 1MB for performance (+1)
...
...
@@ -87,15 +89,15 @@ IMG="$2"
ROOTSIZE
=
"
$3
"
[
-n
"
$ROOTSIZE
"
-a
"
$ROOTSIZE
"
!=
0
]
||
unset
ROOTSIZE
# image size in bytes
(note the final ceil rounding to megabytes)
# image size in bytes
TARSIZE
=
"
$(
stat
-Lc
%s
"
$TAR
"
)
"
# /boot size in that tarball
BOOTSIZE
=
"
$(
boot_size
"
$TAR
"
)
"
DEFSIZE
=
"
$((
$SIZE_FACTOR
*
(
$TARSIZE
-
$BOOTSIZE
))
)"
# (exact sizes)
ROOTSIZE
=
"
$((${
ROOTSIZE
:-
$DEFSIZE
}
+
$MB
-
1
))
"
ROOTSIZE
=
"
$((${
ROOTSIZE
:-
$DEFSIZE
}
+
$MB
-
1
))
"
# for ceil rounding to MB
# image and /boot sizes in megabytes
ROOTSIZEM
=
"
$((
$ROOTSIZE
/
$MB
))
"
BOOTSIZEM
=
"
$((
(
$SIZE_FACTOR
*
$BOOTSIZE
+
$MB
-
1
)
/
$MB
))
"
BOOTSIZEM
=
"
$((
(
$SIZE_FACTOR
*
$BOOT
_SIZE_FACTOR
*
$BOOT
SIZE
+
$MB
-
1
)
/
$MB
))
"
# tested to work: ext[234], jfs
# NB: xfs doesn't have a spare sector for the bootloader
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment