[LEDE-DEV] [PATCH 4/5] base-files: add generic board detection preinit script
Felix Fietkau
nbd at nbd.name
Sun Apr 30 02:53:34 PDT 2017
On 2017-04-28 14:57, Roman Yeryomin wrote:
> Signed-off-by: Roman Yeryomin <roman at advem.lv>
> ---
> package/base-files/files/lib/preinit/03_preinit_board_detect | 11 +++++++++++
> 1 file changed, 11 insertions(+)
> create mode 100644 package/base-files/files/lib/preinit/03_preinit_board_detect
>
> diff --git a/package/base-files/files/lib/preinit/03_preinit_board_detect b/package/base-files/files/lib/preinit/03_preinit_board_detect
> new file mode 100644
> index 0000000..2d64ca6
> --- /dev/null
> +++ b/package/base-files/files/lib/preinit/03_preinit_board_detect
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2017 The Linux Foundation. All rights reserved.
> +#
> +
> +do_board_detect()
> +{
> + include_file /lib/board_detect.sh && board_detect
> +}
> +
> +boot_hook_add preinit_main do_board_detect
If you add something like this, please convert the existing sysinfo
script as well. Then you won't need the include_file() function, because
board_detect.sh will always be present (and overwritten by target
base-files if necessary).
- Felix
More information about the Lede-dev
mailing list