Skip to contentSkip to conversation

u-boot-edison: v2015.10

PATCH Applied Rafaël Carré 2 participants 3 messages Feb 11, 2016 – Feb 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 u-boot-edison: v2015.10

---
 .../files/0001-fw_env.c-missing-header.patch       | 26 ++++++++++++++
 recipes-bsp/u-boot/files/edison.env                |  4 +--
 .../u-boot/u-boot-edison-fw-utils_2014.04.bb       | 41 ----------------------
 .../u-boot/u-boot-edison-fw-utils_2015.10.bb       | 40 +++++++++++++++++++++
 recipes-bsp/u-boot/u-boot-edison_git.bb            |  9 +++--
 5 files changed, 72 insertions(+), 48 deletions(-)
 create mode 100644 recipes-bsp/u-boot/files/0001-fw_env.c-missing-header.patch
 delete mode 100644 recipes-bsp/u-boot/u-boot-edison-fw-utils_2014.04.bb
 create mode 100644 recipes-bsp/u-boot/u-boot-edison-fw-utils_2015.10.bb
recipes-bsp/u-boot/files/0001-fw_env.c-missing-header.patch new file +26 -0
new file mode 100644
index 0000000..7f233b8
@@ -0,0 +1,26 @@
+From dd7affe7ec11aff5099b0c5cf0419cb030f2fca0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <[email protected]>
+Date: Wed, 10 Feb 2016 11:19:03 +0100
+Subject: [PATCH] fw_env.c: missing header
+
+tools/env/fw_env.c:54:2: error: unknown type name 'uint8_t'
+  uint8_t mtd_type;  /* type of the MTD device */
+---
+ tools/env/fw_env.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
+index daa02a7..eff638a 100644
+--- a/tools/env/fw_env.c
++++ b/tools/env/fw_env.c
+@@ -17,6 +17,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
++#include <inttypes.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+-- 
+2.5.0
+
recipes-bsp/u-boot/files/edison.env +2 -2
index 22200df..3dea0ed 100644
@@ -5,9 +5,9 @@
 partitions=uuid_disk=${uuid_disk};name=u-boot0,start=1MiB,size=2MiB,uuid=${uuid_uboot0};name=u-boot-env0,size=1MiB,uuid=${uuid_uboot_env0};name=u-boot1,size=2MiB,uuid=${uuid_uboot1};name=u-boot-env1,size=1MiB,uuid=${uuid_uboot_env1};name=factory,size=1MiB,uuid=${uuid_factory};name=panic,size=24MiB,uuid=${uuid_panic};name=boot,size=32MiB,uuid=${uuid_boot};name=rootfs,size=512MiB,uuid=${uuid_rootfs};name=update,size=768MiB,uuid=${uuid_update};name=home,size=-,uuid=${uuid_home};
 
 # Dfu Alternate setting definition
-do_dfu_alt_info_mmc=setenv dfu_alt_info "ifwi${hardware_id} mmc 0 8192 mmcpart 1;ifwib${hardware_id} mmc 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"
+do_dfu_alt_info_mmc=setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"
 dfu_alt_info_ram=kernel ram ${loadaddr} 0x800000
-do_dfu_alt_info_ifwi=setenv dfu_alt_info "ifwi${hardware_id} mmc 0 8192 mmcpart 1;ifwib${hardware_id} mmc 0 8192 mmcpart 2"
+do_dfu_alt_info_ifwi=setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2"
 dfu_alt_info_reset=reset ram 0x0 0x0
 
 # Kernel load configuration
recipes-bsp/u-boot/u-boot-edison-fw-utils_2014.04.bb deleted +0 -41

41 lines not on this page · raw message

