Skip to content

Commit

Permalink
use nodesource remove armel
Browse files Browse the repository at this point in the history
  • Loading branch information
mkellsy committed Sep 5, 2021
1 parent 5a4aa57 commit 6aa7a8a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 69 deletions.
65 changes: 28 additions & 37 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ steps:

- chroot: /
shell: |
dpkg --add-architecture __EXTRA_ARCH__
apt-get update
unless: rootfs_unpacked

Expand All @@ -82,6 +81,11 @@ steps:
- wget
- curl
- nano
- tar
- git
- make
- gcc
- g++
- bluetooth
- wpasupplicant
- network-manager
Expand All @@ -91,9 +95,6 @@ steps:
- hostapd
- raspi-firmware
- firmware-brcm80211
- libc6:__EXTRA_ARCH__
- libatomic1:__EXTRA_ARCH__
- libstdc++6:__EXTRA_ARCH__
- __LINUX_IMAGE__
tag: /
unless: rootfs_unpacked
Expand All @@ -112,39 +113,6 @@ steps:
tag: /
unless: rootfs_unpacked

- chroot: /
shell: |
curl -s https://dl.hoobs.org/debian/pubkey.gpg.key | gpg --dearmor | tee /usr/share/keyrings/hoobs.gpg > /dev/null
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg > /dev/null
unless: rootfs_unpacked

- create-file: /etc/apt/sources.list.d/hoobs.list
contents: |
deb [signed-by=/usr/share/keyrings/hoobs.gpg] https://dl.hoobs.org/debian/ stable main
unless: rootfs_unpacked

- create-file: /etc/apt/sources.list.d/yarn.list
contents: |
deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main
unless: rootfs_unpacked

- chroot: /
shell: |
apt-get update
unless: rootfs_unpacked

- apt: install
packages:
- tar
- git
- make
- gcc
- g++
- nodejs
- yarn
tag: /
unless: rootfs_unpacked

- create-file: /etc/hostname
trailing-newline: '1'
contents: |
Expand Down Expand Up @@ -219,6 +187,29 @@ steps:
- cache-rootfs: /
unless: rootfs_unpacked

- chroot: /
shell: |
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg > /dev/null
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg > /dev/null
curl -s https://dl.hoobs.org/debian/pubkey.gpg.key | gpg --dearmor | tee /usr/share/keyrings/hoobs.gpg > /dev/null
- create-file: /etc/apt/sources.list.d/yarn.list
contents: |
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/__NODE_REPO__ __RELEASE__ main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/__NODE_REPO__ __RELEASE__ main
- create-file: /etc/apt/sources.list.d/yarn.list
contents: |
deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main
- create-file: /etc/apt/sources.list.d/hoobs.list
contents: |
deb [signed-by=/usr/share/keyrings/hoobs.gpg] https://dl.hoobs.org/debian/ stable main
- chroot: /
shell: |
apt-get update
- create-file: /etc/hoobs
contents: |
ID=__VENDOR_ID__
Expand Down
20 changes: 3 additions & 17 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ hoobs-box-version-arm64.yaml:
sed "s/__RELEASE__/bullseye/" | \
sed "s/__SECURITY_SUITE__/bullseye-security/" | \
sed "s/__ARCH__/arm64/" | \
grep -v "__EXTRA_ARCH__" | \
grep -v "__SHELL_CMDS__" | \
sed "s/__LINUX_IMAGE__/linux-image-arm64/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-arm64\\/broadcom\\/bcm*rpi*.dtb/" | \
sed "s/__SERIAL_CONSOLE__/ttyS1,115200/" | \
sed "s/__NODE_REPO__/$(shell project version nodesource)/" | \
sed "s/__VENDOR_ID__/box/" | \
sed "s/__VENDOR_MODEL__/HSLF-1/" | \
sed "s/__VENDOR_SKU__/7-45114-12419-7/" > cache/$(subst -version-,-,$@)
Expand All @@ -23,10 +22,10 @@ hoobs-version-arm64.yaml:
sed "s/__RELEASE__/bullseye/" | \
sed "s/__SECURITY_SUITE__/bullseye-security/" | \
sed "s/__ARCH__/arm64/" | \
grep -v "__EXTRA_ARCH__" | \
sed "s/__LINUX_IMAGE__/linux-image-arm64/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-arm64\\/broadcom\\/bcm*rpi*.dtb/" | \
sed "s/__SERIAL_CONSOLE__/ttyS1,115200/" | \
sed "s/__NODE_REPO__/$(shell project version nodesource)/" | \
sed "s/__VENDOR_ID__/card/" | \
sed "s/__VENDOR_MODEL__/HSLF-2/" | \
sed "s/__VENDOR_SKU__/7-45114-12418-0/" > cache/$(subst -version-,-,$@)
Expand All @@ -36,24 +35,11 @@ hoobs-version-armhf.yaml:
sed "s/__RELEASE__/bullseye/" | \
sed "s/__SECURITY_SUITE__/bullseye-security/" | \
sed "s/__ARCH__/armhf/" | \
grep -v "__EXTRA_ARCH__" | \
sed "s/__LINUX_IMAGE__/linux-image-armmp/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-armmp\\/bcm*rpi*.dtb/" | \
sed "s/__SERIAL_CONSOLE__/ttyAMA0,115200/" | \
sed "s/__VENDOR_ID__/card/" | \
sed "s/__VENDOR_MODEL__/HSLF-2/" | \
sed "s/__VENDOR_SKU__/7-45114-12418-0/" > cache/$(subst -version-,-,$@)

