diff --git a/boards/beaglebone-black.sh b/boards/beaglebone-black.sh index 35937e1..8367a1c 100644 --- a/boards/beaglebone-black.sh +++ b/boards/beaglebone-black.sh @@ -22,7 +22,7 @@ ## settings & config vars+=(device_name arch size parted_type parted_boot parted_root inittab) vars+=(gitkernel gitbranch) -arrs+=(custmodules extra_packages) +arrs+=(custmodules) device_name="beagleboneblack" arch="armhf" @@ -33,12 +33,13 @@ parted_type="dos" parted_boot="fat32 2048s 264191s" parted_root="ext4 264192s 100%" -extra_packages=() +extra_packages+=() custmodules=() gitkernel="https://github.com/beagleboard/linux" gitbranch="4.4" + prebuild() { fn prebuild req=(device_name strapdir) @@ -46,8 +47,10 @@ prebuild() { notice "executing $device_name prebuild" + enablessh write-fstab copy-zram-init + rdate-to-rclocal mkdir -p $R/tmp/kernels/$device_name } @@ -59,7 +62,7 @@ postbuild() { ## {{{ uEnv.txt notice "creating uEnv.txt file" - 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 . - -## example kernel build script - -## settings & config -vars+=(device_name arch size parted_boot parted_root inittab) -vars+=(gitkernel gitbranch) -arrs+=(custmodules extra_packages) - -## name of your board -device_name="myboard" -## cpu architecture of the board -arch="armhf" -## size of the image file in MB -size=1337 -## board-specific inittab entry -inittab="T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" - -## partition scheme for parted to use -parted_boot="fat32 0 64" -parted_root="ext4 64 -1" - -## extra packages you want installed -extra_packages=(wpasupplicant) -## modules you want loaded at boot -custmodules=() # add the snd module here perhaps - -## git repository of the kernel you want -gitkernel="https://github.com/raspberrypi/linux.git" -gitbranch="rpi-4.4.y" - -## things you need to do before building the kernel -prebuild() { - fn prebuild - notice "executing $device_name prebuild" - return 0 -} - -## things you need to do after building the kernel -postbuild() { - fn postbuild - notice "executing $device_name postbuild" - return 0 -} - -## kernel build function -build_kernel_armhf() { - fn build_kernel_armhf - req=(R arch device_name gitkernel gitbranch MAKEOPTS rpifirmware) - req+=(workdir strapdir) - ckreq || return 1 - - prebuild - - notice "building $arch kernel" - - act "grabbing kernel sources" - mkdir -p $R/tmp/kernels/$device_name - - git clone --depth 1 \ - $gitkernel \ - -b $gitbranch \ - $R/tmp/kernels/$device_name/${device_name}-linux - - pushd $R/tmp/kernels/$device_name/${device_name}-linux - make bcm2709_defconfig ## take care of your .config file here - make $MAKEOPTS - sudo make INSTALL_MOD_PATH=$strapdir modules_install - popd -are - - sudo rm -rf $strapdir/lib/firmware - get-kernel-firmware - sudo cp -ra $R/tmp/linux-firmware $strapdir/lib/firmware - - postbuild -} diff --git a/boards/odroid-xu.sh b/boards/odroid-xu.sh index df6c402..d77df8a 100644 --- a/boards/odroid-xu.sh +++ b/boards/odroid-xu.sh @@ -54,7 +54,6 @@ prebuild() { enablessh write-fstab copy-zram-init - rdate-to-rclocal mkdir -p $R/tmp/kernels/$device_name diff --git a/boards/ouya.sh b/boards/ouya.sh index 433ca20..a8b8966 100644 --- a/boards/ouya.sh +++ b/boards/ouya.sh @@ -22,7 +22,7 @@ ## settings & config vars+=(device_name arch size parted_boot parted_root inittab) vars+=(gitkernel gitbranch) -arrs+=(custmodules extra_packages) +arrs+=(custmodules) device_name="ouya" arch="armhf" @@ -34,7 +34,7 @@ parted_type="dos" parted_boot="fat32 2048s 264191s" parted_root="ext4 264192s 100%" -extra_packages=(libasound2 libglib2.0-0 libgstreamer-plugins-base0.10-0 libxv1) +extra_packages+=(libasound2 libglib2.0-0 libgstreamer-plugins-base0.10-0 libxv1) custmodules=() @@ -45,8 +45,20 @@ prebuild() { notice "executing $device_name prebuild" - write-fstab + enablessh + #write-fstab copy-zram-init + + cat < +/dev/sda2 / ext4 noatime,errors=remount-ro 0 1 +tmpfs /tmp tmpfs defaults 0 0 +EOF + + notice "copying some kernel modules" + sudo cp $CPVERBOSE -ra $R/extra/ouya/3.1.10-tk3+ $strapdir/lib/modules/ + + print 1 | sudo tee $strapdir/boot/keep } postbuild() { @@ -59,17 +71,20 @@ postbuild() { sudo mkdir -p $strapdir/ouya sudo cp $CPVERBOSE $R/extra/ouya/*.deb $strapdir/ouya/ - cat < -/dev/sda2 / ext4 noatime,errors=remount-ro 0 1 -tmpfs /tmp tmpfs defaults 0 0 -EOF - - notice "copying some kernel modules" - sudo cp $CPVERBOSE -ra $R/extra/ouya/3.1.10-tk3+ $strapdir/lib/modules/ - postbuild || zerr } diff --git a/boards/raspberry-pi.sh b/boards/raspberry-pi.sh deleted file mode 100644 index 061aba3..0000000 --- a/boards/raspberry-pi.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/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 extra_packages) - -device_name="raspi" -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=(wpasupplicant rdate) -custmodules=() # add the snd module here perhaps - -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" - - write-fstab - copy-zram-init - - mkdir -p $R/tmp/kernels/$device_name -} - -postbuild() { - fn postbuild - - notice "executing $device_name postbuild" - - ## {{{ apt.sources.list - cat <