So we can use it for dhcp request too.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
call dhcp when ip mode is dhcp-barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This will allow a board to have a custom boot choice with a boot menu as
example.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
you can now specify in the same way as it's done for the kernel where is
stored the oftree.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
barebox will use DHCP and pass the result to the kernel
update the help
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
use rootpath as nfsroot and bootfile as kernelimage if present
when ip mode is dhcp
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish barebox from e.g. pxe machines,
a custom vendor id can be sent in dhcp discover/request messages.
E.g. the ISC dhcp server can be configured with
| if substring(option vendor-class-identifier,0,8) = "barebox:" {
| next-server 192.168.3.24;
| server-name "192.168.3.24";
| option tftp-server-name "192.168.3.24";
| option root-path = concat("/srv/sysroots/by-mac/",
| binary-to-ascii (16, 8, "-", substring (hardware, 1, 6)));
| }
to sent boot params which are valid for barebox hosts only.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Jean-Christophe PLAGNIOL-VILLARD:
- update the use dhcp command option
- support to set the vendor via env dhcp_vendor_id
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
boot: boot [-m <mode>] [-k <kernel_option>] [-r <rootfs_option>] [-i <ip_mode>]
options
- kernel nand, nor, nfs, tftp, disk
- rootfs nand, nor, net, disk
- ip dhcp, none, empty
mode option
mode kernel rootfs
nand nand nand
nor nor nor
nfs nfs net
tftp fttp net
disk disk disk
default mode are used from the /env/config
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Now that we have a bootm command which boots everything we can
simplify the defaultenvironment. We can call bootm on every
image type and can remove the kernelimage_type variables.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The config file looks like you just need to set ethaddr when you do
static IP. This is misleading, so put the setting to a more prominent
place.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch add a config template to the defaultenv.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If a (different) server is supplied to the "nfsroot" parameter, the kernel
will choose that one.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When passing a fixed IP to the kernel set it explicit to eth0. Otherwise
on systems with more than one interface dhcp might be used.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Since commit 9eac282024, the boot script
doesn't understand kernel_loc=net anymore. This patch adds backwards
compatibility so that the kernel is loaded from tftp as before.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
add xload as vaild update type. Default name should be stored in enviroment
variable "xloadimage"
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The _update script does not check the return value of erasing a partiton or
flashing the image to the device. Added this check to get a evaluable return
value from the update script.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
before we can only support tftp
so keep it as default
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The semicolon is a delimiter, not an end marker. With a trailing semicolon the
kernel give the confusing message:
mtd: no mtd-id
With this patch, a semicolon gets added on demand only.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch fixes the return values of the update script.
- Exit with an error of the "_update" script fails.
- Add a "else; true" to the crc check, otherwise the script
exits with "1".
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch fixes a regression introduced in commit
d15cfafeef.
While there, use "-z" to check if ubiroot variable is empty.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-By: Eric Bnard<eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This usage printout during startup more looks like there is
something wrong with the environment than a helpful message.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Eric Bénard <eric@eukrea.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
this is useful when building barebox without integrated env.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this patch allows for example device_type to be fixed in /env/config
(useful for configurations with only one memory type).
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
all root are not named root so give the possibility to
configure this in the config file.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
$0 is _update_help so update -h leads to : usage: /env/bin/_update_help
so don't use $0 but hardcode update instead.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
and abort the update if loadb failed or cancelled
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We had some \" in mtdparts to allow for spaces in the mtdparts
kernel option. Barebox does not handle these correctly, so remove
them and disallow spaces in mtdparts
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
the default mode is tftp to do not change the default behavior
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
use getopt to simplify it and prepare for xmodem support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>