diff options
author | Luiz Otavio O Souza <loos@FreeBSD.org> | 2015-07-06 19:50:03 +0000 |
---|---|---|
committer | Luiz Otavio O Souza <loos@FreeBSD.org> | 2015-07-06 19:50:03 +0000 |
commit | ae951602785ddf875b3ce8e66690b51e94a94dea (patch) | |
tree | 771118f806441b62dba80e48428a831e888aded1 /sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c | |
parent | net-p2p/py-kenosis: Mark DEPRECATED as fails to run with modern python (diff) |
Adds the U-Boot loader for Banana pi, Cubieboard and Cubieboard2.
This version is patched so that:
* ELF and API features are enabled.
* The default environment is trimmed to just what's needed to boot.
* The saveenv command writes to the file u-boot.env on the FAT partition.
* The DTB file name is chosen based on the board model and passed to ubldr
using the fdtfile env variable. ubldr loads the DTB from /boot/dtb/ on
the FreeBSD partition.
* By default, it loads ELF ubldr from file ubldr on the FAT partition to
address 0x42000000, and launches it.
For information about running FreeBSD on Allwinner SoCs, see
https://wiki.freebsd.org/FreeBSD/arm/Allwinner
Differential Revision: https://reviews.freebsd.org/D2874
Reviewed by: garga
Approved by: garga
Notes
Notes:
svn path=/head/; revision=391476
Diffstat (limited to 'sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c')
-rw-r--r-- | sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c b/sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c new file mode 100644 index 000000000000..c72587b117c9 --- /dev/null +++ b/sysutils/u-boot-cubieboard/files/patch-common_cmd__test.c @@ -0,0 +1,19 @@ +--- common/cmd_test.c.orig 2015-04-13 14:53:03 UTC ++++ common/cmd_test.c +@@ -65,9 +65,14 @@ static int do_test(cmd_tbl_t *cmdtp, int + char * const *ap; + int i, op, left, adv, expr, last_expr, last_unop, last_binop; + +- /* args? */ +- if (argc < 3) ++ /* ++ * If no args, that's bogus, return false. ++ * If op is -z and no other args, answer is Yes, string is empty. ++ */ ++ if (argc < 2) + return 1; ++ else if (argc == 2) ++ return !(strcmp(argv[1], "-z") == 0); + + #ifdef DEBUG + { |