Commit f10a8037 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

apply patch in busybox for ubuntu 11.10 build.

parent 0daae1e7
[buildout]
extends =
../patch/buildout.cfg
parts = busybox
# https://bugs.busybox.net/show_bug.cgi?id=4838
[busybox-1.19.3.packed_hack.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = faa5ce46be086763202d7ca24601fbde
filename = busybox-1.19.3.packed_hack.patch
download-only = true
[busybox]
recipe = slapos.recipe.build
url = http://busybox.net/downloads/busybox-1.19.3.tar.bz2
md5sum = c3938e1ac59602387009bbf1dd1af7f6
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${busybox-1.19.3.packed_hack.patch:location}/${busybox-1.19.3.packed_hack.patch:filename}
script =
extract_dir = self.extract(self.download(%(url)r, %(md5sum)r))
workdir = guessworkdir(extract_dir)
self.applyPatchList(self.options.get('patches'), self.options.get('patch-options'), self.options.get('patch-binary'), workdir)
call(['patch', 'defconfig'], cwd=workdir, env=env)
self.logger.info("Creating default configuration")
call(['make', 'defconfig'], cwd=workdir, env=env)
self.logger.info("Building")
......
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index 2a426db..35f44ac 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -60,6 +60,16 @@
//kbuild:lib-$(CONFIG_UBIUPDATEVOL) += ubi_tools.o
#include "libbb.h"
+#if 1
+// __packed hack for broken kernel headers ubi-user.h
+// See: https://lkml.org/lkml/2011/6/22/25
+// Once ubi-user.h is correctly installed without "__packed", or kernel
+// guys correct this another way (with a compiler header??), this can
+// go away.
+# ifndef __packed
+# define __packed __attribute__((packed))
+# endif // ndef __packed
+#endif // 1
#include <mtd/ubi-user.h>
#define OPTION_M (1 << 0)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment