mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 04:53:01 +02:00
common: Create (e)MMC image with redundant root filesystems
This image contains:
- A partition to hold bootloader config ("aux").
- Two redundant copies of the FIT framed rootfs (which will be
upgradable by RAUC from within Infix).
- A partition to store critical configuration data ("cfg")
- A partition to store data created dynamically by Infix ("var")
This commit is contained in:
@@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
image aux.ext4 {
|
||||||
|
mountpoint = "/aux"
|
||||||
|
temporary = true
|
||||||
|
size = 2M
|
||||||
|
|
||||||
|
ext4 {
|
||||||
|
label = "aux"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image cfg.ext4 {
|
||||||
|
empty = true
|
||||||
|
temporary = true
|
||||||
|
size = 16M
|
||||||
|
|
||||||
|
ext4 {
|
||||||
|
label = "cfg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image var.ext4 {
|
||||||
|
empty = true
|
||||||
|
temporary = true
|
||||||
|
# 44M - 24k (GPT backup)
|
||||||
|
size = 45032k
|
||||||
|
|
||||||
|
ext4 {
|
||||||
|
label = "var"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image mmc.img {
|
||||||
|
size = 512M
|
||||||
|
hdimage {
|
||||||
|
partition-table-type = "gpt"
|
||||||
|
}
|
||||||
|
|
||||||
|
partition aux {
|
||||||
|
offset = 2M
|
||||||
|
image = "aux.ext4"
|
||||||
|
}
|
||||||
|
|
||||||
|
partition primary {
|
||||||
|
image = "rootfs.itb"
|
||||||
|
size = 224M
|
||||||
|
}
|
||||||
|
|
||||||
|
partition secondary {
|
||||||
|
image = "rootfs.itb"
|
||||||
|
size = 224M
|
||||||
|
}
|
||||||
|
|
||||||
|
partition cfg {
|
||||||
|
image = "cfg.ext4"
|
||||||
|
}
|
||||||
|
|
||||||
|
partition var {
|
||||||
|
image = "var.ext4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Silence genimage warnings
|
||||||
|
config {}
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
common=$(dirname $(readlink -f "$0"))
|
||||||
|
root=$BUILD_DIR/genimage.root
|
||||||
|
tmp=$BUILD_DIR/genimage.tmp
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p $root/aux
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
||||||
|
cp -f $BINARIES_DIR/uboot-env.bin $root/aux/uboot.env
|
||||||
|
|
||||||
|
rm -rf $tmp
|
||||||
|
|
||||||
|
genimage \
|
||||||
|
--rootpath $root \
|
||||||
|
--tmppath $tmp \
|
||||||
|
--inputpath $BINARIES_DIR \
|
||||||
|
--outputpath $BINARIES_DIR \
|
||||||
|
--config $common/genimage.cfg
|
||||||
@@ -10,6 +10,7 @@ signkey=$3
|
|||||||
|
|
||||||
$common/sign.sh $arch $signkey
|
$common/sign.sh $arch $signkey
|
||||||
$common/mkfit.sh
|
$common/mkfit.sh
|
||||||
|
$common/mkmmc.sh
|
||||||
|
|
||||||
if [ "$BR2_ARCH" = "x86_64" ]; then
|
if [ "$BR2_ARCH" = "x86_64" ]; then
|
||||||
"$common/mkgns3a.sh"
|
"$common/mkgns3a.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user