Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
postmarketOS
pmbootstrap
Commits
2a5bd848
Unverified
Commit
2a5bd848
authored
3 years ago
by
Clayton Craft
Browse files
Options
Downloads
Patches
Plain Diff
pmb/export/symlinks: add support for a single 'flavor'
parent
04809a99
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/export/symlinks.py
+29
-20
29 additions, 20 deletions
pmb/export/symlinks.py
with
29 additions
and
20 deletions
pmb/export/symlinks.py
+
29
−
20
View file @
2a5bd848
...
...
@@ -7,6 +7,7 @@ import glob
import
pmb.build
import
pmb.chroot.apk
import
pmb.config
import
pmb.config.pmaports
import
pmb.flasher
import
pmb.helpers.file
...
...
@@ -16,35 +17,43 @@ def symlinks(args, flavor, folder):
Create convenience symlinks to the rootfs and boot files.
"""
# Backwards compatibility with old mkinitfs (pma#660)
suffix
=
f
"
-
{
flavor
}
"
pmaports_cfg
=
pmb
.
config
.
pmaports
.
read_config
(
args
)
if
pmaports_cfg
.
get
(
"
supported_mkinitfs_without_flavors
"
,
False
):
suffix
=
""
# File descriptions
info
=
{
"
boot.img
-
"
+
flavor
:
"
Fastboot compatible boot.img file,
"
"
contains initramfs and kernel
"
,
f
"
boot.img
{
suffix
}
"
:
(
"
Fastboot compatible boot.img file,
"
"
contains initramfs and kernel
"
)
,
"
dtbo.img
"
:
"
Fastboot compatible dtbo image
"
,
"
initramfs
-
"
+
flavor
:
"
Initramfs
"
,
"
initramfs
-
"
+
flavor
+
"
-extra
"
:
"
Extra initramfs files in /boot
"
,
"
uInitrd
-
"
+
flavor
:
"
Initramfs, legacy u-boot image format
"
,
"
uImage
-
"
+
flavor
:
"
Kernel, legacy u-boot image format
"
,
"
vmlinuz
-
"
+
flavor
:
"
Linux kernel
"
,
args
.
device
+
"
.img
"
:
"
Rootfs with partitions for /boot and /
"
,
args
.
device
+
"
-boot.img
"
:
"
Boot partition image
"
,
args
.
device
+
"
-root.img
"
:
"
Root partition image
"
,
"
pmos-
"
+
args
.
device
+
"
.zip
"
:
"
Android recovery flashable zip
"
,
f
"
initramfs
{
suffix
}
"
:
"
Initramfs
"
,
f
"
initramfs
{
suffix
}
-extra
"
:
"
Extra initramfs files in /boot
"
,
f
"
uInitrd
{
suffix
}
"
:
"
Initramfs, legacy u-boot image format
"
,
f
"
uImage
{
suffix
}
"
:
"
Kernel, legacy u-boot image format
"
,
f
"
vmlinuz
{
suffix
}
"
:
"
Linux kernel
"
,
f
"
{
args
.
device
}
.img
"
:
"
Rootfs with partitions for /boot and /
"
,
f
"
{
args
.
device
}
-boot.img
"
:
"
Boot partition image
"
,
f
"
{
args
.
device
}
-root.img
"
:
"
Root partition image
"
,
f
"
pmos-
{
args
.
device
}
.zip
"
:
"
Android recovery flashable zip
"
,
}
# Generate a list of patterns
path_native
=
args
.
work
+
"
/chroot_native
"
path_boot
=
args
.
work
+
"
/chroot_rootfs_
"
+
args
.
device
+
"
/boot
"
path_buildroot
=
args
.
work
+
"
/chroot_buildroot_
"
+
args
.
deviceinfo
[
"
arch
"
]
patterns
=
[
path_boot
+
"
/*-
"
+
flavor
,
path_boot
+
"
/*-
"
+
flavor
+
"
-extra
"
,
path_boot
+
"
/dtbo.img
"
,
path_native
+
"
/home/pmos/rootfs/
"
+
args
.
device
+
"
.img
"
,
path_native
+
"
/home/pmos/rootfs/
"
+
args
.
device
+
"
-boot.img
"
,
path_native
+
"
/home/pmos/rootfs/
"
+
args
.
device
+
"
-root.img
"
,
path_buildroot
+
"
/var/lib/postmarketos-android-recovery-installer/pmos-
"
+
args
.
device
+
"
.zip
"
]
patterns
=
[
f
"
{
path_boot
}
/boot.img
{
suffix
}
"
,
f
"
{
path_boot
}
/initramfs
{
suffix
}
*
"
,
f
"
{
path_boot
}
/uInitrd
{
suffix
}
"
,
f
"
{
path_boot
}
/uImage
{
suffix
}
"
,
f
"
{
path_boot
}
/vmlinuz
{
suffix
}
"
,
f
"
{
path_boot
}
/dtbo.img
"
,
f
"
{
path_native
}
/home/pmos/rootfs/
{
args
.
device
}
.img
"
,
f
"
{
path_native
}
/home/pmos/rootfs/
{
args
.
device
}
-boot.img
"
,
f
"
{
path_native
}
/home/pmos/rootfs/
{
args
.
device
}
-root.img
"
,
f
"
{
path_buildroot
}
/var/lib/postmarketos-android-recovery-
"
+
f
"
installer/pmos-
{
args
.
device
}
.zip
"
]
# Generate a list of files from the patterns
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