This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Move romboot.S from i386/arch to i386/pc


Hello,

As I mentioned in a previous mail I would like to move the PC romboot
stuff from the i386/arch package to i386/pc in order to support
different boot sequences in other platform HALs. 

The attached patch does this. In addition it changes the
CYGBLD_BUILD_REDBOOT_BIN option to CYGBLD_BUILD_REDBOOT_BIN_FLOPPY for
consistency and enables it only if the startup type is FLOPPY, this is
to avoid the conflicting rules from the two boot methods which both
produce redboot.bin. In addition to applying the patch the files
romboot.S and romboot.ld need to be moved from hal/i386/arch/current/src
to hal/i386/pc/current/src which might involve some CVS surgery or a
remove/add pair or something (I don't know how you guys work this kind
of thing)..

I have tested as far as compiling images for pc floppy and rom, but I
have no easy way to test they will actually boot. However the image
seems to be built in exactly the same way as before my changes, so I
don't expect there to be a problem.

Ian.
-- 
Ian Campbell
Design Engineer

Arcom Control Systems Ltd,
Clifton Road,
Cambridge CB1 7EA
United Kingdom

Tel: +44 (0)1223 411200 ext. 3204
E-Mail: icampbell@arcom.co.uk
Web: http://www.arcomcontrols.com


_____________________________________________________________________
The message in this transmission is sent in confidence for the attention of the addressee only and should not be disclosed to any other party. Unauthorised recipients are requested to preserve this confidentiality. Please advise the sender if the addressee is not resident at the receiving end.

This message has been checked for all viruses by MessageLabs Virus Control Centre. 

Company registered in England No. 1608562.
Registered Office: Unit 8, Clifton Road, Cambridge, CB1 7EA, United Kingdom, Tel: 01223 411200.
In addition to this patch

mv hal/i386/arch/current/src/romboot.* hal/i386/pc/current/src

Index: packages/hal/i386/pc/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/i386/pc/current/ChangeLog,v
retrieving revision 1.13
diff -u -r1.13 ChangeLog
--- packages/hal/i386/pc/current/ChangeLog	2001/10/05 16:22:38	1.13
+++ packages/hal/i386/pc/current/ChangeLog	2001/10/08 14:05:06
@@ -1,3 +1,12 @@
+2001-10-08  Ian Campbell  <icampbell@arcom.co.uk>
+
+	* cdl/hal_i386_pc.cdl: CYGBLD_BUILD_I386_ROMBOOT and
+	CYGBLD_BUILD_REDBOOT_BIN_ROM moved here from hal_i386.cdl in the
+	arch package. Rename CYGBLD_BUILD_REDBOOT_BIN to
+	CYGBLD_BUILD_REDBOOT_BIN_FLOPPY for consistency.
+	* src/romboot.S: Moved from arch package.
+	* src/romboot.ld: Moved from arch package.
+
 2001-10-05  Mark Salter  <msalter@redhat.com>
 
 	* src/plf_stub.c (hal_pc_stubs_init): Install idt entry for GNUPro
Index: packages/hal/i386/arch/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/i386/arch/current/ChangeLog,v
retrieving revision 1.26
diff -u -r1.26 ChangeLog
--- packages/hal/i386/arch/current/ChangeLog	2001/10/05 16:22:37	1.26
+++ packages/hal/i386/arch/current/ChangeLog	2001/10/08 13:58:31
@@ -1,3 +1,10 @@
+2001-10-08  Ian Campbell  <icampbell@arcom.co.uk>
+
+	* cdl/hal_i386.cdl: move CYGBLD_BUILD_I386_ROMBOOT and
+	CYGBLD_BUILD_REDBOOT_BIN_ROM to pc package.
+	* src/romboot.S: Moved to pc package
+	* src/romboot.ld: Moved to pc package
+
 2001-10-05  Mark Salter  <msalter@redhat.com>
 
 	* src/vectors.S: Support separate stub stack.
Index: packages/hal/i386/arch/current/cdl/hal_i386.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/i386/arch/current/cdl/hal_i386.cdl,v
retrieving revision 1.7
diff -u -r1.7 hal_i386.cdl
--- packages/hal/i386/arch/current/cdl/hal_i386.cdl	2001/10/05 16:22:37	1.7
+++ packages/hal/i386/arch/current/cdl/hal_i386.cdl	2001/10/08 13:51:06
@@ -70,46 +70,6 @@
         @tail +2 target.tmp >> $(notdir $@).deps
         @echo >> $(notdir $@).deps
         @rm target.tmp
