PINE64
Pinebook Pro Build Script Issues - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Pinebook Pro Build Script Issues (/showthread.php?tid=9061)



Pinebook Pro Build Script Issues - TDC_PBP - 02-07-2020

Has anyone been able to build a Kali Linux image with the build script? I have tried very hard on both the pinebook pro and another laptop to run it, and I have run into a few obstacles: first, when I run it on the PBP on Manjaro, the ./build-deps.sh script fails because the script uses apt-get. Then, when I switched to Ubuntu Mate, I discovered that the PBP's cross-compiler does not seem to be compatible with arm (apt-get can't find the package). Finally, I switched to another (intel cpu) laptop running elementary os, installed the compiler, and ran the ./build-deps.sh script without issues. But when I tried to run:
Code:
./chromebook-arm-exynos.sh 2019.2

I ran into the error:
Code:
Missing cross compiler. Set up PATH according to the README
I am becoming more and more knowledgeable about linux all the time, but this is starting to get over my head! Any help would be much appreciated Smile .


RE: Pinebook Pro Build Script Issues - shmoo - 02-07-2020

I recently got Kali to boot on my PBP using a 'vanilla' Debian 10 AMD64 VM that I built on an iMac. Below is my workflow and the script I wrote to automate it…

Disclaimer:
Below is how *I* did it. It may not be how *you* do it, but is *a* way that worked for me.

Quote: Prep Work;
   Install VirtualBox
       Create New VM - General Specs;
               Name: Debian
               Type: Linux
               Version: Debian (64-bit)
           System Specs:
               vRAM: 8192MB vRAM
               vCPU: 4
           Storage Specs:   
               vDisk: 80GB Dynamically allocated .vdi 
   Download Debian 10.2 AMD64 NetInstall ISO from https://www.debian.org/distrib/netinst
   Attach Debian 10.2 AMD64 NetInstall ISO to configured VM, boot…
   Install Debian in VM;
       During software selection I unselected;
           - Debian desktop environment
           - print server
       selected;
           + SSH server
           + standard system utilities
   Once install is complete, Reboot…
 Log into new VM as root and copy kali_build_on_debian.sh to the root user's home directory
 Run the kali_build_on_debian.sh script
       There will be some interaction on packages and build, select defaults
 Once completed, copy .img.xz file from the ~/arm-stuff/kali-arm/ dir to a system with balenaEtcher installed. I used my iMac.
 Burn .img.xz file to an SD card # My resulting image was titled kali-linux-2020.1-pinebook-pro.img.xz
 Insert SD card into Pinebook Pro and boot!

Build script…

Code:
#!/bin/sh

#
# kali_build_on_debian.sh
#
##############################################################################
# This code known is distributed under the following terms:
#
# Copyright (c) 2013 Isaac (.ike) Levy <ike@blackskyresearch.net>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#########################################################################
# Credits:
# William Baxter (safe/try pattern originator)
# Matthew Story (loads of use)
# okan@ (try refinements, config conventions)
# Allan Jude (try - the actual name)
#########################################################################

