Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meta-opencentauri/images/cosmos-image-base.bb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ CORE_IMAGE_EXTRA_INSTALL += "\
git \
"

CORE_IMAGE_EXTRA_INSTALL:append:centauri-carbon-2 = " centauri-carbon-2-detect"
CORE_IMAGE_EXTRA_INSTALL:append:centauri-carbon-2 = " \
centauri-carbon-2-detect \
boot-resource-mount \
"

INITRAMFS_IMAGE = "core-image-tiny-initramfs"
INITRAMFS_FSTYPES = "cpio.gz"
Expand Down
16 changes: 12 additions & 4 deletions meta-opencentauri/images/files/centauri-carbon-2/sw-description
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ software =
name = "boot_part";
value = "6";
},
{
name = "boot_resource_part";
value = "2";
},
{
name = "mmc_root";
value = "/dev/mmcblk0p8";
Expand Down Expand Up @@ -86,7 +90,7 @@ software =
},
{
name = "setargs_mainline";
value = "setenv bootargs console=@@KERNEL_CONSOLE@@ root=${mmc_root} rootwait consoleblank=0 gpt systemAB.slot=${systemAB_next}";
value = "setenv bootargs console=@@KERNEL_CONSOLE@@ root=${mmc_root} rootwait consoleblank=0 gpt systemAB.slot=${systemAB_next} bootresource.part=${boot_resource_part}";
},
{
name = "bootcmd_";
Expand All @@ -102,7 +106,7 @@ software =
},
{
name = "preboot";
value = "load mmc 1:2 0x43000000 bootlogo.bmp; bmp display 0x43000000; usb start";
value = "load mmc 1:${boot_resource_part} 0x43000000 bootlogo.bmp; bmp display 0x43000000; usb start";
},
{
name = "stdin";
Expand Down Expand Up @@ -170,6 +174,10 @@ software =
name = "boot_part";
value = "5";
},
{
name = "boot_resource_part";
value = "1";
},
{
name = "mmc_root";
value = "/dev/mmcblk0p7";
Expand Down Expand Up @@ -200,7 +208,7 @@ software =
},
{
name = "setargs_mainline";
value = "setenv bootargs console=@@KERNEL_CONSOLE@@ root=${mmc_root} rootwait consoleblank=0 gpt systemAB.slot=${systemAB_next}";
value = "setenv bootargs console=@@KERNEL_CONSOLE@@ root=${mmc_root} rootwait consoleblank=0 gpt systemAB.slot=${systemAB_next} bootresource.part=${boot_resource_part}";
},
{
name = "bootcmd_";
Expand All @@ -216,7 +224,7 @@ software =
},
{
name = "preboot";
value = "load mmc 1:1 0x43000000 bootlogo.bmp; bmp display 0x43000000; usb start";
value = "load mmc 1:${boot_resource_part} 0x43000000 bootlogo.bmp; bmp display 0x43000000; usb start";
},
{
name = "stdin";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ swu_mode=mainline
systemAB_next=A
boot_part=5
mmc_root=/dev/mmcblk0p7
setargs_mainline=setenv bootargs console=ttyS2,115200 root=${mmc_root} rootwait gpt systemAB.slot=${systemAB_next}
setargs_mainline=setenv bootargs console=ttyS2,115200 root=${mmc_root} rootwait gpt systemAB.slot=${systemAB_next} bootresource.part=${boot_resource_part}
bootcmd_mainline=run setargs_mainline; fatload mmc 1:${boot_part} 43000000 zImage; fatload mmc 1:${boot_part} 43800000 elegoo-centauri-carbon2.dtb; bootz 43000000 - 43800000
bootcmd=if test x${swu_mode} = xmainline; then run bootcmd_mainline; else run bootcmd_stock; fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SUMMARY = "Mount the boot-resource partition selected by u-boot"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"

SRC_URI = "\
file://99-boot-resource.rules \
"

S = "${UNPACKDIR}"

RDEPENDS:${PN} = "udev"

do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
install -m 0644 ${S}/99-boot-resource.rules ${D}${sysconfdir}/udev/rules.d/99-boot-resource.rules
}

FILES:${PN} = "\
${sysconfdir}/udev/rules.d/99-boot-resource.rules \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ACTION=="add", KERNEL=="mmcblk0", IMPORT{cmdline}="bootresource.part", RUN+="/bin/mount /dev/mmcblk0p$env{bootresource.part} /boot-resource"
Loading