-    }
-
-        
-    cdl_option CYGBLD_BUILD_I386_ROMBOOT {
-	display       "Build ROM bootstrap code"
-	calculated    { CYG_HAL_STARTUP == "ROM" }
-
-	make {
-	    <PREFIX>/lib/romboot.ld: <PACKAGE>/src/romboot.ld
-	    cp $< $@
-	}
-	
-	make {
-	    <PREFIX>/bin/romboot.elf : <PACKAGE>/src/romboot.S
-	    @sh -c "mkdir -p $(dir $@)"
-	    $(CC) -Wp,-MD,romboot.tmp $(INCLUDE_PATH) -nostdlib -Wl,-static -T$(PREFIX)/lib/romboot.ld -o $@ $<
-	    @echo $@ ": \\" > $(notdir $@).deps
-	    @tail +2 romboot.tmp >> $(notdir $@).deps
-	    @echo >> $(notdir $@).deps
-	    @rm romboot.tmp
-	}
-    }
-
-    cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROM {
-	display       "Build Redboot ROM binary image"
-	active_if     CYGBLD_BUILD_REDBOOT
-	active_if     { CYG_HAL_STARTUP == "ROM" }
-	default_value { CYG_HAL_STARTUP == "ROM" }
-	no_define
-	description "This option enables the conversion of the Redboot ELF
-	image to a binary image suitable for ROM programming."
-    
-	make -priority 325 {
-	    <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
-	    $(OBJCOPY) -O binary $< $(@:.bin=.img)
-	    $(OBJCOPY) -O binary $(PREFIX)/bin/romboot.elf $(PREFIX)/bin/romboot.img
-	    dd if=/dev/zero of=$@ bs=1024 count=64 conv=sync
-	    dd if=$(@:.bin=.img) of=$@ bs=512 conv=notrunc,sync
-	    dd if=$(PREFIX)/bin/romboot.img of=$@ bs=256 count=1 seek=255 conv=notrunc
-	}
     }
     
     cdl_component CYGHWR_HAL_I386_FPU {
Index: packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl,v
retrieving revision 1.5
diff -u -r1.5 hal_i386_pc.cdl
--- packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl	2001/10/02 18:28:27	1.5
+++ packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl	2001/10/08 14:01:10
@@ -83,6 +83,26 @@
             straight to a boot ROM/Flash). ROM startup is experimental
             at this time."
     }
+        
+    cdl_option CYGBLD_BUILD_I386_ROMBOOT {
+	display       "Build ROM bootstrap code"
+	calculated    { CYG_HAL_STARTUP == "ROM" }
+
+	make {
+	    <PREFIX>/lib/romboot.ld: <PACKAGE>/src/romboot.ld
+	    cp $< $@
+	}
+	
+	make {
+	    <PREFIX>/bin/romboot.elf : <PACKAGE>/src/romboot.S
+	    @sh -c "mkdir -p $(dir $@)"
+	    $(CC) -Wp,-MD,romboot.tmp $(INCLUDE_PATH) -nostdlib -Wl,-static -T$(PREFIX)/lib/romboot.ld -o $@ $<
+	    @echo $@ ": \\" > $(notdir $@).deps
+	    @tail +2 romboot.tmp >> $(notdir $@).deps
+	    @echo >> $(notdir $@).deps
+	    @rm romboot.tmp
+	}
+    }
 
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
         display       "Diagnostic serial port baud rate"
@@ -300,10 +320,11 @@
             This option lists the target's requirements for a valid Redboot
             configuration."
     
-        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
+        cdl_option CYGBLD_BUILD_REDBOOT_BIN_FLOPPY {
             display       "Build Redboot ROM binary image"
             active_if     CYGBLD_BUILD_REDBOOT
-            default_value 1
+	    active_if     { CYG_HAL_STARTUP == "FLOPPY" }
+            default_value { CYG_HAL_STARTUP == "FLOPPY" }
             no_define
             description "This option enables the conversion of the Redboot ELF
                          image to a binary image suitable for copying to a floppy
@@ -316,6 +337,27 @@
                 $(OBJCOPY) -O binary $< $@
             }
         }
+
+	cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROM {
+	    display       "Build Redboot ROM binary image"
+	    active_if     CYGBLD_BUILD_REDBOOT
+	    active_if     { CYG_HAL_STARTUP == "ROM" }
+	    default_value { CYG_HAL_STARTUP == "ROM" }
+	    no_define
+	    description "This option enables the conversion of the Redboot ELF
+	    image to a binary image suitable for ROM programming."
+	    
+	    make -priority 325 {
+		<PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
+		$(OBJCOPY) -O binary $< $(@:.bin=.img)
+		$(OBJCOPY) -O binary $(PREFIX)/bin/romboot.elf $(PREFIX)/bin/romboot.img
+		dd if=/dev/zero of=$@ bs=1024 count=64 conv=sync
+		dd if=$(@:.bin=.img) of=$@ bs=512 conv=notrunc,sync
+		dd if=$(PREFIX)/bin/romboot.img of=$@ bs=256 count=1 seek=255 conv=notrunc
+	    }
+	}
+	
     }
      
 }
+

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]