commit 8ea02afa9afc5a00f3048d09678b432325753735
parent 1b78f78110e1ad5aee5088c1df34f98d57dc8dca
Author: parazyd <parazyd@dyne.org>
Date: Mon, 10 Oct 2016 20:37:35 +0200
finalize bananas, cubies, and ouya
Diffstat:
6 files changed, 225 insertions(+), 186 deletions(-)
diff --git a/boards/bananapi.sh b/boards/bananapi.sh
@@ -51,12 +51,45 @@ prebuild() {
notice "executing $device_name prebuild"
write-fstab
+ copy-zram-init
+
+ mkdir -p $R/tmp/kernels/$device_name
+ clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" || zerr
+ clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" || zerr
+ clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot" || zerr
+
+ pushd $R/tmp/kernels/$device_name/sunxi-tools
+ act "running fex2bin"
+ make fex2bin || zerr
+ sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPi.fex \
+ $strapdir/boot/script.bin || zerr
+ popd
}
postbuild() {
fn postbuild
notice "executing $device_name postbuild"
+
+ notice "building u-boot"
+ pushd $R/tmp/kernels/$device_name/sunxi-uboot
+ make distclean
+ make BananaPi_config
+ make $MAKEOPTS || zerr
+ act "dd-ing to image..."
+ sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
+
+ notice "creating boot.cmd"
+ cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd ${TEEVERBOSE}
+setenv bootm_boot_mode sec
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000
+EOF
+
+ notice "creating u-boot script image"
+ sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr || zerr
}
build_kernel_armhf() {
@@ -66,30 +99,18 @@ build_kernel_armhf() {
req+=(loopdevice)
ckreq || return 1
- prebuild || zerr
-
notice "building $arch kernel"
- mkdir -p $R/tmp/kernels/$device_name
-
- clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" master
- clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" master
- clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot"
- pushd $R/tmp/kernels/$device_name/sunxi-tools
- act "running fex2bin"
- make fex2bin
- sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPi.fex \
- $strapdir/boot/script.bin
- popd
+ prebuild || zerr
get-kernel-sources
pushd $R/tmp/kernels/$device_name/${device_name}-linux
#wget -O .config $linux_defconfig
#copy-kernel-config
make sun7i_defconfig
- make $MAKEOPTS uImage modules
+ make $MAKEOPTS uImage modules || zerr
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir modules_install ## this replaces make-kernel-modules
+ make INSTALL_MOD_PATH=$strapdir modules_install || zerr
popd
sudo rm -rf $strapdir/lib/firmware
@@ -98,35 +119,15 @@ build_kernel_armhf() {
pushd $R/tmp/kernels/$device_name/${device_name}-linux
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir firmware_install
+ make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
sudo cp -v arch/arm/boot/uImage $strapdir/boot/
make mrproper
#wget -O .config $linux_defconfig
#copy-kernel-config
make sun7i_defconfig
sudo -E PATH="$PATH" \
- make modules_prepare
+ make modules_prepare || zerr
popd
- notice "building u-boot"
- pushd $R/tmp/kernels/$device_name/sunxi-uboot
- make distclean
- make BananaPi_config
- make $MAKEOPTS
- act "dd-ing to image..."
- sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8
-
- notice "creating boot.cmd"
- cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd
-setenv bootm_boot_mode sec
-setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
-fatload mmc 0 0x43000000 script.bin
-fatload mmc 0 0x48000000 uImage
-bootm 0x48000000
-EOF
-
- notice "creating u-boot script image"
- sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr
-
postbuild || zerr
}
diff --git a/boards/bananapro.sh b/boards/bananapro.sh
@@ -50,12 +50,46 @@ prebuild() {
notice "executing $device_name prebuild"
write-fstab
+ copy-zram-init
+
+ mkdir -p $R/tmp/kernels/$device_name
+
+ clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" || zerr
+ clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" || zerr
+ clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot" || zerr
+
+ pushd $R/tmp/kernels/$device_name/sunxi-tools
+ act "running fex2bin"
+ make fex2bin || zerr
+ sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPro.fex \
+ $strapdir/boot/script.bin || zerr
+ popd
}
postbuild() {
fn postbuild
notice "executing $device_name postbuild"
+
+ notice "building u-boot"
+ pushd $R/tmp/kernels/$device_name/sunxi-uboot
+ make distclean
+ make BananaPro_config
+ make $MAKEOPTS || zerr
+ act "dd-ing to image..."
+ sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
+
+ notice "creating boot.cmd"
+ cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd ${TEEVERBOSE}
+setenv bootm_boot_mode sec
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000
+EOF
+
+ notice "creating u-boot script image"
+ sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr || zerr
}
build_kernel_armhf() {
@@ -65,30 +99,18 @@ build_kernel_armhf() {
req+=(loopdevice)
ckreq || return 1
- prebuild || zerr
-
notice "building $arch kernel"
- mkdir -p $R/tmp/kernels/$device_name
-
- clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" master
- clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" master
- clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot"
- pushd $R/tmp/kernels/$device_name/sunxi-tools
- act "running fex2bin"
- make fex2bin
- sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPro.fex \
- $strapdir/boot/script.bin
- popd
+ prebuild || zerr
get-kernel-sources
pushd $R/tmp/kernels/$device_name/${device_name}-linux
#wget -O .config $linux_defconfig
#copy-kernel-config
make sun7i_defconfig
- make $MAKEOPTS uImage modules
+ make $MAKEOPTS uImage modules || zerr
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir modules_install ## this replaces make-kernel-modules
+ make INSTALL_MOD_PATH=$strapdir modules_install || zerr
popd
sudo rm -rf $strapdir/lib/firmware
@@ -97,35 +119,15 @@ build_kernel_armhf() {
pushd $R/tmp/kernels/$device_name/${device_name}-linux
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir firmware_install
+ make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
sudo cp -v arch/arm/boot/uImage $strapdir/boot/
make mrproper
#wget -O .config $linux_defconfig
#copy-kernel-config
make sun7i_defconfig
sudo -E PATH="$PATH" \
- make modules_prepare
+ make modules_prepare || zerr
popd
- notice "building u-boot"
- pushd $R/tmp/kernels/$device_name/sunxi-uboot
- make distclean
- make BananaPro_config
- make $MAKEOPTS
- act "dd-ing to image..."
- sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8
-
- notice "creating boot.cmd"
- cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd
-setenv bootm_boot_mode sec
-setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
-fatload mmc 0 0x43000000 script.bin
-fatload mmc 0 0x48000000 uImage
-bootm 0x48000000
-EOF
-
- notice "creating u-boot script image"
- sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr
-
postbuild || zerr
}
diff --git a/boards/beaglebone-black.sh b/boards/beaglebone-black.sh
@@ -47,6 +47,9 @@ prebuild() {
notice "executing $device_name prebuild"
write-fstab
+ copy-zram-init
+
+ mkdir -p $R/tmp/kernels/$device_name
}
postbuild() {
@@ -54,8 +57,9 @@ postbuild() {
notice "executing $device_name postbuild"
+ ## {{{ uEnv.txt
notice "creating uEnv.txt file"
- cat <<EOF | sudo tee ${strapdir}/boot/uEnv.txt
+ cat <<EOF | sudo tee ${strapdir}/boot/uEnv.txt ${TEEVERBOSE}
#u-boot eMMC specific overrides; Angstrom Distribution (BeagleBone Black) 2013-06-20
kernel_file=zImage
initrd_file=uInitrd
@@ -84,9 +88,10 @@ uenvcmd=run loadzimage; run loadfdt; run mmcargs; bootz \${loadaddr} - \${fdtadd
#boot_fdt=run loadzimage; run loadinitrd; run loadfdt
#uenvcmd=run boot_fdt; run mmcargs; bootz \${loadaddr} 0x81000000:\${initrd_size} \${fdtaddr}
EOF
-
+ ## }}}
+ ## {{{ xorg.conf
notice "writing xorg.conf for future use"
- cat <<EOF | sudo tee ${strapdir}/root/xorg.conf
+ cat <<EOF | sudo tee ${strapdir}/root/xorg.conf ${TEEVERBOSE}
# For using Xorg, move this file to /etc/X11/xorg.conf
Section "Monitor"
Identifier "Builtin Default Monitor"
@@ -113,6 +118,12 @@ Section "ServerLayout"
Screen "Builtin Default fbdev Screen 0"
EndSection
EOF
+ ## }}}
+
+ notice "grabbing script for using usb as ethernet device"
+ sudo wget -c \
+ https://raw.github.com/RobertCNelson/tools/master/scripts/beaglebone-black-g-ether-load.sh \
+ -O $strapdir/root/bbb-ether-load.sh
}
build_kernel_armhf() {
@@ -122,20 +133,19 @@ build_kernel_armhf() {
req+=(loopdevice)
ckreq || return 1
- prebuild || zerr
-
notice "building $arch kernel"
- mkdir -p $R/tmp/kernels/$device_name
+
+ prebuild || zerr
get-kernel-sources
pushd $R/tmp/kernels/$device_name/${device_name}-linux
ARCH=arm make bb.org_defconfig
- make $MAKEOPTS
- sudo cp arch/arm/boot/zImage $strapdir/boot/zImage
+ make $MAKEOPTS || zerr
+ sudo cp $CPVERBOSE arch/arm/boot/zImage $strapdir/boot/zImage
sudo mkdir -p $strapdir/boot/dtbs
- sudo cp arch/arm/boot/dts/*.dtb $strapdir/boot/dtbs/
+ sudo cp $CPVERBOSE arch/arm/boot/dts/*.dtb $strapdir/boot/dtbs/
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir modules_install ## this replaces make-kernel-modules
+ make INSTALL_MOD_PATH=$strapdir modules_install || zerr
popd
sudo rm -rf $strapdir/lib/firmware
@@ -144,17 +154,12 @@ build_kernel_armhf() {
pushd $R/tmp/kernels/$device_name/${device_name}-linux
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir firmware_install
+ make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
make mrproper
ARCH=arm make bb.org_defconfig
sudo -E PATH="$PATH" \
- make modules_prepare
+ make modules_prepare || zerr
popd
- notice "grabbing script for using usb as ethernet device"
- sudo wget -c \
- https://raw.github.com/RobertCNelson/tools/master/scripts/beaglebone-black-g-ether-load.sh \
- -O $strapdir/root/bbb-ether-load.sh
-
postbuild || zerr
}
diff --git a/boards/cubieboard2.sh b/boards/cubieboard2.sh
@@ -24,9 +24,9 @@ vars+=(device_name arch size parted_type parted_boot parted_root inittab)
vars+=(gitkernel gitbranch sunxi_tools sunxi_uboot sunxi_boards)
arrs+=(custmodules extra_packages)
-device_name="cubietruck"
+device_name="cubieboard2"
arch="armhf"
-size=1337
+size=1391
inittab="T1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100"
parted_type="dos"
@@ -53,12 +53,48 @@ prebuild() {
notice "executing $device_name prebuild"
write-fstab
+ copy-zram-init
+
+ mkdir -p $R/tmp/kernels/$device_name
+
+ clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" || zerr
+ clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" || zerr
+ clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot" || zerr
+
+ pushd $R/tmp/kernels/$device_name/sunxi-tools
+ act "running fex2bin"
+ make fex2bin || zerr
+ sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/cubieboard2.fex \
+ $strapdir/boot/script.bin || zerr
+ popd
+
+
}
postbuild() {
fn postbuild
notice "executing $device_name postbuild"
+
+ notice "building u-boot"
+ pushd $R/tmp/kernels/$device_name/sunxi-uboot
+ make distclean
+ make Cubieboard2_config
+ make $MAKEOPTS
+ act "dd-ing to image..."
+ sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
+
+ notice "creating boot.cmd"
+ cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd ${TEEVERBOSE}
+setenv bootm_boot_mode sec
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000
+EOF
+
+ notice "creating u-boot script image"
+ sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr || zerr
}
build_kernel_armhf() {
@@ -68,29 +104,17 @@ build_kernel_armhf() {
req+=(loopdevice)
ckreq || return 1
- prebuild || zerr
-
notice "building $arch kernel"
- mkdir -p $R/tmp/kernels/$device_name
-
- clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" master
- clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" master
- clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot"
- pushd $R/tmp/kernels/$device_name/sunxi-tools
- act "running fex2bin"
- make fex2bin
- sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/cubieboard2.fex \
- $strapdir/boot/script.bin
- popd
+ prebuild || zerr
get-kernel-sources
pushd $R/tmp/kernels/$device_name/${device_name}-linux
- wget -O .config $linux_defconfig
- #copy-kernel-config
- make $MAKEOPTS uImage modules
+ #wget -O .config $linux_defconfig
+ copy-kernel-config
+ make $MAKEOPTS uImage modules || zerr
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir modules_install ## this replaces make-kernel-modules
+ make INSTALL_MOD_PATH=$strapdir modules_install || zerr
popd
sudo rm -rf $strapdir/lib/firmware
@@ -99,33 +123,13 @@ build_kernel_armhf() {
pushd $R/tmp/kernels/$device_name/${device_name}-linux
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir firmware_install
+ make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
#make mrproper
- wget -O .config $linux_defconfig
- #copy-kernel-config
+ #wget -O .config $linux_defconfig
+ copy-kernel-config
sudo -E PATH="$PATH" \
- make modules_prepare
+ make modules_prepare || zerr
popd
- notice "building u-boot"
- pushd $R/tmp/kernels/$device_name/sunxi-uboot
- make distclean
- make Cubieboard2_config
- make $MAKEOPTS
- act "dd-ing to image..."
- sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8
-
- notice "creating boot.cmd"
- cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd
-setenv bootm_boot_mode sec
-setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
-fatload mmc 0 0x43000000 script.bin
-fatload mmc 0 0x48000000 uImage
-bootm 0x48000000
-EOF
-
- notice "creating u-boot script image"
- sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr
-
postbuild || zerr
}
diff --git a/boards/cubietruck.sh b/boards/cubietruck.sh
@@ -53,12 +53,48 @@ prebuild() {
notice "executing $device_name prebuild"
write-fstab
+ copy-zram-init
+
+ mkdir -p $R/tmp/kernels/$device_name
+
+ clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" || zerr
+ clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" || zerr
+ clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot" || zerr
+
+ pushd $R/tmp/kernels/$device_name/sunxi-tools
+ act "running fex2bin"
+ make fex2bin || zerr
+ sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/cubietruck.fex \
+ $strapdir/boot/script.bin || zerr
+ popd
}
postbuild() {
fn postbuild
notice "executing $device_name postbuild"
+
+ notice "building u-boot"
+ pushd $R/tmp/kernels/$device_name/sunxi-uboot
+ make distclean
+ make Cubietruck_config
+ make $MAKEOPTS
+ act "dd-ing to image..."
+ sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
+
+ notice "creating boot.cmd"
+ cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd ${TEEVERBOSE}
+setenv bootm_boot_mode sec
+setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000
+EOF
+
+ notice "creating u-boot script image"
+ sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr || zerr
+
+
}
build_kernel_armhf() {
@@ -68,29 +104,17 @@ build_kernel_armhf() {
req+=(loopdevice)
ckreq || return 1
- prebuild || zerr
-
notice "building $arch kernel"
- mkdir -p $R/tmp/kernels/$device_name
-
- clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" master
- clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" master
- clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot"
- pushd $R/tmp/kernels/$device_name/sunxi-tools
- act "running fex2bin"
- make fex2bin
- sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/cubietruck.fex \
- $strapdir/boot/script.bin
- popd
+ prebuild || zerr
get-kernel-sources
pushd $R/tmp/kernels/$device_name/${device_name}-linux
#wget -O .config $linux_defconfig
copy-kernel-config
- make $MAKEOPTS uImage modules
+ make $MAKEOPTS uImage modules || zerr
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir modules_install ## this replaces make-kernel-modules
+ make INSTALL_MOD_PATH=$strapdir modules_install || zerr
popd
sudo rm -rf $strapdir/lib/firmware
@@ -99,33 +123,13 @@ build_kernel_armhf() {
pushd $R/tmp/kernels/$device_name/${device_name}-linux
sudo -E PATH="$PATH" \
- make INSTALL_MOD_PATH=$strapdir firmware_install
+ make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
#make mrproper
#wget -O .config $linux_defconfig
copy-kernel-config
sudo -E PATH="$PATH" \
- make modules_prepare
+ make modules_prepare || zerr
popd
- notice "building u-boot"
- pushd $R/tmp/kernels/$device_name/sunxi-uboot
- make distclean
- make Cubietruck_config
- make $MAKEOPTS
- act "dd-ing to image..."
- sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8
-
- notice "creating boot.cmd"
- cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd
-setenv bootm_boot_mode sec
-setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
-fatload mmc 0 0x43000000 script.bin
-fatload mmc 0 0x48000000 uImage
-bootm 0x48000000
-EOF
-
- notice "creating u-boot script image"
- sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr
-
postbuild || zerr
}
diff --git a/boards/ouya.sh b/boards/ouya.sh
@@ -37,15 +37,29 @@ parted_root="ext4 264192s 100%"
extra_packages=(libasound2 libglib2.0-0 libgstreamer-plugins-base0.10-0 libxv1)
custmodules=()
-postinst() {
- fn postinst
+
+prebuild() {
+ fn prebuild
+ req=(device_name strapdir)
+ ckreq || return 1
+
+ notice "executing $device_name prebuild"
+
+ write-fstab
+ copy-zram-init
+}
+
+postbuild() {
+ fn postbuild
req=(strapdir)
ckreq || return 1
+ notice "executing $device_name postbuild"
+
sudo mkdir -p $strapdir/ouya
- sudo cp $R/extra/ouya/*.deb $strapdir/ouya/
+ sudo cp $CPVERBOSE $R/extra/ouya/*.deb $strapdir/ouya/
- cat <<EOF | sudo tee ${strapdir}/ouya.sh
+ cat <<EOF | sudo tee ${strapdir}/ouya.sh ${TEEVERBOSE}
#!/bin/sh
for deb in /ouya/*.deb; do
dpkg -i $deb
@@ -57,27 +71,36 @@ EOF
sudo chmod +x $strapdir/ouya.sh
sudo chroot $strapdir /ouya.sh
}
-
build_kernel_armhf() {
fn build_kernel_armhf
req+=(workdir strapdir)
ckreq || return 1
- # This device is a bit strange, because I do not want people to flash it on
- # the device's NAND. You will brick it. Instead, we use the device's kernel
- # and boot this image from a USB flash drive.
- #
- # Consult doc/quirks.md to find out how to boot this.
- #
- # https://github.com/kulve/tegra-debian
- # http://tuomas.kulve.fi/blog/2013/09/12/debian-on-ouya-all-systems-go/
+ notice "building $arch kernel"
+
+ prebuild || zerr
- cat <<EOF | sudo tee ${strapdir}/etc/fstab
+ cat <<EOM
+ #############################################################################
+ # This device is a bit strange, because I do not want people to flash it on #
+ # the device's NAND. You will brick it. Instead, we use the device's kernel #
+ # and boot this image from a USB flash drive. #
+ # #
+ # Consult doc/quirks.md to find out how to boot this. #
+ # #
+ # https://github.com/kulve/tegra-debian #
+ # http://tuomas.kulve.fi/blog/2013/09/12/debian-on-ouya-all-systems-go/ #
+ #############################################################################
+EOM
+
+ cat <<EOF | sudo tee ${strapdir}/etc/fstab ${TEEVERBOSE}
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda2 / ext4 noatime,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults 0 0
EOF
notice "copying some kernel modules"
- sudo cp -ra $R/extra/ouya/3.1.10-tk3+ $strapdir/lib/modules/
+ sudo cp $CPVERBOSE -ra $R/extra/ouya/3.1.10-tk3+ $strapdir/lib/modules/
+
+ postbuild || zerr
}