Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
0587597c
Commit
0587597c
authored
22 years ago
by
Stefan Roese
Browse files
Options
Downloads
Patches
Plain Diff
U-Boot version environment variable "ver" added (CONFIG_VERSION_VARIABLE).
parent
0db5bca8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/cmd_nvedit.c
+6
-2
6 additions, 2 deletions
common/cmd_nvedit.c
common/main.c
+10
-0
10 additions, 0 deletions
common/main.c
with
16 additions
and
2 deletions
common/cmd_nvedit.c
+
6
−
2
View file @
0587597c
...
@@ -180,9 +180,13 @@ int _do_setenv (int flag, int argc, char *argv[])
...
@@ -180,9 +180,13 @@ int _do_setenv (int flag, int argc, char *argv[])
#ifndef CONFIG_ENV_OVERWRITE
#ifndef CONFIG_ENV_OVERWRITE
/*
/*
* Ethernet Address and serial# can be set only once
* Ethernet Address and serial# can be set only once,
* ver is readonly.
*/
*/
if
(
(
strcmp
(
name
,
"serial#"
)
==
0
)
||
if
(
(
strcmp
(
name
,
"serial#"
)
==
0
)
||
#if defined(CONFIG_VERSION_VARIABLE)
(
strcmp
(
name
,
"ver"
)
==
0
)
||
#endif
/* CONFIG_VERSION_VARIABLE */
((
strcmp
(
name
,
"ethaddr"
)
==
0
)
((
strcmp
(
name
,
"ethaddr"
)
==
0
)
#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
&&
(
strcmp
(
env_get_addr
(
oldval
),
MK_STR
(
CONFIG_ETHADDR
))
!=
0
)
&&
(
strcmp
(
env_get_addr
(
oldval
),
MK_STR
(
CONFIG_ETHADDR
))
!=
0
)
...
...
This diff is collapsed.
Click to expand it.
common/main.c
+
10
−
0
View file @
0587597c
...
@@ -279,6 +279,16 @@ void main_loop (void)
...
@@ -279,6 +279,16 @@ void main_loop (void)
}
}
#endif
/* CONFIG_MODEM_SUPPORT */
#endif
/* CONFIG_MODEM_SUPPORT */
#ifdef CONFIG_VERSION_VARIABLE
{
extern
char
version_string
[];
char
*
str
=
getenv
(
"ver"
);
if
(
!
str
)
setenv
(
"ver"
,
version_string
);
/* set version variable */
}
#endif
/* CONFIG_VERSION_VARIABLE */
#ifdef CFG_HUSH_PARSER
#ifdef CFG_HUSH_PARSER
u_boot_hush_start
();
u_boot_hush_start
();
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment