r2073 - trunk/src/host/qemu-neo1973/openmoko

andrew at sita.openmoko.org andrew at sita.openmoko.org
Wed May 23 22:38:01 CEST 2007


Author: andrew
Date: 2007-05-23 22:38:00 +0200 (Wed, 23 May 2007)
New Revision: 2073

Modified:
   trunk/src/host/qemu-neo1973/openmoko/Makefile
   trunk/src/host/qemu-neo1973/openmoko/env
   trunk/src/host/qemu-neo1973/openmoko/flash.sh
Log:
Use an overlay flash image by default.


Modified: trunk/src/host/qemu-neo1973/openmoko/Makefile
===================================================================
--- trunk/src/host/qemu-neo1973/openmoko/Makefile	2007-05-23 20:22:01 UTC (rev 2072)
+++ trunk/src/host/qemu-neo1973/openmoko/Makefile	2007-05-23 20:38:00 UTC (rev 2073)
@@ -20,7 +20,8 @@
 #
 SPLASH=splashimg.pl
 SPLASHIMG=System_boot.png
-FLASHIMG=openmoko-flash.image
+FLASHIMG=openmoko-flash.base
+FLASHOVERLAY=openmoko-flash.image
 SHELL=bash
 
 splash.gz: splash
@@ -57,5 +58,9 @@
 	cat .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec > $@
 	rm -rf .8b .16b .512b .sec .8sec .64sec .512sec .2ksec .16ksec
 
+$(FLASHOVERLAY): $(FLASHIMG)
+	../qemu-img create -b $^ -f qcow2 $@
+
 clean:
-	rm -rf $(SPLASH) $(SPLASHIMG) $(FLASHIMG) splash splash.gz
+	rm -rf $(SPLASH) $(SPLASHIMG) $(FLASHIMG) $(FLASHOVERLAY) \
+		splash splash.gz

Modified: trunk/src/host/qemu-neo1973/openmoko/env
===================================================================
--- trunk/src/host/qemu-neo1973/openmoko/env	2007-05-23 20:22:01 UTC (rev 2072)
+++ trunk/src/host/qemu-neo1973/openmoko/env	2007-05-23 20:38:00 UTC (rev 2073)
@@ -6,6 +6,7 @@
 uboot_symlink="$src_dir/u-boot.bin"
 qemu_relative="arm-softmmu/qemu-system-arm -M neo -m 130"
 qemu="$src_dir/$qemu_relative"
+flash_base=openmoko-flash.base
 flash_image=openmoko-flash.image
 make=make
 which gmake && make=gmake

Modified: trunk/src/host/qemu-neo1973/openmoko/flash.sh
===================================================================
--- trunk/src/host/qemu-neo1973/openmoko/flash.sh	2007-05-23 20:22:01 UTC (rev 2072)
+++ trunk/src/host/qemu-neo1973/openmoko/flash.sh	2007-05-23 20:38:00 UTC (rev 2073)
@@ -65,8 +65,8 @@
 rm -rf $uboot_symlink
 ln -s $script_dir_relative/$uboot_image $uboot_symlink
 
-rm -rf $flash_image
-${make} $flash_image || exit -1
+rm -rf $flash_base
+${make} $flash_base || exit -1
 
 # Launch the emulator assuming that u-boot is now functional enough
 # for us to be able to issue u-boot commands.
@@ -74,7 +74,7 @@
 # We should parse the u-boot output for command prompt lines and only
 # issue commands when u-boot is awaiting them.
 emu () {
-	$qemu -mtdblock "$script_dir/$flash_image" -kernel "$script_dir/$1" \
+	$qemu -mtdblock "$script_dir/$flash_base" -kernel "$script_dir/$1" \
 		-serial stdio -nographic -usb -monitor null <&0 & pid=$!
 }
 uboot () {
@@ -127,6 +127,10 @@
 rm -rf openmoko-kernel.bin
 ln -s $kernel_image openmoko-kernel.bin
 
+# Make the flash image accessible under a fixed name
+rm -rf $flash_image
+${make} $flash_image || exit -1
+
 echo
 echo "    "All done.
 echo





More information about the commitlog mailing list