![]() |
|
| FAQ |
|
|
Why use a CDK when I can already easily copy scripts, binaries and configuration files directly to the console server? Opengear provides a custom development kit (CDK) which allows changes to be made to the software in console server firmware image, so using the CDK you can:
How do I use the CDK to build custom firmware? First, acquire a copy of the Opengear CDK for the particular appliance you are working with from ftp://ftp.opengear.com/cdk. The CDK will be a gzipped tarball. Extract it to a local directory, and cd into it. Second, edit the Makefile to add appropriate sections to the "user" and "clean" sections. An example might be: user: # Build a binary make -C example # Install it into the file system make -C progdir romfs clean: make -C example clean Last, execute the "make" command to build new firmware. It will be placed in the "images" directory as "image.bin". How do I use the CDK to build custom binaries? Again firstly acquire a copy of the Opengear CDK for the particular appliance you are working with. The CDK will be a gzipped tarball. Extract it to a local directory, and cd into it. Second, place a copy of your source code in a new directory. For the purposes of these instructions, we will be working on the program "myprog" in a directory called "myprogdir". Third, edit the Makefile to add appropriate sections to the "user" and "clean" sections. An example might be: user: # Build a binary make -C myprogdir # Install it into the file system make -C progdir romfs clean: make -C myprogdir clean Fourth, start a new Makefile in your directory. If you already have a Makefile, name it makefile. If you already have a makefile, whether or not you have a Makefile, name it GNUmakefile. An example makefile is below: include ../opengear.mk export CONFOPTS= all: build/build $(MAKE) -C build build/build: makefile rm -rf build mkdir build ( \ cd build; \ export CXXFLAGS="$(CXXFLAGS)"; \ export CFLAGS="$(CFLAGS)"; \ export LIBS="$(CXX_LDFLAGS)"; \ ac_cv_func_strnstr=no \ ac_cv_header_openssl_sha_h=yes \ sh ../configure $(CONFIGURE_OPTS) $(CONFOPTS) \ ) touch build/build clean: rm -rf build romfs: $(ROMFSINST) build/ctorrent /bin/ctorrent This makefile has three main actions. First, it creates a new directory called build to carry out the compilation in, configures the application, and carrys out the actual compilation. Secondly, it uses the romfs-inst.sh script in tools/ to copy appropriate files to the final filesystem. Lastly, it includes a "clean" command which simply removes the build directory. What tips do you have when using the CDK developing for the Opengear appliance?
|
| © Opengear 2008| Privacy Policy |