From 85c4930c7c0b17491bb905a7fd21587df9164365 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sat, 31 Dec 2016 17:30:58 -0500 Subject: Initial commit --- project.yaml | 6 ++++++ target.bst | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 project.yaml create mode 100644 target.bst diff --git a/project.yaml b/project.yaml new file mode 100644 index 00000000..4aaf1af4 --- /dev/null +++ b/project.yaml @@ -0,0 +1,6 @@ +# Basic project configuration that doesnt override anything +# +name: pony + +aliases: + local: file:///home/tristan/codethink/GNOME/TEST_GIT/ diff --git a/target.bst b/target.bst new file mode 100644 index 00000000..02351e3a --- /dev/null +++ b/target.bst @@ -0,0 +1,18 @@ +kind: autotools +description: Some kinda autotools element +sources: +# This one has a comment ! +- kind: git + url: local:repoa + ref: db1710143fccf78c3fa185e33f616361c1cce711 + track: master +- kind: git + url: local:repob + track: master + ref: 162dbaa938ab3de9577beefba9b7f3a3dd09dc2e +config: + pony-dict: + + # Has a comment ! + - pony: cheese + thisone: 5 -- cgit v1.2.1 From 8df973b24690d0c7d0b38618b4bf3520c3078e2f Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 10 Jan 2017 21:52:41 -0500 Subject: Another commit ! --- build-build.bst | 10 ++++++++++ build.bst | 10 ++++++++++ dep-one.bst | 16 ++++++++++++++++ dep-two.bst | 18 ++++++++++++++++++ project.conf | 7 +++++++ project.yaml | 6 ------ run-build.bst | 5 +++++ run.bst | 5 +++++ target.bst | 23 +++++++++++++---------- 9 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 build-build.bst create mode 100644 build.bst create mode 100644 dep-one.bst create mode 100644 dep-two.bst create mode 100644 project.conf delete mode 100644 project.yaml create mode 100644 run-build.bst create mode 100644 run.bst diff --git a/build-build.bst b/build-build.bst new file mode 100644 index 00000000..f9fe50fb --- /dev/null +++ b/build-build.bst @@ -0,0 +1,10 @@ +kind: autotools +description: Some kinda autotools element +sources: +- kind: git + url: gnome:glade + track: master + ref: b696f16aceec7562d653510eaf0670c135ad8a5e +config: + configure-commands: + - pony diff --git a/build.bst b/build.bst new file mode 100644 index 00000000..9f3ad36e --- /dev/null +++ b/build.bst @@ -0,0 +1,10 @@ +kind: autotools +description: Some kinda autotools element +config: + configure-commands: + - pony +depends: +- filename: build-build.bst + type: build +- filename: run-build.bst + type: runtime diff --git a/dep-one.bst b/dep-one.bst new file mode 100644 index 00000000..453ad9c6 --- /dev/null +++ b/dep-one.bst @@ -0,0 +1,16 @@ +kind: autotools +description: Some kinda autotools element +sources: +- kind: git + url: gnome:gedit + track: master + submodules: + libgd: + url: gnome:libgd + ref: 3bdfa5764deb9909dae9ef041a7e9b6d6297341a +config: + configure-commands: + - pony +depends: +- filename: build.bst + type: build diff --git a/dep-two.bst b/dep-two.bst new file mode 100644 index 00000000..f438bc67 --- /dev/null +++ b/dep-two.bst @@ -0,0 +1,18 @@ +kind: autotools +description: Some kinda autotools element +config: + configure-commands: + - pony +depends: +- filename: build.bst + type: build +- filename: run.bst + type: runtime +sources: +- kind: git + url: gnome:nautilus + track: master + submodules: + libgd: + url: gnome:libgd + ref: 53cee1de89c5bd9fe2d0c3b68ba78583c7fae6e6 diff --git a/project.conf b/project.conf new file mode 100644 index 00000000..b96f2f22 --- /dev/null +++ b/project.conf @@ -0,0 +1,7 @@ +# Basic project configuration that doesnt override anything +# +name: pony + +aliases: + local: file:///home/tristan/codethink/GNOME/TEST_GIT/ + gnome: git://git.gnome.org/ diff --git a/project.yaml b/project.yaml deleted file mode 100644 index 4aaf1af4..00000000 --- a/project.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Basic project configuration that doesnt override anything -# -name: pony - -aliases: - local: file:///home/tristan/codethink/GNOME/TEST_GIT/ diff --git a/run-build.bst b/run-build.bst new file mode 100644 index 00000000..cd1f7396 --- /dev/null +++ b/run-build.bst @@ -0,0 +1,5 @@ +kind: autotools +description: Some kinda autotools element +config: + configure-commands: + - pony diff --git a/run.bst b/run.bst new file mode 100644 index 00000000..cd1f7396 --- /dev/null +++ b/run.bst @@ -0,0 +1,5 @@ +kind: autotools +description: Some kinda autotools element +config: + configure-commands: + - pony diff --git a/target.bst b/target.bst index 02351e3a..10a61564 100644 --- a/target.bst +++ b/target.bst @@ -1,18 +1,21 @@ kind: autotools description: Some kinda autotools element sources: -# This one has a comment ! -- kind: git - url: local:repoa - ref: db1710143fccf78c3fa185e33f616361c1cce711 - track: master -- kind: git - url: local:repob - track: master - ref: 162dbaa938ab3de9577beefba9b7f3a3dd09dc2e + # This one has a comment ! + - kind: git + url: local:repoa + track: master + ref: db1710143fccf78c3fa185e33f616361c1cce711 + - kind: git + url: local:repob + track: pony + ref: 5975641ef40174b9ed505b26cdb31c1ac178e258 config: pony-dict: - # Has a comment ! + # Has a comment ! - pony: cheese thisone: 5 +depends: +- dep-one.bst +- dep-two.bst -- cgit v1.2.1 From ca9f9d60746bbc731d1f8e2389c7ad7ec3e6228f Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 10 Jan 2017 22:55:24 -0500 Subject: Added folks ! --- build-build.bst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-build.bst b/build-build.bst index f9fe50fb..bfa6cee2 100644 --- a/build-build.bst +++ b/build-build.bst @@ -5,6 +5,10 @@ sources: url: gnome:glade track: master ref: b696f16aceec7562d653510eaf0670c135ad8a5e +- kind: git + url: gnome:folks + track: master + ref: a2d0a75044c85003344e82b296915858f4ab6c2e config: configure-commands: - pony -- cgit v1.2.1 From 129c7b86ce97e3744ca1f41f8a82a139c0c8aba1 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 13 Jan 2017 11:00:41 -0500 Subject: Committing changes --- dep-two.bst | 2 +- run.bst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dep-two.bst b/dep-two.bst index f438bc67..00a59d08 100644 --- a/dep-two.bst +++ b/dep-two.bst @@ -15,4 +15,4 @@ sources: submodules: libgd: url: gnome:libgd - ref: 53cee1de89c5bd9fe2d0c3b68ba78583c7fae6e6 + ref: 3c00fa343ec5b642846bc4c280cec7bb18a299a3 diff --git a/run.bst b/run.bst index cd1f7396..f6d5c0bb 100644 --- a/run.bst +++ b/run.bst @@ -1,5 +1,5 @@ kind: autotools description: Some kinda autotools element config: - configure-commands: + install-commands: - pony -- cgit v1.2.1 From 72cd458a01c153b3d6e4c49d32e7c60033e14c41 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 13 Jan 2017 11:02:37 -0500 Subject: More changes --- project.conf | 1 - target.bst | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/project.conf b/project.conf index b96f2f22..28dc1075 100644 --- a/project.conf +++ b/project.conf @@ -3,5 +3,4 @@ name: pony aliases: - local: file:///home/tristan/codethink/GNOME/TEST_GIT/ gnome: git://git.gnome.org/ diff --git a/target.bst b/target.bst index 10a61564..f843064f 100644 --- a/target.bst +++ b/target.bst @@ -1,15 +1,5 @@ kind: autotools description: Some kinda autotools element -sources: - # This one has a comment ! - - kind: git - url: local:repoa - track: master - ref: db1710143fccf78c3fa185e33f616361c1cce711 - - kind: git - url: local:repob - track: pony - ref: 5975641ef40174b9ed505b26cdb31c1ac178e258 config: pony-dict: -- cgit v1.2.1 From 81376bb5be7de3d3326c7d6413add0323502880b Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Mon, 16 Jan 2017 16:05:19 -0500 Subject: Trying some ostree sources ! --- build-build.bst | 13 +++++-------- build.bst | 9 +++++++++ dep-two.bst | 2 +- keys/gnome-sdk.gpg | Bin 0 -> 629 bytes 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 keys/gnome-sdk.gpg diff --git a/build-build.bst b/build-build.bst index bfa6cee2..64cb72bf 100644 --- a/build-build.bst +++ b/build-build.bst @@ -1,14 +1,11 @@ kind: autotools description: Some kinda autotools element sources: -- kind: git - url: gnome:glade - track: master - ref: b696f16aceec7562d653510eaf0670c135ad8a5e -- kind: git - url: gnome:folks - track: master - ref: a2d0a75044c85003344e82b296915858f4ab6c2e +- kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Platform/x86_64/3.20 + gpg-key: keys/gnome-sdk.gpg + ref: 6f900cf02847c5d959b20d0c6f3428d91b576c10150e9bf149d8b91901e2d4c8 config: configure-commands: - pony diff --git a/build.bst b/build.bst index 9f3ad36e..ae134bae 100644 --- a/build.bst +++ b/build.bst @@ -1,5 +1,14 @@ kind: autotools description: Some kinda autotools element +sources: +- kind: git + url: gnome:glade + track: glade-3-18 + ref: 1f6639f981a36fba45ba5bc4dc24b79df1935208 +- kind: git + url: gnome:folks + track: master + ref: a2d0a75044c85003344e82b296915858f4ab6c2e config: configure-commands: - pony diff --git a/dep-two.bst b/dep-two.bst index 00a59d08..9b31adb3 100644 --- a/dep-two.bst +++ b/dep-two.bst @@ -15,4 +15,4 @@ sources: submodules: libgd: url: gnome:libgd - ref: 3c00fa343ec5b642846bc4c280cec7bb18a299a3 + ref: 4484f67b7fd29587c6a8ee787e6b7721ee518e7a diff --git a/keys/gnome-sdk.gpg b/keys/gnome-sdk.gpg new file mode 100644 index 00000000..8434b686 Binary files /dev/null and b/keys/gnome-sdk.gpg differ -- cgit v1.2.1 From bebe2b1d88ecc4d99f84016029a8ec37f7667828 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 17 Jan 2017 13:59:13 -0500 Subject: build-build is now ostree import of GNOME Sdk --- build-build.bst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build-build.bst b/build-build.bst index 64cb72bf..7a4ad38c 100644 --- a/build-build.bst +++ b/build-build.bst @@ -1,11 +1,10 @@ -kind: autotools -description: Some kinda autotools element +kind: import +description: Import the GNOME SDK sources: - kind: ostree url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Platform/x86_64/3.20 + track: runtime/org.gnome.Sdk/x86_64/3.22 gpg-key: keys/gnome-sdk.gpg - ref: 6f900cf02847c5d959b20d0c6f3428d91b576c10150e9bf149d8b91901e2d4c8 + ref: 7cb7ec7286e0d70183c61183da2cd9e837299d615e1fa8674cb2806047994928 config: - configure-commands: - - pony + collect: files -- cgit v1.2.1 From 1b6d50dd22aa9c91880cf43091a1a019a8e0bf8d Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 17 Jan 2017 14:06:31 -0500 Subject: Adding gnome-desktop bst --- gnome-desktop.bst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gnome-desktop.bst diff --git a/gnome-desktop.bst b/gnome-desktop.bst new file mode 100644 index 00000000..e53c6905 --- /dev/null +++ b/gnome-desktop.bst @@ -0,0 +1,18 @@ +kind: autotools +description: GNOME Desktop module + +sources: +- kind: git + url: gnome:gnome-desktop + track: master + +config: + configure-commands: + - | + %{autogen} + - | + %{configure} --disable-debug-tools --disable-udev + +depends: +- filename: gnome-sdk.bst + type: build -- cgit v1.2.1 From dddbcaf0a14df13a1c5ea27556278d073fe607bd Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 18 Jan 2017 11:29:03 -0500 Subject: Face lift: Now we actually build some things --- build-build.bst | 10 ---------- build.bst | 19 ------------------- dep-one.bst | 16 ---------------- dep-two.bst | 18 ------------------ eog-plugins.bst | 15 +++++++++++++++ eog.bst | 14 ++++++++++++++ glade.bst | 18 ++++++++++++++++++ gnome-desktop.bst | 7 ++++--- gnome-platform.bst | 10 ++++++++++ gnome-sdk.bst | 11 +++++++++++ libpeas.bst | 18 ++++++++++++++++++ project.conf | 12 ++++++++++-- run-build.bst | 5 ----- run.bst | 5 ----- target.bst | 11 ----------- 15 files changed, 100 insertions(+), 89 deletions(-) delete mode 100644 build-build.bst delete mode 100644 build.bst delete mode 100644 dep-one.bst delete mode 100644 dep-two.bst create mode 100644 eog-plugins.bst create mode 100644 eog.bst create mode 100644 glade.bst create mode 100644 gnome-platform.bst create mode 100644 gnome-sdk.bst create mode 100644 libpeas.bst delete mode 100644 run-build.bst delete mode 100644 run.bst delete mode 100644 target.bst diff --git a/build-build.bst b/build-build.bst deleted file mode 100644 index 7a4ad38c..00000000 --- a/build-build.bst +++ /dev/null @@ -1,10 +0,0 @@ -kind: import -description: Import the GNOME SDK -sources: -- kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 7cb7ec7286e0d70183c61183da2cd9e837299d615e1fa8674cb2806047994928 -config: - collect: files diff --git a/build.bst b/build.bst deleted file mode 100644 index ae134bae..00000000 --- a/build.bst +++ /dev/null @@ -1,19 +0,0 @@ -kind: autotools -description: Some kinda autotools element -sources: -- kind: git - url: gnome:glade - track: glade-3-18 - ref: 1f6639f981a36fba45ba5bc4dc24b79df1935208 -- kind: git - url: gnome:folks - track: master - ref: a2d0a75044c85003344e82b296915858f4ab6c2e -config: - configure-commands: - - pony -depends: -- filename: build-build.bst - type: build -- filename: run-build.bst - type: runtime diff --git a/dep-one.bst b/dep-one.bst deleted file mode 100644 index 453ad9c6..00000000 --- a/dep-one.bst +++ /dev/null @@ -1,16 +0,0 @@ -kind: autotools -description: Some kinda autotools element -sources: -- kind: git - url: gnome:gedit - track: master - submodules: - libgd: - url: gnome:libgd - ref: 3bdfa5764deb9909dae9ef041a7e9b6d6297341a -config: - configure-commands: - - pony -depends: -- filename: build.bst - type: build diff --git a/dep-two.bst b/dep-two.bst deleted file mode 100644 index 9b31adb3..00000000 --- a/dep-two.bst +++ /dev/null @@ -1,18 +0,0 @@ -kind: autotools -description: Some kinda autotools element -config: - configure-commands: - - pony -depends: -- filename: build.bst - type: build -- filename: run.bst - type: runtime -sources: -- kind: git - url: gnome:nautilus - track: master - submodules: - libgd: - url: gnome:libgd - ref: 4484f67b7fd29587c6a8ee787e6b7721ee518e7a diff --git a/eog-plugins.bst b/eog-plugins.bst new file mode 100644 index 00000000..7c3e7f09 --- /dev/null +++ b/eog-plugins.bst @@ -0,0 +1,15 @@ +kind: autotools +description: eog plugins +sources: +- kind: git + url: gnome:eog-plugins + track: 3.16.5 + ref: d643bb4a4215a700d62b977742ea1041fa0ffdbf +depends: +- libpeas.bst +- gnome-desktop.bst +- eog.bst +- filename: gnome-sdk.bst + type: build +- filename: gnome-platform.bst + type: build diff --git a/eog.bst b/eog.bst new file mode 100644 index 00000000..03e92237 --- /dev/null +++ b/eog.bst @@ -0,0 +1,14 @@ +kind: autotools +description: eog module +sources: +- kind: git + url: gnome:eog + track: gnome-3-20 + ref: 3126ebacfb9e265570df04510bf2608ea8ce0823 +depends: +- libpeas.bst +- gnome-desktop.bst +- filename: gnome-sdk.bst + type: build +- filename: gnome-platform.bst + type: build diff --git a/glade.bst b/glade.bst new file mode 100644 index 00000000..9d3018c8 --- /dev/null +++ b/glade.bst @@ -0,0 +1,18 @@ +kind: autotools +description: Glade Interface Designer +sources: +- kind: git + url: gnome:glade + track: glade-3-20 + ref: f53fade6d12ece7b64142977c3a6d781fd37cc8e +depends: +- filename: gnome-sdk.bst + type: build +- filename: gnome-platform.bst + type: build +config: + configure-commands: + - | + %{autogen} + - | + %{configure} --disable-man-pages diff --git a/gnome-desktop.bst b/gnome-desktop.bst index e53c6905..a68be968 100644 --- a/gnome-desktop.bst +++ b/gnome-desktop.bst @@ -1,11 +1,10 @@ kind: autotools description: GNOME Desktop module - sources: - kind: git url: gnome:gnome-desktop - track: master - + track: gnome-3-22 + ref: b9e03c705253b1a35bd59c7a7f7ffc54d011342f config: configure-commands: - | @@ -16,3 +15,5 @@ config: depends: - filename: gnome-sdk.bst type: build +- filename: gnome-platform.bst + type: build diff --git a/gnome-platform.bst b/gnome-platform.bst new file mode 100644 index 00000000..28f46b5f --- /dev/null +++ b/gnome-platform.bst @@ -0,0 +1,10 @@ +kind: import +description: Import the GNOME Platform +sources: +- kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Platform/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 3f3912c71d02ff77cca9e9f806c18bb8dc7e6ec6835f5e4b0e80a0af34597cf3 +config: + source: files diff --git a/gnome-sdk.bst b/gnome-sdk.bst new file mode 100644 index 00000000..f5d8396e --- /dev/null +++ b/gnome-sdk.bst @@ -0,0 +1,11 @@ +kind: import +description: Import the GNOME SDK +sources: +- kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Sdk/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 7cb7ec7286e0d70183c61183da2cd9e837299d615e1fa8674cb2806047994928 +config: + source: files + target: usr diff --git a/libpeas.bst b/libpeas.bst new file mode 100644 index 00000000..cab3b027 --- /dev/null +++ b/libpeas.bst @@ -0,0 +1,18 @@ +kind: autotools +description: libpeas module +sources: +- kind: git + url: gnome:libpeas + track: 1.20 + ref: 42a16ccb89e36733ba7339386f36cda3a15742ac +depends: +- filename: gnome-sdk.bst + type: build +- filename: gnome-platform.bst + type: build +config: + configure-commands: + - | + autoreconf -ivf + - | + %{configure} diff --git a/project.conf b/project.conf index 28dc1075..acbcf22f 100644 --- a/project.conf +++ b/project.conf @@ -1,6 +1,14 @@ -# Basic project configuration that doesnt override anything +# Eye of GNOME flatpak demo # -name: pony +name: eog aliases: gnome: git://git.gnome.org/ + +variables: + prefix: /app + +environment: + CFLAGS: "-O2 -g" + CXXFLAGS: "-O2 -g" + V: "1" diff --git a/run-build.bst b/run-build.bst deleted file mode 100644 index cd1f7396..00000000 --- a/run-build.bst +++ /dev/null @@ -1,5 +0,0 @@ -kind: autotools -description: Some kinda autotools element -config: - configure-commands: - - pony diff --git a/run.bst b/run.bst deleted file mode 100644 index f6d5c0bb..00000000 --- a/run.bst +++ /dev/null @@ -1,5 +0,0 @@ -kind: autotools -description: Some kinda autotools element -config: - install-commands: - - pony diff --git a/target.bst b/target.bst deleted file mode 100644 index f843064f..00000000 --- a/target.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: autotools -description: Some kinda autotools element -config: - pony-dict: - - # Has a comment ! - - pony: cheese - thisone: 5 -depends: -- dep-one.bst -- dep-two.bst -- cgit v1.2.1 From a0468a07a80d2e51c8afd1d8a2984424f7798990 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 19 Jan 2017 16:38:39 -0500 Subject: Now it's building gedit. And it also builds glade for the hell of it. --- eog-plugins.bst | 15 --------------- eog.bst | 14 -------------- gedit.bst | 22 ++++++++++++++++++++++ glade.bst | 9 ++++----- gnome-desktop.bst | 19 ------------------- gspell.bst | 10 ++++++++++ gtksourceview.bst | 16 ++++++++++++++++ libpeas.bst | 10 ++++------ project.conf | 8 +++++++- 9 files changed, 63 insertions(+), 60 deletions(-) delete mode 100644 eog-plugins.bst delete mode 100644 eog.bst create mode 100644 gedit.bst delete mode 100644 gnome-desktop.bst create mode 100644 gspell.bst create mode 100644 gtksourceview.bst diff --git a/eog-plugins.bst b/eog-plugins.bst deleted file mode 100644 index 7c3e7f09..00000000 --- a/eog-plugins.bst +++ /dev/null @@ -1,15 +0,0 @@ -kind: autotools -description: eog plugins -sources: -- kind: git - url: gnome:eog-plugins - track: 3.16.5 - ref: d643bb4a4215a700d62b977742ea1041fa0ffdbf -depends: -- libpeas.bst -- gnome-desktop.bst -- eog.bst -- filename: gnome-sdk.bst - type: build -- filename: gnome-platform.bst - type: build diff --git a/eog.bst b/eog.bst deleted file mode 100644 index 03e92237..00000000 --- a/eog.bst +++ /dev/null @@ -1,14 +0,0 @@ -kind: autotools -description: eog module -sources: -- kind: git - url: gnome:eog - track: gnome-3-20 - ref: 3126ebacfb9e265570df04510bf2608ea8ce0823 -depends: -- libpeas.bst -- gnome-desktop.bst -- filename: gnome-sdk.bst - type: build -- filename: gnome-platform.bst - type: build diff --git a/gedit.bst b/gedit.bst new file mode 100644 index 00000000..aa3f9f03 --- /dev/null +++ b/gedit.bst @@ -0,0 +1,22 @@ +kind: autotools +description: gedit module +sources: +- kind: git + url: gnome:gedit + track: master + ref: 3bdfa5764deb9909dae9ef041a7e9b6d6297341a + submodules: + libgd: + url: gnome:libgd +depends: +- filename: gnome-sdk.bst +- filename: gnome-platform.bst +- filename: gtksourceview.bst +- filename: gspell.bst +- filename: libpeas.bst +variables: + conf-cmd: ./autogen.sh +config: + configure-commands: + - | + %{configure} --disable-introspection diff --git a/glade.bst b/glade.bst index 9d3018c8..782900c3 100644 --- a/glade.bst +++ b/glade.bst @@ -2,17 +2,16 @@ kind: autotools description: Glade Interface Designer sources: - kind: git + ref: f53fade6d12ece7b64142977c3a6d781fd37cc8e url: gnome:glade track: glade-3-20 - ref: f53fade6d12ece7b64142977c3a6d781fd37cc8e depends: -- filename: gnome-sdk.bst - type: build -- filename: gnome-platform.bst - type: build +- gnome-sdk.bst +- gnome-platform.bst config: configure-commands: - | + # I need to keep this comment ! %{autogen} - | %{configure} --disable-man-pages diff --git a/gnome-desktop.bst b/gnome-desktop.bst deleted file mode 100644 index a68be968..00000000 --- a/gnome-desktop.bst +++ /dev/null @@ -1,19 +0,0 @@ -kind: autotools -description: GNOME Desktop module -sources: -- kind: git - url: gnome:gnome-desktop - track: gnome-3-22 - ref: b9e03c705253b1a35bd59c7a7f7ffc54d011342f -config: - configure-commands: - - | - %{autogen} - - | - %{configure} --disable-debug-tools --disable-udev - -depends: -- filename: gnome-sdk.bst - type: build -- filename: gnome-platform.bst - type: build diff --git a/gspell.bst b/gspell.bst new file mode 100644 index 00000000..5028861f --- /dev/null +++ b/gspell.bst @@ -0,0 +1,10 @@ +kind: autotools +description: gspell module +sources: +- kind: git + url: gnome:gspell + track: 1.2.0 + ref: 372ad5dd7d7f18950f8f013bf31efda505dfa449 +depends: +- filename: gnome-sdk.bst +- filename: gnome-platform.bst diff --git a/gtksourceview.bst b/gtksourceview.bst new file mode 100644 index 00000000..89ff3298 --- /dev/null +++ b/gtksourceview.bst @@ -0,0 +1,16 @@ +kind: autotools +description: gtksourceview module +sources: +- kind: git + url: gnome:gtksourceview + track: gnome-3-22 + ref: 0bdf237be153d496f9173f181519b6447105c1f9 +depends: +- filename: gnome-sdk.bst +- filename: gnome-platform.bst +config: + configure-commands: + - | + %{autogen} + - | + %{configure} --disable-Werror diff --git a/libpeas.bst b/libpeas.bst index cab3b027..0e6b7719 100644 --- a/libpeas.bst +++ b/libpeas.bst @@ -3,16 +3,14 @@ description: libpeas module sources: - kind: git url: gnome:libpeas - track: 1.20 - ref: 42a16ccb89e36733ba7339386f36cda3a15742ac + track: libpeas-1.18.0 + ref: 05d8b7d8ddb5875a0355ba3664733998e2621221 depends: - filename: gnome-sdk.bst - type: build - filename: gnome-platform.bst - type: build +variables: + conf-cmd: ./autogen.sh config: configure-commands: - - | - autoreconf -ivf - | %{configure} diff --git a/project.conf b/project.conf index acbcf22f..1eea3f1a 100644 --- a/project.conf +++ b/project.conf @@ -1,10 +1,14 @@ # Eye of GNOME flatpak demo # -name: eog +name: gedit aliases: gnome: git://git.gnome.org/ +# We're gonna eventually try to build a flatpak, +# so lets start trying to override the environment +# in the appropriate ways. +# variables: prefix: /app @@ -12,3 +16,5 @@ environment: CFLAGS: "-O2 -g" CXXFLAGS: "-O2 -g" V: "1" + PATH: /app/bin:/usr/bin:/bin:/usr/sbin:/sbin + PKG_CONFIG_PATH: '/app/lib/pkgconfig:/usr/lib/pkgconfig' -- cgit v1.2.1 From b2a502a4580b4dee9f3ebedff0ca27aa1425e346 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 19 Jan 2017 16:51:35 -0500 Subject: fixup --- project.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.conf b/project.conf index 1eea3f1a..e326edd1 100644 --- a/project.conf +++ b/project.conf @@ -1,4 +1,4 @@ -# Eye of GNOME flatpak demo +# Gedit text editor flatpakish build demo # name: gedit -- cgit v1.2.1 From 487995301d9729f12ec31a2e3e700b270cbde9ad Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:31:10 +0900 Subject: project.conf: Some custom environments for building flatpaks --- project.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project.conf b/project.conf index e326edd1..004e1bb9 100644 --- a/project.conf +++ b/project.conf @@ -17,4 +17,6 @@ environment: CXXFLAGS: "-O2 -g" V: "1" PATH: /app/bin:/usr/bin:/bin:/usr/sbin:/sbin - PKG_CONFIG_PATH: '/app/lib/pkgconfig:/usr/lib/pkgconfig' + PKG_CONFIG_PATH: /app/lib/pkgconfig:/usr/lib/pkgconfig + XDG_DATA_DIRS: /app/share:/usr/share + GI_TYPELIB_PATH: /app/lib/girepository-1.0:/usr/lib/girepository-1.0 -- cgit v1.2.1 From bc30a3b2375ac9e02c06618c57fd3482e6c0db13 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:31:42 +0900 Subject: New GNOME sdk ref --- gnome-sdk.bst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-sdk.bst b/gnome-sdk.bst index f5d8396e..b40be4e6 100644 --- a/gnome-sdk.bst +++ b/gnome-sdk.bst @@ -5,7 +5,7 @@ sources: url: https://sdk.gnome.org/repo/ track: runtime/org.gnome.Sdk/x86_64/3.22 gpg-key: keys/gnome-sdk.gpg - ref: 7cb7ec7286e0d70183c61183da2cd9e837299d615e1fa8674cb2806047994928 + ref: 4f68757ee521fbec13809d4fbad5eac13b0a828908d9599d33ef5de6d47abf5b config: source: files target: usr -- cgit v1.2.1 From a95e929bc77c6d0870bc8934501285b5b1479703 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:31:55 +0900 Subject: New GNOME platform ref --- gnome-platform.bst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-platform.bst b/gnome-platform.bst index 28f46b5f..4d546c3a 100644 --- a/gnome-platform.bst +++ b/gnome-platform.bst @@ -5,6 +5,6 @@ sources: url: https://sdk.gnome.org/repo/ track: runtime/org.gnome.Platform/x86_64/3.22 gpg-key: keys/gnome-sdk.gpg - ref: 3f3912c71d02ff77cca9e9f806c18bb8dc7e6ec6835f5e4b0e80a0af34597cf3 + ref: b8cefee73336be957b195a797c454808307ff853f811771d5e577f071b5540e4 config: source: files -- cgit v1.2.1 From bbc14e14d78ac3b94cb094d7a90aa38687618683 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:35:43 +0900 Subject: gtksourceview: new ref --- gtksourceview.bst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtksourceview.bst b/gtksourceview.bst index 89ff3298..d5242da2 100644 --- a/gtksourceview.bst +++ b/gtksourceview.bst @@ -4,7 +4,7 @@ sources: - kind: git url: gnome:gtksourceview track: gnome-3-22 - ref: 0bdf237be153d496f9173f181519b6447105c1f9 + ref: e996f1c73bf1bbc766ff920a67258f9ad2e31c16 depends: - filename: gnome-sdk.bst - filename: gnome-platform.bst -- cgit v1.2.1 From 195399095e77ed9a438a91cbaf065c807d29295d Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:35:56 +0900 Subject: gedit.bst: Removed some unneeded customizations, we can build with introspection. --- gedit.bst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gedit.bst b/gedit.bst index aa3f9f03..8ec9bdd0 100644 --- a/gedit.bst +++ b/gedit.bst @@ -4,7 +4,7 @@ sources: - kind: git url: gnome:gedit track: master - ref: 3bdfa5764deb9909dae9ef041a7e9b6d6297341a + ref: b1d7de77c27c021b481b79bbc9369327368d7710 submodules: libgd: url: gnome:libgd @@ -14,9 +14,3 @@ depends: - filename: gtksourceview.bst - filename: gspell.bst - filename: libpeas.bst -variables: - conf-cmd: ./autogen.sh -config: - configure-commands: - - | - %{configure} --disable-introspection -- cgit v1.2.1 From 8a3d414a6f207763a9960113c79275956ec96027 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 15:36:26 +0900 Subject: Removing glade.bst, this has no place in a gedit build demo. --- glade.bst | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 glade.bst diff --git a/glade.bst b/glade.bst deleted file mode 100644 index 782900c3..00000000 --- a/glade.bst +++ /dev/null @@ -1,17 +0,0 @@ -kind: autotools -description: Glade Interface Designer -sources: -- kind: git - ref: f53fade6d12ece7b64142977c3a6d781fd37cc8e - url: gnome:glade - track: glade-3-20 -depends: -- gnome-sdk.bst -- gnome-platform.bst -config: - configure-commands: - - | - # I need to keep this comment ! - %{autogen} - - | - %{configure} --disable-man-pages -- cgit v1.2.1 From 38e7d6867f874db7154cc863c8cabece1c6d23c2 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 25 Jan 2017 20:32:31 +0900 Subject: Added integration commands for the platform and SDK --- gnome-platform.bst | 4 ++++ gnome-sdk.bst | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/gnome-platform.bst b/gnome-platform.bst index 4d546c3a..caeb958e 100644 --- a/gnome-platform.bst +++ b/gnome-platform.bst @@ -8,3 +8,7 @@ sources: ref: b8cefee73336be957b195a797c454808307ff853f811771d5e577f071b5540e4 config: source: files +public: + bst: + integration-commands: + - ldconfig diff --git a/gnome-sdk.bst b/gnome-sdk.bst index b40be4e6..6d990831 100644 --- a/gnome-sdk.bst +++ b/gnome-sdk.bst @@ -9,3 +9,10 @@ sources: config: source: files target: usr +public: + bst: + integration-commands: + - | + if [ -d "/app/share/glib-2.0/schemas" ]; then + glib-compile-schemas /app/share/glib-2.0/schemas + fi -- cgit v1.2.1 From 3b4a250c527d188f26e8deb6f10e59dbe8b18356 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 26 Jan 2017 22:00:16 +0900 Subject: gnome-platform.bst: Architecture conditional ostree import source Pull in a different org.gnome.Platform branch depending on the build architecture. --- gnome-platform.bst | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/gnome-platform.bst b/gnome-platform.bst index caeb958e..79346805 100644 --- a/gnome-platform.bst +++ b/gnome-platform.bst @@ -1,14 +1,23 @@ kind: import description: Import the GNOME Platform -sources: -- kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Platform/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: b8cefee73336be957b195a797c454808307ff853f811771d5e577f071b5540e4 config: source: files public: bst: integration-commands: - ldconfig +arches: + x86_64: + sources: + - kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Platform/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 + i386: + sources: + - kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Platform/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f -- cgit v1.2.1 From 70a45a4364bb270ba6d83476fd19be11e5b6cf65 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 26 Jan 2017 22:01:00 +0900 Subject: gnome-sdk.bst: Architecture conditional ostree import source Pull in a different org.gnome.Sdk branch depending on the build architecture. --- gnome-sdk.bst | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/gnome-sdk.bst b/gnome-sdk.bst index 6d990831..6c645fa3 100644 --- a/gnome-sdk.bst +++ b/gnome-sdk.bst @@ -1,11 +1,5 @@ kind: import description: Import the GNOME SDK -sources: -- kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 4f68757ee521fbec13809d4fbad5eac13b0a828908d9599d33ef5de6d47abf5b config: source: files target: usr @@ -16,3 +10,18 @@ public: if [ -d "/app/share/glib-2.0/schemas" ]; then glib-compile-schemas /app/share/glib-2.0/schemas fi +arches: + x86_64: + sources: + - kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Sdk/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 + i386: + sources: + - kind: ostree + url: https://sdk.gnome.org/repo/ + track: runtime/org.gnome.Sdk/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 -- cgit v1.2.1 From 7d6dc7242598361009ab492db2367e545fc53189 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 1 Feb 2017 20:20:18 +0900 Subject: Remove "V" environment setting from project configuration This is on by default for any autotools or supporting build system. --- project.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/project.conf b/project.conf index 004e1bb9..15069bb1 100644 --- a/project.conf +++ b/project.conf @@ -15,7 +15,6 @@ variables: environment: CFLAGS: "-O2 -g" CXXFLAGS: "-O2 -g" - V: "1" PATH: /app/bin:/usr/bin:/bin:/usr/sbin:/sbin PKG_CONFIG_PATH: /app/lib/pkgconfig:/usr/lib/pkgconfig XDG_DATA_DIRS: /app/share:/usr/share -- cgit v1.2.1 From d85382e41efbe3f3f9012a08851f93bb4919de65 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 1 Feb 2017 20:37:29 +0900 Subject: Manual conversion of Baserock's build-essential stratum This huge commit is a manual conversion, notes on what was needed: o project.conf defines the arch specific stuff which was previously hardcoded into YBD, so the stage1 target and target etc are all defined by the build-essential project.conf o Direct and easy changes for git source representation o Added stage1.bst & stage2.bst "stacks", everything built in stage2 build-depends on stage1.bst, and the final build-essential products build-depend on stage2.bst (note build-depend means to depend _only_ for building, not propagated forward). o Instead of using host tools we build on the GNOME flatpak sdk/platform bundles o Some build-essential morph files use $(dirname $(pwd)) for a sysroot, which is weird, it means the morph files rely on building at one directory below the slash sysroot - in buildstream we build in /buildstream/build which is two - had to replace these with $(dirname $(dirname $(pwd))) instead o Remove the devices sections from the fhs-dirs elements, not allowed to create static device nodes in buildstream. --- build-essential.bst | 20 +++++ build-essential/binutils.bst | 23 +++++ build-essential/busybox.bst | 103 +++++++++++++++++++++++ build-essential/ccache.bst | 27 ++++++ build-essential/fhs-dirs.bst | 26 ++++++ build-essential/gawk.bst | 19 +++++ build-essential/gcc.bst | 66 +++++++++++++++ build-essential/glibc.bst | 76 +++++++++++++++++ build-essential/gnome-platform.bst | 27 ++++++ build-essential/gnome-sdk.bst | 20 +++++ build-essential/linux-api-headers.bst | 38 +++++++++ build-essential/m4-tarball.bst | 19 +++++ build-essential/make.bst | 20 +++++ build-essential/stage1-binutils.bst | 38 +++++++++ build-essential/stage1-gcc.bst | 100 ++++++++++++++++++++++ build-essential/stage1.bst | 7 ++ build-essential/stage2-binutils.bst | 38 +++++++++ build-essential/stage2-busybox.bst | 99 ++++++++++++++++++++++ build-essential/stage2-fake-bash.bst | 15 ++++ build-essential/stage2-fhs-dirs.bst | 31 +++++++ build-essential/stage2-gawk.bst | 28 +++++++ build-essential/stage2-gcc-fixed-headers.bst | 37 +++++++++ build-essential/stage2-gcc.bst | 102 +++++++++++++++++++++++ build-essential/stage2-glibc.bst | 120 +++++++++++++++++++++++++++ build-essential/stage2-libstdcxx.bst | 55 ++++++++++++ build-essential/stage2-linux-api-headers.bst | 41 +++++++++ build-essential/stage2-make.bst | 27 ++++++ build-essential/stage2-reset-specs.bst | 33 ++++++++ build-essential/stage2.bst | 19 +++++ build-essential/zlib.bst | 23 +++++ gedit.bst | 16 ---- gnome-platform.bst | 23 ----- gnome-sdk.bst | 27 ------ gspell.bst | 10 --- gtksourceview.bst | 16 ---- libpeas.bst | 16 ---- project.conf | 62 ++++++++++---- 37 files changed, 1344 insertions(+), 123 deletions(-) create mode 100644 build-essential.bst create mode 100644 build-essential/binutils.bst create mode 100644 build-essential/busybox.bst create mode 100644 build-essential/ccache.bst create mode 100644 build-essential/fhs-dirs.bst create mode 100644 build-essential/gawk.bst create mode 100644 build-essential/gcc.bst create mode 100644 build-essential/glibc.bst create mode 100644 build-essential/gnome-platform.bst create mode 100644 build-essential/gnome-sdk.bst create mode 100644 build-essential/linux-api-headers.bst create mode 100644 build-essential/m4-tarball.bst create mode 100644 build-essential/make.bst create mode 100644 build-essential/stage1-binutils.bst create mode 100644 build-essential/stage1-gcc.bst create mode 100644 build-essential/stage1.bst create mode 100644 build-essential/stage2-binutils.bst create mode 100644 build-essential/stage2-busybox.bst create mode 100644 build-essential/stage2-fake-bash.bst create mode 100644 build-essential/stage2-fhs-dirs.bst create mode 100644 build-essential/stage2-gawk.bst create mode 100644 build-essential/stage2-gcc-fixed-headers.bst create mode 100644 build-essential/stage2-gcc.bst create mode 100644 build-essential/stage2-glibc.bst create mode 100644 build-essential/stage2-libstdcxx.bst create mode 100644 build-essential/stage2-linux-api-headers.bst create mode 100644 build-essential/stage2-make.bst create mode 100644 build-essential/stage2-reset-specs.bst create mode 100644 build-essential/stage2.bst create mode 100644 build-essential/zlib.bst delete mode 100644 gedit.bst delete mode 100644 gnome-platform.bst delete mode 100644 gnome-sdk.bst delete mode 100644 gspell.bst delete mode 100644 gtksourceview.bst delete mode 100644 libpeas.bst diff --git a/build-essential.bst b/build-essential.bst new file mode 100644 index 00000000..54a5d00b --- /dev/null +++ b/build-essential.bst @@ -0,0 +1,20 @@ +kind: stack + +depends: +- build-essential/binutils.bst +- build-essential/busybox.bst +- build-essential/ccache.bst +- build-essential/fhs-dirs.bst +- build-essential/gawk.bst +- build-essential/gcc.bst +- build-essential/glibc.bst +- build-essential/linux-api-headers.bst +- build-essential/m4-tarball.bst +- build-essential/make.bst + +# Build essential is the base runtime, ldconfig +# must be run on it. +public: + bst: + integration-commands: + - ldconfig diff --git a/build-essential/binutils.bst b/build-essential/binutils.bst new file mode 100644 index 00000000..39996ffd --- /dev/null +++ b/build-essential/binutils.bst @@ -0,0 +1,23 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst +- build-essential/zlib.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - | + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --with-system-zlib diff --git a/build-essential/busybox.bst b/build-essential/busybox.bst new file mode 100644 index 00000000..9eca9302 --- /dev/null +++ b/build-essential/busybox.bst @@ -0,0 +1,103 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # Busybox's default config has everything enabled. + - make defconfig KCONFIG_NOTIMESTAMP=1 + + - sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'%{prefix}/share/udhcpc/default.script'"|' + -i .config + - sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' + -i .config + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK, but in GENIVI baseline we want to get rid of it + # - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + # Now turn on some little bits we do need + - sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config + - sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' + -i .config + - sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' + -i .config + + build-commands: + - make KCONFIG_NOTIMESTAMP=1 + + install-commands: + - | + # Note here we intentionally ignore '%{prefix}', this is going into '/' + make CONFIG_PREFIX="%{install-root}" KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}/bin/busybox" + + # Set up man environment variables + - mkdir -p "%{install-root}/etc" + - | + cat << EOF > "%{install-root}/etc/man.conf" + # This file is used by man to provide a manpath for those without one by + # examining their PATH environment variable. + # + # Lines beginning with `#' are comments and are ignored. Any combination of + # tabs or spaces may be used as `whitespace' separators. + + MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man + MANDATORY_MANPATH /usr/local/share/man + EOF diff --git a/build-essential/ccache.bst b/build-essential/ccache.bst new file mode 100644 index 00000000..ed5b088f --- /dev/null +++ b/build-essential/ccache.bst @@ -0,0 +1,27 @@ +kind: autotools + +sources: +- kind: git + url: upstream:ccache + track: baserock/build-essential + ref: 567631456f0899cdf0c382f898d38aadc8901d32 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst +- build-essential/zlib.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + install-commands: + - make DESTDIR="%{install-root}" install + - mkdir -p "%{install-root}%{prefix}/lib/ccache" + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/$cc"; + done + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/%{target}-$cc"; + done diff --git a/build-essential/fhs-dirs.bst b/build-essential/fhs-dirs.bst new file mode 100644 index 00000000..b0b76de3 --- /dev/null +++ b/build-essential/fhs-dirs.bst @@ -0,0 +1,26 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 1218cbd38a4f4e9da75af6f7fae946ca92666afb + +depends: +- filename: build-essential/stage2.bst + type: build + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/build-essential/gawk.bst b/build-essential/gawk.bst new file mode 100644 index 00000000..bac25a56 --- /dev/null +++ b/build-essential/gawk.bst @@ -0,0 +1,19 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst new file mode 100644 index 00000000..56ca5d86 --- /dev/null +++ b/build-essential/gcc.bst @@ -0,0 +1,66 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/build-essential + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/linux-api-headers.bst +- build-essential/glibc.bst +- build-essential/zlib.bst +- build-essential/m4-tarball.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't + # fully work; we will need to hobble the multilib configuration in + # config/i386/t-linux64 if we really want to kill /lib64). + # 2. Avoid having more than one copy of ZLib in use on the system + # 3. Multilib does not make sense in Baserock. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + `# [1]` --libdir=%{prefix}/lib \ + --disable-bootstrap \ + `# [2]` --with-system-zlib \ + `# [3]` --disable-multilib \ + --enable-languages=c,c++,fortran + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + - ln -s gcc "%{install-root}%{prefix}/bin/cc" + - | + for fortran_alias in f77 f90 f95; do + ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" + done diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst new file mode 100644 index 00000000..d634b5f7 --- /dev/null +++ b/build-essential/glibc.bst @@ -0,0 +1,76 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/linux-api-headers.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - mkdir o + + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + # We override the PATH here to remove /tools/bin from it. + # Thanks to this glibc finds bash in /bin/bash through the /bin + # symlink. This is important because glibc changes the path to bash + # of the shebang in some scripts and these scripts will be broken if + # they point to bash in /tools/bin/bash. + export PATH="/usr/bin:/sbin:/bin"; + export CFLAGS="-O2 $CFLAGS"; + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + --disable-profile \ + --enable-kernel=3.0.0 \ + --without-cvs \ + --without-selinux \ + --enable-obsolete-rpc + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < nsswitch.conf + passwd: compat + group: compat + shadow: compat + + hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 + networks: files + + protocols: db files + services: db files + ethers: db files + rpc: db files + + netgroup: nis + EOF + - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" diff --git a/build-essential/gnome-platform.bst b/build-essential/gnome-platform.bst new file mode 100644 index 00000000..fd5efb6b --- /dev/null +++ b/build-essential/gnome-platform.bst @@ -0,0 +1,27 @@ +kind: import +description: Import the GNOME Platform +config: + source: files +public: + bst: + integration-commands: + - ldconfig + - | + if [ -d "/app/share/glib-2.0/schemas" ]; then + glib-compile-schemas /app/share/glib-2.0/schemas + fi +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/build-essential/gnome-sdk.bst b/build-essential/gnome-sdk.bst new file mode 100644 index 00000000..6b0f158f --- /dev/null +++ b/build-essential/gnome-sdk.bst @@ -0,0 +1,20 @@ +kind: import +description: Import the GNOME SDK +config: + source: files + target: usr +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/build-essential/linux-api-headers.bst b/build-essential/linux-api-headers.bst new file mode 100644 index 00000000..db98e096 --- /dev/null +++ b/build-essential/linux-api-headers.bst @@ -0,0 +1,38 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: build-essential/stage2.bst + type: build + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/build-essential/m4-tarball.bst b/build-essential/m4-tarball.bst new file mode 100644 index 00000000..41f9969d --- /dev/null +++ b/build-essential/m4-tarball.bst @@ -0,0 +1,19 @@ +kind: autotools + +sources: +- kind: git + url: upstream:m4-tarball + track: m4-1.4.17 + ref: 23c11479b3ad787adc7a651ee0c4347839e47723 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-gcc-warnings diff --git a/build-essential/make.bst b/build-essential/make.bst new file mode 100644 index 00000000..514140cf --- /dev/null +++ b/build-essential/make.bst @@ -0,0 +1,20 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/build-essential/stage1-binutils.bst b/build-essential/stage1-binutils.bst new file mode 100644 index 00000000..8c89c7ce --- /dev/null +++ b/build-essential/stage1-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- build-essential/gnome-platform.bst +- build-essential/gnome-sdk.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # We set the sysroot location dynamically at runtime by passing + # `--sysroot` to GCC, so we need to build a linker with sysroot support. + # We set it to a non-existent directory as a safety net to avoid looking + # at the host dirs in case we forget to set the sysroot. Setting the + # lib path is vital to avoid the tools we build linking to the libraries + # on the host system; the '=' makes the path we give relative to the + # sysroot, which we can then set at runtime by passing -Wl,--sysroot to + # GCC. Although nothing should be installed on /lib64, we configure the + # linker to look at that directory as well to make things more robust + # (currently GCC installs libraries to this directory at least on + # x86_64). + + - | + %{configure} --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$(sh config.guess) \ + --target=%{target-stage1} \ + --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" diff --git a/build-essential/stage1-gcc.bst b/build-essential/stage1-gcc.bst new file mode 100644 index 00000000..81c4d40a --- /dev/null +++ b/build-essential/stage1-gcc.bst @@ -0,0 +1,100 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/build-essential + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- build-essential/gnome-platform.bst +- build-essential/gnome-sdk.bst +- build-essential/stage1-binutils.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # Workaround from LFS due GCC not detecting stack protection correctly + - | + sed -i -e '/k prot/a \ + gcc_cv_libc_provides_ssp=yes + ' gcc/configure + + - mkdir o + + # Configure flag notes: + # 1. See gcc.morph. + # 2. Although we will be setting a sysroot at runtime, giving a + # temporary one at configuration time seems necessary so that + # `--with-native-system-header-dir` produces effect and + # /tools/include is in the include path for the newly built GCC. We + # set it by default to a non-existent directory to avoid GCC looking + # at the host dirs, in case we forget to give it at runtime. + # 3. Disable searching /usr/local/include for headers + # 4. The pass 1 compiler needs to find the libraries we build in pass + # 2. Include path must be set explicility, because it defaults to + # $SYSROOT/usr/include rather than $SYSROOT/include. + # 5. Disable stuff that doesn't work when building a cross compiler + # without an existing libc, and generally try to keep this build as + # simple as possible. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + --host=$(sh ../config.guess) \ + --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{libdir}" \ + `# [2]` --with-sysroot=/nonexistentdir \ + --with-newlib \ + `# [3]` --with-local-prefix="%{prefix}" \ + `# [4]` --with-native-system-header-dir="%{prefix}/include" \ + --without-headers \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [5]` --disable-decimal-float \ + `# [5]` --disable-threads \ + `# [5]` --disable-libatomic \ + `# [5]` --disable-libgomp \ + `# [5]` --disable-libitm \ + `# [5]` --disable-libquadmath \ + `# [5]` --disable-libsanitizer \ + `# [5]` --disable-libssp \ + `# [5]` --disable-libvtv \ + `# [5]` --disable-libcilkrts \ + `# [5]` --disable-libstdc++-v3 \ + --enable-languages=c,c++ + + build-commands: + - | + # GCC is not passing the correct host/target flags to GMP's configure + # script, which causes it to not use the machine-dependent code for + # the platform and use the generic one instead. However, the generic + # code results on an undefined reference to `__gmpn_invert_limb' in + # ARMv7. Fix the invocation of GMP's configure script so that GMP can + # use the machine-dependent code. + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/build-essential/stage1.bst b/build-essential/stage1.bst new file mode 100644 index 00000000..7304572a --- /dev/null +++ b/build-essential/stage1.bst @@ -0,0 +1,7 @@ +kind: stack + +depends: +- build-essential/gnome-platform.bst +- build-essential/gnome-sdk.bst +- build-essential/stage1-binutils.bst +- build-essential/stage1-gcc.bst diff --git a/build-essential/stage2-binutils.bst b/build-essential/stage2-binutils.bst new file mode 100644 index 00000000..a515d5dd --- /dev/null +++ b/build-essential/stage2-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + # binutils has its own embedded libtool, which is old and strips out + # `--sysroot`. Work around by modifying the compiler command to + # include the sysroot flag + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=%{target-stage1} \ + --target=%{target-stage1} + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + make diff --git a/build-essential/stage2-busybox.bst b/build-essential/stage2-busybox.bst new file mode 100644 index 00000000..12e770dd --- /dev/null +++ b/build-essential/stage2-busybox.bst @@ -0,0 +1,99 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in + # the PATH supplied by the stage2-gcc chunk, which can't execute outside of + # the stage 3 staging area. + - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK. + - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config + - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config + - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 + + install-commands: + # We expect to be built with a non-standard prefix in stage 2 (i.e. not + # /usr). The install will break if prefix is set to /usr. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make CONFIG_PREFIX="%{install-root}%{prefix}" \ + HOSTCC="/usr/bin/gcc" \ + CROSS_COMPILE=%{target-stage1}- \ + KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}%{prefix}"/bin/busybox diff --git a/build-essential/stage2-fake-bash.bst b/build-essential/stage2-fake-bash.bst new file mode 100644 index 00000000..8bd5b15a --- /dev/null +++ b/build-essential/stage2-fake-bash.bst @@ -0,0 +1,15 @@ +kind: manual + +depends: +- filename: build-essential/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "%{install-root}%{prefix}/bin/bash" diff --git a/build-essential/stage2-fhs-dirs.bst b/build-essential/stage2-fhs-dirs.bst new file mode 100644 index 00000000..80ce42f4 --- /dev/null +++ b/build-essential/stage2-fhs-dirs.bst @@ -0,0 +1,31 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 1218cbd38a4f4e9da75af6f7fae946ca92666afb + +depends: +- filename: build-essential/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - rmdir "%{install-root}/bin" + - ln -s "%{prefix}/bin" "%{install-root}/bin" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/build-essential/stage2-gawk.bst b/build-essential/stage2-gawk.bst new file mode 100644 index 00000000..ee901796 --- /dev/null +++ b/build-essential/stage2-gawk.bst @@ -0,0 +1,28 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls + --build=$(sh config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/build-essential/stage2-gcc-fixed-headers.bst b/build-essential/stage2-gcc-fixed-headers.bst new file mode 100644 index 00000000..a83fca25 --- /dev/null +++ b/build-essential/stage2-gcc-fixed-headers.bst @@ -0,0 +1,37 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/build-essential + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + # Stage 1 GCC's fixincludes process created a limits.h before there was + # a real limits.h available for the target. This step (taken from Linux + # Linux From Scratch) creates a better one so that stage 2 GCC can compile. + # + # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to + # overwrite files in a staging area is to install a new chunk. + # This is undesired behaviour in the long term, as we want to never + # have overlaps, so this functionality may go away. + - | + libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) + sysroot="$(dirname $(dirname $(pwd)))" + target_libgcc_dir="${libgcc_dir#$sysroot}" + mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" + cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ + >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" diff --git a/build-essential/stage2-gcc.bst b/build-essential/stage2-gcc.bst new file mode 100644 index 00000000..445fe6f7 --- /dev/null +++ b/build-essential/stage2-gcc.bst @@ -0,0 +1,102 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/build-essential + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst +- build-essential/stage2-gcc-fixed-headers.bst +- build-essential/stage2-libstdcxx.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # In other projects we specify the sysroot location using CPPFLAGS. + # Here, that breaks because GCC compiles stuff for the *build* machine, + # too ... and this requires using the host's compiler, which cannot use + # the same set of CPPFLAGS as the target. If we specify the sysroot + # using CC instead then we don't interfere, because we are only + # specifying the *host* C compiler. + # + # Configure flag notes: + # 1. It's vital that this compiler runs in the bootstrap machine, and + # targets the same machine (TARGET_STAGE1) so that the stage 1 GCC + # is used instead of the compiler of the build machine. + # 2. See gcc.morph. + # 3. Disable searching /usr/local/include for headers + # 4. This flag causes the correct --sysroot flag to be passed when + # calling stage 1 GCC. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + export AR="%{target-stage1}-ar" + export RANLIB="%{target-stage1}-ranlib" + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + `# [1]` --host=%{target-stage1} \ + `# [1]` --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [2]` --libdir=%{prefix}/lib \ + `# [3]` --with-local-prefix=%{prefix} \ + `# [4]` --with-build-sysroot="$STAGE2_SYSROOT" \ + --disable-bootstrap \ + --disable-nls \ + --disable-multilib \ + --disable-libgomp \ + --disable-libstdcxx-pch \ + --enable-languages=c,c++ + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + + # Stage 3 builds need to link against this file in the location that + # it will be in the final system, so we make a temporary link now. + # + # On x86_64 GCC resolutely installs its libraries into lib64. To fix this + # would require hobbling the MULTILIB_OSDIRNAMES field in + # gcc/config/i386/t-linux64 and this might break things, so for now we + # tolerate the inconsistency. + - | + if [ "$(echo %{target} | cut -c -6)" = "x86_64" ]; then + libdir=lib64 + else + libdir=lib + fi + + install -d "%{install-root}/lib" + ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/" + ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/" diff --git a/build-essential/stage2-glibc.bst b/build-essential/stage2-glibc.bst new file mode 100644 index 00000000..0f0bace5 --- /dev/null +++ b/build-essential/stage2-glibc.bst @@ -0,0 +1,120 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. Avoid installing to PREFIX/lib64 on x86_64. + # 2. Location of linux-api-headers. + # 3. Normal flags. See glibc.morph. + # 4. Force configuration values of certain things that can't be detected + # in a cross-compile. + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(../scripts/config.guess) --host=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{prefix}/lib" \ + `# [2]` --with-headers="%{prefix}/include" \ + `# [3]` --disable-profile --enable-kernel=2.6.25 \ + `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ + libc_cv_forced_unwind=yes libc_cv_ssp=no + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" + - | + # Fix up GCC to handle the sysroot containing glibc being in a different + # location for each chunk build. + # + # For headers, it's enough to pass -B in the CPPFLAGS. This would work for + # the startup files (crt*.o) as well, except where libtool is involved (in + # which case it strips -B out of your LDFLAGS before calling GCC). We get + # around this by making GCC locate them relative to the environment variable + # STAGE2_SYSROOT, which we can then set along with CPPFLAGS in each stage 2 + # chunk build. + # + # We also force the use of the program loader at PREFIX/lib/ld.so instead + # of its usual home in /lib or /lib64, which is necessary for the output of + # stage 2 to work as a chroot when building stage 3. + + sysroot="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc --print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$sysroot}" + mkdir -p "$target_specs_dir" + + %{target-stage1}-gcc -dumpspecs | + sed -e "s@[gMS]\?crt[1in].o%s@%:getenv(STAGE2_SYSROOT %{libdir}/&)@g" \ + -e "s@/lib\(64\)\?/ld@%{libdir}/ld@g" \ + > "$target_specs_dir/specs-for-sysroot" + + # NASTY HACK # + # We create a symlink to the actual specs here, so that later the + # symlink can be replaced with a dangling link. + # + # This is necessary as we need to have gcc use its internal specs, + # which can differ to the specs generated by `gcc -dumpspecs`. + # + # The dangling symlink will not make it onto the final system, just + # like all other bootstrap only components. + ln -s specs-for-sysroot "$target_specs_dir/specs" + + # Install a symlink for the program interpreter (ld.so) so that binaries + # built in stage 3 before the stage 3 glibc is built can use it. + # FIXME: get a better way of finding the name of the loader. The lib64 + # path is hardcoded into glibc in the file + # sysdeps/unix/sysv/linux/configure. + - install -d %{install-root}/lib + - | + case "%{bst-arch}" in + x86_64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ + "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; + ppc64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld64.so.1" \ + "%{install-root}/lib64/ld64.so.1" ;; + *) + loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld-linux*)) + [ -z $loader ] && loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld.so*)) + [ -z $loader ] && ( echo "Bug in stage2-glibc ld.so symlinks" ; exit 1 ) + ln -s "%{prefix}/lib/$loader" "%{install-root}/lib/$loader" + esac diff --git a/build-essential/stage2-libstdcxx.bst b/build-essential/stage2-libstdcxx.bst new file mode 100644 index 00000000..f8a75a23 --- /dev/null +++ b/build-essential/stage2-libstdcxx.bst @@ -0,0 +1,55 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/build-essential + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. The thread C++ library cannot be built, as the thread C library + # was not build in stage1-gcc. + # 2. Prevents the installation of precompiled include files, which are + # not needed at this stage. + # 3. From LFS: the header location of C++ needs to be explicitly given + # as we are running the configure script from the top-level + # directory. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + # -fPIC must be given, otherwise it will not be possible to create + # shared libraries linked to libstdc++ + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + cd o && ../libstdc++-v3/configure \ + --build=$(sh ../config.guess) \ + --host="%{target-stage1}" \ + --target="%{target-stage1}" \ + --prefix="%{prefix}" \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [1]` --disable-libstdcxx-threads \ + `# [2]` --disable-libstdcxx-pch \ + `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 + + build-commands: + - cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/build-essential/stage2-linux-api-headers.bst b/build-essential/stage2-linux-api-headers.bst new file mode 100644 index 00000000..d72106c0 --- /dev/null +++ b/build-essential/stage2-linux-api-headers.bst @@ -0,0 +1,41 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: build-essential/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/build-essential/stage2-make.bst b/build-essential/stage2-make.bst new file mode 100644 index 00000000..3b760c0d --- /dev/null +++ b/build-essential/stage2-make.bst @@ -0,0 +1,27 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls --without-guile + --build=$(sh config/config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/build-essential/stage2-reset-specs.bst b/build-essential/stage2-reset-specs.bst new file mode 100644 index 00000000..4b3b6f91 --- /dev/null +++ b/build-essential/stage2-reset-specs.bst @@ -0,0 +1,33 @@ +kind: manual + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + # Nasty hack to get around being unable to reliably add configuration to gcc, + # hence the gcc specs are modified, combined with Baserock's rootfs protection + # preventing specs being modified before builds. + # The limitation is overcome by installing files as part of a chunk, which + # overwrites previous files. + # New specs were added for the bootstrap builds, but after stage2 we start + # having chrooted builds, so the old specs need to be replaced. + # Unfortunately we can't just replace the specs with the ones gcc produces, + # since gcc behaves differently without specs to with specs it produces! + # So we use a **NASTY HACK** to replace the specs symlink with one that + # points to a file that doesn't exist. + install-commands: + - | + STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" + mkdir -p "$target_specs_dir" + ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" diff --git a/build-essential/stage2.bst b/build-essential/stage2.bst new file mode 100644 index 00000000..09ed6be0 --- /dev/null +++ b/build-essential/stage2.bst @@ -0,0 +1,19 @@ +kind: stack + +depends: +- build-essential/stage2-binutils.bst +- build-essential/stage2-busybox.bst +- build-essential/stage2-fhs-dirs.bst +- build-essential/stage2-glibc.bst +- build-essential/stage2-gawk.bst +- build-essential/stage2-gcc.bst +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-make.bst +- build-essential/stage2-reset-specs.bst + +# Stage 2 is a minimal base used to build the +# base runtime, must ldconfig when building on stage2 +public: + bst: + integration-commands: + - ldconfig diff --git a/build-essential/zlib.bst b/build-essential/zlib.bst new file mode 100644 index 00000000..17849abd --- /dev/null +++ b/build-essential/zlib.bst @@ -0,0 +1,23 @@ +kind: manual + +sources: +- kind: git + url: upstream:zlib + track: v1.2.8 + ref: 50893291621658f355bc5b4d450a8d06a563053d + +depends: +- filename: build-essential/stage2.bst + type: build +- build-essential/glibc.bst + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + build-commands: + - make + install-commands: + - make DESTDIR="%{install-root}" install diff --git a/gedit.bst b/gedit.bst deleted file mode 100644 index 8ec9bdd0..00000000 --- a/gedit.bst +++ /dev/null @@ -1,16 +0,0 @@ -kind: autotools -description: gedit module -sources: -- kind: git - url: gnome:gedit - track: master - ref: b1d7de77c27c021b481b79bbc9369327368d7710 - submodules: - libgd: - url: gnome:libgd -depends: -- filename: gnome-sdk.bst -- filename: gnome-platform.bst -- filename: gtksourceview.bst -- filename: gspell.bst -- filename: libpeas.bst diff --git a/gnome-platform.bst b/gnome-platform.bst deleted file mode 100644 index 79346805..00000000 --- a/gnome-platform.bst +++ /dev/null @@ -1,23 +0,0 @@ -kind: import -description: Import the GNOME Platform -config: - source: files -public: - bst: - integration-commands: - - ldconfig -arches: - x86_64: - sources: - - kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Platform/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 - i386: - sources: - - kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Platform/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/gnome-sdk.bst b/gnome-sdk.bst deleted file mode 100644 index 6c645fa3..00000000 --- a/gnome-sdk.bst +++ /dev/null @@ -1,27 +0,0 @@ -kind: import -description: Import the GNOME SDK -config: - source: files - target: usr -public: - bst: - integration-commands: - - | - if [ -d "/app/share/glib-2.0/schemas" ]; then - glib-compile-schemas /app/share/glib-2.0/schemas - fi -arches: - x86_64: - sources: - - kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 - i386: - sources: - - kind: ostree - url: https://sdk.gnome.org/repo/ - track: runtime/org.gnome.Sdk/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/gspell.bst b/gspell.bst deleted file mode 100644 index 5028861f..00000000 --- a/gspell.bst +++ /dev/null @@ -1,10 +0,0 @@ -kind: autotools -description: gspell module -sources: -- kind: git - url: gnome:gspell - track: 1.2.0 - ref: 372ad5dd7d7f18950f8f013bf31efda505dfa449 -depends: -- filename: gnome-sdk.bst -- filename: gnome-platform.bst diff --git a/gtksourceview.bst b/gtksourceview.bst deleted file mode 100644 index d5242da2..00000000 --- a/gtksourceview.bst +++ /dev/null @@ -1,16 +0,0 @@ -kind: autotools -description: gtksourceview module -sources: -- kind: git - url: gnome:gtksourceview - track: gnome-3-22 - ref: e996f1c73bf1bbc766ff920a67258f9ad2e31c16 -depends: -- filename: gnome-sdk.bst -- filename: gnome-platform.bst -config: - configure-commands: - - | - %{autogen} - - | - %{configure} --disable-Werror diff --git a/libpeas.bst b/libpeas.bst deleted file mode 100644 index 0e6b7719..00000000 --- a/libpeas.bst +++ /dev/null @@ -1,16 +0,0 @@ -kind: autotools -description: libpeas module -sources: -- kind: git - url: gnome:libpeas - track: libpeas-1.18.0 - ref: 05d8b7d8ddb5875a0355ba3664733998e2621221 -depends: -- filename: gnome-sdk.bst -- filename: gnome-platform.bst -variables: - conf-cmd: ./autogen.sh -config: - configure-commands: - - | - %{configure} diff --git a/project.conf b/project.conf index 15069bb1..9ea4e31d 100644 --- a/project.conf +++ b/project.conf @@ -1,21 +1,53 @@ -# Gedit text editor flatpakish build demo +# Building baserock build-essential in BuildStream # -name: gedit +name: build-essential aliases: - gnome: git://git.gnome.org/ + upstream: ssh://git@git.baserock.org/delta/ + baserock: ssh://git@git.baserock.org/baserock/ + gnomesdk: https://sdk.gnome.org/ + -# We're gonna eventually try to build a flatpak, -# so lets start trying to override the environment -# in the appropriate ways. -# variables: - prefix: /app + cpu: "%{bst-arch}" + abi: gnu + target-stage1: "%{cpu}-bootstrap-linux-%{abi}" + target: "%{cpu}-baserock-linux-%{abi}" -environment: - CFLAGS: "-O2 -g" - CXXFLAGS: "-O2 -g" - PATH: /app/bin:/usr/bin:/bin:/usr/sbin:/sbin - PKG_CONFIG_PATH: /app/lib/pkgconfig:/usr/lib/pkgconfig - XDG_DATA_DIRS: /app/share:/usr/share - GI_TYPELIB_PATH: /app/lib/girepository-1.0:/usr/lib/girepository-1.0 +# Resolve the cpu and ABI portions of the host triple based +# on archetecture names. +arches: + x86_32: + variables: + cpu: i686 + armv5l: + variables: + abi: gnueabi + armv7b: + variables: + abi: gnueabi + armv7l: + variables: + abi: gnueabi + armv7lhf: + variables: + abi: gnueabi + armv8l64: + variables: + cpu: aarch64 + armv8b64: + variables: + cpu: aarch64_be + mips64b: + variables: + cpu: mips64 + abi: gnuabi64 + mips64l: + variables: + cpu: mips64el + mips32b: + variables: + cpu: mips + mips32l: + variables: + cpu: mipsel -- cgit v1.2.1 From dd35a26c37b8b91ec4c874ecb720e79a7680f746 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 13 Feb 2017 15:30:17 +0000 Subject: Don't use ssh urls in the aliases when not needed --- project.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.conf b/project.conf index 9ea4e31d..33785347 100644 --- a/project.conf +++ b/project.conf @@ -3,8 +3,8 @@ name: build-essential aliases: - upstream: ssh://git@git.baserock.org/delta/ - baserock: ssh://git@git.baserock.org/baserock/ + upstream: git://git.baserock.org/delta/ + baserock: git://git.baserock.org/baserock/ gnomesdk: https://sdk.gnome.org/ -- cgit v1.2.1 From 142b3d5a6d71d1b28674cb3c76c1328c9dc14ab9 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 14 Feb 2017 19:15:15 +0900 Subject: Files in final stage build-essential need /tools/sbin in PATH Because the GNOME sdk is no longer there, and ldconfig from stage2 is in /tools/sbin. --- build-essential/binutils.bst | 2 +- build-essential/busybox.bst | 2 +- build-essential/ccache.bst | 2 +- build-essential/fhs-dirs.bst | 2 +- build-essential/gawk.bst | 2 +- build-essential/gcc.bst | 2 +- build-essential/glibc.bst | 2 +- build-essential/linux-api-headers.bst | 2 +- build-essential/m4-tarball.bst | 2 +- build-essential/make.bst | 2 +- build-essential/zlib.bst | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build-essential/binutils.bst b/build-essential/binutils.bst index 39996ffd..17459b9b 100644 --- a/build-essential/binutils.bst +++ b/build-essential/binutils.bst @@ -13,7 +13,7 @@ depends: - build-essential/zlib.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: diff --git a/build-essential/busybox.bst b/build-essential/busybox.bst index 9eca9302..1013600b 100644 --- a/build-essential/busybox.bst +++ b/build-essential/busybox.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: configure-commands: diff --git a/build-essential/ccache.bst b/build-essential/ccache.bst index ed5b088f..d1b9ed74 100644 --- a/build-essential/ccache.bst +++ b/build-essential/ccache.bst @@ -13,7 +13,7 @@ depends: - build-essential/zlib.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: configure-commands: diff --git a/build-essential/fhs-dirs.bst b/build-essential/fhs-dirs.bst index b0b76de3..3a2f9370 100644 --- a/build-essential/fhs-dirs.bst +++ b/build-essential/fhs-dirs.bst @@ -11,7 +11,7 @@ depends: type: build environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: install-commands: diff --git a/build-essential/gawk.bst b/build-essential/gawk.bst index bac25a56..a4072f36 100644 --- a/build-essential/gawk.bst +++ b/build-essential/gawk.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: configure-commands: diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst index 56ca5d86..e146af43 100644 --- a/build-essential/gcc.bst +++ b/build-essential/gcc.bst @@ -15,7 +15,7 @@ depends: - build-essential/m4-tarball.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst index d634b5f7..32fdf774 100644 --- a/build-essential/glibc.bst +++ b/build-essential/glibc.bst @@ -12,7 +12,7 @@ depends: - build-essential/linux-api-headers.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: diff --git a/build-essential/linux-api-headers.bst b/build-essential/linux-api-headers.bst index db98e096..d248cab0 100644 --- a/build-essential/linux-api-headers.bst +++ b/build-essential/linux-api-headers.bst @@ -11,7 +11,7 @@ depends: type: build environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: install-commands: diff --git a/build-essential/m4-tarball.bst b/build-essential/m4-tarball.bst index 41f9969d..fa6eb8ac 100644 --- a/build-essential/m4-tarball.bst +++ b/build-essential/m4-tarball.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: configure-commands: diff --git a/build-essential/make.bst b/build-essential/make.bst index 514140cf..2201fe33 100644 --- a/build-essential/make.bst +++ b/build-essential/make.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: diff --git a/build-essential/zlib.bst b/build-essential/zlib.bst index 17849abd..f6f08199 100644 --- a/build-essential/zlib.bst +++ b/build-essential/zlib.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin config: configure-commands: -- cgit v1.2.1 From 307d734335634211fe09d033efe42bd21c4a874f Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 16 Feb 2017 19:03:13 +0900 Subject: Place /tools at the end of PATH for the final stage3 builds. This is because otherwise we end up using the sysrooted /tools/sbin/ldconfig, causing the gcc build to fail as it does not find libz.so which is otherwise properly located if /sbin/ldconfig is used. --- build-essential/binutils.bst | 2 +- build-essential/busybox.bst | 2 +- build-essential/ccache.bst | 2 +- build-essential/fhs-dirs.bst | 2 +- build-essential/gawk.bst | 2 +- build-essential/gcc.bst | 2 +- build-essential/glibc.bst | 2 +- build-essential/linux-api-headers.bst | 2 +- build-essential/m4-tarball.bst | 2 +- build-essential/make.bst | 2 +- build-essential/zlib.bst | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build-essential/binutils.bst b/build-essential/binutils.bst index 17459b9b..83b6d235 100644 --- a/build-essential/binutils.bst +++ b/build-essential/binutils.bst @@ -13,7 +13,7 @@ depends: - build-essential/zlib.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: diff --git a/build-essential/busybox.bst b/build-essential/busybox.bst index 1013600b..f2e9c667 100644 --- a/build-essential/busybox.bst +++ b/build-essential/busybox.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: configure-commands: diff --git a/build-essential/ccache.bst b/build-essential/ccache.bst index d1b9ed74..085307e2 100644 --- a/build-essential/ccache.bst +++ b/build-essential/ccache.bst @@ -13,7 +13,7 @@ depends: - build-essential/zlib.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: configure-commands: diff --git a/build-essential/fhs-dirs.bst b/build-essential/fhs-dirs.bst index 3a2f9370..1a25b0a4 100644 --- a/build-essential/fhs-dirs.bst +++ b/build-essential/fhs-dirs.bst @@ -11,7 +11,7 @@ depends: type: build environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: install-commands: diff --git a/build-essential/gawk.bst b/build-essential/gawk.bst index a4072f36..57567900 100644 --- a/build-essential/gawk.bst +++ b/build-essential/gawk.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: configure-commands: diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst index e146af43..e835634e 100644 --- a/build-essential/gcc.bst +++ b/build-essential/gcc.bst @@ -15,7 +15,7 @@ depends: - build-essential/m4-tarball.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst index 32fdf774..1c10c678 100644 --- a/build-essential/glibc.bst +++ b/build-essential/glibc.bst @@ -12,7 +12,7 @@ depends: - build-essential/linux-api-headers.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: diff --git a/build-essential/linux-api-headers.bst b/build-essential/linux-api-headers.bst index d248cab0..7a405a4f 100644 --- a/build-essential/linux-api-headers.bst +++ b/build-essential/linux-api-headers.bst @@ -11,7 +11,7 @@ depends: type: build environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: install-commands: diff --git a/build-essential/m4-tarball.bst b/build-essential/m4-tarball.bst index fa6eb8ac..ff69768b 100644 --- a/build-essential/m4-tarball.bst +++ b/build-essential/m4-tarball.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: configure-commands: diff --git a/build-essential/make.bst b/build-essential/make.bst index 2201fe33..9525487b 100644 --- a/build-essential/make.bst +++ b/build-essential/make.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: diff --git a/build-essential/zlib.bst b/build-essential/zlib.bst index f6f08199..f64eeb43 100644 --- a/build-essential/zlib.bst +++ b/build-essential/zlib.bst @@ -12,7 +12,7 @@ depends: - build-essential/glibc.bst environment: - PATH: /tools/bin:/tools/sbin:/usr/bin:/bin:/usr/sbin:/sbin + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin config: configure-commands: -- cgit v1.2.1 From 409a4ce5847777770f8b2f1772fb52fc4ea2a151 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 21 Feb 2017 20:44:06 +0900 Subject: stage2.bst: Adding missing fake bash element dependency --- build-essential/stage2.bst | 1 + 1 file changed, 1 insertion(+) diff --git a/build-essential/stage2.bst b/build-essential/stage2.bst index 09ed6be0..2a337ec6 100644 --- a/build-essential/stage2.bst +++ b/build-essential/stage2.bst @@ -9,6 +9,7 @@ depends: - build-essential/stage2-gcc.bst - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-make.bst +- build-essential/stage2-fake-bash.bst - build-essential/stage2-reset-specs.bst # Stage 2 is a minimal base used to build the -- cgit v1.2.1 From f7a8deb3081672c22799f1ce4fca2d96c71f0caa Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 21 Feb 2017 20:48:08 +0900 Subject: Incoprorating /usr merge effected in upstream baserock --- build-essential/fhs-dirs.bst | 2 +- build-essential/stage2-fhs-dirs.bst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-essential/fhs-dirs.bst b/build-essential/fhs-dirs.bst index 1a25b0a4..197d6e96 100644 --- a/build-essential/fhs-dirs.bst +++ b/build-essential/fhs-dirs.bst @@ -4,7 +4,7 @@ sources: - kind: git url: baserock:baserock/fhs-dirs track: master - ref: 1218cbd38a4f4e9da75af6f7fae946ca92666afb + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 depends: - filename: build-essential/stage2.bst diff --git a/build-essential/stage2-fhs-dirs.bst b/build-essential/stage2-fhs-dirs.bst index 80ce42f4..9d07d9a2 100644 --- a/build-essential/stage2-fhs-dirs.bst +++ b/build-essential/stage2-fhs-dirs.bst @@ -4,7 +4,7 @@ sources: - kind: git url: baserock:baserock/fhs-dirs track: master - ref: 1218cbd38a4f4e9da75af6f7fae946ca92666afb + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 depends: - filename: build-essential/stage1.bst @@ -19,8 +19,8 @@ environment: config: install-commands: - sh ./create-fhs-dirs "%{install-root}" - - rmdir "%{install-root}/bin" - - ln -s "%{prefix}/bin" "%{install-root}/bin" + - rmdir "%{install-root}/usr/bin" + - ln -s "%{prefix}/bin" "%{install-root}/usr/bin" - install -m 644 passwd "%{install-root}/etc/passwd" - install -m 600 shadow "%{install-root}/etc/shadow" - install -m 644 interfaces "%{install-root}/etc/network/interfaces" -- cgit v1.2.1 From 19f5819c58225e13cda8c239c318ff9bd779807d Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 22 Feb 2017 19:32:04 +0900 Subject: Upgrade build-essential to the baserock new usr merge approach. This required making sure that fhs-dirs is depended on by anything which would stage on top of it, as the directory symlinks must come first. In this commit the dependencies are listed explicitly, probably there is a way to do this without being as wordy. --- build-essential.bst | 2 +- build-essential/binutils.bst | 1 + build-essential/busybox.bst | 1 + build-essential/ccache.bst | 1 + build-essential/gawk.bst | 1 + build-essential/gcc.bst | 1 + build-essential/glibc.bst | 1 + build-essential/linux-api-headers.bst | 1 + build-essential/m4-tarball.bst | 1 + build-essential/make.bst | 1 + build-essential/stage2-binutils.bst | 2 ++ build-essential/stage2-busybox.bst | 2 ++ build-essential/stage2-fake-bash.bst | 2 ++ build-essential/stage2-gawk.bst | 2 ++ build-essential/stage2-glibc.bst | 2 ++ build-essential/stage2-make.bst | 2 ++ build-essential/stage2-reset-specs.bst | 2 ++ build-essential/stage2.bst | 4 +++- 18 files changed, 27 insertions(+), 2 deletions(-) diff --git a/build-essential.bst b/build-essential.bst index 54a5d00b..9ad1ba23 100644 --- a/build-essential.bst +++ b/build-essential.bst @@ -1,10 +1,10 @@ kind: stack depends: +- build-essential/fhs-dirs.bst - build-essential/binutils.bst - build-essential/busybox.bst - build-essential/ccache.bst -- build-essential/fhs-dirs.bst - build-essential/gawk.bst - build-essential/gcc.bst - build-essential/glibc.bst diff --git a/build-essential/binutils.bst b/build-essential/binutils.bst index 83b6d235..a71a2e6b 100644 --- a/build-essential/binutils.bst +++ b/build-essential/binutils.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst - build-essential/zlib.bst diff --git a/build-essential/busybox.bst b/build-essential/busybox.bst index f2e9c667..5029ce72 100644 --- a/build-essential/busybox.bst +++ b/build-essential/busybox.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst environment: diff --git a/build-essential/ccache.bst b/build-essential/ccache.bst index 085307e2..76111195 100644 --- a/build-essential/ccache.bst +++ b/build-essential/ccache.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst - build-essential/zlib.bst diff --git a/build-essential/gawk.bst b/build-essential/gawk.bst index 57567900..c6169d13 100644 --- a/build-essential/gawk.bst +++ b/build-essential/gawk.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst environment: diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst index e835634e..7b1f1c4b 100644 --- a/build-essential/gcc.bst +++ b/build-essential/gcc.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/linux-api-headers.bst - build-essential/glibc.bst - build-essential/zlib.bst diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst index 1c10c678..b1baf608 100644 --- a/build-essential/glibc.bst +++ b/build-essential/glibc.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/linux-api-headers.bst environment: diff --git a/build-essential/linux-api-headers.bst b/build-essential/linux-api-headers.bst index 7a405a4f..f05a6546 100644 --- a/build-essential/linux-api-headers.bst +++ b/build-essential/linux-api-headers.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst environment: PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin diff --git a/build-essential/m4-tarball.bst b/build-essential/m4-tarball.bst index ff69768b..26d123ba 100644 --- a/build-essential/m4-tarball.bst +++ b/build-essential/m4-tarball.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst environment: diff --git a/build-essential/make.bst b/build-essential/make.bst index 9525487b..9723a61f 100644 --- a/build-essential/make.bst +++ b/build-essential/make.bst @@ -9,6 +9,7 @@ sources: depends: - filename: build-essential/stage2.bst type: build +- build-essential/fhs-dirs.bst - build-essential/glibc.bst environment: diff --git a/build-essential/stage2-binutils.bst b/build-essential/stage2-binutils.bst index a515d5dd..f1a5f6f0 100644 --- a/build-essential/stage2-binutils.bst +++ b/build-essential/stage2-binutils.bst @@ -9,6 +9,8 @@ sources: depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-glibc.bst diff --git a/build-essential/stage2-busybox.bst b/build-essential/stage2-busybox.bst index 12e770dd..0b82ed46 100644 --- a/build-essential/stage2-busybox.bst +++ b/build-essential/stage2-busybox.bst @@ -9,6 +9,8 @@ sources: depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-glibc.bst diff --git a/build-essential/stage2-fake-bash.bst b/build-essential/stage2-fake-bash.bst index 8bd5b15a..2289fc8f 100644 --- a/build-essential/stage2-fake-bash.bst +++ b/build-essential/stage2-fake-bash.bst @@ -3,6 +3,8 @@ kind: manual depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime variables: prefix: /tools diff --git a/build-essential/stage2-gawk.bst b/build-essential/stage2-gawk.bst index ee901796..ca1936fb 100644 --- a/build-essential/stage2-gawk.bst +++ b/build-essential/stage2-gawk.bst @@ -9,6 +9,8 @@ sources: depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-glibc.bst diff --git a/build-essential/stage2-glibc.bst b/build-essential/stage2-glibc.bst index 0f0bace5..dcb11dee 100644 --- a/build-essential/stage2-glibc.bst +++ b/build-essential/stage2-glibc.bst @@ -9,6 +9,8 @@ sources: depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst variables: diff --git a/build-essential/stage2-make.bst b/build-essential/stage2-make.bst index 3b760c0d..3549d626 100644 --- a/build-essential/stage2-make.bst +++ b/build-essential/stage2-make.bst @@ -9,6 +9,8 @@ sources: depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-glibc.bst diff --git a/build-essential/stage2-reset-specs.bst b/build-essential/stage2-reset-specs.bst index 4b3b6f91..5ea3d044 100644 --- a/build-essential/stage2-reset-specs.bst +++ b/build-essential/stage2-reset-specs.bst @@ -3,6 +3,8 @@ kind: manual depends: - filename: build-essential/stage1.bst type: build +- filename: build-essential/stage2-fhs-dirs.bst + type: runtime - build-essential/stage2-linux-api-headers.bst - build-essential/stage2-glibc.bst diff --git a/build-essential/stage2.bst b/build-essential/stage2.bst index 2a337ec6..bfbe3376 100644 --- a/build-essential/stage2.bst +++ b/build-essential/stage2.bst @@ -17,4 +17,6 @@ depends: public: bst: integration-commands: - - ldconfig + - | + # In this stage, it may be that ld.so.conf doesnt exist yet + ldconfig || exit 0 -- cgit v1.2.1 From 24e2b51f2b81b6b48376a5b4facbcddb4caad177 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 21 Mar 2017 12:36:42 +0000 Subject: Renamed build-essential to gnu-toolchain --- build-essential.bst | 20 ----- build-essential/binutils.bst | 24 ------ build-essential/busybox.bst | 104 ----------------------- build-essential/ccache.bst | 28 ------ build-essential/fhs-dirs.bst | 26 ------ build-essential/gawk.bst | 20 ----- build-essential/gcc.bst | 67 --------------- build-essential/glibc.bst | 77 ----------------- build-essential/gnome-platform.bst | 27 ------ build-essential/gnome-sdk.bst | 20 ----- build-essential/linux-api-headers.bst | 39 --------- build-essential/m4-tarball.bst | 20 ----- build-essential/make.bst | 21 ----- build-essential/stage1-binutils.bst | 38 --------- build-essential/stage1-gcc.bst | 100 ---------------------- build-essential/stage1.bst | 7 -- build-essential/stage2-binutils.bst | 40 --------- build-essential/stage2-busybox.bst | 101 ---------------------- build-essential/stage2-fake-bash.bst | 17 ---- build-essential/stage2-fhs-dirs.bst | 31 ------- build-essential/stage2-gawk.bst | 30 ------- build-essential/stage2-gcc-fixed-headers.bst | 37 -------- build-essential/stage2-gcc.bst | 102 ---------------------- build-essential/stage2-glibc.bst | 122 --------------------------- build-essential/stage2-libstdcxx.bst | 55 ------------ build-essential/stage2-linux-api-headers.bst | 41 --------- build-essential/stage2-make.bst | 29 ------- build-essential/stage2-reset-specs.bst | 35 -------- build-essential/stage2.bst | 22 ----- build-essential/zlib.bst | 23 ----- gnu-toolchain.bst | 20 +++++ gnu-toolchain/binutils.bst | 24 ++++++ gnu-toolchain/busybox.bst | 104 +++++++++++++++++++++++ gnu-toolchain/ccache.bst | 28 ++++++ gnu-toolchain/fhs-dirs.bst | 26 ++++++ gnu-toolchain/gawk.bst | 20 +++++ gnu-toolchain/gcc.bst | 67 +++++++++++++++ gnu-toolchain/glibc.bst | 77 +++++++++++++++++ gnu-toolchain/gnome-platform.bst | 27 ++++++ gnu-toolchain/gnome-sdk.bst | 20 +++++ gnu-toolchain/linux-api-headers.bst | 39 +++++++++ gnu-toolchain/m4-tarball.bst | 20 +++++ gnu-toolchain/make.bst | 21 +++++ gnu-toolchain/stage1-binutils.bst | 38 +++++++++ gnu-toolchain/stage1-gcc.bst | 100 ++++++++++++++++++++++ gnu-toolchain/stage1.bst | 7 ++ gnu-toolchain/stage2-binutils.bst | 40 +++++++++ gnu-toolchain/stage2-busybox.bst | 101 ++++++++++++++++++++++ gnu-toolchain/stage2-fake-bash.bst | 17 ++++ gnu-toolchain/stage2-fhs-dirs.bst | 31 +++++++ gnu-toolchain/stage2-gawk.bst | 30 +++++++ gnu-toolchain/stage2-gcc-fixed-headers.bst | 37 ++++++++ gnu-toolchain/stage2-gcc.bst | 102 ++++++++++++++++++++++ gnu-toolchain/stage2-glibc.bst | 122 +++++++++++++++++++++++++++ gnu-toolchain/stage2-libstdcxx.bst | 55 ++++++++++++ gnu-toolchain/stage2-linux-api-headers.bst | 41 +++++++++ gnu-toolchain/stage2-make.bst | 29 +++++++ gnu-toolchain/stage2-reset-specs.bst | 35 ++++++++ gnu-toolchain/stage2.bst | 22 +++++ gnu-toolchain/zlib.bst | 23 +++++ 60 files changed, 1323 insertions(+), 1323 deletions(-) delete mode 100644 build-essential.bst delete mode 100644 build-essential/binutils.bst delete mode 100644 build-essential/busybox.bst delete mode 100644 build-essential/ccache.bst delete mode 100644 build-essential/fhs-dirs.bst delete mode 100644 build-essential/gawk.bst delete mode 100644 build-essential/gcc.bst delete mode 100644 build-essential/glibc.bst delete mode 100644 build-essential/gnome-platform.bst delete mode 100644 build-essential/gnome-sdk.bst delete mode 100644 build-essential/linux-api-headers.bst delete mode 100644 build-essential/m4-tarball.bst delete mode 100644 build-essential/make.bst delete mode 100644 build-essential/stage1-binutils.bst delete mode 100644 build-essential/stage1-gcc.bst delete mode 100644 build-essential/stage1.bst delete mode 100644 build-essential/stage2-binutils.bst delete mode 100644 build-essential/stage2-busybox.bst delete mode 100644 build-essential/stage2-fake-bash.bst delete mode 100644 build-essential/stage2-fhs-dirs.bst delete mode 100644 build-essential/stage2-gawk.bst delete mode 100644 build-essential/stage2-gcc-fixed-headers.bst delete mode 100644 build-essential/stage2-gcc.bst delete mode 100644 build-essential/stage2-glibc.bst delete mode 100644 build-essential/stage2-libstdcxx.bst delete mode 100644 build-essential/stage2-linux-api-headers.bst delete mode 100644 build-essential/stage2-make.bst delete mode 100644 build-essential/stage2-reset-specs.bst delete mode 100644 build-essential/stage2.bst delete mode 100644 build-essential/zlib.bst create mode 100644 gnu-toolchain.bst create mode 100644 gnu-toolchain/binutils.bst create mode 100644 gnu-toolchain/busybox.bst create mode 100644 gnu-toolchain/ccache.bst create mode 100644 gnu-toolchain/fhs-dirs.bst create mode 100644 gnu-toolchain/gawk.bst create mode 100644 gnu-toolchain/gcc.bst create mode 100644 gnu-toolchain/glibc.bst create mode 100644 gnu-toolchain/gnome-platform.bst create mode 100644 gnu-toolchain/gnome-sdk.bst create mode 100644 gnu-toolchain/linux-api-headers.bst create mode 100644 gnu-toolchain/m4-tarball.bst create mode 100644 gnu-toolchain/make.bst create mode 100644 gnu-toolchain/stage1-binutils.bst create mode 100644 gnu-toolchain/stage1-gcc.bst create mode 100644 gnu-toolchain/stage1.bst create mode 100644 gnu-toolchain/stage2-binutils.bst create mode 100644 gnu-toolchain/stage2-busybox.bst create mode 100644 gnu-toolchain/stage2-fake-bash.bst create mode 100644 gnu-toolchain/stage2-fhs-dirs.bst create mode 100644 gnu-toolchain/stage2-gawk.bst create mode 100644 gnu-toolchain/stage2-gcc-fixed-headers.bst create mode 100644 gnu-toolchain/stage2-gcc.bst create mode 100644 gnu-toolchain/stage2-glibc.bst create mode 100644 gnu-toolchain/stage2-libstdcxx.bst create mode 100644 gnu-toolchain/stage2-linux-api-headers.bst create mode 100644 gnu-toolchain/stage2-make.bst create mode 100644 gnu-toolchain/stage2-reset-specs.bst create mode 100644 gnu-toolchain/stage2.bst create mode 100644 gnu-toolchain/zlib.bst diff --git a/build-essential.bst b/build-essential.bst deleted file mode 100644 index 9ad1ba23..00000000 --- a/build-essential.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: stack - -depends: -- build-essential/fhs-dirs.bst -- build-essential/binutils.bst -- build-essential/busybox.bst -- build-essential/ccache.bst -- build-essential/gawk.bst -- build-essential/gcc.bst -- build-essential/glibc.bst -- build-essential/linux-api-headers.bst -- build-essential/m4-tarball.bst -- build-essential/make.bst - -# Build essential is the base runtime, ldconfig -# must be run on it. -public: - bst: - integration-commands: - - ldconfig diff --git a/build-essential/binutils.bst b/build-essential/binutils.bst deleted file mode 100644 index a71a2e6b..00000000 --- a/build-essential/binutils.bst +++ /dev/null @@ -1,24 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst -- build-essential/zlib.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - | - ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ - --with-system-zlib diff --git a/build-essential/busybox.bst b/build-essential/busybox.bst deleted file mode 100644 index 5029ce72..00000000 --- a/build-essential/busybox.bst +++ /dev/null @@ -1,104 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:busybox - track: 1_23_1 - ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - # Busybox's default config has everything enabled. - - make defconfig KCONFIG_NOTIMESTAMP=1 - - - sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'%{prefix}/share/udhcpc/default.script'"|' - -i .config - - sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' - -i .config - - # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. - - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' - -i .config' - # We have GAWK, but in GENIVI baseline we want to get rid of it - # - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config - - # Depends on stuff that was removed since eglibc 2.14. - - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config - - # Busybox Patch is incompatible enough with GNU Patch that it can't be - # used for GNULib projects built from Git. - - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config - - # None of this is needed because we have kmod; and it actually breaks the - # Linux build because depmod isn't compatible enough with util-linux's. - - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config - - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config - - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config - - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config - - # General features that we don't need. - - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not - set/' -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config - - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config - - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config - - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config - - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config - - sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config - - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config - - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config - - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config - - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config - - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config - - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config - - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config - - # Now turn on some little bits we do need - - sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config - - sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' - -i .config - - sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' - -i .config - - build-commands: - - make KCONFIG_NOTIMESTAMP=1 - - install-commands: - - | - # Note here we intentionally ignore '%{prefix}', this is going into '/' - make CONFIG_PREFIX="%{install-root}" KCONFIG_NOTIMESTAMP=1 install && - chmod 6755 "%{install-root}/bin/busybox" - - # Set up man environment variables - - mkdir -p "%{install-root}/etc" - - | - cat << EOF > "%{install-root}/etc/man.conf" - # This file is used by man to provide a manpath for those without one by - # examining their PATH environment variable. - # - # Lines beginning with `#' are comments and are ignored. Any combination of - # tabs or spaces may be used as `whitespace' separators. - - MANDATORY_MANPATH /usr/man - MANDATORY_MANPATH /usr/share/man - MANDATORY_MANPATH /usr/local/share/man - EOF diff --git a/build-essential/ccache.bst b/build-essential/ccache.bst deleted file mode 100644 index 76111195..00000000 --- a/build-essential/ccache.bst +++ /dev/null @@ -1,28 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:ccache - track: baserock/build-essential - ref: 567631456f0899cdf0c382f898d38aadc8901d32 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst -- build-essential/zlib.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" - install-commands: - - make DESTDIR="%{install-root}" install - - mkdir -p "%{install-root}%{prefix}/lib/ccache" - - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/$cc"; - done - - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/%{target}-$cc"; - done diff --git a/build-essential/fhs-dirs.bst b/build-essential/fhs-dirs.bst deleted file mode 100644 index 197d6e96..00000000 --- a/build-essential/fhs-dirs.bst +++ /dev/null @@ -1,26 +0,0 @@ -kind: manual - -sources: -- kind: git - url: baserock:baserock/fhs-dirs - track: master - ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 - -depends: -- filename: build-essential/stage2.bst - type: build - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - install-commands: - - sh ./create-fhs-dirs "%{install-root}" - - install -m 644 passwd "%{install-root}/etc/passwd" - - install -m 600 shadow "%{install-root}/etc/shadow" - - install -m 644 interfaces "%{install-root}/etc/network/interfaces" - - install -m 644 group "%{install-root}/etc/group" - - install -m 644 issue "%{install-root}/etc/issue" - - install -m 644 services "%{install-root}/etc/services" - - install -m 644 protocols "%{install-root}/etc/protocols" - - echo baserock > "%{install-root}/etc/hostname" diff --git a/build-essential/gawk.bst b/build-essential/gawk.bst deleted file mode 100644 index c6169d13..00000000 --- a/build-essential/gawk.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gawk - track: gawk-4.1-stable - ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" --disable-nls diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst deleted file mode 100644 index 7b1f1c4b..00000000 --- a/build-essential/gcc.bst +++ /dev/null @@ -1,67 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/build-essential - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/linux-api-headers.bst -- build-essential/glibc.bst -- build-essential/zlib.bst -- build-essential/m4-tarball.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't - # fully work; we will need to hobble the multilib configuration in - # config/i386/t-linux64 if we really want to kill /lib64). - # 2. Avoid having more than one copy of ZLib in use on the system - # 3. Multilib does not make sense in Baserock. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - - cd o && ../configure \ - $ARCH_FLAGS \ - --prefix="%{prefix}" \ - `# [1]` --libdir=%{prefix}/lib \ - --disable-bootstrap \ - `# [2]` --with-system-zlib \ - `# [3]` --disable-multilib \ - --enable-languages=c,c++,fortran - - build-commands: - - | - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install - - ln -s gcc "%{install-root}%{prefix}/bin/cc" - - | - for fortran_alias in f77 f90 f95; do - ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" - done diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst deleted file mode 100644 index b1baf608..00000000 --- a/build-essential/glibc.bst +++ /dev/null @@ -1,77 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/linux-api-headers.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - mkdir o - - - | - case "%{bst-arch}" in - armv7*) - ARCH_FLAGS="--without-fp" ;; - esac - - # We override the PATH here to remove /tools/bin from it. - # Thanks to this glibc finds bash in /bin/bash through the /bin - # symlink. This is important because glibc changes the path to bash - # of the shebang in some scripts and these scripts will be broken if - # they point to bash in /tools/bin/bash. - export PATH="/usr/bin:/sbin:/bin"; - export CFLAGS="-O2 $CFLAGS"; - cd o && ../configure \ - $ARCH_FLAGS \ - --prefix="%{prefix}" \ - --disable-profile \ - --enable-kernel=3.0.0 \ - --without-cvs \ - --without-selinux \ - --enable-obsolete-rpc - - build-commands: - - cd o && make localtime=UTC - - install-commands: - - cd o && make install_root="%{install-root}" localtime=UTC install - - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales - - mkdir -p "%{install-root}/etc" - - mkdir -p "%{install-root}/etc/ld.so.conf.d" - - | - cat < nsswitch.conf - passwd: compat - group: compat - shadow: compat - - hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 - networks: files - - protocols: db files - services: db files - ethers: db files - rpc: db files - - netgroup: nis - EOF - - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf" - - | - cat < ld.so.conf - /lib - /usr/lib - /usr/local/lib - include /etc/ld.so.conf.d/*.conf - EOF - - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" diff --git a/build-essential/gnome-platform.bst b/build-essential/gnome-platform.bst deleted file mode 100644 index fd5efb6b..00000000 --- a/build-essential/gnome-platform.bst +++ /dev/null @@ -1,27 +0,0 @@ -kind: import -description: Import the GNOME Platform -config: - source: files -public: - bst: - integration-commands: - - ldconfig - - | - if [ -d "/app/share/glib-2.0/schemas" ]; then - glib-compile-schemas /app/share/glib-2.0/schemas - fi -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/build-essential/gnome-sdk.bst b/build-essential/gnome-sdk.bst deleted file mode 100644 index 6b0f158f..00000000 --- a/build-essential/gnome-sdk.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: import -description: Import the GNOME SDK -config: - source: files - target: usr -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/build-essential/linux-api-headers.bst b/build-essential/linux-api-headers.bst deleted file mode 100644 index f05a6546..00000000 --- a/build-essential/linux-api-headers.bst +++ /dev/null @@ -1,39 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:linux - track: v4.0 - ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - install-commands: - - | - case "%{bst-arch}" in - armv5l) - ARCH="arm" ;; - armv7b|armv7l|armv7lhf) - ARCH="arm" ;; - armv8l64|armv8b64) - ARCH="arm64" ;; - x86_32) - ARCH="i386" ;; - x86_64) - ARCH="x86_64" ;; - ppc64) - ARCH="powerpc" ;; - *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 - exit 1 - esac - ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - - install -d "%{install-root}%{includedir}" - - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/build-essential/m4-tarball.bst b/build-essential/m4-tarball.bst deleted file mode 100644 index 26d123ba..00000000 --- a/build-essential/m4-tarball.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:m4-tarball - track: m4-1.4.17 - ref: 23c11479b3ad787adc7a651ee0c4347839e47723 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" --disable-gcc-warnings diff --git a/build-essential/make.bst b/build-essential/make.bst deleted file mode 100644 index 9723a61f..00000000 --- a/build-essential/make.bst +++ /dev/null @@ -1,21 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:make-tarball - track: baserock/make-4.1-ttyname-segfault-fix - ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/fhs-dirs.bst -- build-essential/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - ./configure --prefix="%{prefix}" --disable-nls diff --git a/build-essential/stage1-binutils.bst b/build-essential/stage1-binutils.bst deleted file mode 100644 index 8c89c7ce..00000000 --- a/build-essential/stage1-binutils.bst +++ /dev/null @@ -1,38 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- build-essential/gnome-platform.bst -- build-essential/gnome-sdk.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - # We set the sysroot location dynamically at runtime by passing - # `--sysroot` to GCC, so we need to build a linker with sysroot support. - # We set it to a non-existent directory as a safety net to avoid looking - # at the host dirs in case we forget to set the sysroot. Setting the - # lib path is vital to avoid the tools we build linking to the libraries - # on the host system; the '=' makes the path we give relative to the - # sysroot, which we can then set at runtime by passing -Wl,--sysroot to - # GCC. Although nothing should be installed on /lib64, we configure the - # linker to look at that directory as well to make things more robust - # (currently GCC installs libraries to this directory at least on - # x86_64). - - - | - %{configure} --disable-nls --disable-werror \ - --build=$(sh config.guess) \ - --host=$(sh config.guess) \ - --target=%{target-stage1} \ - --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" diff --git a/build-essential/stage1-gcc.bst b/build-essential/stage1-gcc.bst deleted file mode 100644 index 81c4d40a..00000000 --- a/build-essential/stage1-gcc.bst +++ /dev/null @@ -1,100 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/build-essential - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- build-essential/gnome-platform.bst -- build-essential/gnome-sdk.bst -- build-essential/stage1-binutils.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - # Workaround from LFS due GCC not detecting stack protection correctly - - | - sed -i -e '/k prot/a \ - gcc_cv_libc_provides_ssp=yes - ' gcc/configure - - - mkdir o - - # Configure flag notes: - # 1. See gcc.morph. - # 2. Although we will be setting a sysroot at runtime, giving a - # temporary one at configuration time seems necessary so that - # `--with-native-system-header-dir` produces effect and - # /tools/include is in the include path for the newly built GCC. We - # set it by default to a non-existent directory to avoid GCC looking - # at the host dirs, in case we forget to give it at runtime. - # 3. Disable searching /usr/local/include for headers - # 4. The pass 1 compiler needs to find the libraries we build in pass - # 2. Include path must be set explicility, because it defaults to - # $SYSROOT/usr/include rather than $SYSROOT/include. - # 5. Disable stuff that doesn't work when building a cross compiler - # without an existing libc, and generally try to keep this build as - # simple as possible. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(sh ../config.guess) \ - --host=$(sh ../config.guess) \ - --target=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [1]` --libdir="%{libdir}" \ - `# [2]` --with-sysroot=/nonexistentdir \ - --with-newlib \ - `# [3]` --with-local-prefix="%{prefix}" \ - `# [4]` --with-native-system-header-dir="%{prefix}/include" \ - --without-headers \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - `# [5]` --disable-decimal-float \ - `# [5]` --disable-threads \ - `# [5]` --disable-libatomic \ - `# [5]` --disable-libgomp \ - `# [5]` --disable-libitm \ - `# [5]` --disable-libquadmath \ - `# [5]` --disable-libsanitizer \ - `# [5]` --disable-libssp \ - `# [5]` --disable-libvtv \ - `# [5]` --disable-libcilkrts \ - `# [5]` --disable-libstdc++-v3 \ - --enable-languages=c,c++ - - build-commands: - - | - # GCC is not passing the correct host/target flags to GMP's configure - # script, which causes it to not use the machine-dependent code for - # the platform and use the generic one instead. However, the generic - # code results on an undefined reference to `__gmpn_invert_limb' in - # ARMv7. Fix the invocation of GMP's configure script so that GMP can - # use the machine-dependent code. - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install diff --git a/build-essential/stage1.bst b/build-essential/stage1.bst deleted file mode 100644 index 7304572a..00000000 --- a/build-essential/stage1.bst +++ /dev/null @@ -1,7 +0,0 @@ -kind: stack - -depends: -- build-essential/gnome-platform.bst -- build-essential/gnome-sdk.bst -- build-essential/stage1-binutils.bst -- build-essential/stage1-gcc.bst diff --git a/build-essential/stage2-binutils.bst b/build-essential/stage2-binutils.bst deleted file mode 100644 index f1a5f6f0..00000000 --- a/build-essential/stage2-binutils.bst +++ /dev/null @@ -1,40 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" - # binutils has its own embedded libtool, which is old and strips out - # `--sysroot`. Work around by modifying the compiler command to - # include the sysroot flag - export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" - ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ - --build=$(sh config.guess) \ - --host=%{target-stage1} \ - --target=%{target-stage1} - - build-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - make diff --git a/build-essential/stage2-busybox.bst b/build-essential/stage2-busybox.bst deleted file mode 100644 index 0b82ed46..00000000 --- a/build-essential/stage2-busybox.bst +++ /dev/null @@ -1,101 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:busybox - track: 1_23_1 - ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in - # the PATH supplied by the stage2-gcc chunk, which can't execute outside of - # the stage 3 staging area. - - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig - - # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. - - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' - -i .config' - # We have GAWK. - - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config - - # Depends on stuff that was removed since eglibc 2.14. - - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config - - # Busybox Patch is incompatible enough with GNU Patch that it can't be - # used for GNULib projects built from Git. - - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config - - # None of this is needed because we have kmod; and it actually breaks the - # Linux build because depmod isn't compatible enough with util-linux's. - - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config - - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config - - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config - - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config - - # General features that we don't need. - - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not - set/' -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config - - sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config - - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config - - sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config - - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config - - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config - - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config - - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config - - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config - - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config - - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config - - sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config - - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config - - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config - - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config - - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config - - build-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 - - install-commands: - # We expect to be built with a non-standard prefix in stage 2 (i.e. not - # /usr). The install will break if prefix is set to /usr. - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - make CONFIG_PREFIX="%{install-root}%{prefix}" \ - HOSTCC="/usr/bin/gcc" \ - CROSS_COMPILE=%{target-stage1}- \ - KCONFIG_NOTIMESTAMP=1 install && - chmod 6755 "%{install-root}%{prefix}"/bin/busybox diff --git a/build-essential/stage2-fake-bash.bst b/build-essential/stage2-fake-bash.bst deleted file mode 100644 index 2289fc8f..00000000 --- a/build-essential/stage2-fake-bash.bst +++ /dev/null @@ -1,17 +0,0 @@ -kind: manual - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "%{install-root}%{prefix}/bin/bash" diff --git a/build-essential/stage2-fhs-dirs.bst b/build-essential/stage2-fhs-dirs.bst deleted file mode 100644 index 9d07d9a2..00000000 --- a/build-essential/stage2-fhs-dirs.bst +++ /dev/null @@ -1,31 +0,0 @@ -kind: manual - -sources: -- kind: git - url: baserock:baserock/fhs-dirs - track: master - ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 - -depends: -- filename: build-essential/stage1.bst - type: build - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - sh ./create-fhs-dirs "%{install-root}" - - rmdir "%{install-root}/usr/bin" - - ln -s "%{prefix}/bin" "%{install-root}/usr/bin" - - install -m 644 passwd "%{install-root}/etc/passwd" - - install -m 600 shadow "%{install-root}/etc/shadow" - - install -m 644 interfaces "%{install-root}/etc/network/interfaces" - - install -m 644 group "%{install-root}/etc/group" - - install -m 644 issue "%{install-root}/etc/issue" - - install -m 644 services "%{install-root}/etc/services" - - install -m 644 protocols "%{install-root}/etc/protocols" - - echo baserock > "%{install-root}/etc/hostname" diff --git a/build-essential/stage2-gawk.bst b/build-essential/stage2-gawk.bst deleted file mode 100644 index ca1936fb..00000000 --- a/build-essential/stage2-gawk.bst +++ /dev/null @@ -1,30 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gawk - track: gawk-4.1-stable - ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false - LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls - --build=$(sh config.guess) --host=%{target-stage1} - build-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/build-essential/stage2-gcc-fixed-headers.bst b/build-essential/stage2-gcc-fixed-headers.bst deleted file mode 100644 index a83fca25..00000000 --- a/build-essential/stage2-gcc-fixed-headers.bst +++ /dev/null @@ -1,37 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/build-essential - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: build-essential/stage1.bst - type: build -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - # Stage 1 GCC's fixincludes process created a limits.h before there was - # a real limits.h available for the target. This step (taken from Linux - # Linux From Scratch) creates a better one so that stage 2 GCC can compile. - # - # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to - # overwrite files in a staging area is to install a new chunk. - # This is undesired behaviour in the long term, as we want to never - # have overlaps, so this functionality may go away. - - | - libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) - sysroot="$(dirname $(dirname $(pwd)))" - target_libgcc_dir="${libgcc_dir#$sysroot}" - mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" - cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ - >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" diff --git a/build-essential/stage2-gcc.bst b/build-essential/stage2-gcc.bst deleted file mode 100644 index 445fe6f7..00000000 --- a/build-essential/stage2-gcc.bst +++ /dev/null @@ -1,102 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/build-essential - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: build-essential/stage1.bst - type: build -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst -- build-essential/stage2-gcc-fixed-headers.bst -- build-essential/stage2-libstdcxx.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - mkdir o - - # In other projects we specify the sysroot location using CPPFLAGS. - # Here, that breaks because GCC compiles stuff for the *build* machine, - # too ... and this requires using the host's compiler, which cannot use - # the same set of CPPFLAGS as the target. If we specify the sysroot - # using CC instead then we don't interfere, because we are only - # specifying the *host* C compiler. - # - # Configure flag notes: - # 1. It's vital that this compiler runs in the bootstrap machine, and - # targets the same machine (TARGET_STAGE1) so that the stage 1 GCC - # is used instead of the compiler of the build machine. - # 2. See gcc.morph. - # 3. Disable searching /usr/local/include for headers - # 4. This flag causes the correct --sysroot flag to be passed when - # calling stage 1 GCC. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" - export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" - export AR="%{target-stage1}-ar" - export RANLIB="%{target-stage1}-ranlib" - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(sh ../config.guess) \ - `# [1]` --host=%{target-stage1} \ - `# [1]` --target=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [2]` --libdir=%{prefix}/lib \ - `# [3]` --with-local-prefix=%{prefix} \ - `# [4]` --with-build-sysroot="$STAGE2_SYSROOT" \ - --disable-bootstrap \ - --disable-nls \ - --disable-multilib \ - --disable-libgomp \ - --disable-libstdcxx-pch \ - --enable-languages=c,c++ - - build-commands: - - | - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install - - # Stage 3 builds need to link against this file in the location that - # it will be in the final system, so we make a temporary link now. - # - # On x86_64 GCC resolutely installs its libraries into lib64. To fix this - # would require hobbling the MULTILIB_OSDIRNAMES field in - # gcc/config/i386/t-linux64 and this might break things, so for now we - # tolerate the inconsistency. - - | - if [ "$(echo %{target} | cut -c -6)" = "x86_64" ]; then - libdir=lib64 - else - libdir=lib - fi - - install -d "%{install-root}/lib" - ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/" - ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/" diff --git a/build-essential/stage2-glibc.bst b/build-essential/stage2-glibc.bst deleted file mode 100644 index dcb11dee..00000000 --- a/build-essential/stage2-glibc.bst +++ /dev/null @@ -1,122 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. Avoid installing to PREFIX/lib64 on x86_64. - # 2. Location of linux-api-headers. - # 3. Normal flags. See glibc.morph. - # 4. Force configuration values of certain things that can't be detected - # in a cross-compile. - - | - case "%{bst-arch}" in - armv7*) - ARCH_FLAGS="--without-fp" ;; - esac - - export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(../scripts/config.guess) --host=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [1]` --libdir="%{prefix}/lib" \ - `# [2]` --with-headers="%{prefix}/include" \ - `# [3]` --disable-profile --enable-kernel=2.6.25 \ - `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ - libc_cv_forced_unwind=yes libc_cv_ssp=no - - build-commands: - - cd o && make localtime=UTC - - install-commands: - - cd o && make install_root="%{install-root}" localtime=UTC install - - mkdir -p "%{install-root}/etc" - - mkdir -p "%{install-root}/etc/ld.so.conf.d" - - | - cat < ld.so.conf - /lib - /usr/lib - /usr/local/lib - include /etc/ld.so.conf.d/*.conf - EOF - - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" - - | - # Fix up GCC to handle the sysroot containing glibc being in a different - # location for each chunk build. - # - # For headers, it's enough to pass -B in the CPPFLAGS. This would work for - # the startup files (crt*.o) as well, except where libtool is involved (in - # which case it strips -B out of your LDFLAGS before calling GCC). We get - # around this by making GCC locate them relative to the environment variable - # STAGE2_SYSROOT, which we can then set along with CPPFLAGS in each stage 2 - # chunk build. - # - # We also force the use of the program loader at PREFIX/lib/ld.so instead - # of its usual home in /lib or /lib64, which is necessary for the output of - # stage 2 to work as a chroot when building stage 3. - - sysroot="$(dirname $(dirname $(pwd)))" - specs_dir="$(dirname $(%{target-stage1}-gcc --print-libgcc-file-name))" - target_specs_dir="%{install-root}/${specs_dir#$sysroot}" - mkdir -p "$target_specs_dir" - - %{target-stage1}-gcc -dumpspecs | - sed -e "s@[gMS]\?crt[1in].o%s@%:getenv(STAGE2_SYSROOT %{libdir}/&)@g" \ - -e "s@/lib\(64\)\?/ld@%{libdir}/ld@g" \ - > "$target_specs_dir/specs-for-sysroot" - - # NASTY HACK # - # We create a symlink to the actual specs here, so that later the - # symlink can be replaced with a dangling link. - # - # This is necessary as we need to have gcc use its internal specs, - # which can differ to the specs generated by `gcc -dumpspecs`. - # - # The dangling symlink will not make it onto the final system, just - # like all other bootstrap only components. - ln -s specs-for-sysroot "$target_specs_dir/specs" - - # Install a symlink for the program interpreter (ld.so) so that binaries - # built in stage 3 before the stage 3 glibc is built can use it. - # FIXME: get a better way of finding the name of the loader. The lib64 - # path is hardcoded into glibc in the file - # sysdeps/unix/sysv/linux/configure. - - install -d %{install-root}/lib - - | - case "%{bst-arch}" in - x86_64) - install -d "%{install-root}/lib64" - ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ - "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; - ppc64) - install -d "%{install-root}/lib64" - ln -s "%{prefix}/lib/ld64.so.1" \ - "%{install-root}/lib64/ld64.so.1" ;; - *) - loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld-linux*)) - [ -z $loader ] && loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld.so*)) - [ -z $loader ] && ( echo "Bug in stage2-glibc ld.so symlinks" ; exit 1 ) - ln -s "%{prefix}/lib/$loader" "%{install-root}/lib/$loader" - esac diff --git a/build-essential/stage2-libstdcxx.bst b/build-essential/stage2-libstdcxx.bst deleted file mode 100644 index f8a75a23..00000000 --- a/build-essential/stage2-libstdcxx.bst +++ /dev/null @@ -1,55 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/build-essential - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: build-essential/stage1.bst - type: build -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. The thread C++ library cannot be built, as the thread C library - # was not build in stage1-gcc. - # 2. Prevents the installation of precompiled include files, which are - # not needed at this stage. - # 3. From LFS: the header location of C++ needs to be explicitly given - # as we are running the configure script from the top-level - # directory. - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - # -fPIC must be given, otherwise it will not be possible to create - # shared libraries linked to libstdc++ - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - cd o && ../libstdc++-v3/configure \ - --build=$(sh ../config.guess) \ - --host="%{target-stage1}" \ - --target="%{target-stage1}" \ - --prefix="%{prefix}" \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - `# [1]` --disable-libstdcxx-threads \ - `# [2]` --disable-libstdcxx-pch \ - `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 - - build-commands: - - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install diff --git a/build-essential/stage2-linux-api-headers.bst b/build-essential/stage2-linux-api-headers.bst deleted file mode 100644 index d72106c0..00000000 --- a/build-essential/stage2-linux-api-headers.bst +++ /dev/null @@ -1,41 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:linux - track: v4.0 - ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 - -depends: -- filename: build-essential/stage1.bst - type: build - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - | - case "%{bst-arch}" in - armv5l) - ARCH="arm" ;; - armv7b|armv7l|armv7lhf) - ARCH="arm" ;; - armv8l64|armv8b64) - ARCH="arm64" ;; - x86_32) - ARCH="i386" ;; - x86_64) - ARCH="x86_64" ;; - ppc64) - ARCH="powerpc" ;; - *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 - exit 1 - esac - ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - - install -d "%{install-root}%{includedir}" - - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/build-essential/stage2-make.bst b/build-essential/stage2-make.bst deleted file mode 100644 index 3549d626..00000000 --- a/build-essential/stage2-make.bst +++ /dev/null @@ -1,29 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:make-tarball - track: baserock/make-4.1-ttyname-segfault-fix - ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false - LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls --without-guile - --build=$(sh config/config.guess) --host=%{target-stage1} - build-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/build-essential/stage2-reset-specs.bst b/build-essential/stage2-reset-specs.bst deleted file mode 100644 index 5ea3d044..00000000 --- a/build-essential/stage2-reset-specs.bst +++ /dev/null @@ -1,35 +0,0 @@ -kind: manual - -depends: -- filename: build-essential/stage1.bst - type: build -- filename: build-essential/stage2-fhs-dirs.bst - type: runtime -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - # Nasty hack to get around being unable to reliably add configuration to gcc, - # hence the gcc specs are modified, combined with Baserock's rootfs protection - # preventing specs being modified before builds. - # The limitation is overcome by installing files as part of a chunk, which - # overwrites previous files. - # New specs were added for the bootstrap builds, but after stage2 we start - # having chrooted builds, so the old specs need to be replaced. - # Unfortunately we can't just replace the specs with the ones gcc produces, - # since gcc behaves differently without specs to with specs it produces! - # So we use a **NASTY HACK** to replace the specs symlink with one that - # points to a file that doesn't exist. - install-commands: - - | - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" - target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" - mkdir -p "$target_specs_dir" - ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" diff --git a/build-essential/stage2.bst b/build-essential/stage2.bst deleted file mode 100644 index bfbe3376..00000000 --- a/build-essential/stage2.bst +++ /dev/null @@ -1,22 +0,0 @@ -kind: stack - -depends: -- build-essential/stage2-binutils.bst -- build-essential/stage2-busybox.bst -- build-essential/stage2-fhs-dirs.bst -- build-essential/stage2-glibc.bst -- build-essential/stage2-gawk.bst -- build-essential/stage2-gcc.bst -- build-essential/stage2-linux-api-headers.bst -- build-essential/stage2-make.bst -- build-essential/stage2-fake-bash.bst -- build-essential/stage2-reset-specs.bst - -# Stage 2 is a minimal base used to build the -# base runtime, must ldconfig when building on stage2 -public: - bst: - integration-commands: - - | - # In this stage, it may be that ld.so.conf doesnt exist yet - ldconfig || exit 0 diff --git a/build-essential/zlib.bst b/build-essential/zlib.bst deleted file mode 100644 index f64eeb43..00000000 --- a/build-essential/zlib.bst +++ /dev/null @@ -1,23 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:zlib - track: v1.2.8 - ref: 50893291621658f355bc5b4d450a8d06a563053d - -depends: -- filename: build-essential/stage2.bst - type: build -- build-essential/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" - build-commands: - - make - install-commands: - - make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain.bst b/gnu-toolchain.bst new file mode 100644 index 00000000..f38a05da --- /dev/null +++ b/gnu-toolchain.bst @@ -0,0 +1,20 @@ +kind: stack + +depends: +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/binutils.bst +- gnu-toolchain/busybox.bst +- gnu-toolchain/ccache.bst +- gnu-toolchain/gawk.bst +- gnu-toolchain/gcc.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/linux-api-headers.bst +- gnu-toolchain/m4-tarball.bst +- gnu-toolchain/make.bst + +# Build essential is the base runtime, ldconfig +# must be run on it. +public: + bst: + integration-commands: + - ldconfig diff --git a/gnu-toolchain/binutils.bst b/gnu-toolchain/binutils.bst new file mode 100644 index 00000000..5983c465 --- /dev/null +++ b/gnu-toolchain/binutils.bst @@ -0,0 +1,24 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - | + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --with-system-zlib diff --git a/gnu-toolchain/busybox.bst b/gnu-toolchain/busybox.bst new file mode 100644 index 00000000..be14fa51 --- /dev/null +++ b/gnu-toolchain/busybox.bst @@ -0,0 +1,104 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + # Busybox's default config has everything enabled. + - make defconfig KCONFIG_NOTIMESTAMP=1 + + - sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'%{prefix}/share/udhcpc/default.script'"|' + -i .config + - sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' + -i .config + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK, but in GENIVI baseline we want to get rid of it + # - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + # Now turn on some little bits we do need + - sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config + - sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' + -i .config + - sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' + -i .config + + build-commands: + - make KCONFIG_NOTIMESTAMP=1 + + install-commands: + - | + # Note here we intentionally ignore '%{prefix}', this is going into '/' + make CONFIG_PREFIX="%{install-root}" KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}/bin/busybox" + + # Set up man environment variables + - mkdir -p "%{install-root}/etc" + - | + cat << EOF > "%{install-root}/etc/man.conf" + # This file is used by man to provide a manpath for those without one by + # examining their PATH environment variable. + # + # Lines beginning with `#' are comments and are ignored. Any combination of + # tabs or spaces may be used as `whitespace' separators. + + MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man + MANDATORY_MANPATH /usr/local/share/man + EOF diff --git a/gnu-toolchain/ccache.bst b/gnu-toolchain/ccache.bst new file mode 100644 index 00000000..f66a37ca --- /dev/null +++ b/gnu-toolchain/ccache.bst @@ -0,0 +1,28 @@ +kind: autotools + +sources: +- kind: git + url: upstream:ccache + track: baserock/gnu-toolchain + ref: 567631456f0899cdf0c382f898d38aadc8901d32 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + install-commands: + - make DESTDIR="%{install-root}" install + - mkdir -p "%{install-root}%{prefix}/lib/ccache" + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/$cc"; + done + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/%{target}-$cc"; + done diff --git a/gnu-toolchain/fhs-dirs.bst b/gnu-toolchain/fhs-dirs.bst new file mode 100644 index 00000000..df715755 --- /dev/null +++ b/gnu-toolchain/fhs-dirs.bst @@ -0,0 +1,26 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/gnu-toolchain/gawk.bst b/gnu-toolchain/gawk.bst new file mode 100644 index 00000000..7a612bfd --- /dev/null +++ b/gnu-toolchain/gawk.bst @@ -0,0 +1,20 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/gnu-toolchain/gcc.bst b/gnu-toolchain/gcc.bst new file mode 100644 index 00000000..b7b17ae6 --- /dev/null +++ b/gnu-toolchain/gcc.bst @@ -0,0 +1,67 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/linux-api-headers.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst +- gnu-toolchain/m4-tarball.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't + # fully work; we will need to hobble the multilib configuration in + # config/i386/t-linux64 if we really want to kill /lib64). + # 2. Avoid having more than one copy of ZLib in use on the system + # 3. Multilib does not make sense in Baserock. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + `# [1]` --libdir=%{prefix}/lib \ + --disable-bootstrap \ + `# [2]` --with-system-zlib \ + `# [3]` --disable-multilib \ + --enable-languages=c,c++,fortran + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + - ln -s gcc "%{install-root}%{prefix}/bin/cc" + - | + for fortran_alias in f77 f90 f95; do + ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" + done diff --git a/gnu-toolchain/glibc.bst b/gnu-toolchain/glibc.bst new file mode 100644 index 00000000..8621074e --- /dev/null +++ b/gnu-toolchain/glibc.bst @@ -0,0 +1,77 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/linux-api-headers.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - mkdir o + + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + # We override the PATH here to remove /tools/bin from it. + # Thanks to this glibc finds bash in /bin/bash through the /bin + # symlink. This is important because glibc changes the path to bash + # of the shebang in some scripts and these scripts will be broken if + # they point to bash in /tools/bin/bash. + export PATH="/usr/bin:/sbin:/bin"; + export CFLAGS="-O2 $CFLAGS"; + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + --disable-profile \ + --enable-kernel=3.0.0 \ + --without-cvs \ + --without-selinux \ + --enable-obsolete-rpc + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < nsswitch.conf + passwd: compat + group: compat + shadow: compat + + hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 + networks: files + + protocols: db files + services: db files + ethers: db files + rpc: db files + + netgroup: nis + EOF + - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" diff --git a/gnu-toolchain/gnome-platform.bst b/gnu-toolchain/gnome-platform.bst new file mode 100644 index 00000000..fd5efb6b --- /dev/null +++ b/gnu-toolchain/gnome-platform.bst @@ -0,0 +1,27 @@ +kind: import +description: Import the GNOME Platform +config: + source: files +public: + bst: + integration-commands: + - ldconfig + - | + if [ -d "/app/share/glib-2.0/schemas" ]; then + glib-compile-schemas /app/share/glib-2.0/schemas + fi +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/gnu-toolchain/gnome-sdk.bst b/gnu-toolchain/gnome-sdk.bst new file mode 100644 index 00000000..6b0f158f --- /dev/null +++ b/gnu-toolchain/gnome-sdk.bst @@ -0,0 +1,20 @@ +kind: import +description: Import the GNOME SDK +config: + source: files + target: usr +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/gnu-toolchain/linux-api-headers.bst b/gnu-toolchain/linux-api-headers.bst new file mode 100644 index 00000000..0020d2ae --- /dev/null +++ b/gnu-toolchain/linux-api-headers.bst @@ -0,0 +1,39 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/gnu-toolchain/m4-tarball.bst b/gnu-toolchain/m4-tarball.bst new file mode 100644 index 00000000..1019c57a --- /dev/null +++ b/gnu-toolchain/m4-tarball.bst @@ -0,0 +1,20 @@ +kind: autotools + +sources: +- kind: git + url: upstream:m4-tarball + track: m4-1.4.17 + ref: 23c11479b3ad787adc7a651ee0c4347839e47723 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-gcc-warnings diff --git a/gnu-toolchain/make.bst b/gnu-toolchain/make.bst new file mode 100644 index 00000000..731d1a9f --- /dev/null +++ b/gnu-toolchain/make.bst @@ -0,0 +1,21 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/gnu-toolchain/stage1-binutils.bst b/gnu-toolchain/stage1-binutils.bst new file mode 100644 index 00000000..f22a4458 --- /dev/null +++ b/gnu-toolchain/stage1-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # We set the sysroot location dynamically at runtime by passing + # `--sysroot` to GCC, so we need to build a linker with sysroot support. + # We set it to a non-existent directory as a safety net to avoid looking + # at the host dirs in case we forget to set the sysroot. Setting the + # lib path is vital to avoid the tools we build linking to the libraries + # on the host system; the '=' makes the path we give relative to the + # sysroot, which we can then set at runtime by passing -Wl,--sysroot to + # GCC. Although nothing should be installed on /lib64, we configure the + # linker to look at that directory as well to make things more robust + # (currently GCC installs libraries to this directory at least on + # x86_64). + + - | + %{configure} --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$(sh config.guess) \ + --target=%{target-stage1} \ + --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" diff --git a/gnu-toolchain/stage1-gcc.bst b/gnu-toolchain/stage1-gcc.bst new file mode 100644 index 00000000..f7244c00 --- /dev/null +++ b/gnu-toolchain/stage1-gcc.bst @@ -0,0 +1,100 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/stage1-binutils.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # Workaround from LFS due GCC not detecting stack protection correctly + - | + sed -i -e '/k prot/a \ + gcc_cv_libc_provides_ssp=yes + ' gcc/configure + + - mkdir o + + # Configure flag notes: + # 1. See gcc.morph. + # 2. Although we will be setting a sysroot at runtime, giving a + # temporary one at configuration time seems necessary so that + # `--with-native-system-header-dir` produces effect and + # /tools/include is in the include path for the newly built GCC. We + # set it by default to a non-existent directory to avoid GCC looking + # at the host dirs, in case we forget to give it at runtime. + # 3. Disable searching /usr/local/include for headers + # 4. The pass 1 compiler needs to find the libraries we build in pass + # 2. Include path must be set explicility, because it defaults to + # $SYSROOT/usr/include rather than $SYSROOT/include. + # 5. Disable stuff that doesn't work when building a cross compiler + # without an existing libc, and generally try to keep this build as + # simple as possible. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + --host=$(sh ../config.guess) \ + --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{libdir}" \ + `# [2]` --with-sysroot=/nonexistentdir \ + --with-newlib \ + `# [3]` --with-local-prefix="%{prefix}" \ + `# [4]` --with-native-system-header-dir="%{prefix}/include" \ + --without-headers \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [5]` --disable-decimal-float \ + `# [5]` --disable-threads \ + `# [5]` --disable-libatomic \ + `# [5]` --disable-libgomp \ + `# [5]` --disable-libitm \ + `# [5]` --disable-libquadmath \ + `# [5]` --disable-libsanitizer \ + `# [5]` --disable-libssp \ + `# [5]` --disable-libvtv \ + `# [5]` --disable-libcilkrts \ + `# [5]` --disable-libstdc++-v3 \ + --enable-languages=c,c++ + + build-commands: + - | + # GCC is not passing the correct host/target flags to GMP's configure + # script, which causes it to not use the machine-dependent code for + # the platform and use the generic one instead. However, the generic + # code results on an undefined reference to `__gmpn_invert_limb' in + # ARMv7. Fix the invocation of GMP's configure script so that GMP can + # use the machine-dependent code. + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain/stage1.bst b/gnu-toolchain/stage1.bst new file mode 100644 index 00000000..8e5399a0 --- /dev/null +++ b/gnu-toolchain/stage1.bst @@ -0,0 +1,7 @@ +kind: stack + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/stage1-binutils.bst +- gnu-toolchain/stage1-gcc.bst diff --git a/gnu-toolchain/stage2-binutils.bst b/gnu-toolchain/stage2-binutils.bst new file mode 100644 index 00000000..e3ef2eaa --- /dev/null +++ b/gnu-toolchain/stage2-binutils.bst @@ -0,0 +1,40 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + # binutils has its own embedded libtool, which is old and strips out + # `--sysroot`. Work around by modifying the compiler command to + # include the sysroot flag + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=%{target-stage1} \ + --target=%{target-stage1} + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + make diff --git a/gnu-toolchain/stage2-busybox.bst b/gnu-toolchain/stage2-busybox.bst new file mode 100644 index 00000000..a1774abd --- /dev/null +++ b/gnu-toolchain/stage2-busybox.bst @@ -0,0 +1,101 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in + # the PATH supplied by the stage2-gcc chunk, which can't execute outside of + # the stage 3 staging area. + - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK. + - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config + - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config + - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 + + install-commands: + # We expect to be built with a non-standard prefix in stage 2 (i.e. not + # /usr). The install will break if prefix is set to /usr. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make CONFIG_PREFIX="%{install-root}%{prefix}" \ + HOSTCC="/usr/bin/gcc" \ + CROSS_COMPILE=%{target-stage1}- \ + KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}%{prefix}"/bin/busybox diff --git a/gnu-toolchain/stage2-fake-bash.bst b/gnu-toolchain/stage2-fake-bash.bst new file mode 100644 index 00000000..85e0dced --- /dev/null +++ b/gnu-toolchain/stage2-fake-bash.bst @@ -0,0 +1,17 @@ +kind: manual + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "%{install-root}%{prefix}/bin/bash" diff --git a/gnu-toolchain/stage2-fhs-dirs.bst b/gnu-toolchain/stage2-fhs-dirs.bst new file mode 100644 index 00000000..37346231 --- /dev/null +++ b/gnu-toolchain/stage2-fhs-dirs.bst @@ -0,0 +1,31 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - rmdir "%{install-root}/usr/bin" + - ln -s "%{prefix}/bin" "%{install-root}/usr/bin" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/gnu-toolchain/stage2-gawk.bst b/gnu-toolchain/stage2-gawk.bst new file mode 100644 index 00000000..1c15d53a --- /dev/null +++ b/gnu-toolchain/stage2-gawk.bst @@ -0,0 +1,30 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls + --build=$(sh config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/gnu-toolchain/stage2-gcc-fixed-headers.bst b/gnu-toolchain/stage2-gcc-fixed-headers.bst new file mode 100644 index 00000000..f3ed0e1e --- /dev/null +++ b/gnu-toolchain/stage2-gcc-fixed-headers.bst @@ -0,0 +1,37 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + # Stage 1 GCC's fixincludes process created a limits.h before there was + # a real limits.h available for the target. This step (taken from Linux + # Linux From Scratch) creates a better one so that stage 2 GCC can compile. + # + # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to + # overwrite files in a staging area is to install a new chunk. + # This is undesired behaviour in the long term, as we want to never + # have overlaps, so this functionality may go away. + - | + libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) + sysroot="$(dirname $(dirname $(pwd)))" + target_libgcc_dir="${libgcc_dir#$sysroot}" + mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" + cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ + >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" diff --git a/gnu-toolchain/stage2-gcc.bst b/gnu-toolchain/stage2-gcc.bst new file mode 100644 index 00000000..18594d8f --- /dev/null +++ b/gnu-toolchain/stage2-gcc.bst @@ -0,0 +1,102 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst +- gnu-toolchain/stage2-gcc-fixed-headers.bst +- gnu-toolchain/stage2-libstdcxx.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # In other projects we specify the sysroot location using CPPFLAGS. + # Here, that breaks because GCC compiles stuff for the *build* machine, + # too ... and this requires using the host's compiler, which cannot use + # the same set of CPPFLAGS as the target. If we specify the sysroot + # using CC instead then we don't interfere, because we are only + # specifying the *host* C compiler. + # + # Configure flag notes: + # 1. It's vital that this compiler runs in the bootstrap machine, and + # targets the same machine (TARGET_STAGE1) so that the stage 1 GCC + # is used instead of the compiler of the build machine. + # 2. See gcc.morph. + # 3. Disable searching /usr/local/include for headers + # 4. This flag causes the correct --sysroot flag to be passed when + # calling stage 1 GCC. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + export AR="%{target-stage1}-ar" + export RANLIB="%{target-stage1}-ranlib" + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + `# [1]` --host=%{target-stage1} \ + `# [1]` --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [2]` --libdir=%{prefix}/lib \ + `# [3]` --with-local-prefix=%{prefix} \ + `# [4]` --with-build-sysroot="$STAGE2_SYSROOT" \ + --disable-bootstrap \ + --disable-nls \ + --disable-multilib \ + --disable-libgomp \ + --disable-libstdcxx-pch \ + --enable-languages=c,c++ + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + + # Stage 3 builds need to link against this file in the location that + # it will be in the final system, so we make a temporary link now. + # + # On x86_64 GCC resolutely installs its libraries into lib64. To fix this + # would require hobbling the MULTILIB_OSDIRNAMES field in + # gcc/config/i386/t-linux64 and this might break things, so for now we + # tolerate the inconsistency. + - | + if [ "$(echo %{target} | cut -c -6)" = "x86_64" ]; then + libdir=lib64 + else + libdir=lib + fi + + install -d "%{install-root}/lib" + ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/" + ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/" diff --git a/gnu-toolchain/stage2-glibc.bst b/gnu-toolchain/stage2-glibc.bst new file mode 100644 index 00000000..1c3745e1 --- /dev/null +++ b/gnu-toolchain/stage2-glibc.bst @@ -0,0 +1,122 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. Avoid installing to PREFIX/lib64 on x86_64. + # 2. Location of linux-api-headers. + # 3. Normal flags. See glibc.morph. + # 4. Force configuration values of certain things that can't be detected + # in a cross-compile. + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(../scripts/config.guess) --host=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{prefix}/lib" \ + `# [2]` --with-headers="%{prefix}/include" \ + `# [3]` --disable-profile --enable-kernel=2.6.25 \ + `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ + libc_cv_forced_unwind=yes libc_cv_ssp=no + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" + - | + # Fix up GCC to handle the sysroot containing glibc being in a different + # location for each chunk build. + # + # For headers, it's enough to pass -B in the CPPFLAGS. This would work for + # the startup files (crt*.o) as well, except where libtool is involved (in + # which case it strips -B out of your LDFLAGS before calling GCC). We get + # around this by making GCC locate them relative to the environment variable + # STAGE2_SYSROOT, which we can then set along with CPPFLAGS in each stage 2 + # chunk build. + # + # We also force the use of the program loader at PREFIX/lib/ld.so instead + # of its usual home in /lib or /lib64, which is necessary for the output of + # stage 2 to work as a chroot when building stage 3. + + sysroot="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc --print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$sysroot}" + mkdir -p "$target_specs_dir" + + %{target-stage1}-gcc -dumpspecs | + sed -e "s@[gMS]\?crt[1in].o%s@%:getenv(STAGE2_SYSROOT %{libdir}/&)@g" \ + -e "s@/lib\(64\)\?/ld@%{libdir}/ld@g" \ + > "$target_specs_dir/specs-for-sysroot" + + # NASTY HACK # + # We create a symlink to the actual specs here, so that later the + # symlink can be replaced with a dangling link. + # + # This is necessary as we need to have gcc use its internal specs, + # which can differ to the specs generated by `gcc -dumpspecs`. + # + # The dangling symlink will not make it onto the final system, just + # like all other bootstrap only components. + ln -s specs-for-sysroot "$target_specs_dir/specs" + + # Install a symlink for the program interpreter (ld.so) so that binaries + # built in stage 3 before the stage 3 glibc is built can use it. + # FIXME: get a better way of finding the name of the loader. The lib64 + # path is hardcoded into glibc in the file + # sysdeps/unix/sysv/linux/configure. + - install -d %{install-root}/lib + - | + case "%{bst-arch}" in + x86_64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ + "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; + ppc64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld64.so.1" \ + "%{install-root}/lib64/ld64.so.1" ;; + *) + loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld-linux*)) + [ -z $loader ] && loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld.so*)) + [ -z $loader ] && ( echo "Bug in stage2-glibc ld.so symlinks" ; exit 1 ) + ln -s "%{prefix}/lib/$loader" "%{install-root}/lib/$loader" + esac diff --git a/gnu-toolchain/stage2-libstdcxx.bst b/gnu-toolchain/stage2-libstdcxx.bst new file mode 100644 index 00000000..db6f8a62 --- /dev/null +++ b/gnu-toolchain/stage2-libstdcxx.bst @@ -0,0 +1,55 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. The thread C++ library cannot be built, as the thread C library + # was not build in stage1-gcc. + # 2. Prevents the installation of precompiled include files, which are + # not needed at this stage. + # 3. From LFS: the header location of C++ needs to be explicitly given + # as we are running the configure script from the top-level + # directory. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + # -fPIC must be given, otherwise it will not be possible to create + # shared libraries linked to libstdc++ + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + cd o && ../libstdc++-v3/configure \ + --build=$(sh ../config.guess) \ + --host="%{target-stage1}" \ + --target="%{target-stage1}" \ + --prefix="%{prefix}" \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [1]` --disable-libstdcxx-threads \ + `# [2]` --disable-libstdcxx-pch \ + `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 + + build-commands: + - cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain/stage2-linux-api-headers.bst b/gnu-toolchain/stage2-linux-api-headers.bst new file mode 100644 index 00000000..e5869bf1 --- /dev/null +++ b/gnu-toolchain/stage2-linux-api-headers.bst @@ -0,0 +1,41 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/gnu-toolchain/stage2-make.bst b/gnu-toolchain/stage2-make.bst new file mode 100644 index 00000000..9c804f1b --- /dev/null +++ b/gnu-toolchain/stage2-make.bst @@ -0,0 +1,29 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls --without-guile + --build=$(sh config/config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/gnu-toolchain/stage2-reset-specs.bst b/gnu-toolchain/stage2-reset-specs.bst new file mode 100644 index 00000000..5910903e --- /dev/null +++ b/gnu-toolchain/stage2-reset-specs.bst @@ -0,0 +1,35 @@ +kind: manual + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + # Nasty hack to get around being unable to reliably add configuration to gcc, + # hence the gcc specs are modified, combined with Baserock's rootfs protection + # preventing specs being modified before builds. + # The limitation is overcome by installing files as part of a chunk, which + # overwrites previous files. + # New specs were added for the bootstrap builds, but after stage2 we start + # having chrooted builds, so the old specs need to be replaced. + # Unfortunately we can't just replace the specs with the ones gcc produces, + # since gcc behaves differently without specs to with specs it produces! + # So we use a **NASTY HACK** to replace the specs symlink with one that + # points to a file that doesn't exist. + install-commands: + - | + STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" + mkdir -p "$target_specs_dir" + ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" diff --git a/gnu-toolchain/stage2.bst b/gnu-toolchain/stage2.bst new file mode 100644 index 00000000..ccabaf58 --- /dev/null +++ b/gnu-toolchain/stage2.bst @@ -0,0 +1,22 @@ +kind: stack + +depends: +- gnu-toolchain/stage2-binutils.bst +- gnu-toolchain/stage2-busybox.bst +- gnu-toolchain/stage2-fhs-dirs.bst +- gnu-toolchain/stage2-glibc.bst +- gnu-toolchain/stage2-gawk.bst +- gnu-toolchain/stage2-gcc.bst +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-make.bst +- gnu-toolchain/stage2-fake-bash.bst +- gnu-toolchain/stage2-reset-specs.bst + +# Stage 2 is a minimal base used to build the +# base runtime, must ldconfig when building on stage2 +public: + bst: + integration-commands: + - | + # In this stage, it may be that ld.so.conf doesnt exist yet + ldconfig || exit 0 diff --git a/gnu-toolchain/zlib.bst b/gnu-toolchain/zlib.bst new file mode 100644 index 00000000..1dd353c5 --- /dev/null +++ b/gnu-toolchain/zlib.bst @@ -0,0 +1,23 @@ +kind: manual + +sources: +- kind: git + url: upstream:zlib + track: v1.2.8 + ref: 50893291621658f355bc5b4d450a8d06a563053d + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + build-commands: + - make + install-commands: + - make DESTDIR="%{install-root}" install -- cgit v1.2.1 From f501976babcc283c7d2ae4bea25e5feefc4b98c2 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 22 Mar 2017 09:47:09 +0000 Subject: Moved all elements under the elements directory --- elements/gnu-toolchain.bst | 20 ++++ elements/gnu-toolchain/binutils.bst | 24 ++++ elements/gnu-toolchain/busybox.bst | 104 ++++++++++++++++++ elements/gnu-toolchain/ccache.bst | 28 +++++ elements/gnu-toolchain/fhs-dirs.bst | 26 +++++ elements/gnu-toolchain/gawk.bst | 20 ++++ elements/gnu-toolchain/gcc.bst | 67 +++++++++++ elements/gnu-toolchain/glibc.bst | 77 +++++++++++++ elements/gnu-toolchain/gnome-platform.bst | 27 +++++ elements/gnu-toolchain/gnome-sdk.bst | 20 ++++ elements/gnu-toolchain/linux-api-headers.bst | 39 +++++++ elements/gnu-toolchain/m4-tarball.bst | 20 ++++ elements/gnu-toolchain/make.bst | 21 ++++ elements/gnu-toolchain/stage1-binutils.bst | 38 +++++++ elements/gnu-toolchain/stage1-gcc.bst | 100 +++++++++++++++++ elements/gnu-toolchain/stage1.bst | 7 ++ elements/gnu-toolchain/stage2-binutils.bst | 40 +++++++ elements/gnu-toolchain/stage2-busybox.bst | 101 +++++++++++++++++ elements/gnu-toolchain/stage2-fake-bash.bst | 17 +++ elements/gnu-toolchain/stage2-fhs-dirs.bst | 31 ++++++ elements/gnu-toolchain/stage2-gawk.bst | 30 +++++ .../gnu-toolchain/stage2-gcc-fixed-headers.bst | 37 +++++++ elements/gnu-toolchain/stage2-gcc.bst | 102 +++++++++++++++++ elements/gnu-toolchain/stage2-glibc.bst | 122 +++++++++++++++++++++ elements/gnu-toolchain/stage2-libstdcxx.bst | 55 ++++++++++ .../gnu-toolchain/stage2-linux-api-headers.bst | 41 +++++++ elements/gnu-toolchain/stage2-make.bst | 29 +++++ elements/gnu-toolchain/stage2-reset-specs.bst | 35 ++++++ elements/gnu-toolchain/stage2.bst | 22 ++++ elements/gnu-toolchain/zlib.bst | 23 ++++ gnu-toolchain.bst | 20 ---- gnu-toolchain/binutils.bst | 24 ---- gnu-toolchain/busybox.bst | 104 ------------------ gnu-toolchain/ccache.bst | 28 ----- gnu-toolchain/fhs-dirs.bst | 26 ----- gnu-toolchain/gawk.bst | 20 ---- gnu-toolchain/gcc.bst | 67 ----------- gnu-toolchain/glibc.bst | 77 ------------- gnu-toolchain/gnome-platform.bst | 27 ----- gnu-toolchain/gnome-sdk.bst | 20 ---- gnu-toolchain/linux-api-headers.bst | 39 ------- gnu-toolchain/m4-tarball.bst | 20 ---- gnu-toolchain/make.bst | 21 ---- gnu-toolchain/stage1-binutils.bst | 38 ------- gnu-toolchain/stage1-gcc.bst | 100 ----------------- gnu-toolchain/stage1.bst | 7 -- gnu-toolchain/stage2-binutils.bst | 40 ------- gnu-toolchain/stage2-busybox.bst | 101 ----------------- gnu-toolchain/stage2-fake-bash.bst | 17 --- gnu-toolchain/stage2-fhs-dirs.bst | 31 ------ gnu-toolchain/stage2-gawk.bst | 30 ----- gnu-toolchain/stage2-gcc-fixed-headers.bst | 37 ------- gnu-toolchain/stage2-gcc.bst | 102 ----------------- gnu-toolchain/stage2-glibc.bst | 122 --------------------- gnu-toolchain/stage2-libstdcxx.bst | 55 ---------- gnu-toolchain/stage2-linux-api-headers.bst | 41 ------- gnu-toolchain/stage2-make.bst | 29 ----- gnu-toolchain/stage2-reset-specs.bst | 35 ------ gnu-toolchain/stage2.bst | 22 ---- gnu-toolchain/zlib.bst | 23 ---- project.conf | 2 + 61 files changed, 1325 insertions(+), 1323 deletions(-) create mode 100644 elements/gnu-toolchain.bst create mode 100644 elements/gnu-toolchain/binutils.bst create mode 100644 elements/gnu-toolchain/busybox.bst create mode 100644 elements/gnu-toolchain/ccache.bst create mode 100644 elements/gnu-toolchain/fhs-dirs.bst create mode 100644 elements/gnu-toolchain/gawk.bst create mode 100644 elements/gnu-toolchain/gcc.bst create mode 100644 elements/gnu-toolchain/glibc.bst create mode 100644 elements/gnu-toolchain/gnome-platform.bst create mode 100644 elements/gnu-toolchain/gnome-sdk.bst create mode 100644 elements/gnu-toolchain/linux-api-headers.bst create mode 100644 elements/gnu-toolchain/m4-tarball.bst create mode 100644 elements/gnu-toolchain/make.bst create mode 100644 elements/gnu-toolchain/stage1-binutils.bst create mode 100644 elements/gnu-toolchain/stage1-gcc.bst create mode 100644 elements/gnu-toolchain/stage1.bst create mode 100644 elements/gnu-toolchain/stage2-binutils.bst create mode 100644 elements/gnu-toolchain/stage2-busybox.bst create mode 100644 elements/gnu-toolchain/stage2-fake-bash.bst create mode 100644 elements/gnu-toolchain/stage2-fhs-dirs.bst create mode 100644 elements/gnu-toolchain/stage2-gawk.bst create mode 100644 elements/gnu-toolchain/stage2-gcc-fixed-headers.bst create mode 100644 elements/gnu-toolchain/stage2-gcc.bst create mode 100644 elements/gnu-toolchain/stage2-glibc.bst create mode 100644 elements/gnu-toolchain/stage2-libstdcxx.bst create mode 100644 elements/gnu-toolchain/stage2-linux-api-headers.bst create mode 100644 elements/gnu-toolchain/stage2-make.bst create mode 100644 elements/gnu-toolchain/stage2-reset-specs.bst create mode 100644 elements/gnu-toolchain/stage2.bst create mode 100644 elements/gnu-toolchain/zlib.bst delete mode 100644 gnu-toolchain.bst delete mode 100644 gnu-toolchain/binutils.bst delete mode 100644 gnu-toolchain/busybox.bst delete mode 100644 gnu-toolchain/ccache.bst delete mode 100644 gnu-toolchain/fhs-dirs.bst delete mode 100644 gnu-toolchain/gawk.bst delete mode 100644 gnu-toolchain/gcc.bst delete mode 100644 gnu-toolchain/glibc.bst delete mode 100644 gnu-toolchain/gnome-platform.bst delete mode 100644 gnu-toolchain/gnome-sdk.bst delete mode 100644 gnu-toolchain/linux-api-headers.bst delete mode 100644 gnu-toolchain/m4-tarball.bst delete mode 100644 gnu-toolchain/make.bst delete mode 100644 gnu-toolchain/stage1-binutils.bst delete mode 100644 gnu-toolchain/stage1-gcc.bst delete mode 100644 gnu-toolchain/stage1.bst delete mode 100644 gnu-toolchain/stage2-binutils.bst delete mode 100644 gnu-toolchain/stage2-busybox.bst delete mode 100644 gnu-toolchain/stage2-fake-bash.bst delete mode 100644 gnu-toolchain/stage2-fhs-dirs.bst delete mode 100644 gnu-toolchain/stage2-gawk.bst delete mode 100644 gnu-toolchain/stage2-gcc-fixed-headers.bst delete mode 100644 gnu-toolchain/stage2-gcc.bst delete mode 100644 gnu-toolchain/stage2-glibc.bst delete mode 100644 gnu-toolchain/stage2-libstdcxx.bst delete mode 100644 gnu-toolchain/stage2-linux-api-headers.bst delete mode 100644 gnu-toolchain/stage2-make.bst delete mode 100644 gnu-toolchain/stage2-reset-specs.bst delete mode 100644 gnu-toolchain/stage2.bst delete mode 100644 gnu-toolchain/zlib.bst diff --git a/elements/gnu-toolchain.bst b/elements/gnu-toolchain.bst new file mode 100644 index 00000000..f38a05da --- /dev/null +++ b/elements/gnu-toolchain.bst @@ -0,0 +1,20 @@ +kind: stack + +depends: +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/binutils.bst +- gnu-toolchain/busybox.bst +- gnu-toolchain/ccache.bst +- gnu-toolchain/gawk.bst +- gnu-toolchain/gcc.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/linux-api-headers.bst +- gnu-toolchain/m4-tarball.bst +- gnu-toolchain/make.bst + +# Build essential is the base runtime, ldconfig +# must be run on it. +public: + bst: + integration-commands: + - ldconfig diff --git a/elements/gnu-toolchain/binutils.bst b/elements/gnu-toolchain/binutils.bst new file mode 100644 index 00000000..5983c465 --- /dev/null +++ b/elements/gnu-toolchain/binutils.bst @@ -0,0 +1,24 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - | + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --with-system-zlib diff --git a/elements/gnu-toolchain/busybox.bst b/elements/gnu-toolchain/busybox.bst new file mode 100644 index 00000000..be14fa51 --- /dev/null +++ b/elements/gnu-toolchain/busybox.bst @@ -0,0 +1,104 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + # Busybox's default config has everything enabled. + - make defconfig KCONFIG_NOTIMESTAMP=1 + + - sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'%{prefix}/share/udhcpc/default.script'"|' + -i .config + - sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' + -i .config + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK, but in GENIVI baseline we want to get rid of it + # - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + # Now turn on some little bits we do need + - sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config + - sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' + -i .config + - sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' + -i .config + + build-commands: + - make KCONFIG_NOTIMESTAMP=1 + + install-commands: + - | + # Note here we intentionally ignore '%{prefix}', this is going into '/' + make CONFIG_PREFIX="%{install-root}" KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}/bin/busybox" + + # Set up man environment variables + - mkdir -p "%{install-root}/etc" + - | + cat << EOF > "%{install-root}/etc/man.conf" + # This file is used by man to provide a manpath for those without one by + # examining their PATH environment variable. + # + # Lines beginning with `#' are comments and are ignored. Any combination of + # tabs or spaces may be used as `whitespace' separators. + + MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man + MANDATORY_MANPATH /usr/local/share/man + EOF diff --git a/elements/gnu-toolchain/ccache.bst b/elements/gnu-toolchain/ccache.bst new file mode 100644 index 00000000..f66a37ca --- /dev/null +++ b/elements/gnu-toolchain/ccache.bst @@ -0,0 +1,28 @@ +kind: autotools + +sources: +- kind: git + url: upstream:ccache + track: baserock/gnu-toolchain + ref: 567631456f0899cdf0c382f898d38aadc8901d32 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + install-commands: + - make DESTDIR="%{install-root}" install + - mkdir -p "%{install-root}%{prefix}/lib/ccache" + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/$cc"; + done + - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/%{target}-$cc"; + done diff --git a/elements/gnu-toolchain/fhs-dirs.bst b/elements/gnu-toolchain/fhs-dirs.bst new file mode 100644 index 00000000..df715755 --- /dev/null +++ b/elements/gnu-toolchain/fhs-dirs.bst @@ -0,0 +1,26 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/elements/gnu-toolchain/gawk.bst b/elements/gnu-toolchain/gawk.bst new file mode 100644 index 00000000..7a612bfd --- /dev/null +++ b/elements/gnu-toolchain/gawk.bst @@ -0,0 +1,20 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst new file mode 100644 index 00000000..b7b17ae6 --- /dev/null +++ b/elements/gnu-toolchain/gcc.bst @@ -0,0 +1,67 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/linux-api-headers.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst +- gnu-toolchain/m4-tarball.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't + # fully work; we will need to hobble the multilib configuration in + # config/i386/t-linux64 if we really want to kill /lib64). + # 2. Avoid having more than one copy of ZLib in use on the system + # 3. Multilib does not make sense in Baserock. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + `# [1]` --libdir=%{prefix}/lib \ + --disable-bootstrap \ + `# [2]` --with-system-zlib \ + `# [3]` --disable-multilib \ + --enable-languages=c,c++,fortran + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + - ln -s gcc "%{install-root}%{prefix}/bin/cc" + - | + for fortran_alias in f77 f90 f95; do + ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" + done diff --git a/elements/gnu-toolchain/glibc.bst b/elements/gnu-toolchain/glibc.bst new file mode 100644 index 00000000..8621074e --- /dev/null +++ b/elements/gnu-toolchain/glibc.bst @@ -0,0 +1,77 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/linux-api-headers.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - mkdir o + + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + # We override the PATH here to remove /tools/bin from it. + # Thanks to this glibc finds bash in /bin/bash through the /bin + # symlink. This is important because glibc changes the path to bash + # of the shebang in some scripts and these scripts will be broken if + # they point to bash in /tools/bin/bash. + export PATH="/usr/bin:/sbin:/bin"; + export CFLAGS="-O2 $CFLAGS"; + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + --disable-profile \ + --enable-kernel=3.0.0 \ + --without-cvs \ + --without-selinux \ + --enable-obsolete-rpc + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < nsswitch.conf + passwd: compat + group: compat + shadow: compat + + hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 + networks: files + + protocols: db files + services: db files + ethers: db files + rpc: db files + + netgroup: nis + EOF + - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" diff --git a/elements/gnu-toolchain/gnome-platform.bst b/elements/gnu-toolchain/gnome-platform.bst new file mode 100644 index 00000000..fd5efb6b --- /dev/null +++ b/elements/gnu-toolchain/gnome-platform.bst @@ -0,0 +1,27 @@ +kind: import +description: Import the GNOME Platform +config: + source: files +public: + bst: + integration-commands: + - ldconfig + - | + if [ -d "/app/share/glib-2.0/schemas" ]; then + glib-compile-schemas /app/share/glib-2.0/schemas + fi +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Platform/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/elements/gnu-toolchain/gnome-sdk.bst b/elements/gnu-toolchain/gnome-sdk.bst new file mode 100644 index 00000000..6b0f158f --- /dev/null +++ b/elements/gnu-toolchain/gnome-sdk.bst @@ -0,0 +1,20 @@ +kind: import +description: Import the GNOME SDK +config: + source: files + target: usr +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/x86_64/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.gnome.Sdk/i386/3.22 + gpg-key: keys/gnome-sdk.gpg + ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/elements/gnu-toolchain/linux-api-headers.bst b/elements/gnu-toolchain/linux-api-headers.bst new file mode 100644 index 00000000..0020d2ae --- /dev/null +++ b/elements/gnu-toolchain/linux-api-headers.bst @@ -0,0 +1,39 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/elements/gnu-toolchain/m4-tarball.bst b/elements/gnu-toolchain/m4-tarball.bst new file mode 100644 index 00000000..1019c57a --- /dev/null +++ b/elements/gnu-toolchain/m4-tarball.bst @@ -0,0 +1,20 @@ +kind: autotools + +sources: +- kind: git + url: upstream:m4-tarball + track: m4-1.4.17 + ref: 23c11479b3ad787adc7a651ee0c4347839e47723 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" --disable-gcc-warnings diff --git a/elements/gnu-toolchain/make.bst b/elements/gnu-toolchain/make.bst new file mode 100644 index 00000000..731d1a9f --- /dev/null +++ b/elements/gnu-toolchain/make.bst @@ -0,0 +1,21 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - ./configure --prefix="%{prefix}" --disable-nls diff --git a/elements/gnu-toolchain/stage1-binutils.bst b/elements/gnu-toolchain/stage1-binutils.bst new file mode 100644 index 00000000..f22a4458 --- /dev/null +++ b/elements/gnu-toolchain/stage1-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # We set the sysroot location dynamically at runtime by passing + # `--sysroot` to GCC, so we need to build a linker with sysroot support. + # We set it to a non-existent directory as a safety net to avoid looking + # at the host dirs in case we forget to set the sysroot. Setting the + # lib path is vital to avoid the tools we build linking to the libraries + # on the host system; the '=' makes the path we give relative to the + # sysroot, which we can then set at runtime by passing -Wl,--sysroot to + # GCC. Although nothing should be installed on /lib64, we configure the + # linker to look at that directory as well to make things more robust + # (currently GCC installs libraries to this directory at least on + # x86_64). + + - | + %{configure} --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$(sh config.guess) \ + --target=%{target-stage1} \ + --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" diff --git a/elements/gnu-toolchain/stage1-gcc.bst b/elements/gnu-toolchain/stage1-gcc.bst new file mode 100644 index 00000000..f7244c00 --- /dev/null +++ b/elements/gnu-toolchain/stage1-gcc.bst @@ -0,0 +1,100 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/stage1-binutils.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # Workaround from LFS due GCC not detecting stack protection correctly + - | + sed -i -e '/k prot/a \ + gcc_cv_libc_provides_ssp=yes + ' gcc/configure + + - mkdir o + + # Configure flag notes: + # 1. See gcc.morph. + # 2. Although we will be setting a sysroot at runtime, giving a + # temporary one at configuration time seems necessary so that + # `--with-native-system-header-dir` produces effect and + # /tools/include is in the include path for the newly built GCC. We + # set it by default to a non-existent directory to avoid GCC looking + # at the host dirs, in case we forget to give it at runtime. + # 3. Disable searching /usr/local/include for headers + # 4. The pass 1 compiler needs to find the libraries we build in pass + # 2. Include path must be set explicility, because it defaults to + # $SYSROOT/usr/include rather than $SYSROOT/include. + # 5. Disable stuff that doesn't work when building a cross compiler + # without an existing libc, and generally try to keep this build as + # simple as possible. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + --host=$(sh ../config.guess) \ + --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{libdir}" \ + `# [2]` --with-sysroot=/nonexistentdir \ + --with-newlib \ + `# [3]` --with-local-prefix="%{prefix}" \ + `# [4]` --with-native-system-header-dir="%{prefix}/include" \ + --without-headers \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [5]` --disable-decimal-float \ + `# [5]` --disable-threads \ + `# [5]` --disable-libatomic \ + `# [5]` --disable-libgomp \ + `# [5]` --disable-libitm \ + `# [5]` --disable-libquadmath \ + `# [5]` --disable-libsanitizer \ + `# [5]` --disable-libssp \ + `# [5]` --disable-libvtv \ + `# [5]` --disable-libcilkrts \ + `# [5]` --disable-libstdc++-v3 \ + --enable-languages=c,c++ + + build-commands: + - | + # GCC is not passing the correct host/target flags to GMP's configure + # script, which causes it to not use the machine-dependent code for + # the platform and use the generic one instead. However, the generic + # code results on an undefined reference to `__gmpn_invert_limb' in + # ARMv7. Fix the invocation of GMP's configure script so that GMP can + # use the machine-dependent code. + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/elements/gnu-toolchain/stage1.bst b/elements/gnu-toolchain/stage1.bst new file mode 100644 index 00000000..8e5399a0 --- /dev/null +++ b/elements/gnu-toolchain/stage1.bst @@ -0,0 +1,7 @@ +kind: stack + +depends: +- gnu-toolchain/gnome-platform.bst +- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/stage1-binutils.bst +- gnu-toolchain/stage1-gcc.bst diff --git a/elements/gnu-toolchain/stage2-binutils.bst b/elements/gnu-toolchain/stage2-binutils.bst new file mode 100644 index 00000000..e3ef2eaa --- /dev/null +++ b/elements/gnu-toolchain/stage2-binutils.bst @@ -0,0 +1,40 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + # binutils has its own embedded libtool, which is old and strips out + # `--sysroot`. Work around by modifying the compiler command to + # include the sysroot flag + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=%{target-stage1} \ + --target=%{target-stage1} + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + make diff --git a/elements/gnu-toolchain/stage2-busybox.bst b/elements/gnu-toolchain/stage2-busybox.bst new file mode 100644 index 00000000..a1774abd --- /dev/null +++ b/elements/gnu-toolchain/stage2-busybox.bst @@ -0,0 +1,101 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in + # the PATH supplied by the stage2-gcc chunk, which can't execute outside of + # the stage 3 staging area. + - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig + + # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. + - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' + # We have GAWK. + - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + + # Depends on stuff that was removed since eglibc 2.14. + - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + + # Busybox Patch is incompatible enough with GNU Patch that it can't be + # used for GNULib projects built from Git. + - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + + # None of this is needed because we have kmod; and it actually breaks the + # Linux build because depmod isn't compatible enough with util-linux's. + - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config + - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config + - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config + - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config + - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + + # General features that we don't need. + - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config + - sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' + -i .config + - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config + - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config + - sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config + - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config + - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config + - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config + - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config + - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config + - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config + - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config + - sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config + - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config + - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config + - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config + - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 + + install-commands: + # We expect to be built with a non-standard prefix in stage 2 (i.e. not + # /usr). The install will break if prefix is set to /usr. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make CONFIG_PREFIX="%{install-root}%{prefix}" \ + HOSTCC="/usr/bin/gcc" \ + CROSS_COMPILE=%{target-stage1}- \ + KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}%{prefix}"/bin/busybox diff --git a/elements/gnu-toolchain/stage2-fake-bash.bst b/elements/gnu-toolchain/stage2-fake-bash.bst new file mode 100644 index 00000000..85e0dced --- /dev/null +++ b/elements/gnu-toolchain/stage2-fake-bash.bst @@ -0,0 +1,17 @@ +kind: manual + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "%{install-root}%{prefix}/bin/bash" diff --git a/elements/gnu-toolchain/stage2-fhs-dirs.bst b/elements/gnu-toolchain/stage2-fhs-dirs.bst new file mode 100644 index 00000000..37346231 --- /dev/null +++ b/elements/gnu-toolchain/stage2-fhs-dirs.bst @@ -0,0 +1,31 @@ +kind: manual + +sources: +- kind: git + url: baserock:baserock/fhs-dirs + track: master + ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - sh ./create-fhs-dirs "%{install-root}" + - rmdir "%{install-root}/usr/bin" + - ln -s "%{prefix}/bin" "%{install-root}/usr/bin" + - install -m 644 passwd "%{install-root}/etc/passwd" + - install -m 600 shadow "%{install-root}/etc/shadow" + - install -m 644 interfaces "%{install-root}/etc/network/interfaces" + - install -m 644 group "%{install-root}/etc/group" + - install -m 644 issue "%{install-root}/etc/issue" + - install -m 644 services "%{install-root}/etc/services" + - install -m 644 protocols "%{install-root}/etc/protocols" + - echo baserock > "%{install-root}/etc/hostname" diff --git a/elements/gnu-toolchain/stage2-gawk.bst b/elements/gnu-toolchain/stage2-gawk.bst new file mode 100644 index 00000000..1c15d53a --- /dev/null +++ b/elements/gnu-toolchain/stage2-gawk.bst @@ -0,0 +1,30 @@ +kind: autotools + +sources: +- kind: git + url: upstream:gawk + track: gawk-4.1-stable + ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls + --build=$(sh config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst new file mode 100644 index 00000000..f3ed0e1e --- /dev/null +++ b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst @@ -0,0 +1,37 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + # Stage 1 GCC's fixincludes process created a limits.h before there was + # a real limits.h available for the target. This step (taken from Linux + # Linux From Scratch) creates a better one so that stage 2 GCC can compile. + # + # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to + # overwrite files in a staging area is to install a new chunk. + # This is undesired behaviour in the long term, as we want to never + # have overlaps, so this functionality may go away. + - | + libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) + sysroot="$(dirname $(dirname $(pwd)))" + target_libgcc_dir="${libgcc_dir#$sysroot}" + mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" + cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ + >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" diff --git a/elements/gnu-toolchain/stage2-gcc.bst b/elements/gnu-toolchain/stage2-gcc.bst new file mode 100644 index 00000000..18594d8f --- /dev/null +++ b/elements/gnu-toolchain/stage2-gcc.bst @@ -0,0 +1,102 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst +- gnu-toolchain/stage2-gcc-fixed-headers.bst +- gnu-toolchain/stage2-libstdcxx.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # In other projects we specify the sysroot location using CPPFLAGS. + # Here, that breaks because GCC compiles stuff for the *build* machine, + # too ... and this requires using the host's compiler, which cannot use + # the same set of CPPFLAGS as the target. If we specify the sysroot + # using CC instead then we don't interfere, because we are only + # specifying the *host* C compiler. + # + # Configure flag notes: + # 1. It's vital that this compiler runs in the bootstrap machine, and + # targets the same machine (TARGET_STAGE1) so that the stage 1 GCC + # is used instead of the compiler of the build machine. + # 2. See gcc.morph. + # 3. Disable searching /usr/local/include for headers + # 4. This flag causes the correct --sysroot flag to be passed when + # calling stage 1 GCC. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + export AR="%{target-stage1}-ar" + export RANLIB="%{target-stage1}-ranlib" + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(sh ../config.guess) \ + `# [1]` --host=%{target-stage1} \ + `# [1]` --target=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [2]` --libdir=%{prefix}/lib \ + `# [3]` --with-local-prefix=%{prefix} \ + `# [4]` --with-build-sysroot="$STAGE2_SYSROOT" \ + --disable-bootstrap \ + --disable-nls \ + --disable-multilib \ + --disable-libgomp \ + --disable-libstdcxx-pch \ + --enable-languages=c,c++ + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + + # Stage 3 builds need to link against this file in the location that + # it will be in the final system, so we make a temporary link now. + # + # On x86_64 GCC resolutely installs its libraries into lib64. To fix this + # would require hobbling the MULTILIB_OSDIRNAMES field in + # gcc/config/i386/t-linux64 and this might break things, so for now we + # tolerate the inconsistency. + - | + if [ "$(echo %{target} | cut -c -6)" = "x86_64" ]; then + libdir=lib64 + else + libdir=lib + fi + + install -d "%{install-root}/lib" + ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/" + ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/" diff --git a/elements/gnu-toolchain/stage2-glibc.bst b/elements/gnu-toolchain/stage2-glibc.bst new file mode 100644 index 00000000..1c3745e1 --- /dev/null +++ b/elements/gnu-toolchain/stage2-glibc.bst @@ -0,0 +1,122 @@ +kind: manual + +sources: +- kind: git + url: upstream:glibc + track: release/2.22/master + ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. Avoid installing to PREFIX/lib64 on x86_64. + # 2. Location of linux-api-headers. + # 3. Normal flags. See glibc.morph. + # 4. Force configuration values of certain things that can't be detected + # in a cross-compile. + - | + case "%{bst-arch}" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(../scripts/config.guess) --host=%{target-stage1} \ + --prefix="%{prefix}" \ + `# [1]` --libdir="%{prefix}/lib" \ + `# [2]` --with-headers="%{prefix}/include" \ + `# [3]` --disable-profile --enable-kernel=2.6.25 \ + `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ + libc_cv_forced_unwind=yes libc_cv_ssp=no + + build-commands: + - cd o && make localtime=UTC + + install-commands: + - cd o && make install_root="%{install-root}" localtime=UTC install + - mkdir -p "%{install-root}/etc" + - mkdir -p "%{install-root}/etc/ld.so.conf.d" + - | + cat < ld.so.conf + /lib + /usr/lib + /usr/local/lib + include /etc/ld.so.conf.d/*.conf + EOF + - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" + - | + # Fix up GCC to handle the sysroot containing glibc being in a different + # location for each chunk build. + # + # For headers, it's enough to pass -B in the CPPFLAGS. This would work for + # the startup files (crt*.o) as well, except where libtool is involved (in + # which case it strips -B out of your LDFLAGS before calling GCC). We get + # around this by making GCC locate them relative to the environment variable + # STAGE2_SYSROOT, which we can then set along with CPPFLAGS in each stage 2 + # chunk build. + # + # We also force the use of the program loader at PREFIX/lib/ld.so instead + # of its usual home in /lib or /lib64, which is necessary for the output of + # stage 2 to work as a chroot when building stage 3. + + sysroot="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc --print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$sysroot}" + mkdir -p "$target_specs_dir" + + %{target-stage1}-gcc -dumpspecs | + sed -e "s@[gMS]\?crt[1in].o%s@%:getenv(STAGE2_SYSROOT %{libdir}/&)@g" \ + -e "s@/lib\(64\)\?/ld@%{libdir}/ld@g" \ + > "$target_specs_dir/specs-for-sysroot" + + # NASTY HACK # + # We create a symlink to the actual specs here, so that later the + # symlink can be replaced with a dangling link. + # + # This is necessary as we need to have gcc use its internal specs, + # which can differ to the specs generated by `gcc -dumpspecs`. + # + # The dangling symlink will not make it onto the final system, just + # like all other bootstrap only components. + ln -s specs-for-sysroot "$target_specs_dir/specs" + + # Install a symlink for the program interpreter (ld.so) so that binaries + # built in stage 3 before the stage 3 glibc is built can use it. + # FIXME: get a better way of finding the name of the loader. The lib64 + # path is hardcoded into glibc in the file + # sysdeps/unix/sysv/linux/configure. + - install -d %{install-root}/lib + - | + case "%{bst-arch}" in + x86_64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ + "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; + ppc64) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld64.so.1" \ + "%{install-root}/lib64/ld64.so.1" ;; + *) + loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld-linux*)) + [ -z $loader ] && loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld.so*)) + [ -z $loader ] && ( echo "Bug in stage2-glibc ld.so symlinks" ; exit 1 ) + ln -s "%{prefix}/lib/$loader" "%{install-root}/lib/$loader" + esac diff --git a/elements/gnu-toolchain/stage2-libstdcxx.bst b/elements/gnu-toolchain/stage2-libstdcxx.bst new file mode 100644 index 00000000..db6f8a62 --- /dev/null +++ b/elements/gnu-toolchain/stage2-libstdcxx.bst @@ -0,0 +1,55 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. The thread C++ library cannot be built, as the thread C library + # was not build in stage1-gcc. + # 2. Prevents the installation of precompiled include files, which are + # not needed at this stage. + # 3. From LFS: the header location of C++ needs to be explicitly given + # as we are running the configure script from the top-level + # directory. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + # -fPIC must be given, otherwise it will not be possible to create + # shared libraries linked to libstdc++ + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + cd o && ../libstdc++-v3/configure \ + --build=$(sh ../config.guess) \ + --host="%{target-stage1}" \ + --target="%{target-stage1}" \ + --prefix="%{prefix}" \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [1]` --disable-libstdcxx-threads \ + `# [2]` --disable-libstdcxx-pch \ + `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 + + build-commands: + - cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install diff --git a/elements/gnu-toolchain/stage2-linux-api-headers.bst b/elements/gnu-toolchain/stage2-linux-api-headers.bst new file mode 100644 index 00000000..e5869bf1 --- /dev/null +++ b/elements/gnu-toolchain/stage2-linux-api-headers.bst @@ -0,0 +1,41 @@ +kind: manual + +sources: +- kind: git + url: upstream:linux + track: v4.0 + ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + - | + case "%{bst-arch}" in + armv5l) + ARCH="arm" ;; + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + armv8l64|armv8b64) + ARCH="arm64" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install + - install -d "%{install-root}%{includedir}" + - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/elements/gnu-toolchain/stage2-make.bst b/elements/gnu-toolchain/stage2-make.bst new file mode 100644 index 00000000..9c804f1b --- /dev/null +++ b/elements/gnu-toolchain/stage2-make.bst @@ -0,0 +1,29 @@ +kind: autotools + +sources: +- kind: git + url: upstream:make-tarball + track: baserock/make-4.1-ttyname-segfault-fix + ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false + LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls --without-guile + --build=$(sh config/config.guess) --host=%{target-stage1} + build-commands: + - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/elements/gnu-toolchain/stage2-reset-specs.bst b/elements/gnu-toolchain/stage2-reset-specs.bst new file mode 100644 index 00000000..5910903e --- /dev/null +++ b/elements/gnu-toolchain/stage2-reset-specs.bst @@ -0,0 +1,35 @@ +kind: manual + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- filename: gnu-toolchain/stage2-fhs-dirs.bst + type: runtime +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + # Nasty hack to get around being unable to reliably add configuration to gcc, + # hence the gcc specs are modified, combined with Baserock's rootfs protection + # preventing specs being modified before builds. + # The limitation is overcome by installing files as part of a chunk, which + # overwrites previous files. + # New specs were added for the bootstrap builds, but after stage2 we start + # having chrooted builds, so the old specs need to be replaced. + # Unfortunately we can't just replace the specs with the ones gcc produces, + # since gcc behaves differently without specs to with specs it produces! + # So we use a **NASTY HACK** to replace the specs symlink with one that + # points to a file that doesn't exist. + install-commands: + - | + STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" + mkdir -p "$target_specs_dir" + ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" diff --git a/elements/gnu-toolchain/stage2.bst b/elements/gnu-toolchain/stage2.bst new file mode 100644 index 00000000..ccabaf58 --- /dev/null +++ b/elements/gnu-toolchain/stage2.bst @@ -0,0 +1,22 @@ +kind: stack + +depends: +- gnu-toolchain/stage2-binutils.bst +- gnu-toolchain/stage2-busybox.bst +- gnu-toolchain/stage2-fhs-dirs.bst +- gnu-toolchain/stage2-glibc.bst +- gnu-toolchain/stage2-gawk.bst +- gnu-toolchain/stage2-gcc.bst +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-make.bst +- gnu-toolchain/stage2-fake-bash.bst +- gnu-toolchain/stage2-reset-specs.bst + +# Stage 2 is a minimal base used to build the +# base runtime, must ldconfig when building on stage2 +public: + bst: + integration-commands: + - | + # In this stage, it may be that ld.so.conf doesnt exist yet + ldconfig || exit 0 diff --git a/elements/gnu-toolchain/zlib.bst b/elements/gnu-toolchain/zlib.bst new file mode 100644 index 00000000..1dd353c5 --- /dev/null +++ b/elements/gnu-toolchain/zlib.bst @@ -0,0 +1,23 @@ +kind: manual + +sources: +- kind: git + url: upstream:zlib + track: v1.2.8 + ref: 50893291621658f355bc5b4d450a8d06a563053d + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/glibc.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + configure-commands: + - ./configure --prefix="%{prefix}" + build-commands: + - make + install-commands: + - make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain.bst b/gnu-toolchain.bst deleted file mode 100644 index f38a05da..00000000 --- a/gnu-toolchain.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: stack - -depends: -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/binutils.bst -- gnu-toolchain/busybox.bst -- gnu-toolchain/ccache.bst -- gnu-toolchain/gawk.bst -- gnu-toolchain/gcc.bst -- gnu-toolchain/glibc.bst -- gnu-toolchain/linux-api-headers.bst -- gnu-toolchain/m4-tarball.bst -- gnu-toolchain/make.bst - -# Build essential is the base runtime, ldconfig -# must be run on it. -public: - bst: - integration-commands: - - ldconfig diff --git a/gnu-toolchain/binutils.bst b/gnu-toolchain/binutils.bst deleted file mode 100644 index 5983c465..00000000 --- a/gnu-toolchain/binutils.bst +++ /dev/null @@ -1,24 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst -- gnu-toolchain/zlib.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - | - ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ - --with-system-zlib diff --git a/gnu-toolchain/busybox.bst b/gnu-toolchain/busybox.bst deleted file mode 100644 index be14fa51..00000000 --- a/gnu-toolchain/busybox.bst +++ /dev/null @@ -1,104 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:busybox - track: 1_23_1 - ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - # Busybox's default config has everything enabled. - - make defconfig KCONFIG_NOTIMESTAMP=1 - - - sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'%{prefix}/share/udhcpc/default.script'"|' - -i .config - - sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' - -i .config - - # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. - - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' - -i .config' - # We have GAWK, but in GENIVI baseline we want to get rid of it - # - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config - - # Depends on stuff that was removed since eglibc 2.14. - - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config - - # Busybox Patch is incompatible enough with GNU Patch that it can't be - # used for GNULib projects built from Git. - - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config - - # None of this is needed because we have kmod; and it actually breaks the - # Linux build because depmod isn't compatible enough with util-linux's. - - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config - - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config - - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config - - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config - - # General features that we don't need. - - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not - set/' -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config - - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config - - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config - - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config - - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config - - sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config - - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config - - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config - - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config - - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config - - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config - - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config - - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config - - # Now turn on some little bits we do need - - sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config - - sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' - -i .config - - sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' - -i .config - - build-commands: - - make KCONFIG_NOTIMESTAMP=1 - - install-commands: - - | - # Note here we intentionally ignore '%{prefix}', this is going into '/' - make CONFIG_PREFIX="%{install-root}" KCONFIG_NOTIMESTAMP=1 install && - chmod 6755 "%{install-root}/bin/busybox" - - # Set up man environment variables - - mkdir -p "%{install-root}/etc" - - | - cat << EOF > "%{install-root}/etc/man.conf" - # This file is used by man to provide a manpath for those without one by - # examining their PATH environment variable. - # - # Lines beginning with `#' are comments and are ignored. Any combination of - # tabs or spaces may be used as `whitespace' separators. - - MANDATORY_MANPATH /usr/man - MANDATORY_MANPATH /usr/share/man - MANDATORY_MANPATH /usr/local/share/man - EOF diff --git a/gnu-toolchain/ccache.bst b/gnu-toolchain/ccache.bst deleted file mode 100644 index f66a37ca..00000000 --- a/gnu-toolchain/ccache.bst +++ /dev/null @@ -1,28 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:ccache - track: baserock/gnu-toolchain - ref: 567631456f0899cdf0c382f898d38aadc8901d32 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst -- gnu-toolchain/zlib.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" - install-commands: - - make DESTDIR="%{install-root}" install - - mkdir -p "%{install-root}%{prefix}/lib/ccache" - - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/$cc"; - done - - for cc in gcc cc g++ c++; do ln -sf "%{prefix}/bin/ccache" "%{install-root}%{prefix}/lib/ccache/%{target}-$cc"; - done diff --git a/gnu-toolchain/fhs-dirs.bst b/gnu-toolchain/fhs-dirs.bst deleted file mode 100644 index df715755..00000000 --- a/gnu-toolchain/fhs-dirs.bst +++ /dev/null @@ -1,26 +0,0 @@ -kind: manual - -sources: -- kind: git - url: baserock:baserock/fhs-dirs - track: master - ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - install-commands: - - sh ./create-fhs-dirs "%{install-root}" - - install -m 644 passwd "%{install-root}/etc/passwd" - - install -m 600 shadow "%{install-root}/etc/shadow" - - install -m 644 interfaces "%{install-root}/etc/network/interfaces" - - install -m 644 group "%{install-root}/etc/group" - - install -m 644 issue "%{install-root}/etc/issue" - - install -m 644 services "%{install-root}/etc/services" - - install -m 644 protocols "%{install-root}/etc/protocols" - - echo baserock > "%{install-root}/etc/hostname" diff --git a/gnu-toolchain/gawk.bst b/gnu-toolchain/gawk.bst deleted file mode 100644 index 7a612bfd..00000000 --- a/gnu-toolchain/gawk.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gawk - track: gawk-4.1-stable - ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" --disable-nls diff --git a/gnu-toolchain/gcc.bst b/gnu-toolchain/gcc.bst deleted file mode 100644 index b7b17ae6..00000000 --- a/gnu-toolchain/gcc.bst +++ /dev/null @@ -1,67 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/linux-api-headers.bst -- gnu-toolchain/glibc.bst -- gnu-toolchain/zlib.bst -- gnu-toolchain/m4-tarball.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't - # fully work; we will need to hobble the multilib configuration in - # config/i386/t-linux64 if we really want to kill /lib64). - # 2. Avoid having more than one copy of ZLib in use on the system - # 3. Multilib does not make sense in Baserock. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - - cd o && ../configure \ - $ARCH_FLAGS \ - --prefix="%{prefix}" \ - `# [1]` --libdir=%{prefix}/lib \ - --disable-bootstrap \ - `# [2]` --with-system-zlib \ - `# [3]` --disable-multilib \ - --enable-languages=c,c++,fortran - - build-commands: - - | - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install - - ln -s gcc "%{install-root}%{prefix}/bin/cc" - - | - for fortran_alias in f77 f90 f95; do - ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" - done diff --git a/gnu-toolchain/glibc.bst b/gnu-toolchain/glibc.bst deleted file mode 100644 index 8621074e..00000000 --- a/gnu-toolchain/glibc.bst +++ /dev/null @@ -1,77 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/linux-api-headers.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - mkdir o - - - | - case "%{bst-arch}" in - armv7*) - ARCH_FLAGS="--without-fp" ;; - esac - - # We override the PATH here to remove /tools/bin from it. - # Thanks to this glibc finds bash in /bin/bash through the /bin - # symlink. This is important because glibc changes the path to bash - # of the shebang in some scripts and these scripts will be broken if - # they point to bash in /tools/bin/bash. - export PATH="/usr/bin:/sbin:/bin"; - export CFLAGS="-O2 $CFLAGS"; - cd o && ../configure \ - $ARCH_FLAGS \ - --prefix="%{prefix}" \ - --disable-profile \ - --enable-kernel=3.0.0 \ - --without-cvs \ - --without-selinux \ - --enable-obsolete-rpc - - build-commands: - - cd o && make localtime=UTC - - install-commands: - - cd o && make install_root="%{install-root}" localtime=UTC install - - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales - - mkdir -p "%{install-root}/etc" - - mkdir -p "%{install-root}/etc/ld.so.conf.d" - - | - cat < nsswitch.conf - passwd: compat - group: compat - shadow: compat - - hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 - networks: files - - protocols: db files - services: db files - ethers: db files - rpc: db files - - netgroup: nis - EOF - - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf" - - | - cat < ld.so.conf - /lib - /usr/lib - /usr/local/lib - include /etc/ld.so.conf.d/*.conf - EOF - - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" diff --git a/gnu-toolchain/gnome-platform.bst b/gnu-toolchain/gnome-platform.bst deleted file mode 100644 index fd5efb6b..00000000 --- a/gnu-toolchain/gnome-platform.bst +++ /dev/null @@ -1,27 +0,0 @@ -kind: import -description: Import the GNOME Platform -config: - source: files -public: - bst: - integration-commands: - - ldconfig - - | - if [ -d "/app/share/glib-2.0/schemas" ]; then - glib-compile-schemas /app/share/glib-2.0/schemas - fi -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/gnu-toolchain/gnome-sdk.bst b/gnu-toolchain/gnome-sdk.bst deleted file mode 100644 index 6b0f158f..00000000 --- a/gnu-toolchain/gnome-sdk.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: import -description: Import the GNOME SDK -config: - source: files - target: usr -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/gnu-toolchain/linux-api-headers.bst b/gnu-toolchain/linux-api-headers.bst deleted file mode 100644 index 0020d2ae..00000000 --- a/gnu-toolchain/linux-api-headers.bst +++ /dev/null @@ -1,39 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:linux - track: v4.0 - ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - install-commands: - - | - case "%{bst-arch}" in - armv5l) - ARCH="arm" ;; - armv7b|armv7l|armv7lhf) - ARCH="arm" ;; - armv8l64|armv8b64) - ARCH="arm64" ;; - x86_32) - ARCH="i386" ;; - x86_64) - ARCH="x86_64" ;; - ppc64) - ARCH="powerpc" ;; - *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 - exit 1 - esac - ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - - install -d "%{install-root}%{includedir}" - - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/gnu-toolchain/m4-tarball.bst b/gnu-toolchain/m4-tarball.bst deleted file mode 100644 index 1019c57a..00000000 --- a/gnu-toolchain/m4-tarball.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:m4-tarball - track: m4-1.4.17 - ref: 23c11479b3ad787adc7a651ee0c4347839e47723 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" --disable-gcc-warnings diff --git a/gnu-toolchain/make.bst b/gnu-toolchain/make.bst deleted file mode 100644 index 731d1a9f..00000000 --- a/gnu-toolchain/make.bst +++ /dev/null @@ -1,21 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:make-tarball - track: baserock/make-4.1-ttyname-segfault-fix - ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/fhs-dirs.bst -- gnu-toolchain/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - - configure-commands: - - ./configure --prefix="%{prefix}" --disable-nls diff --git a/gnu-toolchain/stage1-binutils.bst b/gnu-toolchain/stage1-binutils.bst deleted file mode 100644 index f22a4458..00000000 --- a/gnu-toolchain/stage1-binutils.bst +++ /dev/null @@ -1,38 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - # We set the sysroot location dynamically at runtime by passing - # `--sysroot` to GCC, so we need to build a linker with sysroot support. - # We set it to a non-existent directory as a safety net to avoid looking - # at the host dirs in case we forget to set the sysroot. Setting the - # lib path is vital to avoid the tools we build linking to the libraries - # on the host system; the '=' makes the path we give relative to the - # sysroot, which we can then set at runtime by passing -Wl,--sysroot to - # GCC. Although nothing should be installed on /lib64, we configure the - # linker to look at that directory as well to make things more robust - # (currently GCC installs libraries to this directory at least on - # x86_64). - - - | - %{configure} --disable-nls --disable-werror \ - --build=$(sh config.guess) \ - --host=$(sh config.guess) \ - --target=%{target-stage1} \ - --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" diff --git a/gnu-toolchain/stage1-gcc.bst b/gnu-toolchain/stage1-gcc.bst deleted file mode 100644 index f7244c00..00000000 --- a/gnu-toolchain/stage1-gcc.bst +++ /dev/null @@ -1,100 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst -- gnu-toolchain/stage1-binutils.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - # Workaround from LFS due GCC not detecting stack protection correctly - - | - sed -i -e '/k prot/a \ - gcc_cv_libc_provides_ssp=yes - ' gcc/configure - - - mkdir o - - # Configure flag notes: - # 1. See gcc.morph. - # 2. Although we will be setting a sysroot at runtime, giving a - # temporary one at configuration time seems necessary so that - # `--with-native-system-header-dir` produces effect and - # /tools/include is in the include path for the newly built GCC. We - # set it by default to a non-existent directory to avoid GCC looking - # at the host dirs, in case we forget to give it at runtime. - # 3. Disable searching /usr/local/include for headers - # 4. The pass 1 compiler needs to find the libraries we build in pass - # 2. Include path must be set explicility, because it defaults to - # $SYSROOT/usr/include rather than $SYSROOT/include. - # 5. Disable stuff that doesn't work when building a cross compiler - # without an existing libc, and generally try to keep this build as - # simple as possible. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(sh ../config.guess) \ - --host=$(sh ../config.guess) \ - --target=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [1]` --libdir="%{libdir}" \ - `# [2]` --with-sysroot=/nonexistentdir \ - --with-newlib \ - `# [3]` --with-local-prefix="%{prefix}" \ - `# [4]` --with-native-system-header-dir="%{prefix}/include" \ - --without-headers \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - `# [5]` --disable-decimal-float \ - `# [5]` --disable-threads \ - `# [5]` --disable-libatomic \ - `# [5]` --disable-libgomp \ - `# [5]` --disable-libitm \ - `# [5]` --disable-libquadmath \ - `# [5]` --disable-libsanitizer \ - `# [5]` --disable-libssp \ - `# [5]` --disable-libvtv \ - `# [5]` --disable-libcilkrts \ - `# [5]` --disable-libstdc++-v3 \ - --enable-languages=c,c++ - - build-commands: - - | - # GCC is not passing the correct host/target flags to GMP's configure - # script, which causes it to not use the machine-dependent code for - # the platform and use the generic one instead. However, the generic - # code results on an undefined reference to `__gmpn_invert_limb' in - # ARMv7. Fix the invocation of GMP's configure script so that GMP can - # use the machine-dependent code. - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain/stage1.bst b/gnu-toolchain/stage1.bst deleted file mode 100644 index 8e5399a0..00000000 --- a/gnu-toolchain/stage1.bst +++ /dev/null @@ -1,7 +0,0 @@ -kind: stack - -depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst -- gnu-toolchain/stage1-binutils.bst -- gnu-toolchain/stage1-gcc.bst diff --git a/gnu-toolchain/stage2-binutils.bst b/gnu-toolchain/stage2-binutils.bst deleted file mode 100644 index e3ef2eaa..00000000 --- a/gnu-toolchain/stage2-binutils.bst +++ /dev/null @@ -1,40 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:binutils-tarball - track: binutils-2.25 - ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" - # binutils has its own embedded libtool, which is old and strips out - # `--sysroot`. Work around by modifying the compiler command to - # include the sysroot flag - export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" - ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ - --build=$(sh config.guess) \ - --host=%{target-stage1} \ - --target=%{target-stage1} - - build-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - make diff --git a/gnu-toolchain/stage2-busybox.bst b/gnu-toolchain/stage2-busybox.bst deleted file mode 100644 index a1774abd..00000000 --- a/gnu-toolchain/stage2-busybox.bst +++ /dev/null @@ -1,101 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:busybox - track: 1_23_1 - ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in - # the PATH supplied by the stage2-gcc chunk, which can't execute outside of - # the stage 3 staging area. - - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig - - # Avoid dividing applets between %{prefix}/[s]bin and %{prefix}/usr/[s]bin. - - '[ "%{prefix}" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' - -i .config' - # We have GAWK. - - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config - - # Depends on stuff that was removed since eglibc 2.14. - - sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config - - # Busybox Patch is incompatible enough with GNU Patch that it can't be - # used for GNULib projects built from Git. - - sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config - - # None of this is needed because we have kmod; and it actually breaks the - # Linux build because depmod isn't compatible enough with util-linux's. - - sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config - - sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config - - sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config - - sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config - - sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config - - # General features that we don't need. - - sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not - set/' -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config - - sed -e 's/CONFIG_FEATURE_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB is not set/' - -i .config - - sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config - - sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config - - sed -e 's/CONFIG_HALT=y.*/# CONFIG_HALT is not set/' -i .config - - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config - - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -i .config - - sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config - - sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config - - sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config - - sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config - - sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config - - sed -e 's/CONFIG_RUNLEVEL=y.*/# CONFIG_RUNLEVEL is not set/' -i .config - - sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config - - sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config - - sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config - - sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config - - build-commands: - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 - - install-commands: - # We expect to be built with a non-standard prefix in stage 2 (i.e. not - # /usr). The install will break if prefix is set to /usr. - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - make CONFIG_PREFIX="%{install-root}%{prefix}" \ - HOSTCC="/usr/bin/gcc" \ - CROSS_COMPILE=%{target-stage1}- \ - KCONFIG_NOTIMESTAMP=1 install && - chmod 6755 "%{install-root}%{prefix}"/bin/busybox diff --git a/gnu-toolchain/stage2-fake-bash.bst b/gnu-toolchain/stage2-fake-bash.bst deleted file mode 100644 index 85e0dced..00000000 --- a/gnu-toolchain/stage2-fake-bash.bst +++ /dev/null @@ -1,17 +0,0 @@ -kind: manual - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "%{install-root}%{prefix}/bin/bash" diff --git a/gnu-toolchain/stage2-fhs-dirs.bst b/gnu-toolchain/stage2-fhs-dirs.bst deleted file mode 100644 index 37346231..00000000 --- a/gnu-toolchain/stage2-fhs-dirs.bst +++ /dev/null @@ -1,31 +0,0 @@ -kind: manual - -sources: -- kind: git - url: baserock:baserock/fhs-dirs - track: master - ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - sh ./create-fhs-dirs "%{install-root}" - - rmdir "%{install-root}/usr/bin" - - ln -s "%{prefix}/bin" "%{install-root}/usr/bin" - - install -m 644 passwd "%{install-root}/etc/passwd" - - install -m 600 shadow "%{install-root}/etc/shadow" - - install -m 644 interfaces "%{install-root}/etc/network/interfaces" - - install -m 644 group "%{install-root}/etc/group" - - install -m 644 issue "%{install-root}/etc/issue" - - install -m 644 services "%{install-root}/etc/services" - - install -m 644 protocols "%{install-root}/etc/protocols" - - echo baserock > "%{install-root}/etc/hostname" diff --git a/gnu-toolchain/stage2-gawk.bst b/gnu-toolchain/stage2-gawk.bst deleted file mode 100644 index 1c15d53a..00000000 --- a/gnu-toolchain/stage2-gawk.bst +++ /dev/null @@ -1,30 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:gawk - track: gawk-4.1-stable - ref: 925f9363c4b0a5bb9375298afcdcf404efb32587 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false - LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls - --build=$(sh config.guess) --host=%{target-stage1} - build-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/gnu-toolchain/stage2-gcc-fixed-headers.bst b/gnu-toolchain/stage2-gcc-fixed-headers.bst deleted file mode 100644 index f3ed0e1e..00000000 --- a/gnu-toolchain/stage2-gcc-fixed-headers.bst +++ /dev/null @@ -1,37 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - # Stage 1 GCC's fixincludes process created a limits.h before there was - # a real limits.h available for the target. This step (taken from Linux - # Linux From Scratch) creates a better one so that stage 2 GCC can compile. - # - # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to - # overwrite files in a staging area is to install a new chunk. - # This is undesired behaviour in the long term, as we want to never - # have overlaps, so this functionality may go away. - - | - libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) - sysroot="$(dirname $(dirname $(pwd)))" - target_libgcc_dir="${libgcc_dir#$sysroot}" - mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" - cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ - >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" diff --git a/gnu-toolchain/stage2-gcc.bst b/gnu-toolchain/stage2-gcc.bst deleted file mode 100644 index 18594d8f..00000000 --- a/gnu-toolchain/stage2-gcc.bst +++ /dev/null @@ -1,102 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst -- gnu-toolchain/stage2-gcc-fixed-headers.bst -- gnu-toolchain/stage2-libstdcxx.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - mkdir o - - # In other projects we specify the sysroot location using CPPFLAGS. - # Here, that breaks because GCC compiles stuff for the *build* machine, - # too ... and this requires using the host's compiler, which cannot use - # the same set of CPPFLAGS as the target. If we specify the sysroot - # using CC instead then we don't interfere, because we are only - # specifying the *host* C compiler. - # - # Configure flag notes: - # 1. It's vital that this compiler runs in the bootstrap machine, and - # targets the same machine (TARGET_STAGE1) so that the stage 1 GCC - # is used instead of the compiler of the build machine. - # 2. See gcc.morph. - # 3. Disable searching /usr/local/include for headers - # 4. This flag causes the correct --sysroot flag to be passed when - # calling stage 1 GCC. - - | - case "%{bst-arch}" in - armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ - --with-cpu=cortex-a9 \ - --with-tune=cortex-a9 \ - --with-fpu=vfpv3-d16 \ - --with-float=hard" ;; - armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; - esac - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" - export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" - export AR="%{target-stage1}-ar" - export RANLIB="%{target-stage1}-ranlib" - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(sh ../config.guess) \ - `# [1]` --host=%{target-stage1} \ - `# [1]` --target=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [2]` --libdir=%{prefix}/lib \ - `# [3]` --with-local-prefix=%{prefix} \ - `# [4]` --with-build-sysroot="$STAGE2_SYSROOT" \ - --disable-bootstrap \ - --disable-nls \ - --disable-multilib \ - --disable-libgomp \ - --disable-libstdcxx-pch \ - --enable-languages=c,c++ - - build-commands: - - | - case "%{bst-arch}" in - armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile - sed -i "s/--target=none/--target=armv5/" o/Makefile ;; - armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile - sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; - esac - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install - - # Stage 3 builds need to link against this file in the location that - # it will be in the final system, so we make a temporary link now. - # - # On x86_64 GCC resolutely installs its libraries into lib64. To fix this - # would require hobbling the MULTILIB_OSDIRNAMES field in - # gcc/config/i386/t-linux64 and this might break things, so for now we - # tolerate the inconsistency. - - | - if [ "$(echo %{target} | cut -c -6)" = "x86_64" ]; then - libdir=lib64 - else - libdir=lib - fi - - install -d "%{install-root}/lib" - ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/" - ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/" diff --git a/gnu-toolchain/stage2-glibc.bst b/gnu-toolchain/stage2-glibc.bst deleted file mode 100644 index 1c3745e1..00000000 --- a/gnu-toolchain/stage2-glibc.bst +++ /dev/null @@ -1,122 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. Avoid installing to PREFIX/lib64 on x86_64. - # 2. Location of linux-api-headers. - # 3. Normal flags. See glibc.morph. - # 4. Force configuration values of certain things that can't be detected - # in a cross-compile. - - | - case "%{bst-arch}" in - armv7*) - ARCH_FLAGS="--without-fp" ;; - esac - - export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ - cd o && ../configure \ - $ARCH_FLAGS \ - --build=$(../scripts/config.guess) --host=%{target-stage1} \ - --prefix="%{prefix}" \ - `# [1]` --libdir="%{prefix}/lib" \ - `# [2]` --with-headers="%{prefix}/include" \ - `# [3]` --disable-profile --enable-kernel=2.6.25 \ - `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ - libc_cv_forced_unwind=yes libc_cv_ssp=no - - build-commands: - - cd o && make localtime=UTC - - install-commands: - - cd o && make install_root="%{install-root}" localtime=UTC install - - mkdir -p "%{install-root}/etc" - - mkdir -p "%{install-root}/etc/ld.so.conf.d" - - | - cat < ld.so.conf - /lib - /usr/lib - /usr/local/lib - include /etc/ld.so.conf.d/*.conf - EOF - - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf" - - | - # Fix up GCC to handle the sysroot containing glibc being in a different - # location for each chunk build. - # - # For headers, it's enough to pass -B in the CPPFLAGS. This would work for - # the startup files (crt*.o) as well, except where libtool is involved (in - # which case it strips -B out of your LDFLAGS before calling GCC). We get - # around this by making GCC locate them relative to the environment variable - # STAGE2_SYSROOT, which we can then set along with CPPFLAGS in each stage 2 - # chunk build. - # - # We also force the use of the program loader at PREFIX/lib/ld.so instead - # of its usual home in /lib or /lib64, which is necessary for the output of - # stage 2 to work as a chroot when building stage 3. - - sysroot="$(dirname $(dirname $(pwd)))" - specs_dir="$(dirname $(%{target-stage1}-gcc --print-libgcc-file-name))" - target_specs_dir="%{install-root}/${specs_dir#$sysroot}" - mkdir -p "$target_specs_dir" - - %{target-stage1}-gcc -dumpspecs | - sed -e "s@[gMS]\?crt[1in].o%s@%:getenv(STAGE2_SYSROOT %{libdir}/&)@g" \ - -e "s@/lib\(64\)\?/ld@%{libdir}/ld@g" \ - > "$target_specs_dir/specs-for-sysroot" - - # NASTY HACK # - # We create a symlink to the actual specs here, so that later the - # symlink can be replaced with a dangling link. - # - # This is necessary as we need to have gcc use its internal specs, - # which can differ to the specs generated by `gcc -dumpspecs`. - # - # The dangling symlink will not make it onto the final system, just - # like all other bootstrap only components. - ln -s specs-for-sysroot "$target_specs_dir/specs" - - # Install a symlink for the program interpreter (ld.so) so that binaries - # built in stage 3 before the stage 3 glibc is built can use it. - # FIXME: get a better way of finding the name of the loader. The lib64 - # path is hardcoded into glibc in the file - # sysdeps/unix/sysv/linux/configure. - - install -d %{install-root}/lib - - | - case "%{bst-arch}" in - x86_64) - install -d "%{install-root}/lib64" - ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ - "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; - ppc64) - install -d "%{install-root}/lib64" - ln -s "%{prefix}/lib/ld64.so.1" \ - "%{install-root}/lib64/ld64.so.1" ;; - *) - loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld-linux*)) - [ -z $loader ] && loader=$(basename $(ls "%{install-root}%{prefix}"/lib/ld.so*)) - [ -z $loader ] && ( echo "Bug in stage2-glibc ld.so symlinks" ; exit 1 ) - ln -s "%{prefix}/lib/$loader" "%{install-root}/lib/$loader" - esac diff --git a/gnu-toolchain/stage2-libstdcxx.bst b/gnu-toolchain/stage2-libstdcxx.bst deleted file mode 100644 index db6f8a62..00000000 --- a/gnu-toolchain/stage2-libstdcxx.bst +++ /dev/null @@ -1,55 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - mkdir o - - # Configure flag notes: - # 1. The thread C++ library cannot be built, as the thread C library - # was not build in stage1-gcc. - # 2. Prevents the installation of precompiled include files, which are - # not needed at this stage. - # 3. From LFS: the header location of C++ needs to be explicitly given - # as we are running the configure script from the top-level - # directory. - - | - export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - # -fPIC must be given, otherwise it will not be possible to create - # shared libraries linked to libstdc++ - export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" - export LDFLAGS="--sysroot=$STAGE2_SYSROOT" - cd o && ../libstdc++-v3/configure \ - --build=$(sh ../config.guess) \ - --host="%{target-stage1}" \ - --target="%{target-stage1}" \ - --prefix="%{prefix}" \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - `# [1]` --disable-libstdcxx-threads \ - `# [2]` --disable-libstdcxx-pch \ - `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 - - build-commands: - - cd o && make - - install-commands: - - cd o && make DESTDIR="%{install-root}" install diff --git a/gnu-toolchain/stage2-linux-api-headers.bst b/gnu-toolchain/stage2-linux-api-headers.bst deleted file mode 100644 index e5869bf1..00000000 --- a/gnu-toolchain/stage2-linux-api-headers.bst +++ /dev/null @@ -1,41 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:linux - track: v4.0 - ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - install-commands: - - | - case "%{bst-arch}" in - armv5l) - ARCH="arm" ;; - armv7b|armv7l|armv7lhf) - ARCH="arm" ;; - armv8l64|armv8b64) - ARCH="arm64" ;; - x86_32) - ARCH="i386" ;; - x86_64) - ARCH="x86_64" ;; - ppc64) - ARCH="powerpc" ;; - *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 - exit 1 - esac - ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - - install -d "%{install-root}%{includedir}" - - cp -r dest/include/* "%{install-root}%{includedir}" diff --git a/gnu-toolchain/stage2-make.bst b/gnu-toolchain/stage2-make.bst deleted file mode 100644 index 9c804f1b..00000000 --- a/gnu-toolchain/stage2-make.bst +++ /dev/null @@ -1,29 +0,0 @@ -kind: autotools - -sources: -- kind: git - url: upstream:make-tarball - track: baserock/make-4.1-ttyname-segfault-fix - ref: 4978d7129e42340ab9efeb0cb9cae4ad0fa052d4 - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - configure-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false - LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls --without-guile - --build=$(sh config/config.guess) --host=%{target-stage1} - build-commands: - - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make diff --git a/gnu-toolchain/stage2-reset-specs.bst b/gnu-toolchain/stage2-reset-specs.bst deleted file mode 100644 index 5910903e..00000000 --- a/gnu-toolchain/stage2-reset-specs.bst +++ /dev/null @@ -1,35 +0,0 @@ -kind: manual - -depends: -- filename: gnu-toolchain/stage1.bst - type: build -- filename: gnu-toolchain/stage2-fhs-dirs.bst - type: runtime -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-glibc.bst - -variables: - prefix: /tools - -environment: - PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin - -config: - # Nasty hack to get around being unable to reliably add configuration to gcc, - # hence the gcc specs are modified, combined with Baserock's rootfs protection - # preventing specs being modified before builds. - # The limitation is overcome by installing files as part of a chunk, which - # overwrites previous files. - # New specs were added for the bootstrap builds, but after stage2 we start - # having chrooted builds, so the old specs need to be replaced. - # Unfortunately we can't just replace the specs with the ones gcc produces, - # since gcc behaves differently without specs to with specs it produces! - # So we use a **NASTY HACK** to replace the specs symlink with one that - # points to a file that doesn't exist. - install-commands: - - | - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" - specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" - target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" - mkdir -p "$target_specs_dir" - ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" diff --git a/gnu-toolchain/stage2.bst b/gnu-toolchain/stage2.bst deleted file mode 100644 index ccabaf58..00000000 --- a/gnu-toolchain/stage2.bst +++ /dev/null @@ -1,22 +0,0 @@ -kind: stack - -depends: -- gnu-toolchain/stage2-binutils.bst -- gnu-toolchain/stage2-busybox.bst -- gnu-toolchain/stage2-fhs-dirs.bst -- gnu-toolchain/stage2-glibc.bst -- gnu-toolchain/stage2-gawk.bst -- gnu-toolchain/stage2-gcc.bst -- gnu-toolchain/stage2-linux-api-headers.bst -- gnu-toolchain/stage2-make.bst -- gnu-toolchain/stage2-fake-bash.bst -- gnu-toolchain/stage2-reset-specs.bst - -# Stage 2 is a minimal base used to build the -# base runtime, must ldconfig when building on stage2 -public: - bst: - integration-commands: - - | - # In this stage, it may be that ld.so.conf doesnt exist yet - ldconfig || exit 0 diff --git a/gnu-toolchain/zlib.bst b/gnu-toolchain/zlib.bst deleted file mode 100644 index 1dd353c5..00000000 --- a/gnu-toolchain/zlib.bst +++ /dev/null @@ -1,23 +0,0 @@ -kind: manual - -sources: -- kind: git - url: upstream:zlib - track: v1.2.8 - ref: 50893291621658f355bc5b4d450a8d06a563053d - -depends: -- filename: gnu-toolchain/stage2.bst - type: build -- gnu-toolchain/glibc.bst - -environment: - PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin - -config: - configure-commands: - - ./configure --prefix="%{prefix}" - build-commands: - - make - install-commands: - - make DESTDIR="%{install-root}" install diff --git a/project.conf b/project.conf index 33785347..7a46260b 100644 --- a/project.conf +++ b/project.conf @@ -7,6 +7,8 @@ aliases: baserock: git://git.baserock.org/baserock/ gnomesdk: https://sdk.gnome.org/ +# All the elements go here +element-path: elements variables: cpu: "%{bst-arch}" -- cgit v1.2.1 From 4faa52372d4e9422346b15ef696fc8616196950d Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 11 Apr 2017 17:03:47 +0900 Subject: Reworking the gnu toolchain project o Use the org.freedesktop.BasePlaform and org.freedesktop.BaseSdk for building instead of the whole GNOME runtime. o Some minor renames --- elements/gnu-toolchain/base-platform.bst | 23 +++++++++++++++++++++++ elements/gnu-toolchain/base-sdk.bst | 20 ++++++++++++++++++++ elements/gnu-toolchain/gnome-platform.bst | 27 --------------------------- elements/gnu-toolchain/gnome-sdk.bst | 20 -------------------- elements/gnu-toolchain/stage1-binutils.bst | 4 ++-- elements/gnu-toolchain/stage1-gcc.bst | 4 ++-- elements/gnu-toolchain/stage1.bst | 4 ++-- project.conf | 7 ++++--- 8 files changed, 53 insertions(+), 56 deletions(-) create mode 100644 elements/gnu-toolchain/base-platform.bst create mode 100644 elements/gnu-toolchain/base-sdk.bst delete mode 100644 elements/gnu-toolchain/gnome-platform.bst delete mode 100644 elements/gnu-toolchain/gnome-sdk.bst diff --git a/elements/gnu-toolchain/base-platform.bst b/elements/gnu-toolchain/base-platform.bst new file mode 100644 index 00000000..09c95acb --- /dev/null +++ b/elements/gnu-toolchain/base-platform.bst @@ -0,0 +1,23 @@ +kind: import +description: Import the base freedesktop platform +config: + source: files +public: + bst: + integration-commands: + - ldconfig +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.freedesktop.BasePlatform/x86_64/1.4 + gpg-key: keys/gnome-sdk.gpg + ref: c9d09b7250a12ef09d95952fc4f49a35e5f8c2c1dd7141b7eeada4069e6f6576 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.freedesktop.BasePlatform/i386/1.4 + gpg-key: keys/gnome-sdk.gpg + ref: 27ebae91839a454596a273391b0e53063eaa8aca4fc9cb64654582bfbc338c96 diff --git a/elements/gnu-toolchain/base-sdk.bst b/elements/gnu-toolchain/base-sdk.bst new file mode 100644 index 00000000..cd191fd1 --- /dev/null +++ b/elements/gnu-toolchain/base-sdk.bst @@ -0,0 +1,20 @@ +kind: import +description: Import the base freedesktop SDK +config: + source: files + target: usr +arches: + x86_64: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.freedesktop.BaseSdk/x86_64/1.4 + gpg-key: keys/gnome-sdk.gpg + ref: 0d9d255d56b08aeaaffb1c820eef85266eb730cb5667e50681185ccf5cd7c882 + i386: + sources: + - kind: ostree + url: gnomesdk:repo/ + track: runtime/org.freedesktop.BaseSdk/i386/1.4 + gpg-key: keys/gnome-sdk.gpg + ref: 16036b747c1ec8e7fe291f5b1f667cb942f0267d08fcad962e9b7627d6cf1981 diff --git a/elements/gnu-toolchain/gnome-platform.bst b/elements/gnu-toolchain/gnome-platform.bst deleted file mode 100644 index fd5efb6b..00000000 --- a/elements/gnu-toolchain/gnome-platform.bst +++ /dev/null @@ -1,27 +0,0 @@ -kind: import -description: Import the GNOME Platform -config: - source: files -public: - bst: - integration-commands: - - ldconfig - - | - if [ -d "/app/share/glib-2.0/schemas" ]; then - glib-compile-schemas /app/share/glib-2.0/schemas - fi -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: af7b50663d808bf5cc6eb7538a3481b29c34864d71b719562246071113a18327 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Platform/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: 8c86378e95d305097e64a7b04e23595773ab894ed5d216b49777a22819bff08f diff --git a/elements/gnu-toolchain/gnome-sdk.bst b/elements/gnu-toolchain/gnome-sdk.bst deleted file mode 100644 index 6b0f158f..00000000 --- a/elements/gnu-toolchain/gnome-sdk.bst +++ /dev/null @@ -1,20 +0,0 @@ -kind: import -description: Import the GNOME SDK -config: - source: files - target: usr -arches: - x86_64: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/x86_64/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: bc2d97521fa42ca824b4d28b1b7746e275820b26aa63c9ae08d6aa5eefcfee20 - i386: - sources: - - kind: ostree - url: gnomesdk:repo/ - track: runtime/org.gnome.Sdk/i386/3.22 - gpg-key: keys/gnome-sdk.gpg - ref: f5616d5b7257a81a8e8b08c34cd7ffcfe3b79c80439c969799dc8617fd9ac5c5 diff --git a/elements/gnu-toolchain/stage1-binutils.bst b/elements/gnu-toolchain/stage1-binutils.bst index f22a4458..72d51bcb 100644 --- a/elements/gnu-toolchain/stage1-binutils.bst +++ b/elements/gnu-toolchain/stage1-binutils.bst @@ -7,8 +7,8 @@ sources: ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/base-platform.bst +- gnu-toolchain/base-sdk.bst variables: prefix: /tools diff --git a/elements/gnu-toolchain/stage1-gcc.bst b/elements/gnu-toolchain/stage1-gcc.bst index f7244c00..17851848 100644 --- a/elements/gnu-toolchain/stage1-gcc.bst +++ b/elements/gnu-toolchain/stage1-gcc.bst @@ -7,8 +7,8 @@ sources: ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/base-platform.bst +- gnu-toolchain/base-sdk.bst - gnu-toolchain/stage1-binutils.bst variables: diff --git a/elements/gnu-toolchain/stage1.bst b/elements/gnu-toolchain/stage1.bst index 8e5399a0..80d3aa43 100644 --- a/elements/gnu-toolchain/stage1.bst +++ b/elements/gnu-toolchain/stage1.bst @@ -1,7 +1,7 @@ kind: stack depends: -- gnu-toolchain/gnome-platform.bst -- gnu-toolchain/gnome-sdk.bst +- gnu-toolchain/base-platform.bst +- gnu-toolchain/base-sdk.bst - gnu-toolchain/stage1-binutils.bst - gnu-toolchain/stage1-gcc.bst diff --git a/project.conf b/project.conf index 7a46260b..8a2d731e 100644 --- a/project.conf +++ b/project.conf @@ -1,6 +1,7 @@ -# Building baserock build-essential in BuildStream -# -name: build-essential +# The GNU Toolchain project provides a base runtime with gcc, +# glibc and some base tools to get off the ground including +# busybox and GNU make. +name: gnu-toolchain aliases: upstream: git://git.baserock.org/delta/ -- cgit v1.2.1 From 35eca3b320fec5dd48b9d79a13cb560250902e1f Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 14 Jun 2017 22:58:22 +0100 Subject: project.conf: Fix spelling in comment --- project.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.conf b/project.conf index 8a2d731e..fcbcbd78 100644 --- a/project.conf +++ b/project.conf @@ -18,7 +18,7 @@ variables: target: "%{cpu}-baserock-linux-%{abi}" # Resolve the cpu and ABI portions of the host triple based -# on archetecture names. +# on architecture names. arches: x86_32: variables: -- cgit v1.2.1 From 616ca90999f3429ecc77b33e7c87603ec025eb4e Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 19 Jun 2017 12:46:53 +0000 Subject: Correct 'track' field for stage2-fhs-dirs --- elements/gnu-toolchain/stage2-fhs-dirs.bst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/gnu-toolchain/stage2-fhs-dirs.bst b/elements/gnu-toolchain/stage2-fhs-dirs.bst index 37346231..f91f2f1f 100644 --- a/elements/gnu-toolchain/stage2-fhs-dirs.bst +++ b/elements/gnu-toolchain/stage2-fhs-dirs.bst @@ -3,7 +3,7 @@ kind: manual sources: - kind: git url: baserock:baserock/fhs-dirs - track: master + track: baserock/usr_merge ref: 9fafca436000bb57ddd5c498f8a75ea7b274f6c5 depends: -- cgit v1.2.1 From aaefeb1e22579deef6a7829d055eee70c8a7a4f0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 20 Jun 2017 08:58:28 +0000 Subject: Update GCC to 7.1.0, and GLIBC to 2.25 --- elements/gnu-toolchain/gcc.bst | 4 ++-- elements/gnu-toolchain/glibc.bst | 4 ++-- elements/gnu-toolchain/stage1-gcc.bst | 5 +++-- elements/gnu-toolchain/stage2-gcc-fixed-headers.bst | 4 ++-- elements/gnu-toolchain/stage2-gcc.bst | 4 ++-- elements/gnu-toolchain/stage2-glibc.bst | 4 ++-- elements/gnu-toolchain/stage2-libstdcxx.bst | 6 +++--- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst index b7b17ae6..5815cf01 100644 --- a/elements/gnu-toolchain/gcc.bst +++ b/elements/gnu-toolchain/gcc.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - filename: gnu-toolchain/stage2.bst diff --git a/elements/gnu-toolchain/glibc.bst b/elements/gnu-toolchain/glibc.bst index 8621074e..48e9262e 100644 --- a/elements/gnu-toolchain/glibc.bst +++ b/elements/gnu-toolchain/glibc.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + track: release/2.25/master + ref: adc7e06fb412a2a1ee52f8cb788caf436335b9f3 depends: - filename: gnu-toolchain/stage2.bst diff --git a/elements/gnu-toolchain/stage1-gcc.bst b/elements/gnu-toolchain/stage1-gcc.bst index 17851848..8e9eadfd 100644 --- a/elements/gnu-toolchain/stage1-gcc.bst +++ b/elements/gnu-toolchain/stage1-gcc.bst @@ -3,8 +3,8 @@ kind: autotools sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - gnu-toolchain/base-platform.bst @@ -72,6 +72,7 @@ config: `# [5]` --disable-libatomic \ `# [5]` --disable-libgomp \ `# [5]` --disable-libitm \ + `# [5]` --disable-libmpx \ `# [5]` --disable-libquadmath \ `# [5]` --disable-libsanitizer \ `# [5]` --disable-libssp \ diff --git a/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst index f3ed0e1e..80c9bf32 100644 --- a/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst +++ b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - filename: gnu-toolchain/stage1.bst diff --git a/elements/gnu-toolchain/stage2-gcc.bst b/elements/gnu-toolchain/stage2-gcc.bst index 18594d8f..2f13723a 100644 --- a/elements/gnu-toolchain/stage2-gcc.bst +++ b/elements/gnu-toolchain/stage2-gcc.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - filename: gnu-toolchain/stage1.bst diff --git a/elements/gnu-toolchain/stage2-glibc.bst b/elements/gnu-toolchain/stage2-glibc.bst index 1c3745e1..63740088 100644 --- a/elements/gnu-toolchain/stage2-glibc.bst +++ b/elements/gnu-toolchain/stage2-glibc.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:glibc - track: release/2.22/master - ref: b995d95a5943785be3ab862b2d3276f3b4a22481 + track: release/2.25/master + ref: 49f97e641e4e84a42246655d30adbc4756e67114 depends: - filename: gnu-toolchain/stage1.bst diff --git a/elements/gnu-toolchain/stage2-libstdcxx.bst b/elements/gnu-toolchain/stage2-libstdcxx.bst index db6f8a62..12ea73fa 100644 --- a/elements/gnu-toolchain/stage2-libstdcxx.bst +++ b/elements/gnu-toolchain/stage2-libstdcxx.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - filename: gnu-toolchain/stage1.bst @@ -46,7 +46,7 @@ config: --disable-multilib \ `# [1]` --disable-libstdcxx-threads \ `# [2]` --disable-libstdcxx-pch \ - `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/4.9.2 + `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/7.1.0 build-commands: - cd o && make -- cgit v1.2.1 From 23a3a3c746261c3ecb2aa961d91f988f0602a032 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 14 Jun 2017 22:58:52 +0100 Subject: Support cross-building the stage1 and stage2 components This requires a feature recently added to BuildStream (in commit 03906221) that adds a framework for elements to support being cross-compiled. To build an armv8l64 native toolchain and sysroot on an x86_64 build machine, for example, you can do this: bst build --target-arch=armv8l64 gnu-toolchain/stage2.bst You can then run `bst checkout` to get at the resulting binaries and copy them onto an armv8l64 machine where they can be executed. --- elements/gnu-toolchain/base-platform.bst | 2 +- elements/gnu-toolchain/base-sdk.bst | 2 +- elements/gnu-toolchain/gcc.bst | 4 ++-- elements/gnu-toolchain/linux-api-headers.bst | 4 ++-- elements/gnu-toolchain/stage1-gcc.bst | 4 ++-- elements/gnu-toolchain/stage2-gcc.bst | 4 ++-- elements/gnu-toolchain/stage2-glibc.bst | 6 +++--- elements/gnu-toolchain/stage2-linux-api-headers.bst | 6 +++--- project.conf | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/elements/gnu-toolchain/base-platform.bst b/elements/gnu-toolchain/base-platform.bst index 09c95acb..ce9cdc0a 100644 --- a/elements/gnu-toolchain/base-platform.bst +++ b/elements/gnu-toolchain/base-platform.bst @@ -6,7 +6,7 @@ public: bst: integration-commands: - ldconfig -arches: +host-arches: x86_64: sources: - kind: ostree diff --git a/elements/gnu-toolchain/base-sdk.bst b/elements/gnu-toolchain/base-sdk.bst index cd191fd1..61c29f64 100644 --- a/elements/gnu-toolchain/base-sdk.bst +++ b/elements/gnu-toolchain/base-sdk.bst @@ -3,7 +3,7 @@ description: Import the base freedesktop SDK config: source: files target: usr -arches: +host-arches: x86_64: sources: - kind: ostree diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst index 5815cf01..e9a54834 100644 --- a/elements/gnu-toolchain/gcc.bst +++ b/elements/gnu-toolchain/gcc.bst @@ -30,7 +30,7 @@ config: # 2. Avoid having more than one copy of ZLib in use on the system # 3. Multilib does not make sense in Baserock. - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ --with-cpu=cortex-a9 \ --with-tune=cortex-a9 \ @@ -50,7 +50,7 @@ config: build-commands: - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile sed -i "s/--target=none/--target=armv5/" o/Makefile ;; armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile diff --git a/elements/gnu-toolchain/linux-api-headers.bst b/elements/gnu-toolchain/linux-api-headers.bst index 0020d2ae..db89f18d 100644 --- a/elements/gnu-toolchain/linux-api-headers.bst +++ b/elements/gnu-toolchain/linux-api-headers.bst @@ -17,7 +17,7 @@ environment: config: install-commands: - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5l) ARCH="arm" ;; armv7b|armv7l|armv7lhf) @@ -31,7 +31,7 @@ config: ppc64) ARCH="powerpc" ;; *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + echo "Error: unsupported architecture: %{bst-target-arch}" >&2 exit 1 esac ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install diff --git a/elements/gnu-toolchain/stage1-gcc.bst b/elements/gnu-toolchain/stage1-gcc.bst index 8e9eadfd..bcf30bc3 100644 --- a/elements/gnu-toolchain/stage1-gcc.bst +++ b/elements/gnu-toolchain/stage1-gcc.bst @@ -43,7 +43,7 @@ config: # without an existing libc, and generally try to keep this build as # simple as possible. - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ --with-cpu=cortex-a9 \ --with-tune=cortex-a9 \ @@ -89,7 +89,7 @@ config: # code results on an undefined reference to `__gmpn_invert_limb' in # ARMv7. Fix the invocation of GMP's configure script so that GMP can # use the machine-dependent code. - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile sed -i "s/--target=none/--target=armv5/" o/Makefile ;; armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile diff --git a/elements/gnu-toolchain/stage2-gcc.bst b/elements/gnu-toolchain/stage2-gcc.bst index 2f13723a..beaff58f 100644 --- a/elements/gnu-toolchain/stage2-gcc.bst +++ b/elements/gnu-toolchain/stage2-gcc.bst @@ -40,7 +40,7 @@ config: # 4. This flag causes the correct --sysroot flag to be passed when # calling stage 1 GCC. - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ --with-cpu=cortex-a9 \ --with-tune=cortex-a9 \ @@ -71,7 +71,7 @@ config: build-commands: - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile sed -i "s/--target=none/--target=armv5/" o/Makefile ;; armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile diff --git a/elements/gnu-toolchain/stage2-glibc.bst b/elements/gnu-toolchain/stage2-glibc.bst index 63740088..a5153c5b 100644 --- a/elements/gnu-toolchain/stage2-glibc.bst +++ b/elements/gnu-toolchain/stage2-glibc.bst @@ -31,7 +31,7 @@ config: # 4. Force configuration values of certain things that can't be detected # in a cross-compile. - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv7*) ARCH_FLAGS="--without-fp" ;; esac @@ -105,12 +105,12 @@ config: # sysdeps/unix/sysv/linux/configure. - install -d %{install-root}/lib - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in x86_64) install -d "%{install-root}/lib64" ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; - ppc64) + ppc64l|ppc64b) install -d "%{install-root}/lib64" ln -s "%{prefix}/lib/ld64.so.1" \ "%{install-root}/lib64/ld64.so.1" ;; diff --git a/elements/gnu-toolchain/stage2-linux-api-headers.bst b/elements/gnu-toolchain/stage2-linux-api-headers.bst index e5869bf1..10ec224a 100644 --- a/elements/gnu-toolchain/stage2-linux-api-headers.bst +++ b/elements/gnu-toolchain/stage2-linux-api-headers.bst @@ -19,7 +19,7 @@ environment: config: install-commands: - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5l) ARCH="arm" ;; armv7b|armv7l|armv7lhf) @@ -30,10 +30,10 @@ config: ARCH="i386" ;; x86_64) ARCH="x86_64" ;; - ppc64) + ppc64b|ppc64l) ARCH="powerpc" ;; *) - echo "Error: unsupported Morph architecture: %{bst-arch}" >&2 + echo "Error: unsupported architecture: %{bst-target-arch}" >&2 exit 1 esac ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install diff --git a/project.conf b/project.conf index fcbcbd78..2e5dbebe 100644 --- a/project.conf +++ b/project.conf @@ -12,7 +12,7 @@ aliases: element-path: elements variables: - cpu: "%{bst-arch}" + cpu: "%{bst-target-arch}" abi: gnu target-stage1: "%{cpu}-bootstrap-linux-%{abi}" target: "%{cpu}-baserock-linux-%{abi}" -- cgit v1.2.1 From 28dba2a2843bf6d5c16256a8e4df47ce18ec48f1 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 19 Jun 2017 12:43:09 +0000 Subject: Proper support for powerpc64 (little and big endian) --- elements/gnu-toolchain/stage2-glibc.bst | 14 ++++++++++---- project.conf | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/elements/gnu-toolchain/stage2-glibc.bst b/elements/gnu-toolchain/stage2-glibc.bst index a5153c5b..043dccb4 100644 --- a/elements/gnu-toolchain/stage2-glibc.bst +++ b/elements/gnu-toolchain/stage2-glibc.bst @@ -100,9 +100,11 @@ config: # Install a symlink for the program interpreter (ld.so) so that binaries # built in stage 3 before the stage 3 glibc is built can use it. - # FIXME: get a better way of finding the name of the loader. The lib64 - # path is hardcoded into glibc in the file - # sysdeps/unix/sysv/linux/configure. + # + # The name of the dynamic loader is hardcoded in GCC during its 'configure' + # stage, but the file is actually provided by the libc (usually GLIBC). It + # would be better if we could ask GCC or GLIBC what the expected name of the + # ld.so is for the given platform rather than figuring it out - install -d %{install-root}/lib - | case "%{bst-target-arch}" in @@ -110,7 +112,11 @@ config: install -d "%{install-root}/lib64" ln -s "%{prefix}/lib/ld-linux-x86-64.so.2" \ "%{install-root}/lib64/ld-linux-x86-64.so.2" ;; - ppc64l|ppc64b) + ppc64l) + install -d "%{install-root}/lib64" + ln -s "%{prefix}/lib/ld64.so.2" \ + "%{install-root}/lib64/ld64.so.2" ;; + ppc64b) install -d "%{install-root}/lib64" ln -s "%{prefix}/lib/ld64.so.1" \ "%{install-root}/lib64/ld64.so.1" ;; diff --git a/project.conf b/project.conf index 2e5dbebe..76445475 100644 --- a/project.conf +++ b/project.conf @@ -54,3 +54,9 @@ arches: mips32l: variables: cpu: mipsel + ppc64b: + variables: + cpu: powerpc64 + ppc64l: + variables: + cpu: powerpc64le -- cgit v1.2.1 From 013e0e3016b3d92c27c23ccafbb6dd18a7c24bc2 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 22 Jun 2017 15:36:01 +0000 Subject: Enable automated testing for this branch --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..12ebce6a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,44 @@ +image: samthursfield/buildstream:0.1-20170627.1 + +before_script: + # Update to latest BuildStream commit + - cd ~/buildstream + - git remote update origin + - git reset --hard origin/master + - pip3 install . + - cd - + + # Work around https://github.com/fedora-cloud/docker-brew-fedora/issues/14 + - export LANG="C.UTF-8" + - export LC_ALL="C.UTF-8" + + # Store cache in the shared Docker volume + - export XDG_CACHE_HOME=/cache + +stages: + - build + +x86_64-native: + stage: build + script: + - bst --colors build gnu-toolchain.bst + +armv8b64-cross: + stage: build + script: + - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst + +armv8l64-cross: + stage: build + script: + - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst + +ppc64b-cross: + stage: build + script: + - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst + +ppc64l-cross: + stage: build + script: + - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst -- cgit v1.2.1 From 9b47b15048d52ab177b885276cc1d64b99a7e69f Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 13:38:16 +0000 Subject: .gitlab-ci.yml: Share cached source between builds --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12ebce6a..94a4e54f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,9 @@ image: samthursfield/buildstream:0.1-20170627.1 +cache: + paths: + - cache/buildstream/sources/ + before_script: # Update to latest BuildStream commit - cd ~/buildstream @@ -12,8 +16,9 @@ before_script: - export LANG="C.UTF-8" - export LC_ALL="C.UTF-8" - # Store cache in the shared Docker volume - - export XDG_CACHE_HOME=/cache + # Store cache in the project directory + - mkdir -p "$(pwd)/cache" + - export XDG_CACHE_HOME="$(pwd)/cache" stages: - build -- cgit v1.2.1 From 387d00648ca64eaec5343cb748f0cbc163d8df12 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 13:51:05 +0000 Subject: .gitlab-ci.yml: Split the pipeline into 2 stages With an empty cache, every worker must spend 10 minutes pulling all of the sources that are required. There's no point having 5 workers pulling the same things in parallel, so the first stage now contains only 1 job. --- .gitlab-ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94a4e54f..14ecee82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,30 +20,35 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" +# All of the builds use the same set of sources. The first stage should contain +# only one job so that, in the case where the source cache is empty, we only +# have a single job pulling all the sources rather than 5 pulling the same things +# in parallel. stages: - - build + - simple + - cross x86_64-native: - stage: build + stage: simple script: - bst --colors build gnu-toolchain.bst armv8b64-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst armv8l64-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst ppc64b-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst ppc64l-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst -- cgit v1.2.1 From af78a2b1041831600eb0598e52613645c24ffcd4 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 15:15:17 +0000 Subject: .gitlab-ci.yml: Separate fetch into a separate stage This is primarly to avoid hitting the 1 hour timeout that seems to be hardcoded into the CI system. It's also a bit clearer this way. --- .gitlab-ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14ecee82..f8d416a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,16 +20,18 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" -# All of the builds use the same set of sources. The first stage should contain -# only one job so that, in the case where the source cache is empty, we only -# have a single job pulling all the sources rather than 5 pulling the same things -# in parallel. stages: - - simple + - fetch + - native - cross +fetch: + stage: fetch + script: + - bst --colors fetch gnu-toolchain.bst + x86_64-native: - stage: simple + stage: native script: - bst --colors build gnu-toolchain.bst -- cgit v1.2.1 From 3b12c3318aff86369e9258f580506ee008f626e4 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 16:33:00 +0000 Subject: Simplify CI for now We cannot do long GCC builds using the default GitLab CI runners, we'll need to provide our own. --- .gitlab-ci.yml | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8d416a2..d7ff4225 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,37 +20,12 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" -stages: - - fetch - - native - - cross - -fetch: - stage: fetch - script: - - bst --colors fetch gnu-toolchain.bst -x86_64-native: - stage: native - script: - - bst --colors build gnu-toolchain.bst - -armv8b64-cross: - stage: cross - script: - - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst - -armv8l64-cross: - stage: cross - script: - - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst - -ppc64b-cross: - stage: cross - script: - - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst +# We are limited to simple CI unless we provide our own GitLab CI runners. +stages: + - validate -ppc64l-cross: - stage: cross +validate: + stage: validate script: - - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst + - bst --colors show gnu-toolchain.bst -- cgit v1.2.1 From a515e4f5fba4eb9d9a417025e62b90b185029d2a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 16:57:22 +0000 Subject: .gitlab-ci.yml: Remove caching as it seems to just add a 20 minute delay --- .gitlab-ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7ff4225..96f5d99a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,5 @@ image: samthursfield/buildstream:0.1-20170627.1 -cache: - paths: - - cache/buildstream/sources/ - before_script: # Update to latest BuildStream commit - cd ~/buildstream @@ -16,11 +12,6 @@ before_script: - export LANG="C.UTF-8" - export LC_ALL="C.UTF-8" - # Store cache in the project directory - - mkdir -p "$(pwd)/cache" - - export XDG_CACHE_HOME="$(pwd)/cache" - - # We are limited to simple CI unless we provide our own GitLab CI runners. stages: - validate -- cgit v1.2.1