diff options
Diffstat (limited to 'dev-embedded/kobs-ng')
-rw-r--r-- | dev-embedded/kobs-ng/Manifest | 6 | ||||
-rw-r--r-- | dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch | 13 | ||||
-rw-r--r-- | dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch | 75 | ||||
-rw-r--r-- | dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch | 13 | ||||
-rw-r--r-- | dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild | 26 | ||||
-rw-r--r-- | dev-embedded/kobs-ng/metadata.xml | 8 |
6 files changed, 141 insertions, 0 deletions
diff --git a/dev-embedded/kobs-ng/Manifest b/dev-embedded/kobs-ng/Manifest new file mode 100644 index 000000000000..c3e24a8b0538 --- /dev/null +++ b/dev-embedded/kobs-ng/Manifest @@ -0,0 +1,6 @@ +AUX kobs-ng-fix-array-violation.patch 338 BLAKE2B f8eeb81566e16d67b9d8d2df4c40a950cfbd0c8d29dd754f5ebffc68889366a142c84078428172693e096904fb913305dc6dbdb020ed22028e57ff5bc8f64e35 SHA512 311fac99b85264a25dc3984096e7467894a286be2ff6ee1fb8a11681ba5833e61b5938ef01312a35bb3a4e7cf90c0fbec163a54e9cc6c844e49da3bb856d2937 +AUX kobs-ng-fix-mtd-defines.patch 2170 BLAKE2B 97a067399e534d7c1d468aa1657e3a6212f37f99a470a9f789752388b7d1fb428c3704dc045e2f41fca4b489ba2db0f46768e0befb2bed150162af67105d58d8 SHA512 5d192d1b6f36ccd1500f33c8a89bbd8bdd7b8f489fe04be56142101b93dd1f7c5b00ca5dffb681aeec15ed58927530dcd487e80b9a02e4af1c3ff46b732d6697 +AUX kobs-ng-fix-open-without-mode.patch 390 BLAKE2B bacf3a3a0c40ff0663f398eeb75648db3ed6cdda8b18accfbd7fa9192446bc2f66c6c81f0e46fda205312e5fde7eb393de13a53e4841e5a618997a652fa3f0c4 SHA512 6574ab1e96833a8fa90fcaa81d71258b28069177fd66d69d0b5b4f7c4988faceac86c6655dfccea192c930bc0c08adb01ff33c68e48447f53bb482ea40dd708b +DIST kobs-ng-3.0.35-4.1.0.tar.gz 145817 BLAKE2B eed8a20be261c5ee03f0cff0d0381079353a7f0887202201eabe1377bc14387b7e5b2240bdf4e5d908aaa38dd58ec3299e8a1ea264122970a872cc29aadaf23b SHA512 b2bb27202ecbf31bebec8eadcf04362178ec74337400416259237880b94ac2e5fcffae59b48857e9fcfa1b1aae584b181901d4dafea63eb1e0972ed3bc3b9e6e +EBUILD kobs-ng-3.0.35.4.1.0.ebuild 763 BLAKE2B 5eb5e2d5f24191157c89fc5d06751b6e3d15740de24e6c42d485a608010005092536328a69e3afec3088f411fd832941991ec9da2be13fb0d4001cb0482ceb63 SHA512 16ccc0739c6145526374e0adc2121c57a2968b9b8bf9c2c0c846ba5b44587d0fc3f764903a99d5e5da1c8097950f40521c4eafb741a89c9dee46190ee5bc4437 +MISC metadata.xml 247 BLAKE2B e46b8f2d053251af5cb591bb2ee5e35089c4e8174ee2e7a3c504db23f844b65083d4a3e5198da3977ad3e98b67cab2e0de686a3c62009b487c1e64785a8ff65d SHA512 15df289e0f962f564551f61ada3cfef0311f6af639887def780bf5ad3be105515c8d24c950ff340ed35d89b9cd994af3540322b684c5dec3b43ec6bb0041aa4e diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch new file mode 100644 index 000000000000..28b1ef97c7f0 --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch @@ -0,0 +1,13 @@ +the part array is declared as part[2], so trying to index [2] isn't going to work + +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -786,7 +786,7 @@ + mp->ecc = 1; + } + +- if (md->part[1].fd >= 0 && md->part[2].fd >=0) ++ if (md->part[1].fd >= 0) + md->flags |= F_MULTICHIP; + + /* if a second partition has been opened, verify that are compatible */ diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch new file mode 100644 index 000000000000..b7dfbe3e2e39 --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch @@ -0,0 +1,75 @@ +# Source: http://git.buildroot.net/buildroot/plain/package/kobs-ng/kobs-ng-fix-mtd-defines.patch?id=b6fb2f5018fe0ae9bba275991efc502236422924 + +Newer kernel headers renamed mtd mode defines and no longer support +MEMSETOOBSEL. Allow code to work with both older and newer kernel +versions. + +Signed-off-by: Paul B. Henson <henson@acm.org> + +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.c kobs-ng-3.0.35-4.0.0/src/mtd.c +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.c 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.c 2013-07-28 19:39:59.000000000 -0700 +@@ -852,8 +852,11 @@ + mp = &md->part[i]; + + if (mp->fd != -1) { ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + (void)ioctl(mp->fd, MEMSETOOBSEL, + &mp->old_oobinfo); ++#endif + close(mp->fd); + } + +@@ -896,6 +899,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo); + if (r != 0) { +@@ -904,6 +909,7 @@ + } + mp->oobinfochanged = 0; + } ++#endif + } else { + r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW); + if (r != 0 && r != -ENOTTY) { +@@ -911,6 +917,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo); + if (r != 0) { +@@ -920,6 +928,7 @@ + mp->oobinfochanged = 1; + } else + mp->oobinfochanged = 2; ++#endif + } + + mp->ecc = ecc; +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.h kobs-ng-3.0.35-4.0.0/src/mtd.h +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.h 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.h 2013-07-28 19:33:57.000000000 -0700 +@@ -31,6 +31,14 @@ + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" + ++// Newer kernel headers renamed define ++#ifndef MTD_MODE_NORMAL ++#define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL ++#endif ++#ifndef MTD_MODE_RAW ++#define MTD_MODE_RAW MTD_FILE_MODE_RAW ++#endif ++ + //------------------------------------------------------------------------------ + // Re-definitions of true and false, because the standard ones aren't good + // enough? diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch new file mode 100644 index 000000000000..47fd33170b2e --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch @@ -0,0 +1,13 @@ +add missing mode to open() when using O_CREAT + +--- kobs-ng-3.0.35-4.1.0/src/main.c ++++ kobs-ng-3.0.35-4.1.0/src/main.c +@@ -563,7 +563,7 @@ + int sz = getpagesize(); + + from = open(file_name, O_RDONLY); +- to = open(tmp_file, O_CREAT | O_RDWR); ++ to = open(tmp_file, O_CREAT | O_RDWR, 0644); + if (from < 0 || to < 0) { + fprintf(stderr, "unable to create a temporary file\n"); + exit(5); diff --git a/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild new file mode 100644 index 000000000000..fa662e6a10ef --- /dev/null +++ b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit eutils versionator + +MY_PV="$(get_version_component_range 1-3)-$(get_version_component_range 4-)" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="utility to write u-boot images to NAND on Freescale iMX devices" +HOMEPAGE="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW" +SRC_URI="http://storage.googleapis.com/chromeos-localmirror/distfiles/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/kobs-ng-fix-mtd-defines.patch + epatch "${FILESDIR}"/kobs-ng-fix-open-without-mode.patch + epatch "${FILESDIR}"/kobs-ng-fix-array-violation.patch +} diff --git a/dev-embedded/kobs-ng/metadata.xml b/dev-embedded/kobs-ng/metadata.xml new file mode 100644 index 000000000000..71b1461e1146 --- /dev/null +++ b/dev-embedded/kobs-ng/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> |