Changeset 1977
- Timestamp:
- 05/16/07 21:47:42 (6 years ago)
- Location:
- trunk/src/host/qemu-neo1973
- Files:
-
- 2 edited
-
openmoko/flash.sh (modified) (3 diffs)
-
vl.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/host/qemu-neo1973/openmoko/flash.sh
r1948 r1977 72 72 # for us to be able to issue u-boot commands. 73 73 # This is also an example of how you *shouldn't* write scripts. 74 # We should parse the u-boot output for command prompt lines and only 75 # issue commands when u-boot is awaiting them. 74 76 emu () { 75 77 $qemu -mtdblock "$script_dir/$flash_image" -kernel "$script_dir/$1" \ … … 78 80 uboot () { 79 81 cd $src_dir 80 emu $1 <<< "$3" 82 emu $1 <<< " 83 $3 84 neo1973 power-off 85 " 81 86 echo Please wait, programming the NAND flash... 82 sleep $2 83 kill $pid # Ugly, use the qemu monitor instead 84 sleep 1 85 kill -9 $pid 86 sleep 1 87 (sleep $2; kill $pid; sleep 1; kill -KILL $pid)& timer=$! 88 if ! wait $pid; then 89 kill $timer 90 echo 91 echo U-boot failed to finish writing in $2 seconds, giving up. 92 echo 93 exit -1 94 fi 95 kill $timer 87 96 cd $script_dir 88 97 } 89 98 90 99 # Set up BBT, u-boot environment, boot menu and program u-boot binary. 91 uboot $uboot_image 40 "100 uboot $uboot_image 300 " 92 101 setenv dontask y 93 102 nand createbbt … … 104 113 105 114 # Program bootsplash. 106 uboot splash.gz 10 "115 uboot splash.gz 60 " 107 116 nand write.e $kernel_addr splash $splash_size" 108 117 109 118 # Program the kernel binary. 110 uboot $kernel_image 10 "119 uboot $kernel_image 60 " 111 120 nand write.e $kernel_addr kernel $kernel_size" 112 121 113 122 # Program the root filesystem. 114 uboot $rootfs_image 20 "123 uboot $rootfs_image 120 " 115 124 nand write.jffs2 $kernel_addr rootfs $rootfs_size" 116 125 -
trunk/src/host/qemu-neo1973/vl.c
r1948 r1977 4310 4310 USBPort *port; 4311 4311 4312 if (strstart(devname, "gadget", &p)) { 4313 dev = usb_gadget; 4314 port = host_usb_ports; 4315 if (!dev || !port) 4316 return -1; 4317 if (p[0] == ':') 4318 usb_gadget_config_set(port, strtoul(&p[1], NULL, 0)); 4319 else if (p[0] != 0) 4320 return -1; 4321 goto attach; 4322 } 4323 4312 4324 if (!free_usb_ports) 4313 4325 return -1; … … 4326 4338 return -1; 4327 4339 dev = usb_net_init(&nd_table[nr]); 4328 } else if (strstart(devname, "gadget", &p)) {4329 dev = usb_gadget;4330 port = host_usb_ports;4331 if (!dev || !port)4332 return -1;4333 if (p[0] == ':')4334 usb_gadget_config_set(port, strtoul(&p[1], NULL, 0));4335 else if (p[0] != 0)4336 return -1;4337 goto attach;4338 4340 } else { 4339 4341 return -1;
Note: See TracChangeset
for help on using the changeset viewer.
