From e0b480da53093f8832a5d6b0a2fd083a9e99c7e8 Mon Sep 17 00:00:00 2001 From: Dragos Motrea Date: Mon, 17 Jul 2017 14:21:32 +0200 Subject: Upgraded to the latest rt-tools version Added new recipe for the bitcalc tool. Removed list2mask recipe and updated the partrt and the count-ticks recipes. Signed-off-by: Dragos Motrea Signed-off-by: Adrian Calianu --- .../packagegroups/packagegroup-enea-rt-tools.bb | 2 +- ...001-bitcalc-resolved-compilation-warnings.patch | 50 ++++++++++++++++++++++ .../0001-bitcalc-resolved-memory-leaks.patch | 43 +++++++++++++++++++ recipes-enea/bitcalc/bitcalc_1.0.bb | 25 +++++++++++ recipes-enea/count-ticks/count-ticks_1.1.bb | 4 +- recipes-enea/list2mask/list2mask/run-ptest | 15 ------- recipes-enea/list2mask/list2mask_1.0.bb | 25 ----------- recipes-enea/partrt/partrt_1.1.bb | 6 +-- 8 files changed, 124 insertions(+), 46 deletions(-) create mode 100644 recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch create mode 100644 recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch create mode 100644 recipes-enea/bitcalc/bitcalc_1.0.bb delete mode 100644 recipes-enea/list2mask/list2mask/run-ptest delete mode 100644 recipes-enea/list2mask/list2mask_1.0.bb diff --git a/recipes-core/packagegroups/packagegroup-enea-rt-tools.bb b/recipes-core/packagegroups/packagegroup-enea-rt-tools.bb index ae26f42..9e15d8e 100644 --- a/recipes-core/packagegroups/packagegroup-enea-rt-tools.bb +++ b/recipes-core/packagegroups/packagegroup-enea-rt-tools.bb @@ -9,5 +9,5 @@ inherit packagegroup RDEPENDS_${PN} = " \ partrt \ count-ticks \ - list2mask \ + bitcalc \ " diff --git a/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch new file mode 100644 index 0000000..d1410cd --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch @@ -0,0 +1,50 @@ +From 00f03f600f29323cc6fd1c0f484a06d31acfd51d Mon Sep 17 00:00:00 2001 +From: Dragos Motrea +Date: Thu, 13 Jul 2017 13:55:42 +0200 +Subject: [rt-tools][LXCR-7892][PATCHv1 1/1] bitcalc: resolved compilation + warnings + +Two warnings resolved: functions which are candidates for 'pure' attribute and +an uninitialized variable. + +Upstream-Status: Submitted + +Signed-off-by: Dragos Motrea +--- + bitcalc/src/bitcalc.c | 2 +- + bitcalc/src/bitmap.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bitcalc/src/bitcalc.c b/bitcalc/src/bitcalc.c +index bae4c06..8a51628 100644 +--- a/bitcalc/src/bitcalc.c ++++ b/bitcalc/src/bitcalc.c +@@ -54,7 +54,7 @@ static size_t bitmap_stack_depth_max = 0; + + static char *bitmap_str(const struct bitmap_t *set) + { +- char *str; ++ char *str = NULL; + + switch (display_format) { + case format_mask: +diff --git a/bitcalc/src/bitmap.h b/bitcalc/src/bitmap.h +index 17fee3a..5022dac 100644 +--- a/bitcalc/src/bitmap.h ++++ b/bitcalc/src/bitmap.h +@@ -61,10 +61,10 @@ extern struct bitmap_t *bitmap_alloc_from_u32_list(const char *mlist); + */ + + /* Return 1 if bit is set in bit mask, 0 otherwise. */ +-extern int bitmap_isset(size_t bit, const struct bitmap_t *set); ++extern int bitmap_isset(size_t bit, const struct bitmap_t *set) __attribute__((pure)); + + /* Return the number of bits set in bit mask. */ +-extern size_t bitmap_bit_count(const struct bitmap_t *set); ++extern size_t bitmap_bit_count(const struct bitmap_t *set) __attribute__((pure)); + + /* + * Modify bitmap +-- +2.7.4 + diff --git a/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch new file mode 100644 index 0000000..39bda0b --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-memory-leaks.patch @@ -0,0 +1,43 @@ +From ca0eba026490d8ee29786f80725fb3077dd200a4 Mon Sep 17 00:00:00 2001 +From: Dragos Motrea +Date: Mon, 17 Jul 2017 11:08:41 +0200 +Subject: [rt-tools][LXCR-7893][PATCHv3 1/1] bitcalc: resolved memory leaks + +Upstream-status: Submitted + +Signed-off-by: Dragos Motrea +--- +Changes from v2: +- added Upstream-Status +**** + bitcalc/src/bitcalc.c | 1 + + bitcalc/src/bitmap.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/bitcalc/src/bitcalc.c b/bitcalc/src/bitcalc.c +index 8a51628..196d406 100644 +--- a/bitcalc/src/bitcalc.c ++++ b/bitcalc/src/bitcalc.c +@@ -487,6 +487,7 @@ int main(int argc, char *argv[]) + char *const bitmap = bitmap_str(item); + printf("%s%s", first ? "" : " ", bitmap); + bitmap_free(item); ++ free(bitmap); + first = 0; + } + +diff --git a/bitcalc/src/bitmap.c b/bitcalc/src/bitmap.c +index 3c60d0b..c29d47c 100644 +--- a/bitcalc/src/bitmap.c ++++ b/bitcalc/src/bitmap.c +@@ -76,6 +76,7 @@ void bitmap_free(struct bitmap_t *set) + { + set->size_u32 = 0; + set->size_bits = 0; ++ free(set->map); + free(set); + } + +-- +2.7.4 + diff --git a/recipes-enea/bitcalc/bitcalc_1.0.bb b/recipes-enea/bitcalc/bitcalc_1.0.bb new file mode 100644 index 0000000..e9c677a --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc_1.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "Translate CPU list to a CPU mask" +DESCRIPTION = "Translate CPU list given on command line to a hexadecimal CPU mask. Can use kernel boot parameters isolcpus or nohz_full as input as well as a list given on command line." +SECTION = "utils" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" + +PR = "r0" + +DEPENDS = "gcc-sanitizers" +RDEPENDS_${PN} = "bash" + +FILESEXTRAPATHS_append := "${THISDIR}/${PN}" + +SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ + file://0001-bitcalc-resolved-compilation-warnings.patch \ + file://0001-bitcalc-resolved-memory-leaks.patch \ + " + +SRCREV = "9d4d1ce26b58ada516466c30e53c75c2961d6f0a" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += "'DESTDIR=${D}/usr/bin'" + +inherit pkgconfig cmake diff --git a/recipes-enea/count-ticks/count-ticks_1.1.bb b/recipes-enea/count-ticks/count-ticks_1.1.bb index caa6ed7..a33a0f9 100644 --- a/recipes-enea/count-ticks/count-ticks_1.1.bb +++ b/recipes-enea/count-ticks/count-ticks_1.1.bb @@ -12,7 +12,7 @@ SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ file://run-ptest \ " -SRCREV = "0fa0a8e084fe68e77a1f0968f2fbfa993292ae9c" +SRCREV = "9d4d1ce26b58ada516466c30e53c75c2961d6f0a" inherit ptest @@ -21,5 +21,5 @@ S = "${WORKDIR}/git" FILES_${PN} += "/bin/*" do_install() { - install -D ${S}/install/bin/count_ticks ${D}/usr/bin/count_ticks + install -D ${S}/count_ticks/count_ticks ${D}/usr/bin/count_ticks } diff --git a/recipes-enea/list2mask/list2mask/run-ptest b/recipes-enea/list2mask/list2mask/run-ptest deleted file mode 100644 index 9eb6c2f..0000000 --- a/recipes-enea/list2mask/list2mask/run-ptest +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -eu - -mask=$(list2mask --cpus 2-3,5,7-8) - -if [ $? -ne 0 ]; then - echo "FAIL: list2mask failed to execute" - exit -fi - -if [ "$mask" != "1ac" ]; then - echo "FAIL: list2mask returns mask '$mask', expected '1ac'" - exit -fi - -echo "PASS: list2mask" diff --git a/recipes-enea/list2mask/list2mask_1.0.bb b/recipes-enea/list2mask/list2mask_1.0.bb deleted file mode 100644 index d72bcda..0000000 --- a/recipes-enea/list2mask/list2mask_1.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Translate CPU list to a CPU mask" -DESCRIPTION = "Translate CPU list given on command line to a hexadecimal CPU mask. Can use kernel boot parameters isolcpus or nohz_full as input as well as a list given on command line." -SECTION = "utils" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" - -PR = "r1" - -RDEPENDS_${PN} = "bash" - -SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ - file://run-ptest \ - " - -SRCREV = "db6eff03d80c04803fb146939c504b500e16fe2f" - -inherit ptest - -S = "${WORKDIR}/git" - -FILES_${PN} += "/bin/*" - -do_install() { - install -D ${S}/install/bin/${PN} ${D}/usr/bin/${PN} -} diff --git a/recipes-enea/partrt/partrt_1.1.bb b/recipes-enea/partrt/partrt_1.1.bb index 8113805..5c22e4a 100644 --- a/recipes-enea/partrt/partrt_1.1.bb +++ b/recipes-enea/partrt/partrt_1.1.bb @@ -11,7 +11,7 @@ SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ file://run-ptest \ " -SRCREV = "cbe36a4946a2b3bb4927ca3b8ac800111ae9ce49" +SRCREV = "9d4d1ce26b58ada516466c30e53c75c2961d6f0a" inherit ptest @@ -21,10 +21,10 @@ FILES_${PN} += "/bin/*" do_install() { install -d ${D}/usr/bin - install ${S}/install/bin/partrt ${D}/usr/bin + install ${S}/partrt/partrt ${D}/usr/bin } do_install_ptest() { - install ${S}/test/test_partition.py ${D}${PTEST_PATH} + install ${S}/partrt/test/test_partition.py ${D}${PTEST_PATH} sed -i s/target/${MACHINE}/ ${D}${PTEST_PATH}/run-ptest } -- cgit v1.2.3-54-g00ecf