hoobs-version-armel.yaml:
cat build.yaml | \
sed "s/__RELEASE__/bullseye/" | \
sed "s/__SECURITY_SUITE__/bullseye-security/" | \
sed "s/__ARCH__/armel/" | \
grep -v "__EXTRA_ARCH__" | \
sed "s/__LINUX_IMAGE__/linux-image-rpi/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-rpi\\/bcm*rpi-*.dtb/" | \
sed "s/__SERIAL_CONSOLE__/ttyAMA0,115200/" | \
sed "s/__VENDOR_ID__/card/" | \
sed "s/__NODE_REPO__/$(shell project version nodesource)/" | \
sed "s/__VENDOR_MODEL__/HSLF-2/" | \
sed "s/__VENDOR_SKU__/7-45114-12418-0/" > cache/$(subst -version-,-,$@)

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "4.1.0",
"description": "HOOBS OS Image Builder",
"license": "GPL-3.0",
"engines": {
"nodesource": "node_14.x"
},
"repository": {
"type": "git",
"url": "git://github.com/hoobs-org/image.git"
Expand Down
33 changes: 18 additions & 15 deletions project
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
COUNT=0

version() {
echo `node -e 'console.log(require("./package.json").version)'`
case $1 in
nodesource ) echo `node -e 'console.log(require("./package.json").engines.nodesource)'`
;;

* ) echo `node -e 'console.log(require("./package.json").version)'`
;;
esac
}

image() {
Expand Down Expand Up @@ -32,22 +38,19 @@ build() {
truncate -s 0 build.log

case $1 in
box ) image "hoobs-box" "arm64"
;;

card ) image "hoobs" "arm64"
;;
box ) image "hoobs-box" "arm64"
;;

armhf ) image "hoobs" "armhf"
;;
card ) image "hoobs" "arm64"
;;

armel ) image "hoobs" "armel"
;;
legacy ) image "hoobs" "armhf"
;;

* ) image "hoobs-box" "arm64"
image "hoobs" "arm64"
image "hoobs" "armhf"
;;
* ) image "hoobs-box" "arm64"
image "hoobs" "arm64"
image "hoobs" "armhf"
;;
esac
}

Expand All @@ -57,7 +60,7 @@ rebuild() {
}

case $1 in
version ) version
version ) version $2
;;

build ) build $2
Expand Down

0 comments on commit 6aa7a8a

Please sign in to comment.