Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
31b9ce8e
Commit
31b9ce8e
authored
Oct 18, 2012
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flash-wrs: add magic string to identify flashin procedure
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
1727ecbc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
flash-wrs
build/flash-wrs
+11
-6
No files found.
build/flash-wrs
View file @
31b9ce8e
...
...
@@ -233,6 +233,14 @@ if [ $nf ]; then
TMPCPIO
=
$(
mktemp
/tmp/wrsflash-cpio.XXXXXX.cpio.gz
)
TMPSCRIPT
=
$(
mktemp
/tmp/wrsrootfs-script.XXXXXX
)
# The TMPCPIO is used for the NAND flashing procedure. It
# contains the magic string "paperino" (0x61706570 0x69726f6e)
# in the first 8bytes and in the following byte the whole
# file system. Barebox use this magic string to identify
# the flashing procedure.
echo
-n
"paperino"
>
$TMPCPIO
cat
>
$TMPSCRIPT
<<
EOF
cd
$TMPFS
zcat
$rootfscpio
| cpio --extract
...
...
@@ -250,18 +258,15 @@ cp ${rootfs} $TMPFS/flashing/wrs-image.jffs2.img
cp
${
kernel
}
$TMPFS
/flashing/zImage
cp
${
WRS_BASE_DIR
}
/usb-loader/S99flash-from-kernel.sh
$TMPFS
/etc/init.d/
cd ..
(cd "
$TMPFS
" && find . | cpio -o -H newc | gzip) >
$TMPCPIO
(cd "
$TMPFS
" && find . | cpio -o -H newc | gzip) >
>
$TMPCPIO
EOF
fakeroot bash
$TMPSCRIPT
TMPSTRFILE
=
$(
mktemp
/tmp/natale.XXXXXX
)
echo
-e
"
\x
BA
\x
BB
\x
00
\x
BA
\x
BB
\x
00"
>
$TMPSTRFILE
${
WRS_BASE_DIR
}
/usb-loader/mch_flasher
-m
ddr
$FLAGS
$DEV
${
Tbarebox
}
0x0
${
kernel
}
0x1000000
${
TMPCPIO
}
0x2000000
${
WRS_BASE_DIR
}
/usb-loader/mch_flasher
-m
ddr
$FLAGS
$DEV
${
Tbarebox
}
0x0
${
kernel
}
0x1000000
${
TMPCPIO
}
0x1FFFFF8
rm
-rf
$TMPFS
rm
-rf
$TMPCPIO
rm
-rf
$TMPSCRIPT
rm
-rf
$TMPSTRFILE
fi
## Loading in DDR
...
...
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