Browse Source

rauc: support OWHW

laforge/owhw2
Harald Welte 6 years ago
parent
commit
8cde214b95
  1. 1
      recipes-core/images/image-rauc-rescue-initramfs.bb
  2. 4
      recipes-core/images/image-rauc-ubi.bb
  3. 41
      recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch
  4. 27
      recipes-extra/rauc/files/gsmk-owhw/system.conf
  5. 3
      recipes-extra/rauc/rauc.bb

1
recipes-core/images/image-rauc-rescue-initramfs.bb

@ -17,6 +17,7 @@ IMAGE_FSTYPES = "cpio.xz"
BAD_RECOMMENDATIONS_append = " busybox-syslog kbd kbd-consolefonts kbd-keymaps"
BAD_RECOMMENDATIONS_append_sysmobts-v2 = " e2fsprogs-e2fsck"
BAD_RECOMMENDATIONS_append_sysmocom-odu = " e2fsprogs-e2fsck"
BAD_RECOMMENDATIONS_append_gsmk-owhw = " e2fsprogs-e2fsck"
inherit core-image
require recipes-apps/images/image-manifest.inc

4
recipes-core/images/image-rauc-ubi.bb

@ -33,6 +33,10 @@ do_fetch() {
cp "${DEPLOY_DIR_IMAGE}/image-rauc-rescue-initramfs-${MACHINE}.cpio.xz" "${S}/fs/initramfs"
}
do_fetch_append_gsmk-owhw() {
cp "${DEPLOY_DIR_IMAGE}/uImage-am335x-gsmk-owhw.dtb" "${S}/fs/devicetree"
}
IMAGE_ROOTFS = "${S}/fs"
IMAGE_NAME = "${PN}-${MACHINE}-${DATETIME}"
# Don't include the DATETIME variable in the sstate package sigantures

41
recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch

@ -0,0 +1,41 @@
From 4cc63588211df7bf328e55820cfe19b56ea776b6 Mon Sep 17 00:00:00 2001
From: Jan Luebbe <jluebbe@debian.org>
Date: Sat, 30 May 2015 20:00:10 +0200
Subject: [PATCH 3/3] hardcode symocom-odu values
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
---
src/barebox-state.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/barebox-state.c b/src/barebox-state.c
index f56275f..002ee5c 100644
--- a/src/barebox-state.c
+++ b/src/barebox-state.c
@@ -1738,6 +1738,7 @@ static struct state *state_get(const char *name)
return ERR_CAST(state);
}
+#if 0
partition_node = of_parse_phandle(node, "backend", 0);
if (!partition_node) {
fprintf(stderr, "cannot find backend node in %s\n", node->full_name);
@@ -1750,9 +1751,14 @@ static struct state *state_get(const char *name)
return ERR_PTR(ret);
}
+#endif
+ devpath = "/sys/bus/i2c/devices/1-0050/eeprom";
+ offset = 0xc0;
+ size = 0x40;
+
of_property_read_string(node, "backend-type", &backend_type);
if (!strcmp(backend_type, "raw"))
- ret = state_backend_raw_file(state, partition_node->full_name, devpath, offset, size);
+ ret = state_backend_raw_file(state, "/i2c/eeprom@50/partition@0", devpath, offset, size);
else
fprintf(stderr, "invalid backend type: %s\n", backend_type);
--
2.1.4

27
recipes-extra/rauc/files/gsmk-owhw/system.conf

@ -0,0 +1,27 @@
[system]
compatible=gsmk-owhw
bootloader=barebox
mountprefix=/mnt/rauc
[keyring]
path=ca.pem
[slot.rescue.0]
device=/dev/ubi0_rescue
type=ubifs
bootname=rescue
readonly=true
[slot.rootfs.0]
device=/dev/ubi0_system0
type=ubifs
bootname=system0
[slot.rootfs.1]
device=/dev/ubi0_system1
type=ubifs
bootname=system1
[slot.data.0]
device=/dev/ubi0_data
type=ubifs

3
recipes-extra/rauc/rauc.bb

@ -1,7 +1,7 @@
DESCRIPTION = "rauc update controller"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
PR = "r0"
PR = "r1"
SRC_URI = "git://github.com/jluebbe/rauc.git;protocol=https \
file://dev-ca.pem \
@ -20,6 +20,7 @@ DEPENDS = "curl openssl glib-2.0"
# rauc is invoking these depending the machine
RDEPENDS_${PN}_append_sysmobts-v2 = " barebox-state"
RDEPENDS_${PN}_append_sysmocom-odu = " barebox-state"
RDEPENDS_${PN}_append_gsmk-owhw = " barebox-state"
RDEPENDS_${PN}_append_sysmocom-bsc = " grub"
FILES_${PN} += "/mnt/rauc"

Loading…
Cancel
Save