Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#966 - ar71xx: images are not named to their board_names #7382

Closed
openwrt-bot opened this issue Aug 16, 2017 · 5 comments
Closed

FS#966 - ar71xx: images are not named to their board_names #7382

openwrt-bot opened this issue Aug 16, 2017 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

lynxis:

Create an image using the imagebuilder (e.g. ar71xx/generic)

  • make PROFILE=ubnt-loco-m-xw image
  • the resulting image is than named lede-ar71xx-generic-ubnt-loco-m-xw-squashfs-factory.bin
  • but looking into /tmp/sysinfo/board_name it's called "loco-m-xw"

original reporter: aparcar
Additional reference: openwrt/asu#26 (comment)

@openwrt-bot
Copy link
Author

NeoRaider:

Naming images after board_name is not feasible on ar71xx, as it is very common to use the same board name for different models that are the the same internally (but magic numbers in the image header differ).

I agree though that the image naming could be improved. In Gluon, we use a sanitized version of /tmp/sysinfo/model for the autoupdater image selection on most targets (for an example, have a look at the TP-Link and Ubiquiti sections in https://github.com/freifunk-gluon/gluon/blob/master/targets/ar71xx-generic - the first argument of the "device" directive defines the Gluon/autoupdater image name, while the second argument is the name used by LEDE)

@openwrt-bot
Copy link
Author

lynxis:

So we have:

  • image profile (the filename is based of)
  • machine name (the kernel depends on this)
  • board_name (user space depends of)
    Did I missed a type?

IMHO if the image needs to be different (because of some magics), it should have it's own board_name.

@openwrt-bot
Copy link
Author

NeoRaider:

Using a separate board_name for models that are basically the same hardware sounds like unnecessary code duplication in /lib/ar71xx.sh, /lib/upgrade/platform.sh, /etc/board.d/* etc. to me.

How about adding a new file /tmp/sysinfo/image_name? This would default to board_name in generic code, while ar71xx and other targets could override it where necessary.

Another target that uses board_name quite unusually is x86: here board_name is set to a sanitized version of the product name (as read from DMI data); this board_name is then used to identify platforms like the APU and set up LEDs etc. accordingly. So this would be another platform where deriving the image name from board_name is not possible.

Note: Another reason we base our image names on /tmp/sysinfo/model instead of board_name even on platforms that have a unique board_name -> image name mapping is that the model names are easier to understand for end users, as they usually include the vendor and the full unabbreviated name of the device.

@openwrt-bot
Copy link
Author

aparcar:

Hi, any news on how to handle the naming?
I build a parser for [[https://lede-project.org/toh/start|hardware overview]] and there seems to be no mapping between e.g. the [[https://lede-project.org/toh/hwdata/tp-link/tp-link_tl-wdr3600_v1|specific hardware info]] and the used profile tl-wdr3600-v1, except maybe parsing the URL with replacing '_' with '-'.
Is there a more convenient way to map the device name (as printed on device) to the profile to create the image?

@openwrt-bot
Copy link
Author

adrianschmutzler:

I think this discussion is obsoleted by retirement of ar71xx. Despite, I tried to achieve a similar goal when harmonizing names in ramips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant