RetroBSD

2.11BSD operating system for microcontrollers
It is currently Sat Aug 08, 2020 3:19 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Apr 07, 2014 1:12 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Hi, in the Master you may find the updated rd_sramc.c driver for this -> 8MB Ramdisk v.1.1.
Proven operation with Fubarino @120MHz.
;)
Code:
# pwd
/tmp
# time dd bs=16k count=300 if=/dev/zero of=AAA
300+0 records in
300+0 records out
        1.0 real         0.0 user         0.9 sys
# time dd bs=16k count=300 if=AAA of=/dev/null
300+0 records in
300+0 records out
        1.1 real         0.0 user         1.1 sys
# ls -l
total 4801
-rw-r-----  1 root      4915200 Apr  4 18:49 AAA
drwxr-xr-x  2 root         1024 Apr  4 18:05 lost+found
# df -i
Filesystem  1K-blocks     Used    Avail Capacity iused   ifree  %iused  Mounted on
/dev/rd0a       63749    14629    49120    22%     599    3401    14%   /
/dev/rd0c       19920        2    19918     0%       3    1261     0%   /u
/dev/rd1b        6116     4822     1294    78%       4     364     1%   /tmp
# pstat -s
3/25 swapmap entries
203 kbytes swap used, 1845 kbytes free
#

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Apr 26, 2014 12:58 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
This is how you may connect the 8MB Ramdisk to the pic32MX/MZ.
Note1: the latest driver supports currently the 8M_8 configuration only, small mods needed for 16M_8 and 16M_16 configs.
Note2: the configurations are not limited to 1-2 modules used, you may set up the ramdisk even from more modules, ie. 24M_8, 32M_8, .. 32M_16, etc. configs are doable :)
Note3: the data throughput is doubled with 16bits PMP bus configurations (for 100+ pins pic32 versions only).


Attachments:
8M_8.jpg
8M_8.jpg [ 32.25 KiB | Viewed 7441 times ]
16M_8.jpg
16M_8.jpg [ 55.26 KiB | Viewed 7441 times ]
16M_16.jpg
16M_16.jpg [ 51.45 KiB | Viewed 7441 times ]
32M_16.jpg
32M_16.jpg [ 59.44 KiB | Viewed 7441 times ]

_________________
Pukao Hats Cleaning Services Ltd.
Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 5:35 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Thanks majenko's great cooperation we managed to run two 8MB Ramdisks modules in a new configuration:
2x8MB_8
Unit0 - /tmp0, PMP address A0
Unit1 - /tmp1, PMP address A10

Code:
2.11 BSD Unix for PIC32, revision G86 build 7:
     Compiled 2014-04-29 by pito@ubuntu:
     /home/pito/RETROBSDGIT/retrobsd-1/sys/pic32/fubarino
cpu: 795F512H 120 MHz, bus 120 MHz
oscillator: HS crystal, PLL div 1:1 mult x15
console: tty1 (5,1)
sd0: port SPI2, select pin G9
PP Schema: (sramc0:sa@2048,fs@6144 sramc1:fs@8192)
Attempting partition of sramc0...
%DBG-PPT: Device Name: sramc0: (7 chars)
%DBG-PPT: Device found.
%DBG-PPT: We now like this bit: sa@2048,fs@6144 sramc1:fs@8192)
%DBG-PPT: Looking at: sa@2048,fs@6144 sramc1:fs@8192)
%DBG-PPT: Added partition 0 type 184 size 4096 at offset 2
%DBG-PPT: Looking at: fs@6144 sramc1:fs@8192)
%DBG-PPT: Added partition 1 type 183 size 12288 at offset 4098
PP Schema: (sramc0:sa@2048,fs@6144 sramc1:fs@8192)
Attempting partition of sramc1...
%DBG-PPT: Device Name: sramc1: (7 chars)
%DBG-PPT: Device found.
%DBG-PPT: We now like this bit: fs@8192)
%DBG-PPT: Looking at: fs@8192)
%DBG-PPT: Added partition 0 type 183 size 16384 at offset 2
sd0: type SDHC, size 3932160 kbytes, speed 20 Mbit/sec
phys mem  = 128 kbytes
user mem  = 96 kbytes
root dev  = rd0a (0,1)
root size = 128000 kbytes
swap dev  = rd1a (1,1)
swap size = 2048 kbytes
/dev/rd0a: 611 files, 35423 used, 92076 free
/dev/rd0c: 3 files, 2 used, 19918 free
Getting disk size for /dev/rd1b
Size: 6144 kbytes
Inodes: 384
Getting disk size for /dev/rd2a
Size: 8192 kbytes
Inodes: 512
Starting daemons: update cron

2.11 BSD UNIX (pic32) (console)

login: root
Password:
Welcome to RetroBSD!
erase, kill ^U, intr ^C
# df -i
Filesystem  1K-blocks     Used    Avail Capacity iused   ifree  %iused  Mounted on
/dev/rd0a      127499    35424    92075    27%     612    7388     7%   /
/dev/rd0c       19920        2    19918     0%       4    1260     0%   /u
/dev/rd1b        6119        2     6117     0%       3     381     0%   /tmp0
/dev/rd2a        8159        2     8157     0%       3     509     0%   /tmp1
#

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 6:41 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Is your latest code in git? I'll see about incorporating it cleanly into the master repo.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 7:42 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
My latest code is on the git. Not sure you can incorporate it cleanly..
fstab formatting makes problems here..
PS: maybe a professional developer might consider to create a PMP bus driver (similar to spi_bus) - my code is a good starting point then.. PMP is a great interface, I like it.. :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission