-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
base-files: allow override model name from uboot env
- Loading branch information
1 parent
41e0c30
commit d242992
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
do_sysinfo_generic() { | ||
[ -d /proc/device-tree ] || return | ||
mkdir -p /tmp/sysinfo | ||
[ -d /proc/device-tree ] || return | ||
[ -e /tmp/sysinfo/board_name ] || \ | ||
echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name | ||
[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \ | ||
echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model | ||
[ -z "$(fw_printenv model_name)" ] || fw_printenv model_name > /tmp/sysinfo/model | ||
} | ||
|
||
boot_hook_add preinit_main do_sysinfo_generic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters