Skip to contentSkip to conversation

ts72xx, ts73xx, ts74xx? How to handle properly similar machines

RFC Petr Štetiar 2 participants 4 messages Oct 14, 2010 – Oct 18, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I've been asked if I could add support for the ts7400 board/machine in the OE. It's not a big deal, it's just an addition of one patch to the kernel recipe.

While I'll be into it, I was thinking about adding the base for the possible future addition of ts7300[2] boards also. Althought I own only ts7800 and ts7250, the ts7200[4], ts7300 and ts7400 families looks like they have a lot of common and it would be possible to have for example one kernel for all of them.

The question is, how to handle this correctly in OE? On the IRC, I was pointed to the SOC_FAMILY[3], but it says "The use of SOC_FAMILY as an override is currently a distribution or local setting", what does it mean?

Would it be possible to create, say ts7234.inc file with shared stuff for all the boards, and separate ts7{2,3,4}xx.conf files with the features for each series, say ts73xx would contain FPGA/video related stuff etc, so the machine specific overrides would be needed.

Any thoughts? Thanks.

1. http://www.embeddedarm.com/products/board-detail.php?product=TS-7400
2. http://www.embeddedarm.com/products/arm-sbc.php#ts-7300-fpga-series
3. http://docs.openembedded.org/usermanual/html/commonuse_new_machine.html
4. http://www.embeddedarm.com/products/arm-sbc.php#ts-7200-200mhz-series

-- ynezz

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Petr Štetiar

Hi,

I've been asked if I could add support for the ts7400 board/machine in the OE. It's not a big deal, it's just an addition of one patch to the kernel recipe.

While I'll be into it, I was thinking about adding the base for the possible future addition of ts7300[2] boards also. Althought I own only ts7800 and ts7250, the ts7200[4], ts7300 and ts7400 families looks like they have a lot of common and it would be possible to have for example one kernel for all of them.

Quoted 3 lines

The question is, how to handle this correctly in OE? On the IRC, I was pointed to the SOC_FAMILY[3], but it says "The use of SOC_FAMILY as an override is currently a distribution or local setting", what does it mean?

It means you need to use angstrom or set is as override in local.conf -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMtwP9MkyGM64RGpERAq2FAJ94Ml70y8lAxRB+PzKOtwyRPnEAnQCeKlY/ LLaTsCmSsKZEP69CIvzkEzE=
=FrGw
-----END PGP SIGNATURE-----

#2 lore raw

Koen Kooi <[email protected]> [2010-10-14 15:22:05]:

Quoted 15 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Petr Štetiar

Hi,

I've been asked if I could add support for the ts7400 board/machine in the OE. It's not a big deal, it's just an addition of one patch to the kernel recipe.

While I'll be into it, I was thinking about adding the base for the possible future addition of ts7300[2] boards also. Althought I own only ts7800 and ts7250, the ts7200[4], ts7300 and ts7400 families looks like they have a lot of common and it would be possible to have for example one kernel for all of them.

Quoted 5 lines
Quoted 3 lines

The question is, how to handle this correctly in OE? On the IRC, I was pointed to the SOC_FAMILY[3], but it says "The use of SOC_FAMILY as an override is currently a distribution or local setting", what does it mean?

It means you need to use angstrom or set is as override in local.conf

You mean setting it to something like a SOC_FAMILY = "ts7xxx"? And then do something like this, from recipes/ti/ti-linuxutils.inc:

do_compile() {
    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS

    case ${SOC_FAMILY} in
    dm365)
            modules="cmem edma irq";;
    omap3)
            modules="cmem sdma";;
        dm355)
            modules="cmem edma irq";;
    *)
            modules="cmem"
    esac

Well, I'm not OE/bitbake expert, but using something like do_compile_append_SOC_FAMILY() would fit more in OE style for me. I can't find any other usage of it. Anyway I think, that it would be abuse of SOC_FAMILY, something like the SBC_FAMILY would be more apropriate, but again, I'm not OE expert and I don't know what is possible.

-- ynezz

#3 lore raw
In reply to Koen Kooi

Koen Kooi <[email protected]> [2010-10-14 15:22:05]:

Quoted 1 line

It means you need to use angstrom or set is as override in local.conf

Ok, but would this work for example (it's not real life example)?

local.conf - SOC_FAMILY="ts7400"
machine/ts7xxx.inc - common stuff for all the boards machine/ts72xx.conf - include ts7xxx.inc and add board specific stuff machine/ts7250.conf - include ts72xx.conf and add board specific stuff machine/ts7260.conf - include ts72xx.conf and CF support machine/ts73xx.conf - include ts7xxx.inc and board specific stuff (FPGA + video) machine/ts74xx.conf - include ts7xxx.inc and add SD card support

can I than use this as some kind of overrides? Say I'll need to have different options in some of the packages and I would need to use something like this:

PACKAGE_ARCH += "${SOC_FAMILY}" SRC_URI_append_ts7xxx += "file://common.patch" SRC_URI_append_ts7260 += "file://compact-flash.patch" SRC_URI_append_ts74xx += "file://sd-card.patch" SRC_URI_append_ts73xx += "file://fpga.patch"

Because as I've seen the usage of the SOC_FAMILY in the recipes I don't think it would be possible. Thanks for the answer, or more specific example.

-- ynezz