[LEDE-DEV] Adding new targets/subtargets

Yousong Zhou yszhou4tech at gmail.com
Wed Dec 28 18:57:36 PST 2016


On 29 December 2016 at 10:04, Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
> I wanted to add a new target for x86, or possibly several.
>
> I have an immediate need for an optimized build to run on Xeon-based 1U servers for a project that I’m working on.  My work in progress is here:
>
> https://github.com/pprindeville/openwrt/commit/67a11380ed69351e320a410ec18c04e62fb548d3
>
> but I’m not clear on what ARCH_PACKAGES is or when it’s used… or why only target/linux/x86/ seems to use it.
>
> Looked on the Wiki but there doesn’t seem to be a blow-by-blow decomposition of what a target directory looks like.
>
> Also, I wanted to build targets with virtio drivers (net and scsi) for running on Parallels or KVM/Qemu… so that none-platform stuff could be tested, possibly in an automated testing environment.

Very likely you can just add xeon-specific bits to x86/64 subtarget.
I think it's intended to be both "modern" and "generic".  It already
contains various virtio device drivers and we even have qemu-2.6.2
with kvm support ready for it.

I cannot find direct reference to ARCH_PACKAGES in target/ dir.  I
think it's a string intended to represent the arch of packages built
for current target/subtarget.  Previously in OpenWrt, we build
packages like pppd separately for targets like ramips and ar71xx, even
though they are of the same arch "mips_24kc" (there was a time ar71xx
was optimized for 34kc though).  Now these packages are arch-specific
and will reside in dir bin/packages/<CONFIG_TARGET_ARCH_PACKAGES>.

>
> Is there any unofficial documentation (i.e. not on the wiki) about how to go about adding platforms?
>
> There’s a wiki entry on “adding a new device” but doesn’t seem to be applicable to what I’m doing.
>
> Any pointers are appreciated.

Adding target/subtarget does not happen very often, but the build
system changes a lot in various aspects.  Probably nobody bothers to
add such doc.  But we can always consult git log/mail history to see
how previous ones are added.

                yousong

>
> Thanks,
>
> -Philip
>



More information about the Lede-dev mailing list