mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-24 14:06:15 +00:00
3a99b624d8
Many Layerscape boards support both flash boot and SD card boot. And different firmware and sysupgrade.bin are built for the two boot methods. To identify them, a fix could be done on board name by adding a postfix "-sdboot" for SD card boot. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
14 lines
349 B
Plaintext
14 lines
349 B
Plaintext
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
|