[Coco] [COCO] Putting NitrOS-9 boot track in ROM

David Ladd davidwladd at gmail.com
Mon Feb 2 12:02:03 EST 2015


Gene,

Your bootlink is a very cool tool for sure :D
The thing though is I wont be using HDBDOS at all on the volumes I plan on
booting from.  I looked at the source for bootlink and it does say HDBDOS
is required. :(

I also tried os9gen with the -q=bootfile
Sadly nothing happened other than my device booted from old boot file
I also tried os9gen with the -q=bootfile /dd
Sadly this option left a temp file in the root of /dd and system no longer
booted.

So what I was hoping to do is actually link the a OS9Boot file of
choice(that means if I have multiple on the OS-9 volume) I can just type
"link bootfile".  What I was picturing is having a few custom OS9Boot files
in the root of the volume.  Depending on which one I want I just do the
link that file.  Then do a reboot and pow I reboot with that os9boot file.
With what ever modules I had chosen to be in that special.

Now I know right now the boot_ide only supports booting from a HDBDOS
virtual drive, but becker, dw3, dw4, CoCoSDC, and WD1773 all boot fine.  I
just don't want to have to manually dEd the LSN0 to point to my custom file
when I feel there should be a utility for this.

Now here are some examples of why this would be useful.
So lets say I have a few OS9Boot files in the root of /dd
One boot file is the general purpose use with all drivers need to do about
everything I could need.
The I have another boot file that contains vrn and stripped down for
playing games.
Then a few others that might be customized for special needs.
Now lets say I booted with the general purpose one.  Now I want the one
with vrn.  "link os9bootvrn" now LSN0 points to os9bootvrn.  I do reboot
and pow now I can cd to my games and start playing.

So thats the basics.
The thing is I don't know how to do this yet myself and figured there might
have been a utility that could do this on the native OS-9 volume already.
Though really I guess if there are system calls for it should be easy to
open file get its start sector and its size and then open the boot volume
and update LSN0 to point to it.  Yes?

Gene, thank you for letting me know about your tool.  That will help me on
my IDE based system :D

+----------+
|David Ladd|
+----------+




On Sun, Feb 1, 2015 at 11:10 PM, Gene Heskett <gheskett at wdtv.com> wrote:

> On Sunday 01 February 2015 23:26:17 Christopher R. Hawks did opine
> And Gene did reply:
> > On Sun, 1 Feb 2015 21:04:27 -0600
> >
> > David Ladd <davidwladd at gmail.com> wrote:
> > > Hello everyone,
> > >
> > > I thought I would share something with everyone that I have been
> > > tinkering with.
> > >
> > > Last night I was thinking about NitrOS-9 in ROM, but not the OS9Boot
> > > file like the docs normally talk about.  I was actually thinking of
> > > putting the boot track for the given device into ROM.
> > >
> > > The first reason I thought about doing this is saving the 4608 bytes
> > > that is normally locked out of a given volume used for the boot
> > > track.  So I figured if I put it into ROM I could gain back that
> > > space.  Plus this might make it a bit easier to just link LSN0 to a
> > > specific boot file. Here is my test code thus far:
> > > ------------------------------*bootrom.asm*
> > >
> > >         org     $C000
> > >
> > > START   EQU     *
> > >
> > >         fcc     "DK"
> > >         lbra    ENTRY
> > >         fill    $FF,9*256
> > >
> > > ENTRY   EQU     *
> > >
> > >         ldx     #$2600
> > >         ldu     #BOOTTRK
> > >
> > > LOOP1   ldd     ,u++
> > >
> > >         std     ,x++
> > >         cmpu    #BOOTEND
> > >         bne     LOOP1
> > >         jmp     $2602
> > >
> > > BOOTTRK EQU     *
> > >
> > >         use     boottrack.asm
> > >
> > > BOOTEND EQU     *
> > > RMSIZE  EQU     BOOTEND-START
> > >
> > >         fill    $39,$2000-RMSIZE
> > >
> > > ​
> > > ------------------------------
> > > Now to create the boottrack.asm file I use the os9 tool from
> > > toolshed. Example as follows:
> > > os9 dump -a kernel_becker >boottrack.asm
> > >
> > > Then you just need to run lwasm on bootrom.asm and it will build the
> > > ROM image of the boot track you selected.
> > >
> > > Now so far I have tested this with becker, CoCoSDC, EmuDisk, and IDE.
> > > Becker, CoCoSDC, and EmuDisk work fine no problems.  So far I
> > > couldn't get IDE to work.  I will have to examine the source code for
> > > boot_ide.asm to see how it works more closely.
> > >
> > > Now the only problem I have ran into thus far is a easy way to update
> > > the OS9Boot file on a pre-existing volume without writing a boot
> > > track to the volume.  So far os9gen and cobbler both require writing
> > > a boot track to the volume.
> > >
> > > What I would like to know if anyone has run across a native
> > > OS-9/NitrOS-9 utility that will link a file as being the OS9Boot file
> > > to the information that would need to be set in LSN0?
> > >
> > > Thanks :D
>
> This is precisely what my "bootlink" on my web site, does Chris.
> Basically the boot module you choose gets the address of the os9boot file
> from its hard drives LSN0.
>
> So it doesn't have to even live on the same hdbdos disk as the boottrack
> since that address in LSN0 can be anyplace on the drive, including plumb
> out of the os9 formatted portion of the drive.  HDBDOS makes it piece of
> cake easy to have with its offset + vdisk allocation scheme.
>
> The syntax is "bootlink $82" or "bootlink 130" which is the decimal
> version of $82. Bootlink translates according to whether or not the first
> of the 3 chars is a dollar sign.  It goes and gets the effective LSN0 of
> that hdbdos vdisk, seeks to the file and verifies that it is indeed a
> legit os9boot file, and if it is, does the math to dd.bt and dd.siz in the
> real lsn0, writes it into those 5 bytes, so the next time it boots or
> reboots, it will boot using the newly created os9boot file.
>
> I have not done it yet, but what you want to do can (maybe) also be done
> with the B&B utils "ba" and "bd" to clear those track 34 bits in that
> disks FAT.  Hardly worth it since that only gains you 6144 bytes per
> vdisk. bd=Bit Deallocate.  However, I do not know if these utils are
> multiple sector cluster aware.  From what someone else said just this past
> week, the hint seems to indicate they are not.
>
> Anyway, take a gander at it as I believe it can do this job.  Get it from
> my web page at the Genes-os9-stf link.
> > >
> > > ​
> > > ​
> > > +----------+
> > >
> > > |David Ladd|
> > >
> > > +----------+
> >
> > os9gen -q=pathtobootfile
> >
> >
> >
> > Christopher R. Hawks
> > HAWKSoft
>
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list