diff --git a/boards/raspberry-pi2.sh b/boards/raspberry-pi2.sh new file mode 100644 index 0000000..f5b3e2a --- /dev/null +++ b/boards/raspberry-pi2.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env zsh +# Copyright (c) 2016 Dyne.org Foundation +# arm-sdk is written and maintained by Ivan J. +# +# 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 . + +## kernel build script for Raspberry Pi 2/3 boards + +## settings & config +vars+=(device_name arch size parted_type parted_boot parted_root inittab) +vars+=(gitkernel gitbranch rpifirmware) +arrs+=(custmodules) + +device_name="raspi2" +arch="armhf" +size=1337 +inittab="T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" + +parted_type="dos" +parted_boot="fat32 0 64" +parted_root="ext4 64 -1" + +extra_packages+=() +custmodules=(snd_bcm2835) + +gitkernel="https://github.com/raspberrypi/linux.git" +gitbranch="rpi-4.4.y" +rpifirmware="https://github.com/raspberrypi/firmware.git" + + +prebuild() { + fn prebuild + req=(device_name strapdir) + ckreq || return 1 + + notice "executing $device_name prebuild" + + enablessh + write-fstab + copy-zram-init + rdate-to-rclocal + + mkdir -p $R/tmp/kernels/$device_name +} + +postbuild() { + fn postbuild + + notice "executing $device_name postbuild" + + ## {{{ apt.sources.list + cat < +# +# 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 . + +## kernel build script for Raspberry Pi 3 boards + +## settings & config +vars+=(device_name arch size parted_type parted_boot parted_root inittab) +vars+=(gitkernel gitbranch rpifirmware) +arrs+=(custmodules) + +device_name="raspi3" +arch="arm64" +size=1337 +inittab="T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" + +parted_type="dos" +parted_boot="fat32 0 64" +parted_root="ext4 64 -1" + +extra_packages+=() +custmodules=(snd_bcm2835) + +gitkernel="https://github.com/Electron752/linux.git" +gitbranch="rpi-4.6.y+rpi364" +rpifirmware="https://github.com/raspberrypi/firmware.git" + + +prebuild() { + fn prebuild + req=(device_name strapdir) + ckreq || return 1 + + notice "executing $device_name prebuild" + + export ARCH=arm64 + enablessh + write-fstab + copy-zram-init + rdate-to-rclocal + + mkdir -p $R/tmp/kernels/$device_name +} + +postbuild() { + fn postbuild + + notice "executing $device_name postbuild" + + ## {{{ boot txts + notice "creating cmdline.txt" + cat <