Failing to run hello-world example on sky tmote - contiki

I'm trying to run the hello-world example in contiki on a sky tmote. I'm using ubuntu and followed this tutorial: http://www.contiki-os.org/start.html#hardware
The first time I executed:
make TARGET=sky hello-world.upload
it worked fine but I got an error when executing:
make TARGET=sky login
../../tools/sky/serialdump-linux -b115200
make: execvp: ../../tools/sky/serialdump-linux: Permission denied
make: *** [login] Error 127
And now from now on every time I execute
make TARGET=sky hello-world.upload
I get the output from the tutorial (the note)
make z1-reset z1-upload
make[1]: Entering directory `/home/user/contiki/examples/hello-world'
make -k -j 20 z1-reset-sequence
make[2]: Entering directory `/home/user/contiki/examples/hello-world'
Done
make[2]: Leaving directory `/home/user/contiki/examples/hello-world'
make -j 20 z1-upload-sequence
make[2]: Entering directory `/home/user/contiki/examples/hello-world'
Done
make[2]: Leaving directory `/home/user/contiki/examples/hello-world'
make[1]: Leaving directory `/home/user/contiki/examples/hello-world'
rm hello-world.ihex
Before I once tried the instantcontiki with the VMPlayer and when this occured I just had to reconnect the sky mote again via a button in the VMPlayer, but since I'm not using it anymore I don't know what to do.
Also I couldn't figure out how to solve the Error 127 from above.
Greetings,
Jan
PS: I'm new to linux

Here is a solution which worked at me:
Find out at which USB is your tmote connected, e.g. USB0 and than just run:
sudo chmod 666 /dev/ttyUSB0

this phrase permission denied indicates that you are not the owner, ie. you are not the root
use sudo su,
give your password for the root
and repeat the code.
you will not find the error

Related

Why this compilation error appers when I add a sky mote in contiki 2.7?

I am getting this problem with contiki-2.7 when I want to add a Sky mote type
make: msp430-gcc: Command not found
cp ../../tools/empty-symbols.c symbols.c
cp ../../tools/empty-symbols.h symbols.h
make: msp430-gcc: Command not found
make: *** [obj_sky/rimeaddr.o] Error 127
Please can anyone help me to resolve this problem?

how can i make an pgAudit installation for my PostgreSQL10?

