Giter Club home page Giter Club logo

Comments (4)

scottellis avatar scottellis commented on July 27, 2024

I modified the simple-upnpd pkg_postinst to return an error if not running on the host, otherwise it gets marked as already run during the build rootfs step on the build workstation and never runs on the BBB.

After that an /etc/simple-upnpd.xml file is created, but :::MAC::: gets replaced by because eth0 is not up.

The default run-postinsts script runs as rcS.d/S99run-postinsts, but the network scripts don't run until runlevel 5.

I moved run-postinsts to rc5.d/S10run-postinsts.

This puts it after rc5.d/S01networking, rc5.d/S02dbus-1 and rc5.d/S05connman.

With this change after first boot I get this

root@venus:~# cat /etc/simple-upnpd.xml
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>

  <device>
    <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
      <friendlyName>BBB Venus (84:EB:18:E2:31:2F)</friendlyName>
      <manufacturer>Victron Energy</manufacturer>
      <manufacturerURL>http://www.victronenergy.com</manufacturerURL>
      <modelName>CCGX</modelName>
      <modelNumber>1.0</modelNumber>
      <modelURL>http://www.victronenergy.com/live/ccgx:start</modelURL>
          <presentationURL>http://www.victronenergy.com/live/ccgx:start</presentationURL>
      <UDN>uuid:com.victronenergy.ccgx.84:EB:18:E2:31:2F</UDN>
    </device>
</root>

Anyone see a problem with this?

There are some other recipes in the victronenergy repos that might need this same fix to the pkg_postinst function to return an error if not running on the host. Otherwise they are probably not doing what was intended.

from venus.

mpvader avatar mpvader commented on July 27, 2024

@scottellis regarding the fix in pkg_postinst: is this caused by a change in bitbake between Danny and Jethro? Or has this always been like this? Please explain, so we can check if it is also necessary for ccgx/danny.

And fix all other packages that have this issue too.

from venus.

scottellis avatar scottellis commented on July 27, 2024

I didn't know this about post install scripts behavior until yesterday.

Post-install scripts can run

  1. At the finish of the build of the rootfs
  2. On first boot
  3. After a package upgrade

If the post-install script succeeds in (1) then it won't be run again in (2).

The "x$D" = "x" check tests whether you are running in (1) or (2), but you have to explicitly fail the script with an exit 1 in (1) if you want the script to run again in (2).

At least back through Danny it looks like they have worked this way.

Section 5.3.6 of the Danny manual

http://www.yoctoproject.org/docs/1.3/mega-manual/mega-manual.html

I'll look at the usage in other victronenergy recipes.

from venus.

mpvader avatar mpvader commented on July 27, 2024

closed. simple-upnp works fine on the bbb now

from venus.

Related Issues (20)

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.