Skip to content

Commit 94aa068

Browse files
committed
Build linux-pine64-package.deb that contains all scripts and fix pinebook support
1 parent 82426fa commit 94aa068

33 files changed

+137
-179
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
/snappy/gadget/uboot.conf
2828
/snappy/gadget/boot-assets
2929
/boot-tools/
30+
/*.deb
3031

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ node('docker && linux-build') {
5858
--description "${CHANGES}\n\n${BUILD_URL}" \
5959
--draft
6060
61-
for file in *.xz; do
61+
for file in *.xz *.deb; do
6262
github-release upload \
6363
--tag "${VERSION}" \
6464
--name "$(basename "$file")" \

Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ linux-pine64-$(RELEASE_NAME).tar: linux/arch/arm64/boot/Image boot-tools kernel/
4646
cd kernel && \
4747
bash ./make_kernel_tarball.sh $(shell readlink -f "$@")
4848

49+
linux-pine64-package-$(RELEASE_NAME).deb: package
50+
fpm -s dir -t deb -n linux-pine64-package -v $(RELEASE_NAME) \
51+
-p $@ \
52+
--deb-priority optional --category admin \
53+
--force \
54+
--deb-compression bzip2 \
55+
--after-install package/scripts/postinst.deb \
56+
--before-remove package/scripts/prerm.deb \
57+
--url https://gitlab.com/ayufan-pine64/linux-build \
58+
--description "GitLab Runner" \
59+
-m "Kamil Trzciński <[email protected]>" \
60+
--license "MIT" \
61+
--vendor "Kamil Trzciński" \
62+
-a arm64 \
63+
package/root/=/
64+
4965
%.tar.xz: %.tar
5066
pxz -f -3 $<
5167

@@ -58,17 +74,21 @@ simple-image-pinebook-$(RELEASE_NAME).img: linux-pine64-$(RELEASE_NAME).tar.xz b
5874
export uboot=../boot-tools/build/u-boot-sun50iw1p1-secure-with-pinebook-dtb.bin && \
5975
bash ./make_simpleimage.sh $(shell readlink -f "$@") 100 $(shell readlink -f linux-pine64-$(RELEASE_NAME).tar.xz)
6076

61-
xenial-pinebook-bspkernel-$(RELEASE_NAME)-$(RELEASE).img: simple-image-pinebook-$(RELEASE_NAME).img.xz linux-pine64-$(RELEASE_NAME).tar.xz boot-tools
77+
xenial-pinebook-bspkernel-$(RELEASE_NAME)-$(RELEASE).img: simple-image-pinebook-$(RELEASE_NAME).img.xz linux-pine64-$(RELEASE_NAME).tar.xz linux-pine64-package-$(RELEASE_NAME).deb boot-tools
6278
sudo bash ./build-pine64-image.sh \
6379
$(shell readlink -f $@) \
6480
$(shell readlink -f simple-image-pinebook-$(RELEASE_NAME).img.xz) \
6581
$(shell readlink -f linux-pine64-$(RELEASE_NAME).tar.xz) \
82+
$(shell readlink -f linux-pine64-package-$(RELEASE_NAME).deb) \
6683
xenial \
6784
pinebook
6885

6986
.PHONY: kernel-tarball
7087
kernel-tarball: linux-pine64-$(RELEASE_NAME).tar.xz
7188

89+
.PHONY: linux-package
90+
linux-package: linux-pine64-package-$(RELEASE_NAME).deb
91+
7292
.PHONY: simple-image-pinebook-$(RELEASE_NAME).img
7393
simple-image-pinebook: simple-image-pinebook-$(RELEASE_NAME).img
7494

build-environment/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ RUN apt-get install -y python git-core gnupg flex bison gperf build-essential \
88
htop iotop sysstat iftop pigz bc device-tree-compiler lunzip \
99
dosfstools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
1010
gcc-arm-linux-gnueabi g++-arm-linux-gnueabi ccache \
11-
sudo
11+
sudo cpio nano vim kmod kpartx wget bsdtar qemu-user-static \
12+
pxz ruby-dev
1213

13-
RUN apt-get install -y cpio nano vim kmod kpartx wget bsdtar qemu-user-static
14-
RUN apt-get install -y pxz
14+
RUN gem install fpm
1515

1616
RUN curl -L https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2 | tar -C /tmp -jx && \
1717
mv /tmp/bin/linux/amd64/github-release /usr/local/bin/

build-pine64-image.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
OUT_IMAGE="$1"
1212
SIMPLEIMAGE="$2"
1313
KERNELTAR="$3"
14-
DISTRO="$4"
15-
MODEL="$5"
14+
PACKAGEDEB="$4"
15+
DISTRO="$5"
16+
MODEL="$6"
1617
if [[ -z "$MODEL" ]]; then
1718
MODEL="pine64"
1819
fi
1920
export MODEL
2021

2122
if [ -z "$SIMPLEIMAGE" -o -z "$KERNELTAR" ]; then
22-
echo "Usage: $0 <result.img> <simpleimage.img.xz> <kernel.tar.xz> [distro] [model]"
23+
echo "Usage: $0 <result.img> <simpleimage.img.xz> <kernel.tar.xz> <package.deb> [distro] [model]"
2324
exit 1
2425
fi
2526

@@ -83,7 +84,7 @@ mount /dev/mapper/${DEVICENAME}p1 "$TEMP/boot"
8384
mount /dev/mapper/${DEVICENAME}p2 "$TEMP/rootfs"
8485

8586
sleep 2
86-
(cd simpleimage && sh ./make_rootfs.sh "$TEMP/rootfs" "$KERNELTAR" "$DISTRO" "$TEMP/boot")
87+
(cd simpleimage && sh ./make_rootfs.sh "$TEMP/rootfs" "$KERNELTAR" "$PACKAGEDEB" "$DISTRO" "$TEMP/boot" "$MODEL")
8788

8889
mv -v "$TEMP/$IMAGE" "$OUT_IMAGE"
8990

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blacklist 8723bs_vq0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disp
2+
hdmi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
8723bs
2+
8723cs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hall
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Disable wlan1 by default (8723bs has two intefaces)
2+
iface wlan1 inet manual

0 commit comments

Comments
 (0)