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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
fff98d41
You need to sign in or sign up before continuing.
Commit
fff98d41
authored
Jun 19, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2fs, build-vm: add VM_BOOTSIZE for change size /boot partition
parent
37dce2b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
tar2fs
bin/tar2fs
+8
-3
90-build-vm.mk
features.in/build-vm/lib/90-build-vm.mk
+1
-1
No files found.
bin/tar2fs
View file @
fff98d41
...
...
@@ -153,15 +153,20 @@ IMG="$2"
ROOTSIZE
=
"
$3
"
[
-n
"
$ROOTSIZE
"
-a
"
$ROOTSIZE
"
!=
0
]
||
unset
ROOTSIZE
BOOTSIZE
=
"
$9
"
[
-n
"
$BOOTSIZE
"
-a
"
$BOOTSIZE
"
!=
0
]
||
unset
BOOTSIZE
# 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)
BOOT
DEF
SIZE
=
"
$(
boot_size
"
$TAR
"
)
"
DEFSIZE
=
"
$((
$SIZE_FACTOR
*
(
$TARSIZE
-
$
{
BOOTSIZE
:-
$BOOTDEFSIZE
}
))
)"
# (exact sizes)
ROOTSIZE
=
"
$((${
ROOTSIZE
:-
$DEFSIZE
}
+
$MB
-
1
))
"
# for ceil rounding to MB
# image and /boot sizes in megabytes
ROOTSIZEM
=
"
$((
$ROOTSIZE
/
$MB
))
"
BOOTSIZEM
=
"
$((
(
$SIZE_FACTOR
*
$BOOT_SIZE_FACTOR
*
$BOOTSIZE
+
$MB
-
1
)
/
$MB
))
"
BOOTDEFSIZE
=
"
$((
$SIZE_FACTOR
*
$BOOT_SIZE_FACTOR
*
$BOOTDEFSIZE
))
"
BOOTSIZE
=
"
$((${
BOOTSIZE
:-
$BOOTDEFSIZE
}
+
$MB
-
1
))
"
# for ceil rounding to MB
BOOTSIZEM
=
"
$((
$BOOTSIZE
/
$MB
))
"
# single root partition hardwired so far,
# add another image for home/data/swap if needed
...
...
features.in/build-vm/lib/90-build-vm.mk
View file @
fff98d41
...
...
@@ -58,7 +58,7 @@ tar2fs: $(SAVE_TARBALL) check-sudo prepare-tarball-qemu
if ! sudo $$TOPDIR/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" "$(VM_SIZE)" "$(VM_FSTYPE)" \
"$(VM_BOOTLOADER)" "$(ARCH)" "$(VM_PARTTABLE)" \
"$(VM_BOOTTYPE)"; then \
"$(VM_BOOTTYPE)"
"$(VM_BOOTSIZE)"
; then \
echo "** error: sudo tar2fs failed, see build log" >&2; \
exit 1; \
fi
...
...
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