summaryrefslogtreecommitdiff
path: root/elements/initramfs/initramfs-gz.bst
blob: 383e9603f86d761ac4ebcb4660b21e6ab2dd5cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
kind: script
description: The compressed initramfs

depends:
- filename: initramfs/initramfs.bst
  type: build
- filename: gnu-toolchain.bst
  type: build

variables:
  cwd: "%{build-root}"

config:
  layout:
  - element: gnu-toolchain.bst
    destination: /
  - element: initramfs/initramfs.bst
    destination: "%{build-root}"

  commands:
  - mkdir -p %{install-root}/boot
  # We need to ensure exec permissions here.
  # See: https://gitlab.com/BuildStream/buildstream/issues/84
  - chmod +x ./sbin/init ./sbin/shutdown
  - (find . -print0 | cpio -0 -H newc -o) |
    gzip -c > %{install-root}/boot/initramfs.gz