syntactic fixes

This commit is contained in:
parazyd 2017-02-13 20:07:56 +01:00
parent 40834f310f
commit 7f87e49af0
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
6 changed files with 1355 additions and 60 deletions

View File

@ -57,9 +57,8 @@ prebuild() {
## the wl1251 driver generates a random MAC address on every boot
## this "fixes" udev so it does not autoincrement the interface number each
## time the device boots
## NOTE: comment the below line for a cool feature of having a random MAC
## every time :)
print "#" | sudo tee $strapdir/etc/udev/rules.d/75-persistent-net-generator.rules
## NOTE: comment the below line for having a random wifi MAC address every time :)
print "#" | sudo tee $strapdir/etc/udev/rules.d/75-persistent-net-generator.rules >/dev/null
}
postbuild() {
@ -68,8 +67,8 @@ postbuild() {
notice "executing $device_name postbuild"
sudo mkdir -p $strapdir/usr/share/keymaps/
sudo cp $CPVERBOSE $R/extra/n900/nokia-n900.kmap $strapdir/etc/
sudo cp $CPVERBOSE $R/extra/n900/nokia-n900-keymap.sh $strapdir/etc/profile.d/
sudo ${=cp} $R/extra/n900/nokia-n900.kmap $strapdir/etc/
sudo ${=cp} $R/extra/n900/nokia-n900-keymap.sh $strapdir/etc/profile.d/
}
build_kernel_armhf() {

View File

@ -51,7 +51,7 @@ prebuild() {
install-custom-packages
${=mkdir}-p $R/tmp/kernels/$device_name
${=mkdir} -p $R/tmp/kernels/$device_name
}
postbuild() {

View File

@ -1,54 +0,0 @@
#!/usr/bin/env zsh
# Copyright (c) 2016 Dyne.org Foundation
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of arm-sdk
#
# This source code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
boards=()
for board in boards/*.sh; do
name=$(grep 'device_name=' $board)
[[ $name =~ myboard ]] && continue
name=${name[(ws:=:)2]}
boards+=(${(Q)name})
done
distro="$1"
[[ -n $distro ]] || { print "(!!) os not declared"; exit 1 }
for board in $boards; do
## odroid wants the devuan packaged toolchain
[[ $board = odroidxu ]] && {
sed -i -e '36,37s/#//' -e '31,32s/^/#/' ./config && \
zsh -f -c "source ./sdk && load $distro $board && build_image_dist && exit" && \
sed -i -e '36,37s/^/#/' -e '31,32s/#//' ./config
continue
}
## raspi3 wants the arm64 toolchain and qemu
[[ $board = raspi3 ]] && {
sed -i -e '42,43s/#//' -e '31,32s/^/#/' ./config && \
sed -i -e '47s/^/#/' -e '48s/#//' ./config && \
zsh -f -c "source ./sdk && load $distro $board && build_image_dist && exit" && \
sed -i -e '42,43s/^/#/' -e '31,32s/#//' ./config && \
sed -i -e '47s/#//' -e '48s/^/#/' ./config
continue
}
zsh -f -c "source ./sdk && load $distro $board && build_image_dist && exit"
done

View File

@ -1,6 +1,10 @@
Notes and quirks for specific devices
=====================================
## Lamobo R1 (BananaPi Router)
* https://github.com/igorpecovnik/lib/issues/511#issuecomment-262571252
* https://github.com/hknaack/lib/commit/485f48957df5de317a04943ffaeeb259b78604e7
## Raspberry Pi 2
* This build script will create an image that works on the Raspberry Pi 3 as
well. It also includes the required firmware for getting onboard Wifi/Bluetooth

63
extra/arm-config/arm-config Executable file
View File

@ -0,0 +1,63 @@
#!/usr/bin/env zsh
# Copyright (c) 2016 Dyne.org Foundation
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
#
# This file is part of arm-sdk
#
# This source code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
## wannabe raspi-config
#[[ $UID = 0 ]] || {
# dialog --msgbox "$(basename $0) must be ran with root privileges." 10 50
#}
do_about() {
dialog --msgbox \
"This tool provides a straightforward way of doing initial configuration of your ARM board.
Although it can be run at any time, some of the options may have difficulties if you have heavily customized your installation." 20 70
}
calc_wt_size() {
WT_HEIGHT=17
WT_WIDTH=$(tput cols)
if [[ -z "$WT_WIDTH" ]] || [[ "$WT_WIDTH" -lt 60 ]]; then
WT_WIDTH=80
fi
if [[ "$WT_WIDTH" -gt 178 ]]; then
WT_WIDTH=120
fi
WT_MENU_HEIGHT=$(($WT_HEIGHT-7))
}
do_expand_rootfs() {
}
calc_wt_size
FUN=$(\
dialog --menu "Setup Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
"1 Expand Filesystem" "Ensures that all of the SD card storage is available to the user." \
"2 Change root password" "Change password for the root user" \
3>&1 1>&2 2>&3 \
)
case "$FUN" in
1\ *) do_expand_rootfs;;
2\ *) do_change_rootpw;;
*) print "fail"; exit 1;;
esac

File diff suppressed because it is too large Load Diff