Creating SD card image - RISC.img
Since Peter De Wachter done such great work with emulator, next logical step in my opinion would be to get it fully self hosted: creating new RISC.img under emulator and exporting it via PCLink, then booting from new image. There is information about boot linker module called ORL in section 14.2 of Project Oberon, but it seems that code for it isn't provided. Are there plans to change it, is there any ETA for it? I've seen some previous discussion about it on mailing list, but that was before availability of emulator. Listing partition table gives interesting results: $ fdisk -l RISC.img Disk RISC.img: 268 MB, 268862464 bytes 255 heads, 63 sectors/track, 32 cylinders, total 525122 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System RISC.img1 * 2048 524287 261120 6 FAT16 RISC.img2 524288 655359 65536 ff BBT I would like to ask Paul Reed about details involving creation of image (since current images are provides by him as far I understand), but I'm afraid it could be asking too much at the time. -- Paul Onyschuk
Am 12.04.2014 15:58, schrieb Paul Onyschuk:
Since Peter De Wachter done such great work with emulator, next logical step in my opinion would be to get it fully self hosted: creating new RISC.img under emulator and exporting it via PCLink, then booting from new image.
Yes please ... an "Step-By-Step"-Tutorial on building a PO2013-System under the RISC Emulator and putting it on a "SD-Image" would be nice. BW, Volkert
Dear all,
Am 12.04.2014 15:58, schrieb Paul Onyschuk:
Since Peter De Wachter done such great work with emulator, next logical step in my opinion would be to get it fully self hosted: creating new RISC.img under emulator and exporting it via PCLink, then booting from new image.
Yes please ... an "Step-By-Step"-Tutorial on building a PO2013-System under the RISC Emulator and putting it on a "SD-Image" would be nice.
Yes, self-hosting would be much better than the ugly cross-tools I'm using at the moment; as time permits... One of the more important aspects of self-hosting is being able to test the new configuration before committing to it. And bear in mind, we are using the real hardware. Notice that the image doesn't have to be big, see the patch to the emulator I included in the Windows package on projectoberon.com - if it recognises the image file as an Oberon filesystem (beginning with FileDir.DirMark) then it virtualises the first 80002H 512-byte sectors, which as you quite rightly say don't need to be accessed if you're just going to be in emulation. (Normally I don't like this kind of magic but it's a useful kludge for small machines. A large [when uncompressed] image with a FAT partition first is for the convenience of Windows users - it is not a real operating system: it doesn't have dd) ;-) And yes, the ORG/ORP are tested and the right ones (ORP from February corrects a bug with multidimensional arrays), please ignore the 10.4.2014 version. Cheers, Paul
Am 14.04.2014 19:37, schrieb Paul Reed:
And yes, the ORG/ORP are tested and the right ones (ORP from February corrects a bug with multidimensional arrays), please ignore the 10.4.2014 version.
Cheers, Paul
Are these errors fixed https://lists.inf.ethz.ch/pipermail/oberon/2014/007195.html https://lists.inf.ethz.ch/pipermail/oberon/2014/007199.html because of this message https://lists.inf.ethz.ch/pipermail/oberon/2014/007288.html BW, Volkert
Hi Volkert,
Are these errors fixed
Rest assured, nothing has been fixed or changed in ORG or ORP (except the latter has a small alignment fix from February which somehow didn't make it to the web) - but one way of addressing the above error has already been suggested (and there's probably more that can be done there too).
https://lists.inf.ethz.ch/pipermail/oberon/2014/007199.html
because of this message
Yes this is fixed, but it is to do with ORS only, which was indeed updated. Once again, sorry for any confusion and thanks for all the feedback, it is appreciated. Paul
Hi Volkert,
Are these errors fixed
https://lists.inf.ethz.ch/pipermail/oberon/2014/007195.html Rest assured, nothing has been fixed or changed in ORG or ORP (except the latter has a small alignment fix from February which somehow didn't make it to the web) - but one way of addressing the above error has already been suggested (and there's probably more that can be done there too).
https://lists.inf.ethz.ch/pipermail/oberon/2014/007199.html
because of this message
https://lists.inf.ethz.ch/pipermail/oberon/2014/007288.html Yes this is fixed, but it is to do with ORS only, which was indeed updated.
Once again, sorry for any confusion and thanks for all the feedback, it is appreciated. It would be nice, if you or NW add some kind of simple release-notes" to
Am 14.04.2014 22:55, schrieb Paul Reed: the sources and we can follow your changes. A simple Text-File. ------ Project Oberon 2013 ( Release 14.04.2013) === ORB.Mod === 10.02.2014: - bug xy fixed - === ORP.Mod === === ... === ---- BW, Volkert
On Mon, 14 Apr 2014 18:37:23 +0100 "Paul Reed" <paulreed@paddedcell.com> wrote:
Yes, self-hosting would be much better than the ugly cross-tools I'm using at the moment; as time permits... One of the more important aspects of self-hosting is being able to test the new configuration before committing to it. And bear in mind, we are using the real hardware.
I used wrong wording, but same method should apply to real hardware and emulator. About testing new configuration (which I guess is rebooting system) beside shuffling SD cards I can think of only one method of recovery, when something goes wrong: multiboot. Choosing which bootloader to user (new/old) seems like only solution... or I'm wrong and missing something?
Notice that the image doesn't have to be big, see the patch to the emulator I included in the Windows package on projectoberon.com - if it recognises the image file as an Oberon filesystem (beginning with FileDir.DirMark) then it virtualises the first 80002H 512-byte sectors, which as you quite rightly say don't need to be accessed if you're just going to be in emulation.
That is nice feature. I have seen commit in upstream repository (patch was pulled by Peter), but I didn't know what it does and how you can use it. Now you can get very small image using dd (since I know exact offset): $ dd if=RISC.img of=SMALL.img bs=512 skip=524290 $ du -ah SMALL.img 496K SMALL.img And new image works just fine under emulator. -- Paul Onyschuk
On 14-04-14 19:37, Paul Reed wrote:
Notice that the image doesn't have to be big, see the patch to the emulator I included in the Windows package on projectoberon.com - if it recognises the image file as an Oberon filesystem (beginning with FileDir.DirMark) then it virtualises the first 80002H 512-byte sectors, which as you quite rightly say don't need to be accessed if you're just going to be in emulation.
Actually, I don't understand why you don't just use the partition table? The code easily fits in the boot loader. Why force the Oberon file system to sit in a random location in the middle of the disk? PROCEDURE FSoffset(): INTEGER; VAR i, ofs, sig, typ, lba1, lba2: INTEGER; BEGIN ofs := 0; ReadSD(0, 0); SYSTEM.GET(508, sig); IF sig DIV 10000H MOD 10000H = 0AA55H THEN FOR i := 494 TO 446 BY -16 DO SYSTEM.GET(i + 2, typ); IF typ DIV 10000H MOD 100H = 0FFH THEN SYSTEM.GET(i + 6, lba1); SYSTEM.GET(i + 10, lba2); ofs := (lba1 DIV 10000H MOD 10000H) + (lba2 * 10000H) END END END; (* halt if no Oberon partition is found *) IF ofs = 0 THEN LED(8FH); REPEAT UNTIL FALSE END RETURN ofs END FSoffset; The discovered value can be passed to Oberon in the boot parameter table, so Kernel.Mod will only need a trivial change.
Hi Peter,
Actually, I don't understand why you don't just use the partition table? The code easily fits in the boot loader. Why force the Oberon file system to sit in a random location in the middle of the disk?
That's a good question - but why stop there? It may interest you to know that when I was first getting a system together on the FPGA, I was using the Oberon-0 compiler from Compiler Construction to write the bootloader, which was a bit tedious due to the lack of types (and not even hex!) but it served the purpose: and I even got the system booted from a file on a FAT partition, which I thought would be the nicest way to get interoperability (like now on the Raspberry Pi, as it happens). But this all comes at the cost of complexity which is pretty irrelevant for some. I guess it all depends on your point of view. The Project Oberon book is about Project Oberon, not about Master Boot Records or other arcane things from the PC world (for example, only from that point of view can you consider a nice round offset to be random!). :) So the choice was, 0 (ie dedicate the whole disk to Oberon) or some fixed offset. I asked for the latter. It might have been more honest to choose 0. Please don't kill me. :) Hope that helps, Paul
On 16-04-14 10:28, Paul Reed wrote:
But this all comes at the cost of complexity which is pretty irrelevant for some. I guess it all depends on your point of view. The Project Oberon book is about Project Oberon, not about Master Boot Records or other arcane things from the PC world (for example, only from that point of view can you consider a nice round offset to be random!).
Maybe "magic" would have been a better word than "random". But I get your point :)
participants (5)
-
Paul Onyschuk -
Paul Onyschuk -
Paul Reed -
Peter De Wachter -
volkert@nivoba.de