NanoPayload

boot_usb

198:9ade98c7b6af
2016-05-14 Paul Boddie Added copyright and licensing documentation.
     1 #!/bin/sh     2      3 # To use the installed stage1 payload...     4      5 if [ "$1" = '--default1' ]; then     6 	if xbboot -u 0x81c00000 stage2/stage2.bin ; then     7 		exit 0     8 	else     9 		exit 1    10 	fi    11     12 # To use usbboot, which is less elegant but sometimes more reliable...    13     14 elif [ "$1" = '--usbboot' ]; then    15 	if usbboot -c 'boot' -1 stage1/stage1.bin -2 stage2/stage2.bin ; then    16 		exit 0    17 	else    18 		exit 1    19 	fi    20 fi    21     22 # Otherwise, use the generated payloads with xbboot.    23     24 xbboot set_addr 0x80002000    25 xbboot bulk_write stage1/stage1.bin    26 xbboot start1 0x80002000    27 xbboot get_info    28 xbboot set_addr 0x81c00000    29 xbboot bulk_write stage2/stage2.bin    30 xbboot flush_cache    31 xbboot start2 0x81c00000