When I try to build for Raspberry Pi2, the option is raspi-2, right?
$ gyp_cobalt raspi-2
$ ninja -C out/raspi-2_debug cobalt
There currently is no raspi-2 configuration, but the raspi-1 configuration will run on a Raspberry Pi Zero, 1, 2, and 3. It won't take advantage of the Neon instruction set available on a Raspberry Pi 2, but it will run. Both the Broadcom 2835 (RasPi 0,1) and 2836 (RasPi 2) are 32-bit ARM chips, so binaries compiled to a common subset of the instruction set should run on both devices.
Creating a raspi-2 configuration wouldn't be too difficult.
$ cd src/starboard/raspi
$ cp -R 1/ 2
And modify src/starboard/rapi/2/gyp_configuration.gypi and src/starboard/rapi/2/gyp_configuration.py to refer to 'raspi-2' where they refer to 'raspi-1'.
Then one could furthet modify gyp_configuration.gypi to pass in more appropriate compiler flags for a Raspberry Pi 2. One might also want to set these properties, to enable Neon assembly optimizations in libwebp:
'arm_version': 7,
'armv7': 1,
'arm_neon': 1,
Thanks.
I put it all together.
$ cd ~/
$ git clone https://cobalt.googlesource.com/cobalt
$ cd cobalt/src/startboard/raspi
$ cp -R 1/ 2
$ cd 2/
$ vi gyp_configuration.gypi
Edit line 37-40 and change rasp-1 to rasp-2 at line 167-180.
# RasPi 2 is ARMv7
'arm_version': 7,
'armv7': 1,
'arm_neon': 1,
....
'default_configuration': 'raspi-2_debug',
'configurations': {
'raspi-2_debug': {
'inherit_from': ['debug_base'],
},
'raspi-2_devel': {
'inherit_from': ['devel_base'],
},
'raspi-2_qa': {
'inherit_from': ['qa_base'],
},
'raspi-2_gold': {
'inherit_from': ['gold_base'],
},
Then,
$ vi gyp_configuration.py
Edit line 14 and change rasp-1 to rasp-2 at line 25.
"""Starboard Raspberry Pi 2 platform configuration for gyp_cobalt."""
....
return _PlatformConfig('raspi-2')
Then, set $RASPI_HOME like the description of a manual.
$ export RASPI_HOME=~/raspi-tools
$ cd ~/cobalt/src/
$ cobalt/build/gyp_cobalt raspi-2
$ ls out/
./
../
raspi-2_debug/
raspi-2_devel/
raspi-2_gold/
raspi-2_qa/
$ ninja -C out/raspi-2_debug cobalt
But clang++ command is not found.
And there is not llvm-build in the following path
cobalt/src/third_party/
Where is it ?
Related
on ( debian 11 / Xfce ) to show lightdm.conf at first I used this command
~$ /usr/sbin/lightdm --show-config
[Seat:*]
-----------
Sources:
B /usr/share/lightdm/lightdm.conf.d/01_debian.conf
B /usr/share/lightdm/lightdm.conf.d/01_debian.conf ---> same as above
C /etc/lightdm/lightdm.conf.d/lightdm.conf
D /etc/lightdm/lightdm.conf
then I tried
~$ sudo lightdm --show-config
[Seat:*]
----------
Sources:
A /usr/share/lightdm/lightdm.conf.d/01_debian.conf
B /etc/lightdm/lightdm.conf.d/lightdm.conf
C /etc/lightdm/lightdm.conf
which gives normal output. But even more puzzling, for me, is that if I use sudo with the first command, which I normally should not do, I get the right output :
~$ sudo /usr/sbin/lightdm --show-config
[Seat:*]
---------
Sources:
A /usr/share/lightdm/lightdm.conf.d/01_debian.conf
B /etc/lightdm/lightdm.conf.d/lightdm.conf
C /etc/lightdm/lightdm.conf
I tried nothing because I am completely puzzled by this problem. I have no idea whatsoever where to start looking or what to look for.
Is it more or less feasible to create PCL files "artisanally", by hand? I have done it for PostScript and found it not particularly difficult, though it takes a lot of time and effort to create even a simple drawing. Now I am faced with an OKI C823 that is connected to an Ubuntu PC, it prints ok but does not understand PostScript - which might explain why it was so inexpensive... (for such a big printer)
I did find the below sample in the "PCL XL Feature Reference" but when I fed it to the printer, the text just printed as text instead of drawing the intended line.
eInch Measure
600 600 UnitsPerMeasure
BeginSession // attribute: basic measure for the session is inches
// attribute: 600 units in both X and Y direction
// operator: begin the imaging session
ePortraitOrientation Orientation
eLetterPaper MediaSize
BeginPage // attribute: page orientation is portrait
// attribute: size of media for page is letter
// operator: begin the page description
1200 800 Point
SetCursor // attribute: point a which to set the current cursor
// operator: set the cursor
2400 800 EndPoint
LinePath // attribute: endpoint of a 2 inch line
// operator: add the line to the current path
PaintPath // operator: paint the current path
EndPage // operator: end the page description
EndSession // operator: end the imaging session
Edit
You can convert ps to pcl with ghostscript
sudo apt-get install ghostscript
gs -o ~/test.pcl -sDEVICE=pxlcolor -f ~/test.ps
or
gs -o ~/test.pcl -sDEVICE=pxlmono -f ~/test.ps
If you need to go backward for some reason--convert pcl to ps--then see the more complicated instructions below
You can convert from pcl6 to ps using GhostPDL from Ghostscript. It's a separate product from Ghostscript, and afaik the only way to install it is to build it from source.
Build It
I'm using ubuntu 18 LTS.
some prereqs I needed, your system might already have them
sudo apt-get install autoconf
sudo apt-get install g++
sudo apt-get install make
download the source, untar, and build
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs950/ghostpdl-9.50.tar.gz
tar xvf ghostpdl-9.50.tar.gz
cd ghostpdl-9.50
sh ./autogen.sh
make
The binaries are in the bin folder
cd ./bin
Sample Usage
I copied a test.ps file from wikipedia that prints "Hello World" in courier.
Convert ps to pcl, convert the pcl back to pdf
./gs -o ~/test.pcl -sDEVICE=pxlcolor -f ~/test.ps
./gpcl6 -o ~/test.pdf -sDEVICE=pdfwrite ~/test.pcl
And everything worked as expected.
I am new to BeagleBone Green Wireless (BBGW). I just read Derek Molloy's Exploring BeagleBone. Very good read, however, BBGW has Linux 4.4.9-ti-r25 and everything is quite different. Linux 4.4.9 no longer has the device tree source. Just has the device tree overlays (.dto). I am trying to experiment with the PWM's. I loaded am33xx_pwm-00A0.dtbo and BB-PWM1-00A0.dtbo overlays found in /lib/firmware. I presume these are default overlays for PWM1 but not sure.
export SLOTS=/sys/devices/platform/bone_capemgr/slots
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins
sudo sh -c "echo am33xx_pwm > $SLOTS"
sudo sh -c "echo BB-PWM1 > $SLOTS"
They appear to be loaded correctly,
root#beaglebone:/lib/firmware# cat $SLOTS
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
5: P-O-L- 0 Override Board Name,00A0,Override Manuf,am33xx_pwm
7: P-O-L- 1 Override Board Name,00A0,Override Manuf,BB-PWM1
However, I cannot find where to access PWM1's properties. Malloy says that they are in, /sys/devices/ocp.3/pwm_test_p9_22.15. I could not find that directory and the closest I could find was /sys/devices/platform/ocp/. There are several devices but nothing about PWM1. Where can I find the location of PWM1's properties? I want to change them using the echo command using this example,
sudo su
echo 5000 > duty
echo 10000 > period
echo 1 > run
If someone knows of a good document that would be helpful as well.
I know you said you are close to solving it but I got it to work..
Kernel: 4.4.30-ti-r64
Distro: Debian 8.6 Jessie
Now to load the PWM overlay...
My distro is from RCN and comes with the overlays pre-populated in my /lib/firmware/ folder. If you have the overlays there continue to step 4, if not step 2.
apt-get update
sudo apt install bb-cape-overlays
Load the overlay into the cape manager:
echo BB-PWM1 > /sys/devices/platform/bone_capemgr/slots
Ensure the overlay is loaded correctly by doing two things:
First make sure it is in the capemanager:
cat /sys/devices/platform/bone_capemgr/slots
output:
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-PWM1
The second is to make sure the pin is correctly muxed to do this:
cd /sys/kernel/debug/pinctrl/44e10800.pinmux
more pins | grep 848
the output should be similar to this :
pin 18 (44e10848.0) 00000006 pinctrl-single
You can look into the overlay to get a deeper understanding of what is going on but it is a little outside the scope of this question.
if you don't see the 00000006 output. Dont proceed. Reboot the BB and try again. This happened to me and a reboot solved the problem
So, the BB is now ready for PWM.
cd /sys/class/pwm
cd pwmchip0
echo 0 > export
cd pwm0
echo 1000000000 > period
echo 800000000 > duty_cycle
echo 1 > enable
Ta-da. it should work. Sorry for the lengthy response. I wanted to be thorough.
I followed the tutorial: http://www.teachmemicro.com/beaglebone-black-pwm-ubuntu-device-tree/
Edit:
This is for setting the PWM for P9_14
How can I run the simulation with different configurations? I am using omnet++ version 4.6.
My omnetpp.ini file looks as below :
[General]
[Config Dcn2]
network = Dcn2
# leaf switch
#**.down_port = 2
**.up_port = 16 #12 # 4
# spine switch
**.port = 28 # 20 #2048
# crossconnect
**.cross_down_port = 28 # 20 #2048
**.cross_up_port = 28 # 20 #2048
# to set destination of packet
**.number_leaf_switch = 28 # 20 #2048
# link speed
#**.switch_switch_link_speed = 40 Mbps
**.interArrivalTime = ${exponential(.0001),exponential(0.0002),exponential(0.0003)}
**.batch_length = 10
**.buffer_length = 10
sim-time-limit = 1000s
I want to run the code with different values of interArrivalTime. But I can neither run with different configs (one after another), nor can I run individual runs in parallel on separate cores.
I have tried with cmdev option in run configurations but the different runs doesn't show up apart from the 1st one. When I try mentioning the number of processes to be more than one then also only the first run gets simulated. I really cannot find out the reason.
Config Examinataion
In your case you can perform config examination. OMNeT++ offers different options for that. They are explained under the Parameter Studies section of the OMNeT++ manual.
So you can try one of the following options to examine your configs and thus config file:
./run –a - will show all the configurations in the omnet.ini
./run -x <config_name> - will give more info about a specific config
./run -x <config_name> -g - see all the combinations of configs
First you will have to navigate to your example folder, and there execute one of the aforementioned commands.
I executed: ./run -x Dcn2 -g and got the following resuls
OMNeT++ Discrete Event Simulation (C) 1992-2014 Andras Varga, OpenSim Ltd.
Version: 4.6, build: 141202-f785492, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
Setting up Tkenv...
Config: Dcn2
Number of runs: 3
Run 0: $0=exponential(.0001), $repetition=0
Run 1: $0=exponential(0.0002), $repetition=0
Run 2: $0=exponential(0.0003), $repetition=0
End.
This confirms indeed that you have 3 different runs for the simulation parameter you are trying to modify. However, variable name you are using for the interArrivalTime parameter is assigned to $0 by default because you have not specified it.
If you change the following line in your config:
**.interArrivalTime = ${exponential(.0001),exponential(0.0002),exponential(0.0003)}
to
**.interArrivalTime = ${interArrivalTime = exponential(0.0001),exponential(0.0002),exponential(0.0003)}
you will get a more descriptive output for ./run -x Dcn2 -g
Running different runs of a config:
Next step for you would be to run the different runs for your config. You can do that by navigating to your example directory and execute:
./run -c <config-name> -r <run-number> -u Cmdenv
Note that the <config-name> would be Dcn2 for you, and the -r specifies which of the runs given above you would like to execute.
In other words you can open three terminal windows and navigate to your example directory and do:
./run -c Dcn2 -r 0 -u Cmdenv - for interArrivalTime = exponential(0.0001)
./run -c Dcn2 -r 1 -u Cmdenv - for interArrivalTime = exponential(0.0002)
./run -c Dcn2 -r 2 -u Cmdenv - for interArrivalTime = exponential(0.0003)
Distinguishing Different run results
To be able to distinguish between the output result files of the different runs for your given config you can modify the default name of the output file.
The "how-to" is given in the 12.2.3 Result File Names section of the OMNeT++ manual.
output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
As you can see by default your output files will be distinguished by the ${runnumber} variable. You can further improve it by adding the interArrivalTime to the output file name.
Example:
output-scalar-file = "${resultdir}/${configname}-${runnumber}-IAtime=${interArrivalTime}.sca/vec"
I have not tested the final approach. So you might get some error along the path.
I'm trying to install Orbfit4.2 on a using linux mint maya edition. I'm trying to follow the on line help. I have unzipped the tared file, configured with $ ./config -0 gfortran and then $ make. Both appears to be successful. I am now trying to create the DE405 data files in the /orbfit/src/jpleph directory. I have downloaded the header.405 and the ascp*date* ascii files into the directory from JPL. I have run $ make ephemerides and get the following;
cat header.405 ascp1960.405 ascp1980.405 ascp2000.405 ascp2020.405> input.430
asc2eph.x < input.430
/bin/sh: 1: asc2eph.x: not found
make: *** [ephemerides] Error 127
(I have also used input value of 405 instead of 430)
I have also tried just running from with in
the directory
$ ./asc2eph.x which was the previous method before the Makefile was included. All I get with this is 'authors' introductory message and the flashing working box-still running 6 hrs later.
If anybody has any experience or advice with installing Orbfit 4.2 from the start or can help me move on from the above blockage I would appreciate.
Note I am a real novice and would appreciate idiot step by step guide- I'm the idiot.
Eric
The Makefile assumes that the current directory "." is in your path. This is a security risk. You can either edit the Makefile to rename these binaries:
$ diff -u Makefile.orig Makefile
--- Makefile.orig 2014-01-09 07:14:10.000000000 -0800
+++ Makefile 2014-10-21 11:40:00.850236839 -0700
## -10,7 +10,7 ##
make clean
ephemerides: input asc2eph.x
- asc2eph.x < input.430
+ ./asc2eph.x < input.430
mv JPLEPH jpleph
make clean
Or you can add . to your path (but this is insecure!) by doing
$ PATH=.:$PATH