summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-05-14 07:11:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-05-14 07:11:17 +0200
commit45000aac11315d7ccbaeefa29cafc8303ac206cb (patch)
tree0bddc2c0cb20514ee080062899020d1ee4d7bb12 /common
parent36acabd5c522501bd7da8eb7a21c865fc78676ee (diff)
parent7721719313bc47e0eb90d45c00d67233d698bd2f (diff)
downloadbarebox-45000aac11315d7ccbaeefa29cafc8303ac206cb.tar.gz
barebox-45000aac11315d7ccbaeefa29cafc8303ac206cb.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'common')
-rw-r--r--common/bbu.c3
-rw-r--r--common/block.c3
-rw-r--r--common/bootargs.c3
-rw-r--r--common/bootm.c1
-rw-r--r--common/clock.c3
-rw-r--r--common/command.c3
-rw-r--r--common/console.c3
-rw-r--r--common/console_common.c3
-rw-r--r--common/console_countdown.c3
-rw-r--r--common/date.c3
-rw-r--r--common/efi/efi-image.c3
-rw-r--r--common/efi/efi.c3
-rw-r--r--common/env.c3
-rw-r--r--common/environment.c3
-rw-r--r--common/filetype.c3
-rw-r--r--common/image.c3
-rw-r--r--common/imd.c10
-rw-r--r--common/memory.c3
-rw-r--r--common/memsize.c3
-rw-r--r--common/memtest.c3
-rw-r--r--common/menu.c3
-rw-r--r--common/misc.c3
-rw-r--r--common/module.lds.S3
-rw-r--r--common/password.c3
-rw-r--r--common/poweroff.c3
-rw-r--r--common/ratp/getenv.c3
-rw-r--r--common/ratp/gpio.c3
-rw-r--r--common/ratp/i2c.c3
-rw-r--r--common/ratp/md.c3
-rw-r--r--common/ratp/mw.c3
-rw-r--r--common/ratp/ping.c3
-rw-r--r--common/ratp/ratp.c3
-rw-r--r--common/ratp/reset.c3
-rw-r--r--common/resource.c3
-rw-r--r--common/restart.c3
-rw-r--r--common/s_record.c3
-rw-r--r--common/startup.c49
-rw-r--r--common/tlsf_malloc.c1
-rw-r--r--common/uimage.c3
39 files changed, 46 insertions, 120 deletions
diff --git a/common/bbu.c b/common/bbu.c
index 1755615cb5..f284c341b9 100644
--- a/common/bbu.c
+++ b/common/bbu.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/block.c b/common/block.c
index 39275dc418..c522310dcf 100644
--- a/common/block.c
+++ b/common/block.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/bootargs.c b/common/bootargs.c
index f0ab689158..97d0e15eaf 100644
--- a/common/bootargs.c
+++ b/common/bootargs.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/bootm.c b/common/bootm.c
index 299985678d..8fec1ee34d 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -607,6 +607,7 @@ int bootm_boot(struct bootm_data *bootm_data)
*/
data->oftree_file = NULL;
data->initrd_file = NULL;
+ data->tee_file = NULL;
if (os_type != filetype_oftree) {
printf("Signed boot and image is no FIT image, aborting\n");
ret = -EINVAL;
diff --git a/common/clock.c b/common/clock.c
index 1a4931ca83..17b07abdc1 100644
--- a/common/clock.c
+++ b/common/clock.c
@@ -7,9 +7,6 @@
* Copyright (C) 2004, 2005 IBM, John Stultz (johnstul@us.ibm.com)
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/command.c b/common/command.c
index 49845938ae..c7c0c4c103 100644
--- a/common/command.c
+++ b/common/command.c
@@ -2,9 +2,6 @@
* (C) Copyright 2000-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/console.c b/common/console.c
index e6e029848d..3375ecb7e5 100644
--- a/common/console.c
+++ b/common/console.c
@@ -2,9 +2,6 @@
* (C) Copyright 2000
* Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/console_common.c b/common/console_common.c
index 6d017538bc..a174c2deed 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -4,9 +4,6 @@
* (C) Copyright 2000 Paolo Scaffardi, AIRVENT SAM s.p.a -
* RIMINI(ITALY), arsenio@tin.it
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/console_countdown.c b/common/console_countdown.c
index 8d09894c30..74dc382795 100644
--- a/common/console_countdown.c
+++ b/common/console_countdown.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/date.c b/common/date.c
index 129192e232..1fea02cae0 100644
--- a/common/date.c
+++ b/common/date.c
@@ -2,9 +2,6 @@
* (C) Copyright 2001
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/efi/efi-image.c b/common/efi/efi-image.c
index 9c66c9f882..bd1c58438e 100644
--- a/common/efi/efi-image.c
+++ b/common/efi/efi-image.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/efi/efi.c b/common/efi/efi.c
index ed81583550..6f55e3970e 100644
--- a/common/efi/efi.c
+++ b/common/efi/efi.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/env.c b/common/env.c
index 323a82223e..fbaaac4f2f 100644
--- a/common/env.c
+++ b/common/env.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/environment.c b/common/environment.c
index 005caf45e6..6e58f122ba 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/filetype.c b/common/filetype.c
index fd6e8e3d1c..799ede96bc 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/image.c b/common/image.c
index fc10ce5fd9..8199e2df17 100644
--- a/common/image.c
+++ b/common/image.c
@@ -4,9 +4,6 @@
* (C) Copyright 2000-2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/imd.c b/common/imd.c
index 526308effa..96496514a5 100644
--- a/common/imd.c
+++ b/common/imd.c
@@ -1,9 +1,6 @@
/*
* (C) Copyright 2014 Sascha Hauer, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
@@ -370,6 +367,7 @@ static int imd_write_crc32(void *buf, const struct imd_header *imd_start,
return -ENODATA;
} else {
uint32_t *p = (uint32_t *)(imd_crc + 1);
+ int ret;
if (*p != crc) {
uint32_t *flags = imd_crc32_flags(imd_crc);
@@ -377,7 +375,11 @@ static int imd_write_crc32(void *buf, const struct imd_header *imd_start,
debug("Update crc token from 0x%08x to 0x%08x (flags 0x%08x)\n", *p, crc, *flags);
*p = crc;
- write_file(filename, buf, size);
+ ret = write_file(filename, buf, size);
+ if (ret < 0) {
+ eprintf("CRC: write crc token to %s failed: %d\n", filename, ret);
+ return ret;
+ }
}
}
diff --git a/common/memory.c b/common/memory.c
index 21b2b4f63a..114958fbcf 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/memsize.c b/common/memsize.c
index ef6381babd..915ab87b34 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -2,9 +2,6 @@
* (C) Copyright 2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/memtest.c b/common/memtest.c
index 7b7a9eef5a..09cfa8a347 100644
--- a/common/memtest.c
+++ b/common/memtest.c
@@ -6,9 +6,6 @@
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/menu.c b/common/menu.c
index 31e5c90a0f..089dab8a11 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -1,9 +1,6 @@
/*
* (C) Copyright 2009-2010 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of
diff --git a/common/misc.c b/common/misc.c
index 9b390dc7ba..1c7f937608 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -2,9 +2,6 @@
* (C) Copyright 2000-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/module.lds.S b/common/module.lds.S
index f3dbb12f4a..76f3b6d1bb 100644
--- a/common/module.lds.S
+++ b/common/module.lds.S
@@ -2,9 +2,6 @@
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/password.c b/common/password.c
index 74d328f4b2..a2a9c4cd6c 100644
--- a/common/password.c
+++ b/common/password.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2008-2010 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/poweroff.c b/common/poweroff.c
index 32a78280d3..4ce04d158f 100644
--- a/common/poweroff.c
+++ b/common/poweroff.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2015 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/getenv.c b/common/ratp/getenv.c
index fdb4b0b282..7b38d2e363 100644
--- a/common/ratp/getenv.c
+++ b/common/ratp/getenv.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/gpio.c b/common/ratp/gpio.c
index d2c527a40c..df413b6a5a 100644
--- a/common/ratp/gpio.c
+++ b/common/ratp/gpio.c
@@ -2,9 +2,6 @@
* Copyright (c) 2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
* Copyright (c) 2018 Zodiac Inflight Innovations
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/i2c.c b/common/ratp/i2c.c
index 07097c7f4b..c14bbbf9b9 100644
--- a/common/ratp/i2c.c
+++ b/common/ratp/i2c.c
@@ -2,9 +2,6 @@
* Copyright (c) 2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
* Copyright (c) 2018 Zodiac Inflight Innovations
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/md.c b/common/ratp/md.c
index a25cbf1127..3e258c59a0 100644
--- a/common/ratp/md.c
+++ b/common/ratp/md.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2011-2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/mw.c b/common/ratp/mw.c
index 772910b39d..8945799f1d 100644
--- a/common/ratp/mw.c
+++ b/common/ratp/mw.c
@@ -2,9 +2,6 @@
* Copyright (c) 2011-2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
* Copyright (c) 2018 Zodiac Inflight Innovations
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/ping.c b/common/ratp/ping.c
index cc29ea36c6..ff92f8e364 100644
--- a/common/ratp/ping.c
+++ b/common/ratp/ping.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c
index e84ad22167..ca751a30eb 100644
--- a/common/ratp/ratp.c
+++ b/common/ratp/ratp.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2015 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/ratp/reset.c b/common/ratp/reset.c
index d0229d5d6c..060475169b 100644
--- a/common/ratp/reset.c
+++ b/common/ratp/reset.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/resource.c b/common/resource.c
index 16430b78eb..62497e7a54 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -3,9 +3,6 @@
*
* Copyright (c) 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/restart.c b/common/restart.c
index 8fd5ffd1a2..b19ae54657 100644
--- a/common/restart.c
+++ b/common/restart.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2015 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
diff --git a/common/s_record.c b/common/s_record.c
index 36d557f0ae..1806890242 100644
--- a/common/s_record.c
+++ b/common/s_record.c
@@ -2,9 +2,6 @@
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/common/startup.c b/common/startup.c
index c417a4d078..511675ed55 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -6,9 +6,6 @@
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* Marius Groeger <mgroeger@sysgo.de>
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
@@ -39,6 +36,7 @@
#include <errno.h>
#include <linux/stat.h>
#include <envfs.h>
+#include <magicvar.h>
#include <asm/sections.h>
#include <uncompress.h>
#include <globalvar.h>
@@ -76,6 +74,16 @@ fs_initcall(mount_root);
#endif
#ifdef CONFIG_ENV_HANDLING
+static bool region_overlap(loff_t starta, loff_t lena,
+ loff_t startb, loff_t lenb)
+{
+ if (starta + lena <= startb)
+ return 0;
+ if (startb + lenb <= starta)
+ return 0;
+ return 1;
+}
+
static int check_overlap(const char *path)
{
struct cdev *cenv, *cdisk, *cpart;
@@ -106,8 +114,8 @@ static int check_overlap(const char *path)
if (cpart == cenv)
continue;
- if (lregion_overlap(cpart->offset, cpart->size,
- cenv->offset, cenv->size))
+ if (region_overlap(cpart->offset, cpart->size,
+ cenv->offset, cenv->size))
goto conflict;
}
@@ -163,6 +171,14 @@ static const char * const global_autoboot_abort_keys[] = {
};
static int global_autoboot_timeout = 3;
+static const char * const global_autoboot_states[] = {
+ [AUTOBOOT_COUNTDOWN] = "countdown",
+ [AUTOBOOT_ABORT] = "abort",
+ [AUTOBOOT_MENU] = "menu",
+ [AUTOBOOT_BOOT] = "boot",
+};
+static int global_autoboot_state = AUTOBOOT_COUNTDOWN;
+
static bool test_abort(void)
{
bool do_abort = false;
@@ -194,8 +210,6 @@ static bool test_abort(void)
#define INITFILE "/env/bin/init"
#define MENUFILE "/env/menu/mainmenu"
-static enum autoboot_state autoboot_state = AUTOBOOT_UNKNOWN;
-
/**
* set_autoboot_state - set the autoboot state
* @autoboot: the state to set
@@ -205,7 +219,7 @@ static enum autoboot_state autoboot_state = AUTOBOOT_UNKNOWN;
*/
void set_autoboot_state(enum autoboot_state autoboot)
{
- autoboot_state = autoboot;
+ global_autoboot_state = autoboot;
}
/**
@@ -221,6 +235,7 @@ void set_autoboot_state(enum autoboot_state autoboot)
*/
enum autoboot_state do_autoboot_countdown(void)
{
+ enum autoboot_state autoboot_state;
unsigned flags = CONSOLE_COUNTDOWN_EXTERN;
int ret;
struct stat s;
@@ -228,8 +243,8 @@ enum autoboot_state do_autoboot_countdown(void)
char *abortkeys = NULL;
unsigned char outkey;
- if (autoboot_state != AUTOBOOT_UNKNOWN)
- return autoboot_state;
+ if (global_autoboot_state != AUTOBOOT_COUNTDOWN)
+ return global_autoboot_state;
menu_exists = stat(MENUFILE, &s) == 0;
@@ -285,6 +300,10 @@ static int run_init(void)
ARRAY_SIZE(global_autoboot_abort_keys));
globalvar_add_simple_int("autoboot_timeout",
&global_autoboot_timeout, "%u");
+ globalvar_add_simple_enum("autoboot",
+ &global_autoboot_state,
+ global_autoboot_states,
+ ARRAY_SIZE(global_autoboot_states));
setenv("PATH", "/env/bin");
@@ -391,3 +410,13 @@ void shutdown_barebox(void)
(*exitcall)();
}
}
+
+BAREBOX_MAGICVAR_NAMED(autoboot_state,
+ global.autoboot,
+ "Autoboot state. Possible values: countdown (default), abort, menu, boot");
+BAREBOX_MAGICVAR_NAMED(global_autoboot_abort_key,
+ global.autoboot_abort_key,
+ "Which key allows to interrupt autoboot. Possible values: any, ctrl-c");
+BAREBOX_MAGICVAR_NAMED(global_autoboot_timeout,
+ global.autoboot_timeout,
+ "Timeout before autoboot starts in seconds");
diff --git a/common/tlsf_malloc.c b/common/tlsf_malloc.c
index c8900fc6bb..9cb9ede62c 100644
--- a/common/tlsf_malloc.c
+++ b/common/tlsf_malloc.c
@@ -4,7 +4,6 @@
* Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
*
* This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
diff --git a/common/uimage.c b/common/uimage.c
index 3470d9bc72..a84b8fddc4 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -5,9 +5,6 @@
*
* partly based on U-Boot uImage code
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.