[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] boot manager



Mark Duckworth wrote:
I think Vincent Rivere already wrote IDE routines for the firebee so
that could be a good start ;)

I have added an extra-light IDE support to EmuTOS. Now EmuTOS is able to see and use IDE disks, without any driver. It works well on ARAnyM with IDE emulation, on the FireBee with a CompactFlash card, and on the M5484LITE with a CompactFlash card. It would probably work fine on Falcon with a real IDE disk, too. All the CompactFlash cards contain an IDE interface, from the OS it is the same as real disks. I'm currently committing all my work into EmuTOS' CVS, slowly but surely. That stuff will be available in the next stable version.

EmuTOS has already a built-in support for PC/MBR formatted disks. I have formatted a CompactFlash card in PC format, with a FAT16 partition respecting the current limitations of EmuTOS. I put it into an USB adapter, and I access to the files on it from Windows, like an USB flash drive. Then I put the CompactFlash card in the M5484LITE (it is the same on the FireBee), I switch on the power, EmuTOS boots instantly and see the CompactFlash card as the C: drive. It can run the programs from the AUTO folder, etc. There is no specific driver on the CompactFlash card.

Didier has done the same thing in FireTOS long ago, and I must absolutely thank him for his help, especially for the CompactFlash support on the M5484LITE.

By the way, for a boot manager, there are several layers, it must be absolutely clear for anyone before making further projects.

1) BIOS level access to the sectors of the whole drive.
For IDE, my patch to EmuTOS allows this, without further requirements.
For ACSI, it has never been possible with TOS. The TOS has only a very simple ACSI protocol for reading the first sector of the drive, and executing it. On an autoboot ACSI drive, this sector contains a small routine to read the ACSI driver from the drive itself, and install it into the BIOS for further accesses. As a comparison, on PC te BIOS always know how to access IDE/SATA drives. SCSI adapters dynamically patch the BIOS for adding that functionality.

2) BIOS level access to the sectors of the partitions.
If I'm not wrong, the TOS knows nothing about partitioning. That's the job of the ACSI driver to find the partitions and make them available to the BIOS, each of them with a drive letter. EmuTOS already support Atari and PC/MBR partition style. So any disk having support for 1) can be used on EmuTOS, that's why my task for IDE was finally very small.

3) Knowledge of filesystems for accessing files.
TOS and EmuTOS know only FAT12/FAT16 filesystems, currently with some size restrictions. A boot manager must be able to know some filesystems in order to read its configuration files and kernels. On GRUB, that filesystem driver is called "stage1.5" and is located on the track 0, usually unused. The main GRUB program itself is stored in a regular file named "stage2".

Keep in mind these 3 levels when designing a boot manager.

--
Vincent Rivière