diff options
10 files changed, 391 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-fw-utils_2018.09.bb b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-fw-utils_2018.09.bb new file mode 100644 index 0000000..ebdad11 --- /dev/null +++ b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-fw-utils_2018.09.bb @@ -0,0 +1,50 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" + +UBOOT_URL = "git://github.com/renesas-rcar/u-boot.git" +BRANCH = "v2018.09/rcar-3.9.3" + +SRC_URI = "${UBOOT_URL};branch=${BRANCH}" +SRCREV = "2b858f59e82177c8aba621b26629d797db2b7cc7" +PV = "2018.09" + +COMPATIBLE_MACHINE = "(salvator-x|ebisu|ulcb)" +DEPENDS = "mtd-utils" + +INSANE_SKIP_${PN} = "already-stripped" +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' +EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake envtools +} + +ENVADDR_h3ulcb = "/dev/mmcblk0boot1 0x07e0000 0x20000 0x20000" +ENVADDR_m3ulcb = "/dev/mmcblk0boot1 0x07e0000 0x20000 0x20000" +ENVADDR_m3nulcb = "/dev/mmcblk0boot1 0x1fc0000 0x20000 0x20000" + +do_install () { + install -d ${D}${base_sbindir} + install -d ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config + # Set the env address in emmc + sed 's|^/|#/|' -i ${D}${sysconfdir}/fw_env.config + echo ${ENVADDR} >> ${D}${sysconfdir}/fw_env.config +} + +do_install_class-cross () { + install -d ${D}${bindir_cross} + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross"
\ No newline at end of file diff --git a/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script.bb b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script.bb new file mode 100644 index 0000000..9a831f5 --- /dev/null +++ b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "RAUC Sample U-Boot Script" +LICENSE = "MIT" +LIC_FILES_CHKSUM := "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +COMPATIBLE_MACHINE = "(salvator-x|ebisu|ulcb)" + +S = "${WORKDIR}" + +SRC_URI = " \ + file://rauc-ubootscript.txt \ +" + +DEPENDS += "u-boot-mkimage-native" + +DEVICE_TREE_h3ulcb = "r8a7795-h3ulcb.dtb" +DEVICE_TREE_m3ulcb = "r8a7796-m3ulcb.dtb" +DEVICE_TREE_m3nulcb = "r8a77965-m3nulcb.dtb" +do_configure() { + sed "s/@DEVICE_TREE@/${DEVICE_TREE}/g" -i ${S}/rauc-ubootscript.txt +} + +do_compile(){ + mkimage -A arm -T script -C none -d ${S}/rauc-ubootscript.txt ${S}/rauc-ubootscript +} + +do_install(){ + install -d ${D}${sysconfdir}/rauc/ + install -m 644 ${S}/rauc-ubootscript ${D}${sysconfdir}/rauc/rauc-ubootscript +} + +RDEPENDS_${PN} = "rauc" +PACKAGES = "${PN}" + +FILES_${PN} = " \ + ${sysconfdir}/rauc/rauc-ubootscript \ +" diff --git a/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script/rauc-ubootscript.txt b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script/rauc-ubootscript.txt new file mode 100644 index 0000000..025063c --- /dev/null +++ b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-rauc-script/rauc-ubootscript.txt @@ -0,0 +1,50 @@ +test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B" +test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 +test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3 + +# These for selecting rootfs +setenv argsA 'rw root=/dev/mmcblk0p1' +setenv argsB 'rw root=/dev/mmcblk0p2' +# These for selecting kernel +setenv kernel_A_par 1:1 +setenv kernel_B_par 1:2 +setenv kernel_par + +setenv bootargs + +for SLOT in ${BOOT_ORDER}; do + if test "x${bootargs}" != "x"; then + echo "Bootargs is set to: "$bootargs + else + if test "x${SLOT}" = "xA"; then + if test "${BOOT_A_LEFT}" -gt 0; then + echo "Slot ${SLOT} found. ${BOOT_A_LEFT} times remaining" + setenv bootargs ${argsA} + setenv kernel_par ${kernel_A_par} + setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1 + else + echo "Slot ${SLOT} failed. Rolling back" + fi + elif test "x${SLOT}" = "xB"; then + if test "${BOOT_B_LEFT}" -gt 0; then + echo "Slot ${SLOT} found. ${BOOT_B_LEFT} times remaining" + setenv bootargs ${argsB} + setenv kernel_par ${kernel_B_par} + setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 + else + echo "Slot ${SLOT} failed. Rolling back" + fi + fi + fi +done + +if test -n "${bootargs}"; then + setenv bootcmd 'ext4load mmc '$kernel_par' 0x48080000 /etc/rauc/rauc-ubootscript; source 0x48080000; ext4load mmc '$kernel_par' 0x48080000 /boot/Image; ext4load mmc '$kernel_par' 0x48000000 /boot/@DEVICE_TREE@; booti 0x48080000 - 0x48000000' + saveenv +else + echo "No valid slot found, resetting tries to 3" + setenv BOOT_A_LEFT 3 + setenv BOOT_B_LEFT 3 + saveenv + reset +fi diff --git a/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.cert.pem b/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.cert.pem new file mode 100644 index 0000000..1820e83 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.cert.pem @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: O=Test Org, CN=Test Org rauc CA Development + Validity + Not Before: Jan 1 00:00:00 1970 GMT + Not After : Dec 31 23:59:59 9999 GMT + Subject: O=Test Org, CN=Test Org Development-1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d0:4a:6d:0e:00:1e:08:07:fe:8e:c2:1f:a5:fe: + dc:f4:a9:9f:7d:b0:80:13:2d:ee:16:11:25:ba:60: + b5:f3:e5:6e:81:56:0a:eb:54:bb:09:18:ca:bd:2b: + 88:0c:26:eb:9c:45:bf:7f:78:fe:54:3a:c4:aa:99: + 30:43:8b:44:c7:38:8a:a3:79:82:b4:4a:e1:a9:d0: + 16:c3:df:df:d2:ef:f3:34:17:ea:83:87:2b:f7:c2: + d1:90:96:46:85:31:e1:f3:58:ea:a9:33:ef:a9:29: + 7f:38:22:9c:9a:ab:1e:e4:7c:c7:13:e0:3c:d6:ff: + 74:e3:61:05:9b:df:48:7d:61:ea:b0:78:8d:ce:09: + af:37:9c:b4:b7:7f:d3:41:36:df:78:00:4b:28:26: + b0:3a:2d:2f:7b:41:98:34:6b:2d:66:d8:b4:d4:39: + 17:0f:99:48:88:5d:6f:61:13:9c:88:68:62:92:5f: + 71:f8:53:b1:10:a6:78:18:81:9b:b2:16:f9:0c:6b: + a4:cf:ee:2b:19:6c:3c:82:64:57:9e:39:31:bf:a2: + 17:06:6a:83:e0:0a:28:48:2e:4a:b1:f7:f7:c7:51: + 51:03:b9:12:c1:4d:25:d9:f1:3b:b8:21:e0:63:7f: + dd:37:33:b8:20:52:55:a2:46:f2:cb:86:48:bc:0a: + a6:59 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 42:56:68:BF:2F:16:F8:96:4F:D3:23:83:CF:3A:E0:2F:AB:A0:7F:84 + X509v3 Authority Key Identifier: + keyid:3E:CF:40:FF:18:41:35:16:D1:D3:C8:C6:3C:71:3C:EE:CB:3F:63:45 + DirName:/O=Test Org/CN=Test Org rauc CA Development + serial:01 + + X509v3 Basic Constraints: + CA:FALSE + Signature Algorithm: sha256WithRSAEncryption + a2:a5:b7:95:19:1f:01:2a:91:c5:59:80:b6:a1:b1:9a:0e:9a: + f1:0f:13:c9:44:05:e3:e1:93:32:42:e6:c2:9f:e8:60:ce:e3: + 73:ce:a3:bb:2b:cf:7e:a4:72:c9:ed:c8:32:29:49:41:91:3a: + c9:fa:60:6c:bf:37:4e:ed:7b:ce:6b:5c:70:4d:3f:af:39:b8: + 01:f2:23:6d:d5:dc:f6:28:95:cc:15:c1:8a:3c:37:32:77:dc: + bb:38:65:ff:62:c7:cd:03:68:5b:2e:ee:90:ee:4b:0a:d7:65: + a2:8e:be:3f:89:45:e7:e4:1f:ac:f0:31:40:a4:01:12:a1:db: + f5:28:b4:f3:57:a8:13:b1:81:a4:4e:e6:4a:9d:79:35:6f:23: + 89:2c:5c:eb:57:f9:63:06:e1:ab:e4:b9:91:d9:e2:cf:c8:c5: + 64:90:ab:a3:f0:7e:4b:4b:3c:40:21:14:30:5b:6b:e5:f8:17: + 9e:b4:dc:6e:e3:30:f1:87:58:c1:2a:12:bf:b6:1d:b5:77:c5: + af:20:1d:03:5d:e5:19:e3:01:ac:52:40:ad:b4:0b:b0:c6:d6: + 56:79:5b:cd:5a:f1:9b:e6:1b:71:84:74:ef:51:26:ae:0e:9f: + eb:e4:09:04:49:1e:10:e2:e4:e4:6f:fc:f4:47:e2:e8:bd:37: + f5:4e:07:eb +-----BEG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tX+WMG4avkuZHZ4s/IxWSQq6PwfktLPEAh +FDBba+X4F5603G7jMPGHWMEqEr+2HbV3xa8gHQNd5RnjAaxSQK20C7DG1lZ5W81a +8ZvmG3GEdO9RJq4On+vkCQRJHhDi5ORv/PRH4ui9N/VOB+s= +-----END CERTIFICATE----- diff --git a/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.key.pem b/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.key.pem new file mode 100644 index 0000000..3eb14b4 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/bundles/files/rauc-sample.key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDQSm0OAB4IB/6O +wh+l/tz0qZ99sIATLe4WESW6YLXz5W6BVgrrVLsJGMq9K4gMJuucRb9/eP5UOsSq +mTBDi0THOIqjeYK0SuGp0BbD39/S7/M0F+qDhyv3wtGQlkaFMeHzWOqpM++pKX84 +Ipyaqx7kfMcT4DzW/3TjYQWb30h9YeqweI3OCa83nLS3f9NBNt94AEsoJrA6LS97 +QZg0ay1m2LTUORcPmUiIXW9hE5yIaGKSX3H4U7EQpngYgZuyFvkMa6TP7isZbDyC +ZFeeOTG/ohcGaoPgCihILkqx9/fHUVEDuRLBTSXZ8Tu4IeBjf903M7ggUlWiRvLL +hki8CqZZAgMBAAECggEACqqFAx6GayrdojnWnQ18CxtUi38qT9EeTAr8v5qMNr0c +94qMbJieK00VtLIx+U1U61+2+rQbcfzAbWwCyLKtBvaiQtTKGKls/OEnCUjBkW+w +KI7A95NIcRuM17aaTd/MDkYTXi7Gqwbw+NLs6g6xOkoZd68X7nqOZcZmHyFD+Qee +0xZ4SjNHEZHnpBSL7IuFbpr9rA5FcC+0bSVOJFJqlgnU0eTv1lU0KmWE5r2wpi8n +9OJjsNR3RIPmo5HYWLWEUsv8fsBUie6SNX04j/wT5HYev0gidP1rD7Wz2OhfIGyu +73NKo4clHX9zA79jHaH5Q9xsvKbIiecLJb38RquNsQKBgQD/vMFyFXMmUTLDNzHf +tKZuljQjYcx2AvnbW1YQ+AdGa0Jz7zio+zI1xvSGxwPto2TnUHf2DZhC7wbhelXm +eK5xOiXzNC1xWULyH7FbSVR5M8vE27mffTpVBTj8DXzk1mqjmWZwMUfuDjOf4gsh +s1N7CMK0hKFAKrfnI6XYWUtLjwKBgQDQgTHQ6g0hs/5yau5yZdsLuS7+p9ghUCIx +4sNOW8aKfsJHUrZ1Jz2w10ATTKq7uCzQsHxXXIgpZ0Feg+SewVocZLVscPjsOpWZ +aIo/Xf+UzjNxyveMbJXY+Q9G0LULjqpPu1DzNKbine3Hh8spGVvDEj21G+GCCgz7 +bJiUpUcblwKBgQCBFI3zfl4jrgJYRGi5CF6lHM1uOnPP8QqaLIzRfc92PLdK+yj3 +Kesa97P+vz79WGaa1qPmHtCGoE0xy+TFso4h+n6jNefl+W7v9Q05DVdE4d7tGxaj +KLsjpMIxfsFWY99pegkZgdZTkvl9rsN9nBz70d0s7nDRiX5PfU+9VrzJgwKBgCTm +GDjOktBaGDeLcPNRzzf957EtZvROSB7n8IRXfYVY9WzF2IBXF3XKQg6oTLa320Z7 +VSXovDgHi+v8D2OA+D96Gxk7zPGRVJQ3ie+45NgivbvvnWt+c+5X9TolCUUoVD+T ++Llxoe8M392lzHBTioe1HLKGYpwuxylfiIkVzsW1AoGBAL6v+hmaDcyM91XziHS9 +MHSSUH6Y5UXRyRjwhUg64BGP93byohdpGw4HCIGeTqjJ/Hz11WvXJ1QoB+gzxQ3U +1Aq0a27iFbAL9tKjlNpCjQn+ZRlFa76HuG0e0ziaJpMrPOlMmeURS9g6/ffcMA9m +5U+89NGy1LqfBGTgZd05uGR+ +-----END PRIVATE KEY----- diff --git a/meta-rcar-gen3/recipes-core/packagegroups/rauc-packagegroup.bb b/meta-rcar-gen3/recipes-core/packagegroups/rauc-packagegroup.bb new file mode 100644 index 0000000..75675be --- /dev/null +++ b/meta-rcar-gen3/recipes-core/packagegroups/rauc-packagegroup.bb @@ -0,0 +1,23 @@ +SUMMARY = "Packages required to use with RAUC update" +LICENSE = "LGPLv2.1 & MIT" + +COMPATIBLE_MACHINE = "(salvator-x|ebisu|ulcb)" + +inherit packagegroup + +DEPENDS = " \ + rauc \ + u-boot-rauc-script \ + u-boot-fw-utils \ + e2fsprogs \ +" + +PACKAGES = "rauc-packagegroup" + +RDEPENDS_rauc-packagegroup = " \ + rauc \ + rauc-mark-good \ + u-boot-rauc-script \ + u-boot-fw-utils \ + e2fsprogs e2fsprogs-mke2fs \ +" diff --git a/meta-rcar-gen3/recipes-core/rauc/rauc/rauc-sample-ca.cert.pem b/meta-rcar-gen3/recipes-core/rauc/rauc/rauc-sample-ca.cert.pem new file mode 100644 index 0000000..8e53016 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/rauc/rauc/rauc-sample-ca.cert.pem @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: O=Test Org, CN=Test Org rauc CA Development + Validity + Not Before: Jan 1 00:00:00 1970 GMT + Not After : Dec 31 23:59:59 9999 GMT + Subject: O=Test Org, CN=Test Org rauc CA Development + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c9:d3:d0:c1:72:4b:ca:f7:57:68:ad:05:c2:a3: + 73:80:99:c6:7f:41:43:50:67:55:09:f9:38:f3:4b: + 60:6a:dd:56:ec:5e:d7:21:36:53:ed:24:29:7f:21: + dd:7e:0f:c3:4c:ca:69:82:53:fb:1b:04:12:0e:4a: + d5:8a:c6:50:cd:d8:96:b6:46:0a:f0:b3:dc:e0:d2: + ff:29:1e:19:9f:c5:f3:f3:15:ab:d9:76:9d:73:fe: + ca:a4:e7:ff:f1:30:b7:e7:7d:fc:ec:0a:dc:1b:f2: + 12:2e:15:73:0f:be:7e:2b:3b:fa:7b:50:70:a5:3f: + c7:b7:7b:83:cd:b4:7b:4b:8b:b8:75:a9:96:59:8f: + 38:aa:b7:29:ae:37:45:5c:b7:ad:18:93:e5:2f:86: + 07:34:b1:77:84:88:c4:dd:a5:63:b7:27:56:d8:f7: + 94:6b:1a:2b:5a:21:0f:63:7b:f0:14:6a:17:ca:1d: + af:8a:c0:e5:90:99:42:1f:e9:f6:7a:9e:0f:4e:86: + 95:3b:f4:99:3c:83:53:d7:5d:d8:56:1f:99:25:9c: + 1c:b9:7b:3c:61:a8:42:8c:54:2e:46:f8:41:22:54: + e6:96:38:12:88:e8:3c:cb:c1:6d:65:16:ad:12:0f: + 69:8a:e2:7f:d8:e9:be:d5:8c:d1:5c:3a:27:72:8f: + f9:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 3E:CF:40:FF:18:41:35:16:D1:D3:C8:C6:3C:71:3C:EE:CB:3F:63:45 + X509v3 Authority Key Identifier: + keyid:3E:CF:40:FF:18:41:35:16:D1:D3:C8:C6:3C:71:3C:EE:CB:3F:63:45 + DirName:/O=Test Org/CN=Test Org rauc CA Development + serial:01 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + b1:54:aa:45:ea:04:55:10:58:a2:c9:9a:df:fe:5c:48:47:da: + 9f:3e:4b:f3:ea:68:99:d2:a6:78:79:a7:48:23:d5:de:54:7a: + 86:43:78:7d:2c:8f:ab:ea:f1:a6:20:38:35:c3:a0:61:a3:c9: + 3e:3c:61:2b:88:c0:da:4f:db:b5:46:43:3b:3d:f1:ad:49:1f: + b4:dd:b1:0b:66:f0:d6:58:96:49:e7:68:05:01:83:49:5c:43: + 66:38:68:f3:da:40:f6:18:84:0a:b2:82:6e:5e:c1:f2:5e:a9: + 5a:5c:4e:88:7e:fc:92:e0:74:51:ce:c6:57:c7:38:8c:80:20: + 47:c2:01:ef:49:3c:7e:16:50:fe:24:8f:b3:48:ef:5c:08:53: + 7a:6e:26:42:b4:9a:c9:99:0a:05:1c:43:32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BgNVBAoMCFRlc3QgT3Jn +MSUwIwYDVQQDDBxUZXN0IE9yZyByYXVjIENBIERldmVsb3BtZW50ggEBMAwGA1Ud +EwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALFUqkXqBFUQWKLJmt/+XEhH2p8+ +S/PqaJnSpnh5p0gj1d5UeoZDeH0sj6vq8aYgODXDoGGjyT48YSuIwNpP27VGQzs9 +8a1JH7TdsQtm8NZYlknnaAUBg0lcQ2Y4aPPaQPYYhAqygm5ewfJeqVpcToh+/JLg +dFHOxlfHOIyAIEfCAe9JPH4WUP4kj7NI71wIU3puJkK0msmZCgUcQzIgp35ERdYz +w8+RiqpITKgiQ0nfRzAoZFsEey1GMLgZWuZszuMQGTSsnMv2GDshnfbVbI95r3/L +FiHCRcjLB161N3Ifm7IDeMdwjhM6hM/HryG/3HfrJaC3tZvrF7z7JaBrTH4= +-----END CERTIFICATE-----
\ No newline at end of file diff --git a/meta-rcar-gen3/recipes-core/rauc/rauc/rauc_enable_fw_set b/meta-rcar-gen3/recipes-core/rauc/rauc/rauc_enable_fw_set new file mode 100644 index 0000000..eeb77c4 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/rauc/rauc/rauc_enable_fw_set @@ -0,0 +1,4 @@ +#!/bin/bash + +# Enable writing to eMMC boot env +echo 0 > /sys/block/mmcblk0boot1/force_ro diff --git a/meta-rcar-gen3/recipes-core/rauc/rauc/system.conf b/meta-rcar-gen3/recipes-core/rauc/rauc/system.conf new file mode 100644 index 0000000..847e207 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/rauc/rauc/system.conf @@ -0,0 +1,16 @@ +[system] +compatible=@MACHINENAME@ +bootloader=uboot + +[keyring] +path=/etc/rauc/rauc-sample-ca.cert.pem + +[slot.rootfs.0] +device=/dev/mmcblk0p1 +type=ext4 +bootname=A + +[slot.rootfs.1] +device=/dev/mmcblk0p2 +type=ext4 +bootname=B diff --git a/meta-rcar-gen3/recipes-core/rauc/rauc_%.bbappend b/meta-rcar-gen3/recipes-core/rauc/rauc_%.bbappend new file mode 100644 index 0000000..c32227c --- /dev/null +++ b/meta-rcar-gen3/recipes-core/rauc/rauc_%.bbappend @@ -0,0 +1,24 @@ +FILESEXTRAPATHS_prepend_rcar-gen3 := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " \ + file://system.conf \ + file://rauc_enable_fw_set \ +" + +RAUC_KEYRING_FILE_rcar-gen3 := "${THISDIR}/${PN}/rauc-sample-ca.cert.pem" + +do_install_append_rcar-gen3(){ + # Compatible target of system.conf + sed "s/@MACHINENAME@/${MACHINE}/g" -i ${D}/etc/rauc/system.conf + # Script to unlock writing to eMMC + install -d ${D}${bindir} + install -m 755 ${WORKDIR}/rauc_enable_fw_set ${D}${bindir}/rauc_enable_fw_set + # Enable to run that script before marking stot status + sed "/\[Service\]/ a ExecStartPre=/usr/bin/rauc_enable_fw_set" -i ${D}${systemd_unitdir}/system/rauc-mark-good.service + sed "/start)/ a /usr/bin/rauc_enable_fw_set" -i ${D}${sysconfdir}/init.d/rauc-mark-good +} + +RDEPENDS_${PN}-mark-good_rcar-gen3 += "bash" +FILES_${PN}-mark-good_append_rcar-gen3 = " \ + ${bindir}/rauc_enable_fw_set \ +" |