aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/layerscape/base-files/lib/preinit/02_sysinfo_fixup13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/layerscape/base-files/lib/preinit/02_sysinfo_fixup b/target/linux/layerscape/base-files/lib/preinit/02_sysinfo_fixup
new file mode 100644
index 0000000000..1bbd8efbc6
--- /dev/null
+++ b/target/linux/layerscape/base-files/lib/preinit/02_sysinfo_fixup
@@ -0,0 +1,13 @@
+do_sysinfo_layerscape_fixup() {
+ [ -e /tmp/sysinfo/board_name ] || return
+ [ -e /proc/cmdline ] || return
+ cmdline=$(strings /proc/cmdline)
+ case "${cmdline}" in
+ *root=/dev/mmcblk*)
+ board="$(strings /tmp/sysinfo/board_name)-sdboot"
+ echo ${board} > /tmp/sysinfo/board_name
+ ;;
+ esac
+}
+
+boot_hook_add preinit_main do_sysinfo_layerscape_fixup