rauc: support OWHW

This commit is contained in:
Harald Welte 2015-11-01 15:53:58 +01:00
parent fe3fe6e3d3
commit 8cde214b95
5 changed files with 75 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"