Re: [Oberon] RISC.img format
Dear Paul, I bought Pepino LX9 board recently. I am studying Project Oberon 2013, making my firsts steps. My earlier experience comes from Pascal and Modula on ATARI-ST. I asked a similar question about RISC.img format here, http://saanlima.com/forum/viewtopic.php?f=14&t=1280&sid=6771605d7bfdce198fa7d7cba611aab7 fdisk reports vfat and OBS partitons on my uSD card imaged with RISC.img, size 256MB. Having read chapters on file system - Files.Mod, FileDir.Mod, I wish to know, if OBS partition grows somehow, so I can get more sectors allocated on my 2GB uSD? I also missed the point of media formating, as FileDir.Mod does not seem to provide Format command in its ToolBox. Many thanks. -- Tomas Kral <thomas.kral@email.cz>
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Tom the RISC.img is an "normal" ISO file with an MBR. The MBR is populated with two partitions. The first one (256 MB) is just there and is not used by Oberon at all. It can be (re)formatted to any filesystem you like. The second partition (64 MB) is the Oberon filesystem. It has to be at that location (256 MB from the start of the disk) as the Oberon bootloader does NOT read the MBR to find the first Oberon sector. It just reads directly from a fixed position and reads in some 1K sectors to load the system. The Oberon filesystem is currently limited to 64 MB as Kernel.Mod keeps a fixed sector map (VAR sectorMap) of 64k bit (CONST mapsize) Each bit represents a sectior of 1K --> 64k * 1kB = 64 MB. 64MB is the maximum size an Oberon system can hold. The actual size of the few files distributed in RISC.img is much smaller; below 500kB. If you want to use the rest of your SD card, add a third partition in the MBR after the Oberon partition. I wrote Oberon code to copy files from and to the second partition of RISC.img. If your interested, I can send you my code. Jörg
Am 19.03.2016 um 16:09 schrieb Tomas Kral <thomas.kral@email.cz>:
Dear Paul,
I bought Pepino LX9 board recently. I am studying Project Oberon 2013, making my firsts steps. My earlier experience comes from Pascal and Modula on ATARI-ST.
I asked a similar question about RISC.img format here, http://saanlima.com/forum/viewtopic.php?f=14&t=1280&sid=6771605d7bfdce198fa7d7cba611aab7
fdisk reports vfat and OBS partitons on my uSD card imaged with RISC.img, size 256MB.
Having read chapters on file system - Files.Mod, FileDir.Mod, I wish to know, if OBS partition grows somehow, so I can get more sectors allocated on my 2GB uSD?
I also missed the point of media formating, as FileDir.Mod does not seem to provide Format command in its ToolBox.
Many thanks.
-- Tomas Kral <thomas.kral@email.cz>
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Joerg, Aha, that corresponds to Ceres workstation, I read somewhere 40MB SCSI, and 10MHz processor clock. FPGA project clearly outperforms the 80'ies hardware. Yes I am interested in your code, what would be the size of a 3rd partition, I can imagine it is a clone o the primary OBS 64MB one? Many thanks. -- Tomas Kral <thomas.kral@email.cz> On Sun, 2016-03-20 at 09:20 +0100, Jörg Straube wrote:
Hi Tom
the RISC.img is an "normal" ISO file with an MBR. The MBR is populated with two partitions.
The first one (256 MB) is just there and is not used by Oberon at all. It can be (re)formatted to any filesystem you like.
The second partition (64 MB) is the Oberon filesystem. It has to be at that location (256 MB from the start of the disk) as the Oberon bootloader does NOT read the MBR to find the first Oberon sector. It just reads directly from a fixed position and reads in some 1K sectors to load the system.
The Oberon filesystem is currently limited to 64 MB as Kernel.Mod keeps a fixed sector map (VAR sectorMap) of 64k bit (CONST mapsize) Each bit represents a sectior of 1K --> 64k * 1kB = 64 MB.
64MB is the maximum size an Oberon system can hold. The actual size of the few files distributed in RISC.img is much smaller; below 500kB.
If you want to use the rest of your SD card, add a third partition in the MBR after the Oberon partition.
I wrote Oberon code to copy files from and to the second partition of RISC.img. If your interested, I can send you my code.
Jörg
Am 19.03.2016 um 16:09 schrieb Tomas Kral <thomas.kral@email.cz>:
Dear Paul,
I bought Pepino LX9 board recently. I am studying Project Oberon 2013, making my firsts steps. My earlier experience comes from Pascal and Modula on ATARI-ST.
I asked a similar question about RISC.img format here, http://saanlima.com/forum/viewtopic.php?f=14&t=1280&sid=6771605d7bfdce198fa7d7cba611aab7
fdisk reports vfat and OBS partitons on my uSD card imaged with RISC.img, size 256MB.
Having read chapters on file system - Files.Mod, FileDir.Mod, I wish to know, if OBS partition grows somehow, so I can get more sectors allocated on my 2GB uSD?
I also missed the point of media formating, as FileDir.Mod does not seem to provide Format command in its ToolBox.
Many thanks.
-- Tomas Kral <thomas.kral@email.cz>
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Nice thread. I'm interested in disks & MBR and don't see how other can avoid it. Jorg wrote:
If you want to use the rest of your SD card, add a third partition in the MBR after the Oberon partition.
Tomas wrote:- ]what would be the size of a 3rd partition, Do you put it in a <linux driven> card reader & see the partition sizes, including the tail/rest/unformatted ? == Chris Glur. On 3/20/16, Tomas Kral <thomas.kral@email.cz> wrote:
Hi Joerg,
Aha, that corresponds to Ceres workstation, I read somewhere 40MB SCSI, and 10MHz processor clock. FPGA project clearly outperforms the 80'ies hardware.
Yes I am interested in your code, what would be the size of a 3rd partition, I can imagine it is a clone o the primary OBS 64MB one?
Many thanks.
-- Tomas Kral <thomas.kral@email.cz>
On Sun, 2016-03-20 at 09:20 +0100, Jörg Straube wrote:
Hi Tom
the RISC.img is an "normal" ISO file with an MBR. The MBR is populated with two partitions.
The first one (256 MB) is just there and is not used by Oberon at all. It can be (re)formatted to any filesystem you like.
The second partition (64 MB) is the Oberon filesystem. It has to be at that location (256 MB from the start of the disk) as the Oberon bootloader does NOT read the MBR to find the first Oberon sector. It just reads directly from a fixed position and reads in some 1K sectors to load the system.
The Oberon filesystem is currently limited to 64 MB as Kernel.Mod keeps a fixed sector map (VAR sectorMap) of 64k bit (CONST mapsize) Each bit represents a sectior of 1K --> 64k * 1kB = 64 MB.
64MB is the maximum size an Oberon system can hold. The actual size of the few files distributed in RISC.img is much smaller; below 500kB.
If you want to use the rest of your SD card, add a third partition in the MBR after the Oberon partition.
I wrote Oberon code to copy files from and to the second partition of RISC.img. If your interested, I can send you my code.
Jörg
Am 19.03.2016 um 16:09 schrieb Tomas Kral <thomas.kral@email.cz>:
Dear Paul,
I bought Pepino LX9 board recently. I am studying Project Oberon 2013, making my firsts steps. My earlier experience comes from Pascal and Modula on ATARI-ST.
I asked a similar question about RISC.img format here, http://saanlima.com/forum/viewtopic.php?f=14&t=1280&sid=6771605d7bfdce198fa7d7cba611aab7
fdisk reports vfat and OBS partitons on my uSD card imaged with RISC.img, size 256MB.
Having read chapters on file system - Files.Mod, FileDir.Mod, I wish to know, if OBS partition grows somehow, so I can get more sectors allocated on my 2GB uSD?
I also missed the point of media formating, as FileDir.Mod does not seem to provide Format command in its ToolBox.
Many thanks.
-- Tomas Kral <thomas.kral@email.cz>
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Joerg, Chris, 64MB disk space seems plentiful, as the whole Oberon system is designed to be very lean. Compared to ATARI-ST and it's original MEGA FILE with 20MB, seemed programmer's heaven then. In the Project Oberon 2013, I am now at Chapter 8 on Storage management, I hope I will soon understand better. I use fdisk or cfdisk to add new partitions, on a notebook with Debian Live on USB, the only machinery in our household having a SD slot. I also run Debian on RPI, and through it's USB port I connect Oberon station. Joerg, I would be very glad for your code sample. I also started toying with AOS @ ETH and OLR (Oberon Linux Revival by Peter Matthias) running natively on RPI, but I am at the very start of learning here. I prefer Oberon Station, as it is very didactic, teaching the entire system design from scratch. Many thanks so far. -- Tomas Kral <thomas.kral@email.cz> On Sun, 2016-03-20 at 09:20 +0100, Jörg Straube wrote:
Hi Tom
the RISC.img is an "normal" ISO file with an MBR. The MBR is populated with two partitions.
The first one (256 MB) is just there and is not used by Oberon at all. It can be (re)formatted to any filesystem you like.
The second partition (64 MB) is the Oberon filesystem. It has to be at that location (256 MB from the start of the disk) as the Oberon bootloader does NOT read the MBR to find the first Oberon sector. It just reads directly from a fixed position and reads in some 1K sectors to load the system.
The Oberon filesystem is currently limited to 64 MB as Kernel.Mod keeps a fixed sector map (VAR sectorMap) of 64k bit (CONST mapsize) Each bit represents a sectior of 1K --> 64k * 1kB = 64 MB.
64MB is the maximum size an Oberon system can hold. The actual size of the few files distributed in RISC.img is much smaller; below 500kB.
If you want to use the rest of your SD card, add a third partition in the MBR after the Oberon partition.
I wrote Oberon code to copy files from and to the second partition of RISC.img. If your interested, I can send you my code.
Jörg
Am 19.03.2016 um 16:09 schrieb Tomas Kral <thomas.kral@email.cz>:
Dear Paul,
I bought Pepino LX9 board recently. I am studying Project Oberon 2013, making my firsts steps. My earlier experience comes from Pascal and Modula on ATARI-ST.
I asked a similar question about RISC.img format here, http://saanlima.com/forum/viewtopic.php?f=14&t=1280&sid=6771605d7bfdce198fa7d7cba611aab7
fdisk reports vfat and OBS partitons on my uSD card imaged with RISC.img, size 256MB.
Having read chapters on file system - Files.Mod, FileDir.Mod, I wish to know, if OBS partition grows somehow, so I can get more sectors allocated on my 2GB uSD?
I also missed the point of media formating, as FileDir.Mod does not seem to provide Format command in its ToolBox.
Many thanks.
-- Tomas Kral <thomas.kral@email.cz>
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Tomas Kral wrote:-
I use fdisk or cfdisk to add new partitions, on a notebook with Debian Live on USB, the only machinery in our household having a SD slot.
I also need a live-USB-linux, but googling gives vague leads. Can you give a proven reliable URL for "Debian Live on USB"? Is your BIOS on your notebook, made to see the SD as a USB; since you apparently just copied the Live-on-USB to a SD-card? ---
I also run Debian on RPI, and through it's USB port I connect Oberon station.
Can you communicate: RPi <-> x86 ; via USB instead of the absurd eth0 [I call it a railway system to fetch coffee from the next room]? ------
I also started toying with AOS @ ETH and OLR (Oberon Linux Revival by Peter Matthias) running natively on RPI, but I am at the very start of learning here.
ORL/LNO is good, provided you don't need to roam the directory tree. I call them vehicles which demonstrate in the show room, but have. problems to go out on the roads. By contrast: LEO [ETHO for linux x86] is the ultimate go-any-where. I'm using it now as the master coordinator where I need to extract text from inet, and pdf, and 15 year old files on various disks; and build a [pdf for paper printing] legal argument. On my current LEO-menu, I see for example - but with syntax coloring:- System.Execute Pdf2Txt /mnt/s5/Legal/CIPC/Summons/FSAA.pdf. /tmp/tmPDF I can't remember the details now [Menus avoid needing to remember] but also from the colors, I see that LEO's System.Execute calls a *nix-script, which fetches FSAA.pdf from a different disk and partition, and translates the pdf into ASCII; and then I can use LEO to read that ASCII from /tmp/tmPDF; and use that text anywhere [since LEO can access to whole file tree], e.g. to write pieces of the original-pdf-text to any LEO-files, using different colors, to associate different text-stretches, or build a plain text file, for later conversion to pdf for printing. I don't like the modern fad that printing needs pdf, but LEO manages to communicate with OpenOffice/LibreOffice via plain-text.
I prefer Oberon Station, as it is very didactic, teaching the entire system design from scratch.
Yes, it seems to be a magnificent, and so far unique, teaching project. == Chris Glur.
Chris, I keep the old stable Debian, debian-live-7.2-i386-standard.iso with no GUI, just for the purpose of USB/SD shuffling. Most uptodate links may be found here, http://cdimage.debian.org/debian-cd/current-live/i386/bt-hybrid/ You may need a Torrent client for that. Under Linux SD/USB appear as additional /dev/sd[a-z] devices, when inserted. You may watch for newly added one by $ dmesg | tail I am also interested in LEO, as I believe it provides support for OBERON.FS so I could prepare test SD images for 'Project Oberon 2013' in it? I found a lot of links at ETH site on different flavours of Oberon. Can you please guide me to the correct one? I read in the manuals that Oberon0 has to be imaged/booted first to commence installation steps. This one? ftp://ftp.ethoberon.ethz.ch/ETHOberon/Native/StdAlone/
Can you communicate: RPi <-> x86 ; via USB instead of the absurd eth0 [I call it a railway system to fetch coffee from the next room]?
Admittedly, I do mostly FTP on RPI<-->x86, though using NFS (Network File System) would allow drag and drop on shared folders. [ using your jargon, fetching a piano nextdoor for daily papers left on its top :-) ] But with Oberon Station, I plan to use RS232 link to exchange files, I can also try initial booting over it, so as to follow the build process documented. On Saanlima FPGA boards, RS232 is wired as a separate micro-USB channel, that makes it easy to connect with RPI.
On my current LEO-menu, I see for example - but with syntax coloring: - System.Execute Pdf2Txt /mnt/s5/Legal/CIPC/Summons/FSAA.pdf. /tmp/tmPDF
Rather ingenious way of text exchange, something I'd love to learn. But it may take me a while and I am right at the beginning of my learning. Many thanks so far. -- Tomas Kral <thomas.kral@email.cz>
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Tomas Kral Sent: Monday, 21 March 2016 12:07 AM To: ETH Oberon and related systems Subject: Re: [Oberon] RISC.img format
I use fdisk or cfdisk to add new partitions, on a notebook with Debian Live on USB, the only machinery in our household having a SD slot.
You don't need to have a dedicated SD card slot on your PC. You can access the Project Oberon microSD cards on a PC with USB ports using a USB / SDCard adaptor which cost about $10. e.g. search for 'SanDisk MobileMate USB Card Reader'. Regards, Chris Chris Burrows CFB Software http://www.astrobe.com/RISC5
participants (4)
-
Chris Burrows -
eas lab -
Jörg Straube -
Tomas Kral