[OpenWrt-Devel] [PATCH 3/3] treewide: rename DEVICE_TYPE to DEFAULT_TYPE

Adrian Schmutzler mail at adrianschmutzler.de
Sat May 30 18:10:37 EDT 2020


> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Matthias Schiffer
> Sent: Samstag, 30. Mai 2020 16:45
> To: mans0n <mans0n at gorani.run>
> Cc: 'Linus Walleij' <linus.walleij at linaro.org>; openwrt-
> devel at lists.openwrt.org; mail at adrianschmutzler.de
> Subject: Re: [OpenWrt-Devel] [PATCH 3/3] treewide: rename DEVICE_TYPE
> to DEFAULT_TYPE
> 
> On 5/30/20 12:20 PM, mans0n wrote:
> > Hi Adrian, Matthias,
> >
> > I was preparing my own patch for converting DEVICE_TYPE to a
> > device-specific variable.
> >
> https://github.com/mans0n/openwrt/commit/4d41dd963ae8d595ef38ea0a3
> 8ea0
> > 8abdac1415d
> >
> > But I stumbled on some blockers so I left it behind...
> >
> > One of the blockers was the busybox hdparm.
> > I'd also found that DEVICE_TYPE in the busybox Makefile does not work
> > as intended, thanks to Linus for dealing with this.
> >
> >> On 5/29/20 10:52 PM, mail at adrianschmutzler.de wrote:
> >>>> Or we just drop the variable at all, and do DEFAULT_PACKAGES :=
> >>>> DEFAULT_PACKAGES.basic DEFAULT_PACKAGES.router at the
> beginning (!)
> >>>> of target.mk, so targets (effectively just 3 of them) can just
> >>>> overwrite it with DEFAULT_PACKAGES := DEFAULT_PACKAGES.basic
> >>>> DEFAULT_PACKAGES.nas directly in the few cases where that is
> >>>> necessary (I'd rather use DEFAULT_PACKAGES_BASIC etc. as names
> then).
> >>>
> >>> I've pushed a quick draft of this approach here:
> >>>
> >>> https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=r
> >>> efs/heads/devicetypedrop
> >>>
> >>>
> >>> Only the most topmost patch is relevant. From "make menuconfig" it
> >>> seems to work as expected.
> >>
> >> I would prefer to find a solution that doesn't require adding
> >> $(DEFAULT_PACKAGES_BASIC) to the other default package lists. I'll
> >> have to ponder over this a bit more. Posting the patch - possibly
> >> marked as [RFC] - would make discussing this easier.
> >>
> >>
> >>>
> >>> The if/else in busybox is not considered in this patch.
> >>>
> >>
> >> Meanwhile I've found another target-specific config setting in the
> >> busybox
> >> package: BUSYBOX_DEFAULT_TRUNCATE is enabled for TARGET_bcm53xx
> only.
> >>
> >> I assume "truncate" is tiny enough that it doesn't really justify
> >> making busybox non-shared, we could just build in truncate
> >> unconditionally. I don't know how contrained some of the "nas"
> >> targets are, but maybe we should just replace the busybox hack with a
> >> full-featured hdparm on these targets?
> >
> > Busybox hdparm is about 8k and full hdparm is about 93k. I think most
> > NAS devices can manage that space, so I agree with Matthias.
> > But the problem is that full hdparm is in the package feed, so it
> > shouldn't be included in DEFAULT_PACKAGES (unless we move the
> package
> > into the main repo).
> 
> Moving hdparm to OpenWrt base sounds fine to me. I can take care of that,
> and removing the target-specific busybox config, sometime this weekend.

I'd be happy about anything that removes the DEVICE_TYPE dependency from package config, as I don't really think it's worth keeping that entire mechanism for the small set of options and devices that are effectively affected here (referring to the busybox switch here, DEFAULT_PACKAGES are a separate discussion).

Best

Adrian

> 
> Mtthias
> 
> 
> >
> > Now I prefer removing DEVICE_TYPE entirely as Adrian suggested. I
> > can't see any use case of it other than package selections.
> > Perhaps we can create some meta packges (only containing dependencies)
> > as an alternative?
> >
> > Thanks.
> >
> >>
> >> Matthias
> >>
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list