RetroBSD

2.11BSD operating system for microcontrollers
It is currently Sun Mar 29, 2020 11:33 am

All times are UTC




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Thu Oct 15, 2015 9:37 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
Just thought I'd see about getting back into LiteBSD again - trying to compile the WiFire kernel and failing...

Code:
/usr/local/mips-2014.05/bin/mips-sde-elf-gcc -g -mips32r2 -EL -msoft-float -nostdinc -fno-builtin -Werror -Wall -c -O -I. -I../.. -DWIFIRE -DPIC32MZ -DBUTTON2=0x14 -DBUTTON1=0x15 -DSD_KHZ=16000 -DSD_LED=0x7f -DCONS_MINOR=3 -DCONS_MAJOR=17 -DINET -DPROCFS -DFDESC -DKERNFS -DUNION -DFFS -DFIFO -DHZ=100 -DCPU_KHZ=200000 -DBUFPAGES=18 -DNBUF=18 -DNMBCLUSTERS=16 -DNKMEMCLUSTERS=32 -DDEBUG -DDIAGNOSTIC -DDEVPAGER -DVNODEPAGER -DSWAPPAGER -DKERNEL ioconf.c
ioconf.c:22:18: error: array type has incomplete element type
 struct mips_ctlr mips_cinit[] = {
                  ^
ioconf.c:31:20: error: array type has incomplete element type
 struct scsi_device scsi_dinit[] = {
                    ^
*** Error code 1

Stop.

Is there something I'm missing here? I can find no definition for the mips_ctlr struct anywhere in the tree.

_________________
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: Thu Oct 15, 2015 9:41 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I compiled and run default SDZL fine (few days back, git cloned).

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Oct 15, 2015 9:47 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
Looks like it was something dirty in my kernel compile directory. Wiped it and it's compiled now.

_________________
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: Thu Oct 15, 2015 9:54 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
How do I configure the kernel actually? Ie. sdcard speed? Cannot find Config..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Oct 15, 2015 9:56 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
sys/mips/conf/SDZL.pic32

_________________
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: Thu Oct 15, 2015 10:16 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Added in SDZL.pic32
Code:
disk            sd0     at spi2 drive 0 flags 0x79      # select pin RG9  - logical 27
options         "SD_LED=0x57"                           # LED4 is RE7
options         "SD_MHZ=20"

Trying to run config:
Code:
pito@UBU1404:~/LiteBSD/sys/mips/conf$ config SDZL.pic32

Code:
pito@UBU1404:~/LiteBSD/usr.sbin/config$ config SDZL.pic32
No command 'config' found, did you mean:
 Command 'vconfig' from package 'vlan' (main)
 Command 'fconfig' from package 'redboot-tools' (universe)
 Command 'mconfig' from package 'mono-devel' (main)
 Command 'zconfig' from package 'python-zconfig' (universe)
config: command not found
pito@UBU1404:~/LiteBSD/usr.sbin/config$

Cannot decipher from wiki guide from where I should run the config actually..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Oct 15, 2015 10:29 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
Code:
../../../usr/sbin/config/config SDZL.pic32

_________________
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: Thu Oct 15, 2015 10:35 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Code:
# To build the kernel, use:
#   ../../../usr.sbin/config/config SDZL.pic32
#   cd ../../compile/SDZL.pic32
#   bmake depend
#   bmake

That worked..

Hmm, I still see 12MHz SPi
Code:
sd0 at port spi2, pin cs=G9
sd0: type I, size 500224 kbytes, speed 12 Mbit/sec
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 32768 kb


and, halt and reboot cycles in a loop through login (the same in the qemu simulator)..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Oct 15, 2015 11:26 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
You need to change this parameter, not add a new one:

Code:
options         "SD_KHZ=16000"                          # speed 16MHz

_________________
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: Fri Oct 16, 2015 6:21 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
,Still 12MHz in splash screen. So how to set SD to 20MHz??

Also I would highly recommend to add an info on current dir:
Code:
# To build the kernel, use:
#  You have to be in /LiteBSD/sys/mips/conf  directory, then
#   ../../../usr.sbin/config/config SDZL.pic32
#   cd ../../compile/SDZL.pic32
#   bmake depend
#   bmake

or to make the whole kernel install user friendly. We are users, not developers :)

For example, an user needs only two commands:

bmake kernel - makes vmunix.hex
bmake fs - makes sdcard.img

Both shall work from top (LIteBSD) directory and "bmake kernel" shall include all the Config stuff in it. No messing with config and depend.

Simply edit SDZL.pic32, save it, and run "bmake kernel" from top directory..

And also copy vmunix.hex to top directory automatically after it has been built.

"bmake fs" shall include "bmake build" as a normal user needs sdcard image basically.

Thus after "bmake kernel" and "bmake fs" you will see the new sdcard.img and vmunix.hex in top directory.

Make it simple, PLEASE!!

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Oct 16, 2015 10:38 am 
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
You may well need to do a "bmake clean" on the kernel first to get it to pick up the changed options.

_________________
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: Fri Oct 16, 2015 11:09 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Yes, it seems so. I messed with those config stuff, with no result, then edited, and messed again with no result, then run bmake kernel from top and I see 16MHz there. The top Makefile has bmake clean somewhere around config.
So my current understanding is it is enough to edit SDZL.pic32 and then run top bmake kernel. Am I right??
No it does not work that way..

CAN SOMEBODY DESCRIBE THE EXACT PROCEDURE (STEP BY STEP) FOR CREATING A NEW KERNEL AFTER EDITING THE SDZL.pic32 config file, PLEASE?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Oct 16, 2015 11:37 am 
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
To do it manually:

Code:
pito@linux:~/LiteBSD/sys/mips/conf$ ../../../usr.sbin/config/config SDZL.pic32
pito@linux:~/LiteBSD/sys/mips/conf$ cd ../../compile/SDZL.pic32
pito@linux:~/LiteBSD/sys/compile/SDZL.pic32$ bmake clean
pito@linux:~/LiteBSD/sys/compile/SDZL.pic32$ bmake depend
pito@linux:~/LiteBSD/sys/compile/SDZL.pic32$ bmake
pito@linux:~/LiteBSD/sys/compile/SDZL.pic32$ pic32prog -d /dev/ttyUSB0 vmunix.hex

To do it from the "top level":
Code:
pito@linux:~/LiteBSD$ rm -rf sys/compile/SDZL.pic32
pito@linux:~/LiteBSD$ bmake kernel
pito@linux:~/LiteBSD$ bmake load

_________________
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: Fri Oct 16, 2015 11:50 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I did from top level, and I still see 16MHz (while in sdzl.pic32 is 20):
Code:
disk            sd0     at spi2 drive 0 flags 0x79      # select pin RG9  - logical 27
options         "SD_LED=0x57"                           # LED4 is RE7
options         "SD_KHZ=20000"

Code:
sd0: type SDHC, size 7838720 kbytes, speed 16 Mbit/sec

Maybe this is a problem:
Code:
CPU   200
BUS   100
   
N   SPI
0   50.0
1   25.0
2   16.7
3   12.5
4   10.0
5   8.3
6   7.1
7   6.3
8   5.6
9   5.0
10   4.5

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Oct 16, 2015 12:02 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
YES!! :lol:
With 25MHZ SPI
Code:
# diskspeed
Testing 4-kbyte block size.
Write speed: 8 Mbytes in 5.601 seconds = 1462 kbytes/sec
 Read speed: 8 Mbytes in 3.808 seconds = 2151 kbytes/sec
#

Code:
# time ls -lR /     
      15.54 real         4.65 user         0.49 sys
      14.86 real         4.77 user         0.49 sys
      15.11 real         4.90 user         0.53 sys
      15.17 real         5.00 user         0.46 sys
#
#

What about 50MHz SPI?? :ugeek:

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Feb 10, 2016 11:27 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
I got a chipKIT Wi-FIRE today, courtesy of Microchip (and majenko!).
How do I get a LiteBSD kernel onto it?

_________________
@__briancallahan on Twitter


Top
 Profile  
 
PostPosted: Thu Feb 11, 2016 12:00 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Brian,

... And how do I connect wired ethernet to it :).

[ I haven't done that yet with mine. ]

If you have the official Microchip stuff, it should just be download the package from LiteBSD.org. SD stuff to your SD, and kernel to kernel space VIA Microchip stuff. Not sure about bootloader. I may be already there and already talking to the USB? Mine seems to be.
I could not read flash memory from the USB so I stopped at that point.

As I said VIA icb, some LiteBSD.org downloads didn't work for me earlier today? Maybe Serge can check that out?

I see nc [netcat] seems to be in the LiteBSD download.

Hope the above helps.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Thu Feb 11, 2016 5:01 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
ibara wrote:
I got a chipKIT Wi-FIRE today, courtesy of Microchip (and majenko!).
How do I get a LiteBSD kernel onto it?

(1) Download the latest version of package litebsd-wifire-2016-xx-xx.zip from the Autobuild server: http://litebsd.org/wiki/autobuild.php

(2) Unpack the archive and follow instructions in README.txt file.


Top
 Profile  
 
PostPosted: Thu Feb 11, 2016 3:33 pm 
Contributor
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Got it working!

_________________
@__briancallahan on Twitter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4

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