Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
uboot-imx
Commits
fd4bb67b
Commit
fd4bb67b
authored
Sep 25, 2005
by
Wolfgang Denk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tools/bmp_logo.c using incorrect offset to pixel data
Patch by Andrew Dyer, 31 Jan 2005
parent
fe7eb5d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
CHANGELOG
CHANGELOG
+3
-0
tools/bmp_logo.c
tools/bmp_logo.c
+8
-2
No files found.
CHANGELOG
View file @
fd4bb67b
...
...
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.4:
======================================================================
* Fix tools/bmp_logo.c using incorrect offset to pixel data
Patch by Andrew Dyer, 31 Jan 2005
* Add ARM946E cpu and core module targets; remap memory to 0x00000000
Patch by Peter Pearse, 2 Feb 2005
...
...
tools/bmp_logo.c
View file @
fd4bb67b
...
...
@@ -46,7 +46,7 @@ int main (int argc, char *argv[])
FILE
*
fp
;
bitmap_t
bmp
;
bitmap_t
*
b
=
&
bmp
;
uint16_t
n_colors
;
uint16_t
data_offset
,
n_colors
;
if
(
argc
<
2
)
{
fprintf
(
stderr
,
"Usage: %s file
\n
"
,
argv
[
0
]);
...
...
@@ -67,7 +67,9 @@ int main (int argc, char *argv[])
* read width and height of the image, and the number of colors used;
* ignore the rest
*/
skip_bytes
(
fp
,
16
);
skip_bytes
(
fp
,
8
);
fread
(
&
data_offset
,
sizeof
(
uint16_t
),
1
,
fp
);
skip_bytes
(
fp
,
6
);
fread
(
&
b
->
width
,
sizeof
(
uint16_t
),
1
,
fp
);
skip_bytes
(
fp
,
2
);
fread
(
&
b
->
height
,
sizeof
(
uint16_t
),
1
,
fp
);
...
...
@@ -78,6 +80,7 @@ int main (int argc, char *argv[])
/*
* Repair endianess.
*/
data_offset
=
le_short
(
data_offset
);
b
->
width
=
le_short
(
b
->
width
);
b
->
height
=
le_short
(
b
->
height
);
n_colors
=
le_short
(
n_colors
);
...
...
@@ -129,6 +132,9 @@ int main (int argc, char *argv[])
);
}
/* seek to offset indicated by file header */
fseek
(
fp
,
(
long
)
data_offset
,
SEEK_SET
);
/* read the bitmap; leave room for default color map */
printf
(
"
\n
"
);
printf
(
"};
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment