Changeset 581a54a in mainline


Ignore:
Timestamp:
2021-12-20T20:44:44Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dbc1398
Parents:
c0436cb
git-author:
Jiri Svoboda <jiri@…> (2021-12-20 20:30:41)
git-committer:
Jiri Svoboda <jiri@…> (2021-12-20 20:44:44)
Message:

Allow filtering list of drivers even in non-barebone mode

This reduces the size of RAM disk / OS image for platforms that do not
use barebone by default, namely amd64, ia32, ia64 and ppc32,
in some cases significantly.

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • meson/arch/amd64/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    4950arch_uspace_link_args = [ '-Wl,-z,max-page-size=0x1000', '-nostdlib', '-lgcc' ]
    5051
    51 
     52# Binaries to be included in a barebone build
    5253rd_essential += [
    5354        'app/edit',
     
    5657
    5758        'srv/audio/hound',
     59]
    5860
     61# Drivers to be included in a barebone build
     62rd_essential_drv += [
    5963        'drv/intctl/apic',
    6064        'drv/intctl/i8259',
     
    6872        'drv/hid/xtkbd',
    6973]
     74
     75# Drivers to be included in a regular build
     76rd_drv += [
     77        'drv/audio/hdaudio',
     78        'drv/audio/sb16',
     79        'drv/block/ahci',
     80        'drv/block/ata_bd',
     81        'drv/block/usbmast',
     82        'drv/block/virtio-blk',
     83        'drv/bus/isa',
     84        'drv/bus/pci/pciintel',
     85        'drv/bus/usb/ehci',
     86        'drv/bus/usb/ohci',
     87        'drv/bus/usb/uhci',
     88        'drv/bus/usb/usbdiag',
     89        'drv/bus/usb/usbflbk',
     90        'drv/bus/usb/usbhub',
     91        'drv/bus/usb/usbmid',
     92        'drv/bus/usb/vhc',
     93        'drv/bus/usb/xhci',
     94        'drv/char/i8042',
     95        'drv/char/ns8250',
     96        'drv/char/pc-lpt',
     97        'drv/hid/ps2mouse',
     98        'drv/hid/xtkbd',
     99        'drv/hid/usbhid',
     100        'drv/intctl/apic',
     101        'drv/intctl/i8259',
     102        'drv/nic/ar9271',
     103        'drv/nic/e1k',
     104        'drv/nic/ne2k',
     105        'drv/nic/rtl8139',
     106        'drv/nic/rtl8169',
     107        'drv/nic/virtio-net',
     108        'drv/platform/pc',
     109        'drv/time/cmos-rtc',
     110]
  • meson/arch/arm32/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    5556
    5657
    57 rd_essential += [
     58rd_essential_drv += [
    5859        'drv/bus/usb/ehci',
    5960        'drv/bus/usb/ohci',
     
    7374
    7475elif MACHINE == 'beagleboardxm' or MACHINE == 'beaglebone'
    75         rd_essential += [
     76        rd_essential_drv += [
    7677                'drv/platform/amdm37x',
    7778                'drv/fb/amdm37x_dispc',
     
    7980
    8081elif MACHINE == 'integratorcp'
    81         rd_essential += [
     82        rd_essential_drv += [
    8283                'drv/char/pl050',
    8384                'drv/hid/atkbd',
     
    8788        ]
    8889endif
     90
     91rd_drv += rd_essential_drv
  • meson/arch/arm64/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2015 Petr Pavlu
    34# All rights reserved.
     
    4647
    4748if MACHINE == 'virt'
    48         rd_essential += [
     49        rd_essential_drv += [
    4950                'drv/char/pl011',
    5051                'drv/intctl/gicv2',
     
    5455
    5556if MACHINE == 'hikey960'
    56         rd_essential += [
     57        rd_essential_drv += [
    5758                'drv/char/pl011',
    5859                'drv/intctl/gicv2',
     
    6061        ]
    6162endif
     63
     64rd_drv += rd_essential_drv
  • meson/arch/ia32/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    5657arch_uspace_link_args = [ '-nostdlib', '-lgcc' ]
    5758
    58 
     59# Binaries to be included in a barebone build
    5960rd_essential += [
    6061        'app/edit',
     
    6364
    6465        'srv/audio/hound',
     66]
    6567
     68# Drivers to be included in a barebone build
     69rd_essential_drv += [
    6670        'drv/intctl/apic',
    6771        'drv/intctl/i8259',
     
    7579        'drv/hid/xtkbd',
    7680]
     81
     82# Drivers to be included in a regular build
     83rd_drv += [
     84        'drv/audio/hdaudio',
     85        'drv/audio/sb16',
     86        'drv/block/ahci',
     87        'drv/block/ata_bd',
     88        'drv/block/usbmast',
     89        'drv/block/virtio-blk',
     90        'drv/bus/isa',
     91        'drv/bus/pci/pciintel',
     92        'drv/bus/usb/ehci',
     93        'drv/bus/usb/ohci',
     94        'drv/bus/usb/uhci',
     95        'drv/bus/usb/usbdiag',
     96        'drv/bus/usb/usbflbk',
     97        'drv/bus/usb/usbhub',
     98        'drv/bus/usb/usbmid',
     99        'drv/bus/usb/vhc',
     100        'drv/bus/usb/xhci',
     101        'drv/char/i8042',
     102        'drv/char/ns8250',
     103        'drv/char/pc-lpt',
     104        'drv/hid/ps2mouse',
     105        'drv/hid/xtkbd',
     106        'drv/hid/usbhid',
     107        'drv/intctl/apic',
     108        'drv/intctl/i8259',
     109        'drv/nic/ar9271',
     110        'drv/nic/e1k',
     111        'drv/nic/ne2k',
     112        'drv/nic/rtl8139',
     113        'drv/nic/rtl8169',
     114        'drv/nic/virtio-net',
     115        'drv/platform/pc',
     116        'drv/time/cmos-rtc',
     117]
  • meson/arch/ia64/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    4142
    4243if MACHINE == 'i460GX'
    43         rd_essential += [
     44        rd_essential_drv += [
    4445                'drv/platform/pc',
    4546                'drv/bus/pci/pciintel',
     
    5051
    5152elif MACHINE == 'ski'
    52         rd_essential += [
     53        rd_essential_drv += [
    5354                'drv/char/ski-con',
    5455                'drv/platform/ski',
     
    5657
    5758endif
     59
     60rd_drv += rd_essential_drv
  • meson/arch/mips32/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    6667
    6768if MACHINE == 'bmalta' or MACHINE == 'lmalta'
    68         rd_essential += [
     69        rd_essential_drv += [
    6970                'drv/platform/malta',
    7071                'drv/intctl/i8259',
     
    7980
    8081elif MACHINE == 'msim'
    81         rd_essential += [
     82        rd_essential_drv += [
    8283                'drv/platform/msim',
    8384                'drv/block/ddisk',
     
    8687
    8788endif
     89
     90rd_drv += rd_essential_drv
  • meson/arch/ppc32/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    3940
    4041
    41 rd_essential += [
     42rd_essential_drv += [
    4243        'drv/platform/mac',
    4344        'drv/bus/adb/cuda_adb',
     
    5455        'drv/hid/usbhid',
    5556]
     57
     58rd_drv += rd_essential_drv
  • meson/arch/riscv64/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    3637rd_essential += [
    3738]
     39
     40rd_drv += rd_essential_drv
  • meson/arch/sparc64/meson.build

    rc0436cb r581a54a  
    11#
     2# Copyright (c) 2021 Jiri Svoboda
    23# Copyright (c) 2019 Jiří Zárevúcky
    34# All rights reserved.
     
    7778
    7879if PROCESSOR == 'sun4v'
    79         rd_essential += [
     80        rd_essential_drv += [
    8081                'drv/platform/sun4v',
    8182                'drv/char/sun4v-con',
    8283        ]
    8384else
    84         rd_essential += [
     85        rd_essential_drv += [
    8586                'drv/platform/sun4u',
    8687                'drv/bus/pci/pciintel',
     
    9091        ]
    9192endif
     93
     94rd_drv += rd_essential_drv
  • meson/part/initrd_manifest/meson.build

    rc0436cb r581a54a  
    5252        'srv/hid/output',
    5353        'srv/klog',
     54]
    5455
     56rd_essential_drv = [
    5557        'drv/root/root',
    5658        'drv/root/virt',
    5759        'drv/fb/kfb',
    5860]
     61
     62rd_drv = rd_essential_drv
    5963
    6064if CONFIG_FB
  • uspace/meson.build

    rc0436cb r581a54a  
    5858endforeach
    5959
     60if CONFIG_BAREBONE
     61        drv_list = rd_essential_drv
     62else
     63        drv_list = rd_drv
     64endif
     65
    6066foreach drv : drvs
    6167        _basename = run_command(basename, drv, check: true).stdout().strip()
     
    6874
    6975        # Install driver metadata.
    70         if not CONFIG_BAREBONE or rd_essential.contains('drv' / drv)
     76        if drv_list.contains('drv' / drv)
    7177                _src = meson.current_source_dir() / 'drv' / drv / _basename + '.ma'
    7278                _dstdir = 'drv' / _basename
     
    9399        installdir = appdirs.get('installdir')
    94100
    95         install = not CONFIG_BAREBONE or rd_essential.contains(dir)
     101        is_drv = (dir.split('/')[0] == 'drv')
     102
     103        if is_drv
     104                # Drivers are installed based on rd_[essential_]drv list
     105                install = drv_list.contains(dir)
     106        else
     107                #
     108                # Servers and applications are installed all or
     109                # based on rd_essential in case of barebone build
     110                #
     111                install = not CONFIG_BAREBONE or rd_essential.contains(dir)
     112        endif
    96113
    97114        if install
     
    129146        # Binaries in the 'drv' subdirectory link libdrv by default.
    130147
    131         is_drv = (dir.split('/')[0] == 'drv')
    132148
    133149        if is_drv
Note: See TracChangeset for help on using the changeset viewer.