The last ISO you got was a bit annoying. There were almost forty modules to load by OF. It took long. Moreover, putting these files on FAT-formatted USB stick failed, since OF was unable to find some of the files.
I made few changes to the bootstrap code and AROS itself. AROS sets up interrupts in proper way. It should not lock anymore, as it happened before. The USB mass storage has been fixed a bit and should work a bit better now. Regarding the bootstrap code, following changes have been made:
- os_image does not need the boot-device setting anymore. Boot it from any place and it will work as expected.
- os_image honors the command line argument passed from OF. Now, if both menu.lst and OF command line contain parameters for kernel, they will be joined together.
- os_image supports packages. No need to load 40 boot files through OF anymore. There will be few packages: generic-ppc, efika, usb and few other files to load. It means faster boot time and less risk of OF issues 😉
- os_image does not support timeout option anymore. If there are more kernel configurations, it will stop and wait for an input.
Although timeout is gone, os_image on this cd will boot aros without waiting. I have removed the second boot option, which was not used anymore. How to boot? Put the CD into drive and type:
boot cd os_image
whereas “cd” corresponds to the boot device you use. You may find this iso here.
OMG, it was a busy weekend…
Last 48 hours were quite intensive. The source tree of Efika5k2 branch has been updated – the tree was almost 4 months old! I have added a complete contrib directory to the build – the iso is now 150 MB large and contains a complete gcc compiler toolchain for Efika as well as some other goodies.
The kernel.resource got new function, which may be used to change the WMID bits of certain pages of memory. One may use it, for example, to disable caching in some RAM areas. This feature is used by the PCI driver class for efika. Every region allocated for use by PCI bus master devices is excluded from caching. This manouver may simplify driver’s code significantly. For example, the OHCI driver uses Endpoint Descriptors (ED) and Transfer Descriptors (TD) which may be used by both CPU and OHCI controller. With an incoherent cache enabled, the driver has to either flush or invalidate the cached copies of descriptors permanently. Here, uncached region for these descriptors permits a more simple and error-safer code.
I have changed the scheduler a bit. The old one was not so stable upon very small CPU loads. It’s tendency was to lock interrupts and put CPU into sleep mode. Very unfortunate, I must say 😉 The updated code introduces the Idle Task which enters the power saving mode in a safer way. The scheduler calculates the time which CPU spent during execution of very task. Have a look yourself at C:TaskList command to understand what I mean
Wait, Did I wrote “have a look yourself”? Yes! Download this torrent, and test the AROS for efika yourself. It is not complete yet. You will surely see it crashing. The both IDE and network drivers are missnig. The release is unstable. Just put the ISO on CD, put it into your USB-CD or USB-DVD drive and start efika. Then, type following commands in the OF prompt:
setenv boot-device cd
boot cd os_image
Once you see the Boot? > prompt, press 1 and be patient. The OF needs some time to read all aros’ modules and will put enourmous amount of debug info. It will even report some missing file. Once AROS starts up, you will see the mouse pointer on the screen and CD drive working. Have fun. The serial port outputs debug information at 115200bps, 8N1.
PS. My upstream is limited. Please seed the file after download.
Every modern USB presents itself as a SCSI conforming bulk-only mass storage device to the system. Therefore, in order to do any IO operations, I have had to do them in the old good SCSI style. Therefore, the mass storage class do contain a DirectSCSI method and exposes it to rest of the world.
What a coincidence! I have added a few-lines long implementation of HD_SCSICMD to the .device layer of mass storage. I have started AROS in QEMU and forwarded the USB->PATA converter with a DVD attached to it and AROS CD inside (I didn’t want to test anything special, but it was the first CD I saw on the desktop). AROS booted and stopped. Then, the timeout errors appeared. A lot of them. A bit disappointed I’ve left my desk and did something else. Suddenly, the CD started to spin and AROS booted from USB CD device! Great!
A short investigation showed, that the CD filesystem used in AROS performs the INQUIRY SCSI command with a fixed size, whereas the USB protocol provides a much shorter data in return, which leads to a timeout. Then, it tries to get the full-sized TOC and such. Anyway, AROS team will either need to fix CD filesystem a bit, or I will have to give up 10 second timeouts in mass storage and introduce four pipes there: two of them with very short timeout (100 miliseconds or so) and two with the 10 second timeout.
So, now the mass storage can not only access any USB sticks and USB harddrives, but also USB CD/DVD readers and burners. Nice, isn’t it? The next step: booting Efika CD directly
Good Day Everyone!
After my last fights with the USB Mass Storage bounty I have decided to take a break there and continue with AROS port for Efika. The Mass Storage is basically ready, at least in my eyes, since I do lack the hardware where the whole USB stack makes any issues at all. It works here with two PC’s I own and with two virtual machines: QEMU and VmWare Player.
Anyway, I’m back with Efika right now. I took my freshly written mass storage class, fixed the OHCI driver again (it uses the physical address provided by the CachePreDMA() call) and copied the whole Efika CD onto my SFS partition of USB stick. And guess what! I have the wanderer desktop on Efika in front of my eyes now! Horray! Screenshot will follow as soon as I organise a USB hub (two USB slots are not enough for mouse, keyboard and USB stick, you know
One note: as you may know from the lecture of my previous posts, both FAT and FFS filesystems lack proper caching and thus are relatively slow, especially on Efika. Attempting to boot from FFS partition on USB stick may take more than 10 minutes. Booting from FAT will not work, because this filesystem is still incomplete. As for SFS, Efika needed one minute to boot from it, approximately.
PS. Since the SFS filesystem for linux is not working well on my machine (it crashes the linux kernel during mount already), I have started VMWare with AROS and Efika cd’s attached. Then I have plugged my usb stick, attached it to vmware and copied all the Efika ISO contents to the stick. Just as a proof that all the things are working here as expected.
This week was a very active one. I was working on my mass storage class all the time and got some really impressive results. The bounty is almost ready, at the moment I’m testing the class and the USB stack as a whole too. I have tested the mass storage class on my two USB sticks and a 4-in-1 USB card reader. All of them seems to work properly. In my private test phase were incorporated three different machines:
- my dying laptop (either gfx chip or it’s VRAM attempts to die pathetically – a chance of successful boot into X11 or Windows oscillates around 5%) used for development
- x86_64 box with 32 bit native aros to do some heavy testing
- my wifes PC which was the very first computer in the world booting AROS from USB stick 😉
Additionally, a qemu with USB forwarding has been used for immediate tests (in this case, the qemu takes a whole device of my wish over). In all this cases the USB stack and mass storage class seem to work properly. The mass storage is also being tested by other people, whom I’m very thankful
Once the eventual bugs are ironed out the bounty, according to it’s description, will be completed.
Note about the speed: AROS’ USB stack has at the moment the OHCI and UHCI drivers. It means, only the USB1.1 speed may be expected. The closest to the maximal transfer rate is, with 1.4MB/s, the SmartFilesystem. Both fat and ffs filesystems are dramatically slow, achieving 160KB/s and 140KB/s, respectively. Keep this information in minde while toying with AROS
Mass storage class for AROS’ USB stack is almost ready now. I have completed the exec-device interface and fixed few most annoying bugs. The class should support all devices supporting bulk-only protocol (that is, almost everything), including all USB card readers. USB DVD drives might work too, but I do not have the hardware to test.
Using the mass storage class, I have formatted a small SFS partition on my USB stick. It worked. I’ve tried to copy my whole AROS CD there. It worked again. Reading from the very same partition works. FAT partition from the very same stick worked too, both in read and write mode. The screenshot I’ve made for you was stored on FAT partition of USB stick Welcome new and easier way to transfer data to and from AROS
During next few days I will clean the code a bit and commit it to AROS’ repository. Apart from that I will fix the USB stack and AROS a bit in order to make booting from USB key feasible. Then, the USB Mass Storage bounty will be completed.