Add support for rootfs in fpgactl
This commit is contained in:
parent
a4cda932d2
commit
66e3c36f77
11
fpga/fpgactl
11
fpga/fpgactl
@ -264,14 +264,16 @@ function load_bitstream() # {{{
|
|||||||
|
|
||||||
bitstream=
|
bitstream=
|
||||||
bootloader=
|
bootloader=
|
||||||
kernelfile=
|
kernel=
|
||||||
reloadfs=
|
initrd=
|
||||||
|
rootfs=
|
||||||
resetcpu=
|
resetcpu=
|
||||||
verbose=
|
verbose=
|
||||||
|
|
||||||
bootloader_addr=0x80000000
|
bootloader_addr=0x80000000
|
||||||
kernel_addr=0x84000000
|
kernel_addr=0x84000000
|
||||||
initrd_addr=0x8c300000
|
initrd_addr=0x8c300000
|
||||||
|
rootfs_addr=0x180000000
|
||||||
|
|
||||||
function usage()
|
function usage()
|
||||||
{
|
{
|
||||||
@ -286,18 +288,20 @@ function usage()
|
|||||||
echo " -b bootloader Load the bootloader file in $bootloader_addr" >&2
|
echo " -b bootloader Load the bootloader file in $bootloader_addr" >&2
|
||||||
echo " -k kernel Load the kernel file in $kernel_addr" >&2
|
echo " -k kernel Load the kernel file in $kernel_addr" >&2
|
||||||
echo " -i initrd Load the initrd file in $initrd_addr" >&2
|
echo " -i initrd Load the initrd file in $initrd_addr" >&2
|
||||||
|
echo " -r rootfs Load the rootfs file in $rootfs_addr" >&2
|
||||||
echo " -v Be verbose" >&2
|
echo " -v Be verbose" >&2
|
||||||
echo "" >&2
|
echo "" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts "hvw:b:k:i:" opt; do
|
while getopts "hvw:b:k:i:r:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
v) verbose=1 ;;
|
v) verbose=1 ;;
|
||||||
w) bitstream="${OPTARG}" ;;
|
w) bitstream="${OPTARG}" ;;
|
||||||
b) bootloader="${OPTARG}"; resetcpu=1 ;;
|
b) bootloader="${OPTARG}"; resetcpu=1 ;;
|
||||||
k) kernel="${OPTARG}"; resetcpu=1 ;;
|
k) kernel="${OPTARG}"; resetcpu=1 ;;
|
||||||
i) initrd="${OPTARG}"; resetcpu=1 ;;
|
i) initrd="${OPTARG}"; resetcpu=1 ;;
|
||||||
|
r) rootfs="${OPTARG}"; resetcpu=1 ;;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
@ -312,6 +316,7 @@ test "$resetcpu" && do_system_reset
|
|||||||
test "$bootloader" && load_file_in_memory "$bootloader" $bootloader_addr
|
test "$bootloader" && load_file_in_memory "$bootloader" $bootloader_addr
|
||||||
test "$kernel" && load_file_in_memory "$kernel" $kernel_addr
|
test "$kernel" && load_file_in_memory "$kernel" $kernel_addr
|
||||||
test "$initrd" && load_file_in_memory "$initrd" $initrd_addr
|
test "$initrd" && load_file_in_memory "$initrd" $initrd_addr
|
||||||
|
test "$rootfs" && load_file_in_memory "$rootfs" $rootfs_addr
|
||||||
test "$resetcpu" && do_system_release
|
test "$resetcpu" && do_system_release
|
||||||
|
|
||||||
# vim:ts=2:sw=2:ai:foldmethod=marker:foldlevel=0:
|
# vim:ts=2:sw=2:ai:foldmethod=marker:foldlevel=0:
|
||||||
|
Loading…
Reference in New Issue
Block a user