File tree Expand file tree Collapse file tree 8 files changed +394
-3
lines changed
Expand file tree Collapse file tree 8 files changed +394
-3
lines changed Original file line number Diff line number Diff line change 22
33# Only for regular builds, not bootloader-only builds
44if [ " $BR2_TARGET_ROOTFS_SQUASHFS " = " y" ]; then
5- cp " $BR2_EXTERNAL_INFIX_PATH /board/common/rootfs/usr/bin/onieprom" " $BINARIES_DIR /"
6-
75 # Quick intro for beginners, with links to more information
86 cp " $BR2_EXTERNAL_INFIX_PATH /board/common/README.txt" " $BINARIES_DIR /"
97fi
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/lowdown/Config.in"
2929source "$BR2_EXTERNAL_INFIX_PATH/package/mcd/Config.in"
3030source "$BR2_EXTERNAL_INFIX_PATH/package/mdns-alias/Config.in"
3131source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
32+ source "$BR2_EXTERNAL_INFIX_PATH/package/onieprom/Config.in"
3233source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
3334source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
3435source "$BR2_EXTERNAL_INFIX_PATH/package/python-statd/Config.in"
Original file line number Diff line number Diff line change 1+ menuconfig BR2_PACKAGE_ONIEPROM
2+ bool "onieprom"
3+ default y
4+ select BR2_PACKAGE_HOST_PYTHON3
5+ select BR2_PACKAGE_DBUS_PYTHON
6+ help
7+ ONIE EEPROM parser/generator
8+
9+ config BR2_PACKAGE_ONIEPROM_INSTALL_IMAGES
10+ bool "install onieprom in images"
11+ depends on BR2_PACKAGE_ONIEPROM
12+ default y
13+ help
14+ Install the onieprom script in the images direcory. Useful
15+ when the release is destined for someone who will have to
16+ create ONIE EEPROM binaries for deployment during
17+ manufacturing.
Original file line number Diff line number Diff line change 1+ ONIEPROM_VERSION = 1.0
2+ ONIEPROM_SITE_METHOD = local
3+ ONIEPROM_SITE = $(BR2_EXTERNAL_INFIX_PATH ) /src/onieprom
4+ ONIEPROM_LICENSE = GPLv2
5+ ONIEPROM_LICENSE_FILES = COPYING
6+ ONIEPROM_DEPENDENCIES = host-python3 python3 host-python-poetry-core
7+ ONIEPROM_SETUP_TYPE = pep517 # poetry
8+ ONIEPROM_INSTALL_IMAGES = $(if $(BR2_PACKAGE_ONIEPROM_INSTALL_IMAGES ) ,YES,NO)
9+
10+ define ONIEPROM_INSTALL_IMAGES_CMDS
11+ @cp $(@D ) /onieprom/onieprom.py $(BINARIES_DIR ) /onieprom
12+ @chmod +x $(BINARIES_DIR ) /onieprom
13+ endef
14+
15+ $(eval $(python-package))
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ def unpack_vendor(ext):
181181
182182 return d
183183
184- if __name__ == "__main__" :
184+ def main () :
185185 import argparse
186186 import json
187187 import os
@@ -216,3 +216,6 @@ def unpack_vendor(ext):
216216 args .outfile .buffer .write (into_tlv (json .load (args .infile )))
217217 else :
218218 args .outfile .write (json .dumps (from_tlv (args .infile )))
219+
220+ if __name__ == "__main__" :
221+ main ()
Original file line number Diff line number Diff line change 1+ [tool .poetry ]
2+ name = " infix-onieprom"
3+ version = " 1.0"
4+ description = " ONIE EEPROM parser/generator"
5+ license = " GPLv2"
6+ authors = [
7+ " KernelKit developers"
8+ ]
9+ packages = [
10+ { include = " onieprom" }
11+ ]
12+
13+ [build-system ]
14+ requires = [" poetry-core>=1.0.0" ]
15+ build-backend = " poetry.core.masonry.api"
16+
17+ [tool .poetry .scripts ]
18+ onieprom = " onieprom:main"
You can’t perform that action at this time.
0 commit comments