Le mardi 14 avril 2015 à 08:37 +0200, Hans de Goede a écrit : > Hi, > > On 13-04-15 23:25, Paul Kocialkowski wrote: > > Le lundi 13 avril 2015 à 22:25 +0200, Maxime Ripard a écrit : > >> On Mon, Apr 13, 2015 at 09:30:53PM +0200, Hans de Goede wrote: > >>> Hi, > >>> > >>> On 13-04-15 17:50, Paul Kocialkowski wrote: > >>>> After working a bit on sunxi recently, I found myself somewhat puzzled > >>>> with the ways sunxi devices are named in mainstream U-Boot, mainstream > >>>> Linux (device-tree), sunxi-boards and the linux-sunxi wiki. What bothers > >>>> me particularly is the lack of consistency across those projects and > >>>> among devices. This is clearly not a technical topic of interest, but > >>>> all that disparity and lack of consistency is starting to annoy me a > >>>> lot. > >>>> > >>>> Currently, there are apparently no guidelines (or nobody cares to > >>>> respect or enforce them) on most of those projects. I would like to > >>>> discuss this problem with the maintainers of each of those so that we > >>>> could find a common and consistent way of naming sunxi devices, convert > >>>> the already supported devices to comply with the new naming scheme and > >>>> stick to it in the future. I know that a fair share of people just don't > >>>> care about it, but I hope that the maintainers for those projects will > >>>> see some interest in it. > >>>> > >>>> First off, such a change will probably mess up a few hand-written build > >>>> scripts and bother a few people at first, but I think it's better to do > >>>> it now instead of waiting or not doing anything about it. > >>>> > >>>> To summarize, the current situation varies a bit depending on each > >>>> project: > >>>> > >>>> U-Boot: > >>>> * Defconfig targets allow the use of upper-case, lower-case, dashes and > >>>> underscores > >>>> * Most targets follow the following scheme: [Vendor]_[Model]_defconfig > >>>> * Some targets do not respect the vendor or model typography > >>>> (A20-Olinuxino-Lime2 is not correct for the model part, it should be > >>>> A20-Olinuxino-LIME2) > >>>> * Some targets use dashes to mark spaces in either the vendor or model > >>>> part > >>>> * Some devices add prefixes to the configs > >>>> > >>>> Linux: > >>>> * Device-tree sources have a clear naming scheme, > >>>> a[xx]-sun[x]i-[device].dts, that only allows lower-case and dashes > >>>> * However, what [device] is is unclear and sometimes includes the vendor > >>>> name, sometimes not > >>>> > >>>> sunxi-boards: > >>>> * FEX files are all lower-case and allow dashes and underscores > >>>> * There is no clear scheme for the naming of devices, some files include > >>>> the vendor name, some don't > >>>> * Some files use dashes to mark spaces in either the vendor or model > >>>> part > >>>> > >>>> linux-sunxi wiki: > >>>> * The scheme to follow should be [Vendor]_[Model] and upper-case, > >>>> lower-case, dashes and underscores are allowed > >>>> * Some pages may not respect that convention > >>>> * Some targets do not respect the vendor or model typography > >>>> (A20-Olinuxino-Lime2 is not correct for the model part, it should be > >>>> A20-Olinuxino-LIME2) > >>>> * Some targets use dashes to mark spaces in either the vendor or model > >>>> part > >>>> > >>>> My proposal to unify all this is the following: > >>>> * linux-sunxi wiki: use the [Vendor]_[Model] convention while respecting > >>>> the correct typography for the vendor and model names (as defined by the > >>>> vendor) and using underscores for spaces > >>>> * Use exactly the same name for the U-Boot configs, except in the case > >>>> mediawiki automatically adds an upper case at the beginning of the page > >>>> name (iNet becomes INet but we should still use iNet in the U-Boot > >>>> config) > >>>> * Use that name with all underscores replaced by dashes and all caps > >>>> changed to lower-case in the Linux device-tree names > >>>> * Use that name with all caps changed to lower-case in sunxi-boards > >>>> > >>>> I am willing to submit patches for each projects and update the wiki > >>>> pages for each concerned device following this convention. Especially, I > >>>> would need Maxime's approval for the Linux part, Hans and/or Ian's > >>>> approval for U-Boot and an overal feeling of approval for the wiki and > >>>> sunxi-boards parts. > >>>> > >>>> Please let me know what you think about all this! > >>>> > >>> > >>> > >>> So my 2 cents on this are: > >> > >> I guess it was 3 cents ? ;) > >> > >>> 1) The dts file name is an ABI between u-boot and the kernel and as such > >>> cannot be changed for existing boards. But coming up with and documenting > >>> some standards for new boards may be a good idea. > >> > >> I never thought of the DTS filename, but I guess that's true, > >> especially if we don't consider the DT bindings themselves as an ABI > >> (even though that starts to backfire a bit), since we have to at least > >> provide some consistency to the downstream users. > > > > Well to be fair here, we know that only U-Boot is using device-tree on > > sunxi, so I doubt changing the names of a handful of dts files will > > break anything for anyone. > > Actually it will, the u-boot binary contains the name of the dtb > to use, and most distro boot configs (extlinux.conf) use this > to load the right dtb. So if we start renaming dtb files, > then as soon as the user installs a kernel upgrade (e.g. > via a simple apt-get update) his board will no longer boot. > > This is simply a hard ABI, no discussion possible. If we break this for > rhen we will break peoples boards, and we better have a very good reason > for doing so, not a minor cosmetic one. > > > I understand the point though, that it can be > > seen as an ABI (don't break the ABI), but it would be a shame for us to > > this as a pretext to not correct our mistake. > > > > Don't get me wrong, I don't like breaking ABIs more than the next guy > > (even though I fear Hans is starting to think this is becoming kind of > > habit for me), but this is really borderline. > > Nothing borderline about it, take a standard Fedora or Debian image, > both of which rely on the dtb name embedded in the u-boot binary, > change the dtb name in the kernel, upgrade the kernel, try to boot, > and voila the board will not boot (and no the old dtb file will not > help, as each kernel build has its own dir with dtb files). > > Really this is as hard an ABI as one can get, please do not break it.
Okay that makes sense, let's forget about the device-tree side then. -- Paul Kocialkowski, Replicant developer Replicant is a fully free Android distribution running on several devices, a free software mobile operating system putting the emphasis on freedom and privacy/security. Website: http://www.replicant.us/ Blog: http://blog.replicant.us/ Wiki/tracker/forums: http://redmine.replicant.us/ -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: This is a digitally signed message part