I wanted to install pgAudit on my CentOS 6 32-bit, I already installed PostgreSQL 10 + pgAdmin4 from PostgreSQL Linux run installer that I downloaded from DBEnterprise
I followed the guide from here, here are the steps I followed :
git clone https://github.com/postgres/postgres.git
go into the folder by cd postgres and then git checkout REL_10_STABLE
./configure after that make install -s
cd contrib
Clone the pgAudit extension by git clone https://github.com/pgaudit/pgaudit.git
cd pgaudit
git checkout REL_10_STABLE
make -s check
make install
I'm stuck at step 8. Here's the result :
[root#localhost pgaudit]# make -s check
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine /root/postgres/contrib/pgaudit/log/initdb.log for the reason.
Command was: "initdb" -D "/root/postgres/contrib/pgaudit/./tmp_check/data" --no-clean --no-sync > "/root/postgres/contrib/pgaudit/log/initdb.log" 2>&1
make: *** [check] Error 2
I opened the initdb.log at /root/postgres/contrib/pgaudit/log/initdb.log like how it told me to, and it says :
Running in no-clean mode. Mistakes will not be cleaned up.
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
So I tried it again after I logged in as postgres, here's the result :
bash-4.1$ make -s check
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[2]: *** [submake-errcodes] Error 2
make[1]: *** [submake-libpgport] Error 2
make: *** [submake] Error 2
I'm really new to both Linux and PostgreSQL, so I don't know why it failed and what is the solution for this. Thanks in advance!
Look like your db user not having a login shell.
You can try with:
sudo -u postgres psql template
Or:
sudo -u postgres bash

foreach & silencer in a makefile target

I am using a foreach in a makefile for a particular target.
my_Target:
$(foreach x,$(MY_TARGET_DIRS), #echo " BUILD $(x)";$(Q)$(MAKE) --directory=$(x) LIB_DIR=$(MY_LIB_DIR) $(MY_TARGET_RULES); )
This is intended call the makefiles contained every specified directory of MY_TARGET_DIRS, after a string has been printed to tell which build is ongoing.
The Q variable is defined as follows:
# Silent per default, 'make V=1' shows all compiler calls.
ifneq ($(V),1)
Q := #
endif
So that the make command is verbose if V=1 is defined.
For V=1 the output log is:
make my_Target V=1
BUILD /dir1
make[1]: Entering directory `/dir1'
make[1]: Nothing to be done for `elf'.
make[1]: Nothing to be done for `bin'.
make[1]: Leaving directory `/dir1'
/bin/sh: #echo: command not found
make[1]: Entering directory `/dir2'
make[1]: Nothing to be done for `elf'.
make[1]: Nothing to be done for `bin'.
make[1]: Leaving directory `/dir2'
While if I do not define V=1, the output log is:
make my_Target
BUILD /dir1
/bin/sh: #make: command not found
/bin/sh: #echo: command not found
/bin/sh: #make: command not found
make: *** [my_Target] Error 127
How can I get the behavior I desire correctly?
Bye!
Put the # ($(Q)) at the beginning of the recipe:
my_Target:
$(Q)$(foreach x,$(MY_TARGET_DIRS), echo " BUILD $(x)";$(MAKE) --directory=$(x) LIB_DIR=$(MY_LIB_DIR) $(MY_TARGET_RULES); )
Notice that the foreach will ouptut a single recipe line, and the # will apply to all of it. An alternative, if you want to get more fancy is to create a rule for each of the target dirs:
MY_TARGET_DIRS_TARGS=$(MY_TARGET_DIRS:%=%/.phony)
my_Target: $(MY_TARGET_DIRS_TARG)
$(MY_TARGET_DIRS_TARGS):
#echo " BUILD $(x)"
$(Q)(MAKE) --directory=$(x) LIB_DIR=$(MY_LIB_DIR) $(MY_TARGET_RULES);
.PHONY: $(MY_TARGET_DIRS_TARGS)

My package in OpenWRT does not compile

I have downloaded OpenWRT source from git and build it. I created a simple helloworld package with the required Makefile in package/helloworld directory and build it. But it does not seem to be doing anything. Following is the log:
sonal#sonal-ThinkPad:~/openwrt$ make V=99 package/helloworld/compile
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/home/sonal/openwrt'
make[2]: Entering directory '/home/sonal/openwrt/package/libs/toolchain'
if [ -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
make[2]: Leaving directory '/home/sonal/openwrt/package/libs/toolchain'
make[2]: Entering directory '/home/sonal/openwrt/package/helloworld'
make[2]: Leaving directory '/home/sonal/openwrt/package/helloworld'
make[1]: Leaving directory '/home/sonal/openwrt'`enter code here`
Thanks
Sonal
http://wiki.prplfoundation.org/wiki/Creating_an_OpenWrt_package_for_a_web_page
This above link will guide you how to build own package. I had also made own luci pages with above link. It will guide you from scratch.
If you want to create only hello world page then no need to create package, you just make new directory name as files in '/home/sonal/openwrt/'
and then go to files directory and make new directory as www in '/home/sonal/openwrt/files/'. No custom packages requires for it.

Troubles with wkhtmltopdf

Good day!, I hope someone has the answer to this question. I'm having troubles when trying to "convert" an html to pdf from a rails application, I've followed these steps: http://www.snikt.net/blog/2012/04/26/wicked-pdf/ with no luck, when I click the link it only changes the url from "http://localhost:3000/users/3" to "http://localhost:3000/users.3" with a blank page.
Then I read that you must configure a few things first, so I follow these steps: http://code.google.com/p/wkhtmltopdf/wiki/compilation, everything looks good until I reach the part with the "make && make install", here are the results:
cd src/lib/ && make -f Makefile
make[1]: Entering directory /home/username/wkhtmltopdf/src/lib'
make[1]: Nothing to be done forfirst'.
make[1]: Leaving directory /home/username/wkhtmltopdf/src/lib'
cd src/pdf/ && make -f Makefile
make[1]: Entering directory/home/username/wkhtmltopdf/src/pdf'
make[1]: Nothing to be done for first'.
make[1]: Leaving directory/home/username/wkhtmltopdf/src/pdf'
cd src/image/ && make -f Makefile
make[1]: Entering directory /home/username/wkhtmltopdf/src/image'
make[1]: Nothing to be done forfirst'.
make[1]: Leaving directory /home/username/wkhtmltopdf/src/image'
cd src/lib/ && make -f Makefile install
make[1]: Entering directory/home/username/wkhtmltopdf/src/lib'
mkdir: cannot create directory /include': Permission denied
make[1]: *** [install_headers] Error 1
make[1]: Leaving directory/home/username/wkhtmltopdf/src/lib'
make: * [sub-src-lib-install_subtargets-ordered] Error 2
As a note the command "wkhtmltopdf some_url my_pdf.pdf" does work, the issue is when trying to "convert" an html, from a rails application, to pdf.
I appreciate every single tip you can give because I'm trully lost. I'm sorry if it's a dumb question and for all the troubles, and thank you for your time.
Ok, just go through all of that, following this tutorial: http://blog.tcs.de/install-wkhtmltopdf-on-ubuntu-server/
Thank you guys for your time.

Resources