Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
05cdc60e
Commit
05cdc60e
authored
May 21, 2013
by
Henrik Nordstrom
Browse files
usb-boot: Rework ram boot to use a boot.scr @0x41000000 to indicate RAM boot
parent
bacc658e
Changes
3
Show whitespace changes
Inline
Side-by-side
bin/ramboot.scr
0 → 100644
View file @
05cdc60e
File added
felboot/ramboot.cmd
0 → 100644
View file @
05cdc60e
#
U
-boot
RAM
boot
script
ramdisk
=
if
iminfo
0x4c000000
;
then
ramdisk
=
0x4c000000
fi
setenv
bootargs
console
=
ttyS0
,
115200
rdinit
=
/sbin/init
panic
=
10
bootm
0x44000000
$ramdisk
usb-boot
View file @
05cdc60e
#!/bin/sh -e
#!/bin/sh -e
top
=
`
dirname
$0
`
if
[
$#
-lt
2
]
;
then
if
[
$#
-lt
2
]
;
then
echo
"Usage:
$0
board u-boot.bin [kernel script.bin [initramfs]]"
echo
"Usage:
$0
board u-boot.bin
[boot.scr|-]
[kernel script.bin [initramfs]]"
exit
1
exit
1
fi
fi
board
=
$1
board
=
$1
;
shift
uboot
=
$2
uboot
=
$1
;
shift
kernel
=
$3
bootscr
=
$tob
/felboot/ramboot.scr
scriptbin
=
$4
if
[
!
-f
$bootscr
]
;
then
initramfs
=
$5
bootscr
=
$top
/bin/ramboot.scr
fi
case
"
$1
"
in
*
.scr
)
bootscr
=
"
$1
"
;
shift
;;
esac
kernel
=
$1
;
shift
scriptbin
=
$1
;
shift
initramfs
=
$1
;
shift
fel
()
{
fel
()
{
echo
fel
"
$@
"
echo
fel
"
$@
"
.
/fel
$@
$top
/fel
$@
}
}
felboot
=
felboot/fel-boot-
${
board
}
.bin
felboot
=
$top
/
felboot/fel-boot-
${
board
}
.bin
if
[
!
-f
$felboot
]
;
then
if
[
!
-f
$felboot
]
;
then
felboot
=
bin/fel-boot-
${
board
}
.bin
felboot
=
$top
/
bin/fel-boot-
${
board
}
.bin
fi
fi
if
[
!
-f
$felboot
]
;
then
if
[
!
-f
$felboot
]
;
then
echo
"ERROR: Can't find fel-boot binary for
${
board
}
"
echo
"ERROR: Can't find fel-boot binary for
${
board
}
"
exit
1
exit
1
fi
fi
if
[
!
-f
$bootscr
]
;
then
echo
"ERROR: Can't fint boot script '
${
bootscr
}
'"
exit
1
fi
fel write 0x2000
$felboot
fel write 0x2000
$felboot
fel exe 0x2000
fel exe 0x2000
if
[
-n
"
$uboot
"
]
;
then
if
[
-n
"
$uboot
"
]
;
then
fel write 0x4a000000
$uboot
fel write 0x4a000000
$uboot
fi
fi
if
[
-n
"
$bootscr
"
]
;
then
fel write 0x41000000
$bootscr
fi
if
[
-n
"
$kernel
"
]
;
then
if
[
-n
"
$kernel
"
]
;
then
if
[
-n
"
$scriptbin
"
]
;
then
if
[
-n
"
$scriptbin
"
]
;
then
fel write 0x43000000
$scriptbin
fel write 0x43000000
$scriptbin
...
...
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