Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zephyr Firmware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel Firmware
Zephyr Firmware
Commits
49908f27
Commit
49908f27
authored
Jul 16, 2021
by
Raptor Engineering Development Team
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Strip internal LiteX checksum header off of BMC firmware downloads
parent
3f79e73c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
kestrel/src/flash_filesystem.c
kestrel/src/flash_filesystem.c
+8
-6
kestrel/src/flash_filesystem.h
kestrel/src/flash_filesystem.h
+3
-1
kestrel/src/webportal.c
kestrel/src/webportal.c
+3
-1
No files found.
kestrel/src/flash_filesystem.c
View file @
49908f27
...
...
@@ -22,6 +22,8 @@ LOG_MODULE_REGISTER(flash_filesystem, LOG_LEVEL_DBG);
#include "kestrel.h"
#include "flash_filesystem.h"
extern
const
struct
flash_area
*
flash_map
;
extern
const
int
flash_map_entries
;
...
...
@@ -63,7 +65,7 @@ int initialize_flash_filesystem(void)
if
(
rc
<
0
)
{
printk
(
"FAIL: unable to find flash area %u: %d
\n
"
,
id
,
rc
);
return
;
return
-
1
;
}
printk
(
"Area %u at 0x%x on %s for %u bytes
\n
"
,
...
...
@@ -81,10 +83,10 @@ int initialize_flash_filesystem(void)
rc
=
fs_mount
(
mp
);
if
(
rc
<
0
)
{
printk
(
"FAIL: mount id %u at %s: %d
\n
"
,
(
u
nsigned
in
t
)
mp
->
storage_dev
,
mp
->
mnt_point
,
printk
(
"FAIL: mount id %
l
u at %s: %d
\n
"
,
(
u
intptr_
t
)
mp
->
storage_dev
,
mp
->
mnt_point
,
rc
);
return
;
return
-
1
;
}
printk
(
"%s mount: %d
\n
"
,
mp
->
mnt_point
,
rc
);
...
...
@@ -148,7 +150,7 @@ int write_firmware_to_flash(const char* device_name, int partition_number, const
}
}
if
(
!
result
)
{
result
=
flash_area_write
(
flash_area
,
(
add_litex_header
)
?
0x8
:
0x0
,
data
,
length
);
result
=
flash_area_write
(
flash_area
,
(
add_litex_header
)
?
LITEX_HEADER_LENGTH_BYTES
:
0x0
,
data
,
length
);
}
if
(
result
<
0
)
{
LOG_INF
(
"Write failed!"
);
...
...
@@ -156,4 +158,4 @@ int write_firmware_to_flash(const char* device_name, int partition_number, const
}
return
0
;
}
\ No newline at end of file
}
kestrel/src/flash_filesystem.h
View file @
49908f27
...
...
@@ -6,8 +6,10 @@
#ifndef _FLASH_FILESYSTEM_H
#define _FLASH_FILESYSTEM_H
#define LITEX_HEADER_LENGTH_BYTES 0x8
int
initialize_flash_filesystem
(
void
);
int
write_firmware_to_flash
(
const
char
*
device_name
,
int
partition_number
,
const
uint8_t
*
data
,
size_t
length
,
int
add_litex_header
);
#endif // _FLASH_FILESYSTEM_H
\ No newline at end of file
#endif // _FLASH_FILESYSTEM_H
kestrel/src/webportal.c
View file @
49908f27
...
...
@@ -14,6 +14,8 @@ LOG_MODULE_REGISTER(webportal, LOG_LEVEL_DBG);
#include "simple_pwm.h"
#include "sbe_fsi.h"
#include "flash_filesystem.h"
#include "webportal.h"
#include "redfish.h"
...
...
@@ -78,7 +80,7 @@ static int static_file_##name##_handler(struct mg_connection *conn, void *cbdata
uint8_t
*
embedded_file_fpga_firmware_raw_pointer
=
(
uint8_t
*
)((
uintptr_t
)
BMCSPIFLASH_BASE
+
0x0
);
size_t
embedded_file_fpga_firmware_raw_length
=
0x800000
;
uint8_t
*
embedded_file_bmc_firmware_raw_pointer
=
(
uint8_t
*
)((
uintptr_t
)
BMCSPIFLASH_BASE
+
0x800000
);
uint8_t
*
embedded_file_bmc_firmware_raw_pointer
=
(
uint8_t
*
)((
uintptr_t
)
BMCSPIFLASH_BASE
+
0x800000
+
LITEX_HEADER_LENGTH_BYTES
);
size_t
embedded_file_bmc_firmware_raw_length
=
0x400000
;
uint8_t
*
embedded_file_pnor_firmware_raw_pointer
=
(
uint8_t
*
)((
uintptr_t
)
HOSTSPIFLASH_BASE
);
size_t
embedded_file_pnor_firmware_raw_length
=
0x4000000
;
...
...
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