RetroBSD

2.11BSD operating system for microcontrollers
It is currently Wed Aug 05, 2020 2:17 am

All times are UTC




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sat Feb 21, 2015 3:14 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Is there a sudo for a single command only? Such the elevated privileges disappear after the command is fulfilled?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Feb 21, 2015 3:22 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
Yes, it's called "sudo". You can configure it to only allow access to specific commands.

But, there is no need for sudo in most usage - just configure your system as I listed above so all the operations you need to do are possible by a normal user.

_________________
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: Sat Feb 21, 2015 4:14 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Why we cannot put the paths into the top Makefile there?
Like
Code:
#   @(#)Makefile   8.1 (Berkeley) 6/19/93

BSDSRC      = $HOME/LiteBSD
MIPS_GCC_ROOT   = /usr/local/mips-2014.05
DESTDIR      = $BSDSRC/DESTDIR
MAKESYSPATH   = $BSDSRC/share/mk-pic32

SUBDIR=   bin contrib games include lib libexec old sbin \ ..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Feb 21, 2015 4:28 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
Because you have a catch-22 situation then.

You need the paths set to be able to run bmake. Running bmake sets the paths. So how do you run bmake to set the paths to be able to run bmake?

_________________
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: Sat Feb 21, 2015 5:46 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Ok, so before bmake makes makefiles, it does something else..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Feb 21, 2015 6:04 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
In contemporary systems that is the role of "configure" created by autoconf.

_________________
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: Sat Feb 21, 2015 6:19 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
A bit off topic - could we use the Mentor Sourcery compiler for retrobsd build too?
For example in target.mk
Code:
# Generic MIPS toolchain
# ~~~~~~~~~~~~~~~~~~~~~~
# You can build it from sources, as described on page
# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips
ifndef GCCPREFIX
    GCCPREFIX   = /usr/local/mips-2014.05/bin/mips-sde-elf-
    LDFLAGS     =
    INCLUDES    =
endif

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Feb 21, 2015 6:45 pm 
User avatar

Joined: Fri Jan 23, 2015 12:41 pm
Posts: 3
Pito wrote:
A bit off topic - could we use the Mentor Sourcery compiler for retrobsd build too?
I've roughly the same question in the opposite direction: Is there a recipe somewhere to build a toolchain for LiteBSD from sources like the one for RetroBSD?

_________________
"Logic, my dear Zoe, merely enables one to be wrong with authority." -- The 2nd Doctor


Top
 Profile  
 
PostPosted: Sat Feb 21, 2015 8:06 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
It's the DESTDIR variable. It is used as standard when any software is compiled for where to install it - so it interferes big time with any other compilations. You have to make sure to remember to undefine it before compiling anything other than LiteBSD.

Code:
$ unset DESTDIR

_________________
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: Sun Feb 22, 2015 6:13 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Pito,
Pito wrote:
Copy filesystem image to the SDcard "sdb" (could be different on your linux box!):
Code:
cd $BSDSRC
sudo dd bs=32k if=sdcard.img of=/dev/sdb

or you may add it into the top Makefile:
Code:
copyfs:
           sudo dd bs=32k if=sdcard.img of=/dev/sdb

and then
Code:
cd $BSDSRC
bmake copyfs

Actually, the top level Makefile already has "installfs" target to copy FS image to SD card. It needs a parameter SDCARD with a name of /dev file, like:
Code:
bmake installfs SDCARD=/dev/sdb


Top
 Profile  
 
PostPosted: Sun Feb 22, 2015 7:09 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Pito wrote:
A bit off topic - could we use the Mentor Sourcery compiler for retrobsd build too?
Yes, we can use Mentor Sourcery toolchain for RetroBSD as well. I don't see any obvious benefit though.

ping-panther wrote:
I've roughly the same question in the opposite direction: Is there a recipe somewhere to build a toolchain for LiteBSD from sources like the one for RetroBSD?
You can use the same recipe as for RetroBSD: http://retrobsd.org/wiki/doku.php/doc/toolchain-mips
It works for me on Mac OS X. Unfortunately, Mentor does not supply mac binaries for Sourcery toolchain.


Top
 Profile  
 
PostPosted: Mon Feb 23, 2015 9:10 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
bmake clean does not clean /sys/compile/SDZL.pic32 directory when SDZL.pic32 is selected.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Feb 23, 2015 10:02 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Pito wrote:
bmake clean does not clean /sys/compile/SDZL.pic32 directory when SDZL.pic32 is selected.
This is intentional: as the filesystem build is separate from kernel build, so should the clean. I would propose to add another make target for cleaning sys/compile/$BOARD directory.


Top
 Profile  
 
PostPosted: Tue Feb 24, 2015 1:35 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
update of the guide

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Tue Feb 24, 2015 1:48 pm 
User avatar

Joined: Mon Nov 12, 2012 3:17 pm
Posts: 164
Location: Bratislava, Slovakia
Pito wrote:
Upload the Kernel to the pic32MZ's flash via serial (there must be the bootloader installed):
...
Do not flash the Kernel directly into the chip (via picki2 or pickit3) - it will not work. The pic32MZ config bits are set within the bootloader !

Is the PIC32MZ bootloader available somewhere? Something like the one on https://github.com/sergev/LiteBSD/wiki/ ... SDZL-board

_________________
http://jaromir.xf.cz/
https://hackaday.io/jaromir/


Top
 Profile  
 
PostPosted: Tue Feb 24, 2015 3:59 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
They are usually built from the PIC32-avrdude-bootloader source using the licensed version of xc32

https://github.com/chipKIT32/PIC32-avrdude-bootloader

_________________
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 Feb 24, 2015 4:49 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Update - the SDZL board bootloader attached to the guide.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Mar 04, 2015 8:47 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Update - pic32prog at github now.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Mar 04, 2015 10:26 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
I'm also working on getting pic32prog into launchpad so you can install it into Ubuntu properly. I have a test version in there already, but need to set it up properly to track the github repository.

_________________
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:29 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Update:
Added an information on SDZL board's Rx/Tx pins assignment.

_________________
Pukao Hats Cleaning Services Ltd.


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

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