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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
98a9c4d4
Commit
98a9c4d4
authored
18 years ago
by
Matthew McClintock
Browse files
Options
Downloads
Patches
Plain Diff
* Modify bootm command to support booting with flat device trees
Patch by Matthew McClintock 26-June-2006
parent
f73e73ba
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
README
+54
-0
54 additions, 0 deletions
README
common/cmd_bootm.c
+26
-14
26 additions, 14 deletions
common/cmd_bootm.c
with
80 additions
and
14 deletions
README
+
54
−
0
View file @
98a9c4d4
...
@@ -447,6 +447,11 @@ The following options need to be configured:
...
@@ -447,6 +447,11 @@ The following options need to be configured:
Board code has addition modification that it wants to make
Board code has addition modification that it wants to make
to the flat device tree before handing it off to the kernel
to the flat device tree before handing it off to the kernel
CONFIG_OF_BOOT_CPU
This define fills in the correct boot cpu in the boot
param header, the default value is zero if undefined.
- Serial Ports:
- Serial Ports:
CFG_PL010_SERIAL
CFG_PL010_SERIAL
...
@@ -3013,6 +3018,55 @@ format!) to the "bootm" command:
...
@@ -3013,6 +3018,55 @@ format!) to the "bootm" command:
bash#
bash#
Boot Linux and pass a flat device tree:
-----------
First, U-Boot must be compiled with the appropriate defines. See the section
titled "Linux Kernel Interface" above for a more in depth explanation. The
following is an example of how to start a kernel and pass an updated
flat device tree:
=> print oftaddr
oftaddr=0x300000
=> print oft
oft=oftrees/mpc8540ads.dtb
=> tftp $oftaddr $oft
Speed: 1000, full duplex
Using TSEC0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.101
Filename 'oftrees/mpc8540ads.dtb'.
Load address: 0x300000
Loading: #
done
Bytes transferred = 4106 (100a hex)
=> tftp $loadaddr $bootfile
Speed: 1000, full duplex
Using TSEC0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'uImage'.
Load address: 0x200000
Loading:############
done
Bytes transferred = 1029407 (fb51f hex)
=> print loadaddr
loadaddr=200000
=> print oftaddr
oftaddr=0x300000
=> bootm $loadaddr - $oftaddr
## Booting image at 00200000 ...
Image Name: Linux-2.6.17-dirty
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1029343 Bytes = 1005.2 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using flat device tree at 0x300000
Using MPC85xx ADS machine description
Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
[snip]
More About U-Boot Image Types:
More About U-Boot Image Types:
------------------------------
------------------------------
...
...
This diff is collapsed.
Click to expand it.
common/cmd_bootm.c
+
26
−
14
View file @
98a9c4d4
...
@@ -465,6 +465,13 @@ U_BOOT_CMD(
...
@@ -465,6 +465,13 @@ U_BOOT_CMD(
"[addr [arg ...]]
\n
- boot application image stored in memory
\n
"
"[addr [arg ...]]
\n
- boot application image stored in memory
\n
"
"
\t
passing arguments 'arg ...'; when booting a Linux kernel,
\n
"
"
\t
passing arguments 'arg ...'; when booting a Linux kernel,
\n
"
"
\t
'arg' can be the address of an initrd image
\n
"
"
\t
'arg' can be the address of an initrd image
\n
"
#ifdef CONFIG_OF_FLAT_TREE
"
\t
When booting a Linux kernel which requires a flat device-tree
\n
"
"
\t
a third argument is required which is the address of the of the
\n
"
"
\t
device-tree blob. To boot that kernel without an initrd image,
\n
"
"
\t
use a '-' for the second argument. If you do not pass a third
\n
"
"
\t
a bd_info struct will be passed instead
\n
"
#endif
);
);
#ifdef CONFIG_SILENT_CONSOLE
#ifdef CONFIG_SILENT_CONSOLE
...
@@ -500,11 +507,6 @@ fixup_silent_linux ()
...
@@ -500,11 +507,6 @@ fixup_silent_linux ()
}
}
#endif
/* CONFIG_SILENT_CONSOLE */
#endif
/* CONFIG_SILENT_CONSOLE */
#ifdef CONFIG_OF_FLAT_TREE
extern
const
unsigned
char
oftree_dtb
[];
extern
const
unsigned
int
oftree_dtb_len
;
#endif
#ifdef CONFIG_PPC
#ifdef CONFIG_PPC
static
void
static
void
do_bootm_linux
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
do_bootm_linux
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
...
@@ -616,7 +618,17 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
...
@@ -616,7 +618,17 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
/*
/*
* Check if there is an initrd image
* Check if there is an initrd image
*/
*/
#ifdef CONFIG_OF_FLAT_TREE
/* Look for a '-' which indicates to ignore the ramdisk argument */
if
(
argc
>=
3
&&
strcmp
(
argv
[
2
],
"-"
)
==
0
)
{
debug
(
"Skipping initrd
\n
"
);
data
=
0
;
}
else
#endif
if
(
argc
>=
3
)
{
if
(
argc
>=
3
)
{
debug
(
"Not skipping initrd
\n
"
);
SHOW_BOOT_PROGRESS
(
9
);
SHOW_BOOT_PROGRESS
(
9
);
addr
=
simple_strtoul
(
argv
[
2
],
NULL
,
16
);
addr
=
simple_strtoul
(
argv
[
2
],
NULL
,
16
);
...
@@ -724,6 +736,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
...
@@ -724,6 +736,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
len
=
data
=
0
;
len
=
data
=
0
;
}
}
#ifdef CONFIG_OF_FLAT_TREE
if
(
argc
>=
3
)
{
of_flat_tree
=
(
char
*
)
simple_strtoul
(
argv
[
3
],
NULL
,
16
);
printf
(
"Booting using flat device tree at 0x%x
\n
"
,
of_flat_tree
);
}
#endif
if
(
!
data
)
{
if
(
!
data
)
{
debug
(
"No initrd
\n
"
);
debug
(
"No initrd
\n
"
);
}
}
...
@@ -793,15 +814,6 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
...
@@ -793,15 +814,6 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
initrd_end
=
0
;
initrd_end
=
0
;
}
}
#ifdef CONFIG_OF_FLAT_TREE
if
(
initrd_start
==
0
)
of_flat_tree
=
(
char
*
)(((
ulong
)
kbd
-
OF_FLAT_TREE_MAX_SIZE
-
sizeof
(
bd_t
))
&
~
0xF
);
else
of_flat_tree
=
(
char
*
)((
initrd_start
-
OF_FLAT_TREE_MAX_SIZE
-
sizeof
(
bd_t
))
&
~
0xF
);
#endif
debug
(
"## Transferring control to Linux (at address %08lx) ...
\n
"
,
debug
(
"## Transferring control to Linux (at address %08lx) ...
\n
"
,
(
ulong
)
kernel
);
(
ulong
)
kernel
);
...
...
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