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
Anton Palgunov
mkimage-profiles
Commits
0f28ee41
Commit
0f28ee41
authored
Apr 01, 2020
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build-vm, tar2fs: added VM_PARTTABLE
For Raspberry Pi needed to build grub-efi + MBR images.
parent
32b47113
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
tar2fs
bin/tar2fs
+18
-7
90-build-vm.mk
features.in/build-vm/lib/90-build-vm.mk
+1
-1
No files found.
bin/tar2fs
View file @
0f28ee41
...
@@ -68,6 +68,15 @@ ppc*)
...
@@ -68,6 +68,15 @@ ppc*)
;;
;;
esac
esac
PARTTABLE
=
"
$7
"
if
[
-z
"
$PARTTABLE
"
]
;
then
if
[
"
$BOOTLOADER
"
==
grub-efi
]
;
then
PARTTABLE
=
gpt
else
PARTTABLE
=
msdos
fi
fi
# figure out the part taken by /boot in the given tarball
# figure out the part taken by /boot in the given tarball
boot_size
()
{
boot_size
()
{
if
[
-n
"
$BOOTPART
"
]
;
then
if
[
-n
"
$BOOTPART
"
]
;
then
...
@@ -185,11 +194,7 @@ OFFSET="$(($CUR_BOUNDARY + $EFIPARTSIZEM + $BOOTLOADERPARTSIZEM + $BOOTSIZEM + $
...
@@ -185,11 +194,7 @@ OFFSET="$(($CUR_BOUNDARY + $EFIPARTSIZEM + $BOOTLOADERPARTSIZEM + $BOOTSIZEM + $
dd
if
=
/dev/zero
of
=
"
$IMG
"
conv
=
notrunc
bs
=
$MB
count
=
1
seek
=
"
$OFFSET
"
dd
if
=
/dev/zero
of
=
"
$IMG
"
conv
=
notrunc
bs
=
$MB
count
=
1
seek
=
"
$OFFSET
"
losetup
"
$LOOPDEV
"
"
$IMG
"
losetup
"
$LOOPDEV
"
"
$IMG
"
if
[
"
$BOOTLOADER
"
==
grub-efi
]
;
then
parting mklabel
"
$PARTTABLE
"
parting mklabel gpt
else
parting mklabel msdos
fi
if
[
-n
"
$BOOTLOADERPART
"
]
&&
[
-n
"
$BOOTLOADERPARTSIZEM
"
]
;
then
if
[
-n
"
$BOOTLOADERPART
"
]
&&
[
-n
"
$BOOTLOADERPARTSIZEM
"
]
;
then
case
"
$ARCH
"
in
case
"
$ARCH
"
in
...
@@ -204,10 +209,16 @@ fi
...
@@ -204,10 +209,16 @@ fi
if
[
-n
"
$EFIPART
"
]
;
then
if
[
-n
"
$EFIPART
"
]
;
then
EFIDEV
=
"
$EFIDEV$EFIPART
"
EFIDEV
=
"
$EFIDEV$EFIPART
"
parting mkpart fat32 2048s
$((
$EFIPARTSIZEM
+
1
))
MiB
if
[
"
$PARTTABLE
"
==
gpt
]
;
then
parting mkpart fat32 2048s
$((
$EFIPARTSIZEM
+
1
))
MiB
else
parting mkpart primary fat32 2048s
$((
$EFIPARTSIZEM
+
1
))
MiB
fi
CUR_BOUNDARY
=
"
$EFIPARTSIZEM
"
CUR_BOUNDARY
=
"
$EFIPARTSIZEM
"
parting
set
1 boot on
parting
set
1 boot on
parting
set
1 esp on
if
[
"
$PARTTABLE
"
==
gpt
]
;
then
parting
set
1 esp on
fi
fi
fi
if
[
-n
"
$BOOTPART
"
]
;
then
if
[
-n
"
$BOOTPART
"
]
;
then
...
...
features.in/build-vm/lib/90-build-vm.mk
View file @
0f28ee41
...
@@ -45,7 +45,7 @@ tar2fs: check-sudo prepare-tarball-qemu
...
@@ -45,7 +45,7 @@ tar2fs: check-sudo prepare-tarball-qemu
fi; \
fi; \
if ! sudo $$TOPDIR/bin/tar2fs \
if ! sudo $$TOPDIR/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" "$(VM_SIZE)" "$(VM_FSTYPE)" \
"$(VM_TARBALL)" "$(VM_RAWDISK)" "$(VM_SIZE)" "$(VM_FSTYPE)" \
"$(VM_BOOTLOADER)" "$(ARCH)"; then \
"$(VM_BOOTLOADER)" "$(ARCH)"
"$(VM_PARTTABLE)"
; then \
echo "** error: sudo tar2fs failed, see build log" >&2; \
echo "** error: sudo tar2fs failed, see build log" >&2; \
exit 1; \
exit 1; \
fi
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