Mystery Solved - Boot CEPC from Hard Disk
From: BryanEverly (BryanEverly_at_discussions.microsoft.com)
Date: 02/11/05
- Next message: Nicklas: "Loadcepc - Image doesn't fit"
- Previous message: Dean Ramsier: "Re: 16bpp with Windows CE 5.0"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Feb 2005 07:05:03 -0800
At least for me... <grin>
OK,
I have finally thrashed around enough that I understand what I was doing
wrong in combination with what the BLDR (BiosLoader boot loader bootloader)
code was doing. I had to get my brain back to where it was in 1992 when I
was coding 386 assembly code and writing my own DOS filesystem but I managed
to get there.
Here it is in a nutshell:
1. Reduce the size of the READ_BUFFER_LENGTH_MAX define in fat.h in the
\WINCE500\PUBLIC\COMMON\OAK\CSP\X86\BIOSLOADER\LOADER directory
2. Rebuild the bootloader by running "build -c" from the
\WINCE500\PUBLIC\COMMON\OAK\CSP\X86\BIOSLOADER\LOADER directory.
3. Make sure your hard disk's primary partition is less than 536,788,992
bytes in size (for those of you like me who have problems counting commas,
that is 512 MEGA bytes, i.e. half a gig in size)
The reason for this is that as you increase the size of your partition (why
didn't I remember this earlier!) the cluster size in FAT16 goes up. The
READ_BUFFER_LENGTH_MAX value defines the size of the read buffer used to pull
in a cluster from the hard drive. With my setup which had the maximum size
partiiton DOS would let me create (i.e. answer "Y" to that question that
FDISK asks you about making it as big as you can and marking it as the active
partition), I was ending up with a 32,768 byte cluster size which is bigger
than the 0x3000 (or 12,288 byte) buffer allocated by the #define in the fat.h
file.
Ha! I'm not as dumb as I thought I was (that's good, otherwise I might not
have a heartbeat <grin>). To recap, here is what you need to do, step by
step to go from an assembled VIA EPIA ME6000 motherboard with a floppy, hard
drive, and Ethernet connection to a self-booting Windows CE 5.0 image:
1. Download and install the BSP for this board from the VIAArena website
(http://www.viaarena.com/default.aspx?PageID=2&Type=2)
2. Download and install the IDE and floppy drivers from the same site.
3. Create a new platform in Platform builder. Use the BSP you installed in
#1.
4. Drag over from the catalog the VIA ATAPI PCI/IDE Storage Block Driver,
the VIA FloppyDisk driver, the PowerSaver driver, the CD/UDFS File System,
the FAT File System, and the Storage Manager Control Panel Applet.
5. Build your OS image
6. Create the BootDisk.144 and SetupDisk.144 disk images.
7. Reduce the size of the READ_BUFFER_LENGTH_MAX define in fat.h in the
\WINCE500\PUBLIC\COMMON\OAK\CSP\X86\BIOSLOADER\LOADER directory
8. Rebuild the bootloader by running "build -c" from the
\WINCE500\PUBLIC\COMMON\OAK\CSP\X86\BIOSLOADER\LOADER directory.
9. Replace the BLDR file on the SetupDisk.144 with the one that now lives
in the \WINCE500\PUBLIC\COMMON\OAK\CSP\X86\BIOSLOADER\LOADER directory.
10. Put the EBOOT.BIN file from the ZIP file you downloaded in #1 above on
both disks and modify their BOOT.INI files to use it instead of the EBOOT.bix
file that is present on the disks.
11. Boot the device (BTW, the "Del" key is the key that gets you to the
BIOS configuration screen on these boards) from the SetupDisk.144 floppy.
12. Use FDISK to create a partition WITH NO VOLUME LABEL that is smaller
that 512 MB in size (i used 499 just to be safe). In other words, do not say
"Y" to the question "Do you want DOS to make this partition as big as
possible and mark it as active?"
13. Still in FDISK, mark the partition you created in #9 as active.
14. Reboot from the SetupDisk.144 floppy
15. Format the C: partition you crated in #9 above using NO VOLUME LABEL.
16. Run mkdisk c: from the floppy to put the boot loader on the hard drive.
>From here you can either copy your NK.bin file directly to the hard disk (I
did that by booting a DOS floppy with CDROM drivers and copying the NK.bin
file from a CD I burned from my development workstation - regardless, you
must put a BOOT.INI file on the hard disk as indicated in step 20 below) or
you can get fancy using CE itself:
17. Boot from the BootDisk.144 floppy and attach the device in
PlatformBuilder over Ethernet
18. From the device (which should now boot up to a UI shell depending on
your build choices - I used Internet Appliance as my starting point) navigate
to the \Release folder, change the folder options to display file extensions,
select the NK.bin file and select "Copy" from the "Edit" menu.
19. Go to your "Hard Disk" device and select "Paste" from the "Edit" menu
and the NK.bin file will get copied over to your hard disk.
20. From the BootDisk.144 floppy, copy the BOOT.ini file and put it on the
hard disk (similar process to #18 and #19 above). Edit that file to use
NK.bin as the primary boot image.
Remove the floppy from your drive and you should have a booting CEPC image.
Now my next question - how do you get a bigger hard disk partition than 2
GB? I'll post that one separately.
One last thing, if you want to boot your device independent of the
development workstation, you have to build an OS image (and install it to the
hard disk) after going to "Connectivity Options" from the "Target" menu in
Platform Builder, select "Core Device Settings" and uncheck "Enable KITL on
device boot".
Thanks!
- Next message: Nicklas: "Loadcepc - Image doesn't fit"
- Previous message: Dean Ramsier: "Re: 16bpp with Windows CE 5.0"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|