shout() { echo "$0: $*" >&2; }
die() { shout "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }

try echo "Updating repos to Kali linux and installing Kali Full…"
# Found the following steps on building Kali on Debian vanilla at
# https://forum.pine64.org/showthread.php?tid=8838&pid=58539#pid58539
# Thanks to Tazdevl
# Adapted to use try/die/shout

try apt update
try apt install -y wget gnupg git
try wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import
try gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6
try echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
try gpg -a --export ED444FF07D8D0BF6 | apt-key add -
try apt update
try apt -y upgrade
try apt -y dist-upgrade
try apt -y autoremove --purge
try apt -y install kali-linux-full

# From https://gitlab.com/kalilinux/build-scripts/kali-arm

try mkdir ~/arm-stuff
try cd ~/arm-stuff
try git clone https://gitlab.com/kalilinux/build-scripts/kali-arm
try cd ~/arm-stuff/kali-arm
try ./build-deps.sh
# Modified for Pinebook-Pro. Use the current rolling release in place
# of the 2020.1 label
try ./pinebook-pro.sh 2020.1

# That should be it!
try echo "Built complete!"

true
# alternatively, exit 0



RE: Pinebook Pro Build Script Issues - TDC_PBP - 02-08-2020

(02-07-2020, 05:06 PM)shmoo Wrote: I recently got Kali to build and boot on my PBP using a 'vanilla' Debian 10 AMD64 VM. Below is my workflow and the script I wrote to automate it…

Disclaimer:
Below is how *I* did it. It may not be how *you* do it, but is *a* way that worked for me.

Quote: Prep Work;
   Install VirtualBox
       Create New VM - General Specs;
               Name: Debian
               Type: Linux
               Version: Debian (64-bit)
           System Specs:
               vRAM: 8192MB vRAM
               vCPU: 4
           Storage Specs:   
               vDisk: 80GB Dynamically allocated .vdi 
   Download Debian 10.2 AMD64 NetInstall ISO from https://www.debian.org/distrib/netinst
   Attach Debian 10.2 AMD64 NetInstall ISO to configured VM, boot…
   Install Debian in VM;
       During software selection I unselected;
           - Debian desktop environment
           - print server
       selected;
           + SSH server
           + standard system utilities
   Once install is complete, Reboot…
 Log into new VM as root and copy kali_build_on_debian.sh to the root user's home directory
 Run the kali_build_on_debian.sh script
       There will be some interaction on packages and build, select defaults
 Once completed, copy .img.xz file from the ~/arm-stuff/kali-arm/ dir to a system with balenaEtcher installed. I used my iMac.
 Burn .img.xz file to an SD card # My resulting image was titled kali-linux-2020.1-pinebook-pro.img.xz
 Insert SD card into Pinebook Pro and boot!

Build script…

Code:
#!/bin/sh

#
# kali_build_on_debian.sh
#
##############################################################################
# This code known is distributed under the following terms:
#
# Copyright (c) 2013 Isaac (.ike) Levy <ike@blackskyresearch.net>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#########################################################################
# Credits:
# William Baxter (safe/try pattern originator)
# Matthew Story (loads of use)
# okan@ (try refinements, config conventions)
# Allan Jude (try - the actual name)
#########################################################################

shout() { echo "$0: $*" >&2; }
die() { shout "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }

try echo "Updating repos to Kali linux and installing Kali Full…"
# Found the following steps on building Kali on Debian vanilla at
# https://forum.pine64.org/showthread.php?tid=8838&pid=58539#pid58539
# Thanks to Tazdevl
# Adapted to use try/die/shout

try apt update
try apt install -y wget gnupg git
try wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import
try gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6
try echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
try gpg -a --export ED444FF07D8D0BF6 | apt-key add -
try apt update
try apt -y upgrade
try apt -y dist-upgrade
try apt -y autoremove --purge
try apt -y install kali-linux-full

# From https://gitlab.com/kalilinux/build-scripts/kali-arm

try mkdir ~/arm-stuff
try cd ~/arm-stuff
try git clone https://gitlab.com/kalilinux/build-scripts/kali-arm
try cd ~/arm-stuff/kali-arm
try ./build-deps.sh
# Modified for Pinebook-Pro. Use the current rolling release in place
# of the 2020.1 label
try ./pinebook-pro.sh 2020.1

# That should be it!
try echo "Built complete!"

true
# alternatively, exit 0

Thanks! I will try it later when I have some free time at my computer!


RE: Pinebook Pro Build Script Issues - jwhall - 03-01-2020

(02-07-2020, 05:06 PM)shmoo Wrote: I recently got Kali to boot on my PBP using a 'vanilla' Debian 10 AMD64 VM that I built on an iMac. Below is my workflow and the script I wrote to automate it…

Disclaimer:
Below is how *I* did it. It may not be how *you* do it, but is *a* way that worked for me.

Quote: Prep Work;
   Install VirtualBox
       Create New VM - General Specs;
               Name: Debian
               Type: Linux
               Version: Debian (64-bit)
           System Specs:
               vRAM: 8192MB vRAM
               vCPU: 4
           Storage Specs:   
               vDisk: 80GB Dynamically allocated .vdi 
   Download Debian 10.2 AMD64 NetInstall ISO from https://www.debian.org/distrib/netinst
   Attach Debian 10.2 AMD64 NetInstall ISO to configured VM, boot…
   Install Debian in VM;
       During software selection I unselected;
           - Debian desktop environment
           - print server
       selected;
           + SSH server
           + standard system utilities
   Once install is complete, Reboot…
 Log into new VM as root and copy kali_build_on_debian.sh to the root user's home directory
 Run the kali_build_on_debian.sh script
       There will be some interaction on packages and build, select defaults
 Once completed, copy .img.xz file from the ~/arm-stuff/kali-arm/ dir to a system with balenaEtcher installed. I used my iMac.
 Burn .img.xz file to an SD card # My resulting image was titled kali-linux-2020.1-pinebook-pro.img.xz
 Insert SD card into Pinebook Pro and boot!

Build script…

Code:
#!/bin/sh

#
# kali_build_on_debian.sh
#
##############################################################################
# This code known is distributed under the following terms:
#
# Copyright (c) 2013 Isaac (.ike) Levy <ike@blackskyresearch.net>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#########################################################################
# Credits:
# William Baxter (safe/try pattern originator)
# Matthew Story (loads of use)
# okan@ (try refinements, config conventions)
# Allan Jude (try - the actual name)
#########################################################################

shout() { echo "$0: $*" >&2; }
die() { shout "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }

try echo "Updating repos to Kali linux and installing Kali Full…"
# Found the following steps on building Kali on Debian vanilla at
# https://forum.pine64.org/showthread.php?tid=8838&pid=58539#pid58539
# Thanks to Tazdevl
# Adapted to use try/die/shout

try apt update
try apt install -y wget gnupg git
try wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import
try gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6
try echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
try gpg -a --export ED444FF07D8D0BF6 | apt-key add -
try apt update
try apt -y upgrade
try apt -y dist-upgrade
try apt -y autoremove --purge
try apt -y install kali-linux-full

# From https://gitlab.com/kalilinux/build-scripts/kali-arm

try mkdir ~/arm-stuff
try cd ~/arm-stuff
try git clone https://gitlab.com/kalilinux/build-scripts/kali-arm
try cd ~/arm-stuff/kali-arm
try ./build-deps.sh
# Modified for Pinebook-Pro. Use the current rolling release in place
# of the 2020.1 label
try ./pinebook-pro.sh 2020.1

# That should be it!
try echo "Built complete!"

true
# alternatively, exit 0

This worked great for me. Note you'll need to dos2unix the build script if you copy from this forum. Otherwise I had no real issues. Thank you for the hard work!