[LEDE-DEV] [PATCH 4/5] base-files: add generic board detection preinit script
Roman Yeryomin
leroi.lists at gmail.com
Mon May 1 15:55:06 PDT 2017
On 30 April 2017 at 12:53, Felix Fietkau <nbd at nbd.name> wrote:
> 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).
>
You mean convert /lib/preinit/10_sysinfo into default board_detect.sh ?
Ok, that sounds reasonable.
Regards,
Roman
More information about the Lede-dev
mailing list