Create additional option to setup FS geometry

Some platforms like the TI AM62 require a particular FAT geometry for
their CPU to read the file system (and thus the bootloader). Failing
that the CPU will simply not boot and keep looking for a bootloader.

Let's add some options to enforce a particular filesystem geometry
through the -g option of mkfs.fat.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
Maxime Ripard 2023-09-25 14:51:58 +02:00 committed by Achilleas Koutsou
parent e58fc3d289
commit 7af2f1a5c1
4 changed files with 128 additions and 1 deletions

View file

@ -0,0 +1,41 @@
{
"version": "2",
"pipelines": [
{
"name": "image",
"stages": [
{
"type": "org.osbuild.truncate",
"options": {
"filename": "disk.img",
"size": "64M"
}
},
{
"type": "org.osbuild.mkfs.fat",
"options": {
"volid": "7B7795E7",
"geometry": {
"heads": 12,
"sectors-per-track": 42
}
},
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"lock": true
}
}
}
}
]
}
],
"sources": {
"org.osbuild.curl": {
"items": {}
}
}
}

View file

@ -0,0 +1,20 @@
version: '2'
pipelines:
- name: image
stages:
- type: org.osbuild.truncate
options:
filename: disk.img
size: '64M'
- type: org.osbuild.mkfs.fat
options:
volid: 7B7795E7
geometry:
heads: 12
sectors-per-track: 42
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
lock: true