Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Johannes Rudolph
lede-mikrotik
Commits
5e7833d0
Commit
5e7833d0
authored
18 years ago
by
Florian Fainelli
Browse files
Options
Downloads
Patches
Plain Diff
Add image generation for edimax routers
SVN-Revision: 6627
parent
285c45e7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
target/linux/adm5120-2.6/image/Makefile
+13
-0
13 additions, 0 deletions
target/linux/adm5120-2.6/image/Makefile
tools/firmware-utils/Makefile
+1
-0
1 addition, 0 deletions
tools/firmware-utils/Makefile
tools/firmware-utils/src/mksyshdr.c
+44
-0
44 additions, 0 deletions
tools/firmware-utils/src/mksyshdr.c
with
58 additions
and
0 deletions
target/linux/adm5120-2.6/image/Makefile
+
13
−
0
View file @
5e7833d0
...
@@ -34,8 +34,21 @@ define trxalign/squashfs
...
@@ -34,8 +34,21 @@ define trxalign/squashfs
-a
1024
-a
1024
endef
endef
define
Image/Build/Compex
$(CP)
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).trx
endef
define
Image/Build/Edimax
$(STAGING_DIR)/bin/mksyshdr
csys
$(KDIR)/vmlinux
cat
csys
$(KDIR)/vmlinux
$(KDIR)/root.$(1)
>
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
endef
define
Image/Build
define
Image/Build
$(STAGING_DIR)/bin/trx
-o
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx
-f
$(KDIR)/loader.gz
-f
$(KDIR)/vmlinux.lzma
$(
call
trxalign/
$(
1
))
-f
$(KDIR)/root.$(1)
$(STAGING_DIR)/bin/trx
-o
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx
-f
$(KDIR)/loader.gz
-f
$(KDIR)/vmlinux.lzma
$(
call
trxalign/
$(
1
))
-f
$(KDIR)/root.$(1)
ifneq
($(1),jffs2-128K)
$(
call
Image/Build/Compex,
$(
1
)
,wp54g,
$(
patsubst jffs2-%,jffs2,
$(
1
)))
$(
call
Image/Build/Edimax,
$(
1
)
,br6104,
$(
patsubst jffs2-%,jffs2,
$(
1
)))
endif
endef
endef
$(
eval
$(
call BuildImage
))
$(
eval
$(
call BuildImage
))
This diff is collapsed.
Click to expand it.
tools/firmware-utils/Makefile
+
1
−
0
View file @
5e7833d0
...
@@ -26,6 +26,7 @@ define Build/Compile
...
@@ -26,6 +26,7 @@ define Build/Compile
$(
call
cc,ptgen
)
$(
call
cc,ptgen
)
$(
call
cc,airlink
)
$(
call
cc,airlink
)
$(
call
cc,srec2bin
)
$(
call
cc,srec2bin
)
$(
call
cc,mksyshdr
)
endef
endef
define
Build/Install
define
Build/Install
...
...
This diff is collapsed.
Click to expand it.
tools/firmware-utils/src/mksyshdr.c
0 → 100644
+
44
−
0
View file @
5e7833d0
#include
<stdlib.h>
#include
<stdio.h>
int
main
(
int
argc
,
char
*
argv
[])
{
FILE
*
fp
;
long
nImgSize
;
char
*
pHeader1
=
"CSYS"
;
long
nHeader2
=
0x80500000
;
if
(
argc
!=
3
)
{
printf
(
"Usage: mksyshdr <header file> <image file>
\n
"
);
return
-
1
;
}
fp
=
fopen
(
argv
[
2
],
"rb"
);
if
(
fp
!=
NULL
)
{
fseek
(
fp
,
0
,
SEEK_END
);
nImgSize
=
ftell
(
fp
);
fclose
(
fp
);
fp
=
fopen
(
argv
[
1
],
"wb+"
);
if
(
fp
!=
NULL
)
{
fwrite
(
pHeader1
,
sizeof
(
char
),
4
,
fp
);
fwrite
(
&
nHeader2
,
sizeof
(
long
),
1
,
fp
);
fwrite
(
&
nImgSize
,
sizeof
(
long
),
1
,
fp
);
fclose
(
fp
);
}
else
{
printf
(
"Cannot create %s.
\n
"
,
argv
[
1
]);
return
-
1
;
}
}
else
{
printf
(
"Cannot open %s.
\n
"
,
argv
[
2
]);
return
-
1
;
}
return
0
;
}
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