diff options
Diffstat (limited to 'defaultenv')
-rw-r--r-- | defaultenv/.gitignore | 3 | ||||
-rw-r--r-- | defaultenv/Makefile | 10 | ||||
-rw-r--r-- | defaultenv/defaultenv-2-base/boot/net | 2 | ||||
-rw-r--r-- | defaultenv/defaultenv-2-base/init/automount | 4 | ||||
-rw-r--r-- | defaultenv/defaultenv-2-reboot-mode/bmode/bootloader | 3 | ||||
-rwxr-xr-x | defaultenv/defaultenv-2-reboot-mode/bmode/loader | 2 | ||||
-rw-r--r-- | defaultenv/defaultenv-2-reboot-mode/bmode/recovery | 2 | ||||
-rw-r--r-- | defaultenv/defaultenv.c | 7 |
8 files changed, 27 insertions, 6 deletions
diff --git a/defaultenv/.gitignore b/defaultenv/.gitignore index 7c33850599..d14aa0f494 100644 --- a/defaultenv/.gitignore +++ b/defaultenv/.gitignore @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only + barebox_default_env* barebox_zero_env +defaultenv-2-ikconfig/ diff --git a/defaultenv/Makefile b/defaultenv/Makefile index e030355a40..1eaca9f410 100644 --- a/defaultenv/Makefile +++ b/defaultenv/Makefile @@ -1,6 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only + bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE) += defaultenv-2-reboot-mode bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1 obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) barebox_zero_env @@ -31,3 +34,10 @@ cmd_env_zero = ($(objtree)/scripts/bareboxenv -z $(CONFIG_DEFAULT_ENVIRONMENT_PA $(obj)/barebox_zero_env: FORCE $(call if_changed,env_zero) + +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG) += defaultenv-2-ikconfig + +defaultenv/defaultenv-2-ikconfig.bbenv$(DEFAULT_COMPRESSION_SUFFIX): $(KCONFIG_CONFIG) + @mkdir -p defaultenv/defaultenv-2-ikconfig/data + @cp $(KCONFIG_CONFIG) defaultenv/defaultenv-2-ikconfig/data/config + $(call cmd,envgen,defaultenv/defaultenv-2-ikconfig) diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net index e79432eb27..98286ff5e0 100644 --- a/defaultenv/defaultenv-2-base/boot/net +++ b/defaultenv/defaultenv-2-base/boot/net @@ -3,7 +3,7 @@ path="/mnt/tftp" # global.net.server and global.hostname may be set by DHCP, so trigger it first -ifup -a +ifup -a1 global.bootm.image="${path}/${global.user}-linux-${global.hostname}" diff --git a/defaultenv/defaultenv-2-base/init/automount b/defaultenv/defaultenv-2-base/init/automount index 0996cea04d..39e8234897 100644 --- a/defaultenv/defaultenv-2-base/init/automount +++ b/defaultenv/defaultenv-2-base/init/automount @@ -3,12 +3,12 @@ # automount tftp server mkdir -p /mnt/tftp -automount /mnt/tftp 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' +automount /mnt/tftp 'ifup -a1 && mount -t tftp $global.net.server /mnt/tftp' # automount nfs server's nfsroot mkdir -p /mnt/nfs -automount /mnt/nfs 'ifup -a && mount -t nfs ${global.net.server}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs' +automount /mnt/nfs 'ifup -a1 && mount -t nfs ${global.net.server}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs' # FAT on usb disk example diff --git a/defaultenv/defaultenv-2-reboot-mode/bmode/bootloader b/defaultenv/defaultenv-2-reboot-mode/bmode/bootloader new file mode 100644 index 0000000000..50a7a0f633 --- /dev/null +++ b/defaultenv/defaultenv-2-reboot-mode/bmode/bootloader @@ -0,0 +1,3 @@ +# Mode to re-flash partitions +global.autoboot_timeout=30 +global.usbgadget.autostart=1 diff --git a/defaultenv/defaultenv-2-reboot-mode/bmode/loader b/defaultenv/defaultenv-2-reboot-mode/bmode/loader new file mode 100755 index 0000000000..45647dec29 --- /dev/null +++ b/defaultenv/defaultenv-2-reboot-mode/bmode/loader @@ -0,0 +1,2 @@ +# Development mode +global.autoboot=abort diff --git a/defaultenv/defaultenv-2-reboot-mode/bmode/recovery b/defaultenv/defaultenv-2-reboot-mode/bmode/recovery new file mode 100644 index 0000000000..0496ba3b0d --- /dev/null +++ b/defaultenv/defaultenv-2-reboot-mode/bmode/recovery @@ -0,0 +1,2 @@ +# Interactive mode for recovery +global.autoboot=menu diff --git a/defaultenv/defaultenv.c b/defaultenv/defaultenv.c index 3b4efcfd36..055475eb47 100644 --- a/defaultenv/defaultenv.c +++ b/defaultenv/defaultenv.c @@ -1,9 +1,6 @@ /* * Copyright (C) 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 @@ -48,6 +45,10 @@ static void defaultenv_add_base(void) defaultenv_append_directory(defaultenv_2_menu); if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU)) defaultenv_append_directory(defaultenv_2_dfu); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE)) + defaultenv_append_directory(defaultenv_2_reboot_mode); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG)) + defaultenv_append_directory(defaultenv_2_ikconfig); if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) defaultenv_append_directory(defaultenv_1); } |