Coder Social home page Coder Social logo

bitbake-el's Introduction

Maintainer needed

I've not used bitbake in a long time and I do not expect this to change soon. I don't have an environment to test new PRs so this project is not really maintained any more. If anybody who uses bitbake regularly wants to take over, just ask!

bitbake.el - Bitbake integration with emacs

This package provides integration of the Yocto Bitbake tool with emacs. Its main features are:

  • interacting with the bitbake script so that you can run bitbake seamlessly from emacs. When editing a recipe, recompiling is just one M-x bitbake-recompile command away,

  • deploying recipes output directly to your target device over ssh for direct testing (if your image supports read-write mode),

  • generating wic images,

  • a global minor mode providing menu and shortcuts,

  • an mmm based mode to edit bitbake recipes.

Installing

This package is available on Melpa: MELPA

Usage

Calling bitbake from emacs

First you'll need to start bitbake as a server. Use M-x bitbake-start-server to do so. If you haven't setup the bitbake-poky-directory and bitbake-build-directory variables, emacs will prompt for your poky and build directory. You can permanently set them by running M-x customize-group bitbake.

Now that the server is started, you can execute tasks for the current recipe or any recipe by running M-x bitbake-task. There are shortcut for the most common task, see the BitBake menu in Bitbake minor mode.

Deploying recipes

If your target device supports ssh and writing to the root file system, you can use M-x bitbake-deploy to deploy a recipe on the device. It will use tar to create an archive of the files generated on the host and deploy them on the device. You should make sure that the recipe has already been build before or use the M-x bitbake-recompile-deploy command.

Generating wic images

If you use wic to create images, you can use M-x bitbake-wic-create to generate an image. It will prompt for the definition file the image name. You need to first build the Yocto image or use the command M-x bitbake-hdd-image which will first run bitbake image and then wic. If you set the custom variable bitbake-flash-device you'll be able rebuild and put your wic image directly on the device with the command M-x bitbake-flash-image.

Bitbake global minor mode

There is also a minor mode which provides shortcut and menu for those commands, run M-x bitbake-minor-mode and look at the BitBake menu for commands and key strokes.

Bitbake recipe mode

Finally, you should get syntax highlighting when editing bitbake recipe files. It uses mmm-mode to provide python and shell support in tasks.

Development

Development is done on GitHub. Any bugs or patches are welcome.

Contributors

Thanks to

  • Lee Yen-Chin for helping me updating the code to support Melpa and publishing it,
  • Syohei Yoshida for small fixes,
  • Brian Malehorn for font-lock enhancement.

License

This emacs extension is distributed under the terms of the GPLv3. See COPYING file for details.

Build Status

bitbake-el's People

Contributors

bmalehorn avatar canatella avatar coldnew avatar ericcrosson avatar garyblackbourne avatar syohex avatar tarsius avatar xantoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bitbake-el's Issues

look at the log

Summary: There were 3 WARNING messages shown.
Traceback (most recent call last):
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/bin/bitbake", line 36, in
cookerdata.CookerConfiguration()))
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/main.py", line 366, in bitbake_main
server_connection, ui_module = setup_bitbake(configParams, configuration)
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/main.py", line 422, in setup_bitbake
configParams.observe_only, configParams.xmlrpctoken)
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/server/xmlrpcclient.py", line 138, in connectXMLRPC
raise e
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/server/xmlrpcclient.py", line 134, in connectXMLRPC
connection = BitBakeXMLRPCServerConnection(host, port, (ip, 0), observer_only, featureset)
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/server/xmlrpcclient.py", line 76, in init
self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/ui/uievent.py", line 41, in init
ret = self.BBServer.registerEventHandler(self.host, self.port)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1112, in call
return self.__send(self.__name, args)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/usr/lib/python3.7/xmlrpc/client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1166, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1279, in send_request
self.send_content(connection, request_body)
File "/home/penguin/zhang/sw/t690/sdk/trunk/linux/tool/yocto/source/openembedded-core/bitbake/lib/bb/server/xmlrpcclient.py", line 42, in send_content
xmlrpc.client.Transport.send_content(self, h, body)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1309, in send_content
connection.endheaders(request_body)
File "/usr/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 938, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
WARNING: Could not connect to server at localhost:45496 ([Errno 111] Connection refused)

melpa support

It seems like this package can't install via elpa, can you add support for melpa ?

Project merge and maintainership

Hi @canatella, I saw your notice about a new maintainer. What do you think about merging this project with my project https://bitbucket.org/olanilsson/bitbake-modes ?
I have never put it on MELPA. I kept meaning to but never got it to the point it felt ready. Maybe this can be the push to get that done.

I think the projects have very simliar setup regarding syntax highlighting with mmm-mode. It's been a while since I looked at your package in detail so I'm not sure where there is overlap and where there are unique features.

I do still use bitbake daily and probably will for quite some time.

Byte compiled version lacks symbols at run time

The following line is required otherwise the byte compiled version doesn't work as expected:
(eval-when-compile (require 'cl-lib))

The workaround was to M-x load-library RET cl-lib and reevaluate the buffer of bitbake-el's source file.

Indenting

Currently the indentation function will always give me zero indentation in both shell and python mode. Is this a known issue?

Is dash really required?

Bitbake-el requires the non-standard package dash, but only for one call to -distinct in bitbake-add-path.

The -distinct is only to check for duplicate paths in the users PATH variable. There is an `unless member' clause that makes sure bitbake-add-path itself never adds duplicate paths.

While the slight optimization for an edge case is commendable, not at the expense of requiring a non-standard package. It is also a expensive call for what is basically a user error.

Caveat emptor: I have not actually used bitbake-el yet, I am just trying to set it up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.