From ac3e05c5d757334944fbf1f14583164cd1d69172 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Fri, 7 Apr 2017 18:09:08 +0200 Subject: treewide: populate boardname and model earlier For targets using the generic board detection and board specific settings in diag.sh, the board name is still unset at the time the set_state() provided by diag.sh is called by 10_indicate_preinit. Change the execution order to ensure the boardname is populated before required the first time. Do the target specific board detection as early as possible, directly followed by the generic one to allow a seamless switch to the generic function for populating /tmp/sysinfo/. Signed-off-by: Mathias Kresin --- .../linux/ramips/base-files/lib/preinit/01_preinit_do_ramips.sh | 9 +++++++++ .../linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 target/linux/ramips/base-files/lib/preinit/01_preinit_do_ramips.sh delete mode 100644 target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh (limited to 'target/linux/ramips/base-files/lib') diff --git a/target/linux/ramips/base-files/lib/preinit/01_preinit_do_ramips.sh b/target/linux/ramips/base-files/lib/preinit/01_preinit_do_ramips.sh new file mode 100644 index 0000000000..31ef5f8146 --- /dev/null +++ b/target/linux/ramips/base-files/lib/preinit/01_preinit_do_ramips.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +do_ramips() { + . /lib/ramips.sh + + ramips_board_detect +} + +boot_hook_add preinit_main do_ramips diff --git a/target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh b/target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh deleted file mode 100644 index 31ef5f8146..0000000000 --- a/target/linux/ramips/base-files/lib/preinit/03_preinit_do_ramips.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -do_ramips() { - . /lib/ramips.sh - - ramips_board_detect -} - -boot_hook_add preinit_main do_ramips -- cgit v1.2.3