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.
Related
What does $(build_dir), $(pkg_build_dir) has in OpenWrt.
I have create the sample helloworld component and created the Makefile by following steps in openwrt.org.
When I try:
make package/helloworld/install -j1 V=s
it throws below error:
Warning: Your configuration is out of Sync, Please run make memuconfig, oldconfi or defconfig!
Entering Directory '.../openwrt'
***no rule to make target 'pckage/helloworld/install'. Stop
Leaving Directory .../openwrt
/home../toplevel.mk:216: recipe for target 'package/helloworld/install' failed.
Can someone help me in resolving this?
$(build_dir), $(pkg_build_dir) are variable defaults used by OpenWRT.
$(build_dir), is the directory that OpenWRT builds to and
$(pkg_build_dir) is a package build directory.
$(build_dir) does not need to be defined in the makefile
$(pkg_build_dir) can be defined in the makefile as:
PKG_NAME:=helloworld
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
With regards to your issue I would also try including the source directory in the makefile:
SOURCE_DIR:=/home/johndoe/helloworld
and updating the package feeds
cd /home/buildbot/source
./scripts/feeds update mypackages
./scripts/feeds install -a -p mypackag
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)
i have a problem while building openWRT for the carambola module. The package hotplug2 is the problem.
make[2]: Entering directory /carambola/package/hotplug2
mkdir -p /carambola/dl
echo "Checking out files from the svn repository..."; mkdir -p /carambola/tmp/dl && cd /carambola/tmp/dl && rm -rf hotplug2-201 && [ \! -d hotplug2-201 ] && ( svn help export | grep -q trust-server-cert && svn export --non-interactive --trust-server-cert -r201 http://svn.nomi.cz/svn/isteve/hotplug2 hotplug2-201 || svn export --non-interactive -r201 http://svn.nomi.cz/svn/isteve/hotplug2 hotplug2-201 ) && echo "Packing checkout..." && /bin/tar cfz //carambola/tmp/dl/hotplug2-201.tar.gz hotplug2-201 && mv /home/hosst/Dokumente/Projekte/OSC_GIT/02_WSS/linux-system/carambola/tmp/dl/hotplug2-201.tar.gz /carambola/dl/ && rm -rf hotplug2-201;
Checking out files from the svn repository...
svn: E670002: Unable to connect to a repository at URL 'http://svn.nomi.cz/svn/isteve/hotplug2'
svn: E670002: Name or service not known
svn: E670002: Unable to connect to a repository at URL 'http://svn.nomi.cz/svn/isteve/hotplug2'
svn: E670002: Name or service not known
make[2]: *** [/carambola/dl/hotplug2-201.tar.gz] Error 1
make[2]: Leaving directory /carambola/package/hotplug2
make[1]: *** [package/hotplug2/compile] Error 2
make[1]: Leaving directory carambola
make: *** [package/hotplug2/compile] Fehler 2
Obviously the svn repo http://svn.nomi.cz/svn/isteve/hotplug2 is not reachable. But this is the original makefile from OpenWRT Repo (hotplug2 package).
Does anybody know the problem? Could not find any hints on the net but i am sure many other people can compile OpenWRT without problems.
The problem is the url of svn repo has changed. Make these changes in
package/hotplug2/Makefile
#PKG_REV:=201
PKG_REV:=4
#PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2
PKG_SOURCE_URL:=http://hotplug2.googlecode.com/svn/trunk
With those changes, you should be able to compile the code.
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
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.