recipes-bsp/u-boot/u-boot-edison-fw-utils_2015.10.bb new file +40 -0
new file mode 100644
index 0000000..0e62a1f
@@ -0,0 +1,40 @@
+SUMMARY = "U-boot bootloader fw_printenv/setenv utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
+
+SECTION = "bootloader"
+
+DEPENDS = "virtual/bootloader"
+
+PV = "2015.10"
+SRCREV = "2e2b030bc6ed039b3b27225ee3486bd5b5d9f5a4"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI = "git://github.com/01org/edison-u-boot;branch=edison-v2015.10 \
+           file://${MACHINE}.env \
+            file://target_env/*.env \
+            file://0001-fw_env.c-missing-header.patch \
+            "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
+
+do_compile () {
+  oe_runmake ${UBOOT_MACHINE}
+  oe_runmake env
+}
+
+do_install () {
+  install -d ${D}${sbindir}
+  install -m 755 ${S}/tools/env/fw_printenv ${D}${sbindir}/fw_printenv
+  # This is not a typo, this tool checks the args[0] to change its behavior a-la-busybox
+  install -m 755 ${S}/tools/env/fw_printenv ${D}${sbindir}/fw_setenv
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+FILES_${PN} = "${sbindir}/*"
+FILES_${PN} += "${sysconfdir}/fw_env.config"
+
recipes-bsp/u-boot/u-boot-edison_git.bb +4 -5
index 703ae40..2e57791 100644
@@ -3,13 +3,12 @@ require u-boot-target-env.inc
 require u-boot-osip.inc
 
 LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
 
-PV = "2014.04"
-SRCREV = "dda0dbfc69f3d560c87f5be85f127ed862ea6721"
+PV = "2015.10"
+SRCREV = "2e2b030bc6ed039b3b27225ee3486bd5b5d9f5a4"
 
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
-           file://upstream_to_edison.patch \
+SRC_URI = "git://github.com/01org/edison-u-boot;branch=edison-v2015.10 \
 	   file://${MACHINE}.env \
 	   file://target_env/*.env \
 	  "
Signature · 1 line
2.5.0
#1 lore raw

PATCH 2/2 u-boot-edison: expand variables inside python function

---
 recipes-bsp/u-boot/u-boot-osip.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
recipes-bsp/u-boot/u-boot-osip.inc +5 -5
index d05d440..0091f28 100644
@@ -140,11 +140,11 @@ python do_osip_mkimage() {
     '000000000000000000000000000000000055aa'
 
     def main():
-        input_file = "${UBOOT_TMP_IMG}"
-        output_file = "${UBOOT_IMG}"
-        handoff_pointer =  ${OSIP_HANDOFF_POINTER}
-        destination_pointer = ${OSIP_DESTINATION_POINTER}
-        starting_lba = ${OSIP_STARTING_LBA}
+        input_file = d.expand("${UBOOT_TMP_IMG}")
+        output_file = d.expand("${UBOOT_IMG}")
+        handoff_pointer =  int(d.expand("${OSIP_HANDOFF_POINTER}"))
+        destination_pointer = int(d.expand("${OSIP_DESTINATION_POINTER}"))
+        starting_lba = int(d.expand("${OSIP_STARTING_LBA}"))
 
         in_file_data = open(input_file, 'rb').read()
 
Signature · 1 line
2.5.0
Applied
#2 lore raw

Re: [PATCH 2/2] u-boot-edison: expand variables inside python function

Thanks, applied both!

Quoted 30 lines

Op 11 feb. 2016, om 12:42 heeft Rafaël Carré <[email protected]> het volgende geschreven:

---
recipes-bsp/u-boot/u-boot-osip.inc | 10 +++++-----

1 file changed, 5 insertions(+), 5 deletions(-)
recipes-bsp/u-boot/u-boot-osip.inc +5 -5
index d05d440..0091f28 100644
@@ -140,11 +140,11 @@ python do_osip_mkimage() {
    '000000000000000000000000000000000055aa'
 
    def main():
-        input_file = "${UBOOT_TMP_IMG}"
-        output_file = "${UBOOT_IMG}"
-        handoff_pointer =  ${OSIP_HANDOFF_POINTER}
-        destination_pointer = ${OSIP_DESTINATION_POINTER}
-        starting_lba = ${OSIP_STARTING_LBA}
+        input_file = d.expand("${UBOOT_TMP_IMG}")
+        output_file = d.expand("${UBOOT_IMG}")
+        handoff_pointer =  int(d.expand("${OSIP_HANDOFF_POINTER}"))
+        destination_pointer = int(d.expand("${OSIP_DESTINATION_POINTER}"))
+        starting_lba = int(d.expand("${OSIP_STARTING_LBA}"))
 
        in_file_data = open(input_file, 'rb').read()
 
Signature · 1 line
2.5.0