aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-05-06 00:59:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-05-06 00:59:28 +0000
commitbc76393de3b8ad0edb881db058c63b451ea9075b (patch)
tree64392d18746c4fba1541a6ec171617d81ce3a50a
parentc3ea80d92921dc7fc8c053758d758469a00e7f93 (diff)
downloadupstream-bc76393de3b8ad0edb881db058c63b451ea9075b.tar.gz
upstream-bc76393de3b8ad0edb881db058c63b451ea9075b.tar.bz2
upstream-bc76393de3b8ad0edb881db058c63b451ea9075b.zip
uboot-envtools: disable AES support, reduces code size
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45615 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/boot/uboot-envtools/patches/200-fw_env_no_aes.patch38
-rw-r--r--package/boot/uboot-envtools/patches/300-support-env-in-ubivol-chardev.patch4
2 files changed, 41 insertions, 1 deletions
diff --git a/package/boot/uboot-envtools/patches/200-fw_env_no_aes.patch b/package/boot/uboot-envtools/patches/200-fw_env_no_aes.patch
new file mode 100644
index 0000000000..05fd3c7c4f
--- /dev/null
+++ b/package/boot/uboot-envtools/patches/200-fw_env_no_aes.patch
@@ -0,0 +1,38 @@
+--- a/tools/env/fw_env.c
++++ b/tools/env/fw_env.c
+@@ -245,7 +245,7 @@ int fw_printenv (int argc, char *argv[])
+ int i, n_flag;
+ int rc = 0;
+
+- if (argc >= 2 && strcmp(argv[1], "-a") == 0) {
++ if (0 && argc >= 2 && strcmp(argv[1], "-a") == 0) {
+ if (argc < 3) {
+ fprintf(stderr,
+ "## Error: '-a' option requires AES key\n");
+@@ -324,7 +324,7 @@ int fw_printenv (int argc, char *argv[])
+ int fw_env_close(void)
+ {
+ int ret;
+- if (aes_flag) {
++ if (0 && aes_flag) {
+ ret = env_aes_cbc_crypt(environment.data, 1);
+ if (ret) {
+ fprintf(stderr,
+@@ -1222,7 +1222,7 @@ int fw_env_open(void)
+
+ crc0 = crc32 (0, (uint8_t *) environment.data, ENV_SIZE);
+
+- if (aes_flag) {
++ if (0 && aes_flag) {
+ ret = env_aes_cbc_crypt(environment.data, 0);
+ if (ret)
+ return ret;
+@@ -1279,7 +1279,7 @@ int fw_env_open(void)
+
+ crc1 = crc32 (0, (uint8_t *) redundant->data, ENV_SIZE);
+
+- if (aes_flag) {
++ if (0 && aes_flag) {
+ ret = env_aes_cbc_crypt(redundant->data, 0);
+ if (ret)
+ return ret;
diff --git a/package/boot/uboot-envtools/patches/300-support-env-in-ubivol-chardev.patch b/package/boot/uboot-envtools/patches/300-support-env-in-ubivol-chardev.patch
index 05ec74ae68..b778e8a1ba 100644
--- a/package/boot/uboot-envtools/patches/300-support-env-in-ubivol-chardev.patch
+++ b/package/boot/uboot-envtools/patches/300-support-env-in-ubivol-chardev.patch
@@ -11,13 +11,15 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
-@@ -24,6 +24,11 @@ ifeq ($(MTD_VERSION),old)
+@@ -24,6 +24,13 @@ ifeq ($(MTD_VERSION),old)
HOST_EXTRACFLAGS += -DMTD_OLD
endif
+ifeq ($(UBI),y)
+HOST_EXTRACFLAGS += -DUBI
+HOST_LOADLIBES = "-Wl,--gc-sections,-lubi-utils"
++else
++HOST_LOADLIBES = "-Wl,--gc-sections"
+endif
+
always := fw_printenv