mirror of https://github.com/parazyd/arm-sdk.git
fin ouya and add a note about it
This commit is contained in:
parent
27e3f51361
commit
34c55d5bfa
|
|
@ -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 <<EOF | sudo tee ${strapdir}/boot/uEnv.txt ${TEEVERBOSE}
|
||||
cat <<EOF | sudo tee ${strapdir}/boot/uEnv.txt
|
||||
#u-boot eMMC specific overrides; Angstrom Distribution (BeagleBone Black) 2013-06-20
|
||||
kernel_file=zImage
|
||||
initrd_file=uInitrd
|
||||
|
|
@ -91,31 +94,31 @@ EOF
|
|||
## }}}
|
||||
## {{{ xorg.conf
|
||||
notice "writing xorg.conf for future use"
|
||||
cat <<EOF | sudo tee ${strapdir}/root/xorg.conf ${TEEVERBOSE}
|
||||
cat <<EOF | sudo tee ${strapdir}/root/xorg.conf
|
||||
# For using Xorg, move this file to /etc/X11/xorg.conf
|
||||
Section "Monitor"
|
||||
Identifier "Builtin Default Monitor"
|
||||
Identifier "Builtin Default Monitor"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "Builtin Default fbdev Device 0"
|
||||
Driver "fbdev"
|
||||
Option "SWCursor" "true"
|
||||
Identifier "Builtin Default fbdev Device 0"
|
||||
Driver "fbdev"
|
||||
Option "SWCursor" "true"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Builtin Default fbdev Screen 0"
|
||||
Device "Builtin Default fbdev Device 0"
|
||||
Monitor "Builtin Default Monitor"
|
||||
DefaultDepth 16
|
||||
# Comment out the above and uncomment the below if using a
|
||||
# bbb-view or bbb-exp
|
||||
#DefaultDepth 24
|
||||
Identifier "Builtin Default fbdev Screen 0"
|
||||
Device "Builtin Default fbdev Device 0"
|
||||
Monitor "Builtin Default Monitor"
|
||||
DefaultDepth 16
|
||||
# Comment out the above and uncomment the below if using a
|
||||
# bbb-view or bbb-exp
|
||||
#DefaultDepth 24
|
||||
EndSection
|
||||
|
||||
Section "ServerLayout"
|
||||
Identifier "Builtin Default Layout"
|
||||
Screen "Builtin Default fbdev Screen 0"
|
||||
Identifier "Builtin Default Layout"
|
||||
Screen "Builtin Default fbdev Screen 0"
|
||||
EndSection
|
||||
EOF
|
||||
## }}}
|
||||
|
|
@ -124,6 +127,8 @@ EOF
|
|||
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-clean
|
||||
}
|
||||
|
||||
build_kernel_armhf() {
|
||||
|
|
@ -139,13 +144,13 @@ build_kernel_armhf() {
|
|||
|
||||
get-kernel-sources
|
||||
pushd $R/tmp/kernels/$device_name/${device_name}-linux
|
||||
ARCH=arm make bb.org_defconfig
|
||||
make $MAKEOPTS || zerr
|
||||
sudo cp $CPVERBOSE arch/arm/boot/zImage $strapdir/boot/zImage
|
||||
sudo mkdir -p $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 || zerr
|
||||
ARCH=arm make bb.org_defconfig
|
||||
make $MAKEOPTS || zerr
|
||||
sudo cp $CPVERBOSE arch/arm/boot/zImage $strapdir/boot/zImage
|
||||
sudo mkdir -p $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 || zerr
|
||||
popd
|
||||
|
||||
sudo rm -rf $strapdir/lib/firmware
|
||||
|
|
@ -153,12 +158,12 @@ build_kernel_armhf() {
|
|||
sudo cp $CPVERBOSE -ra $R/tmp/linux-firmware $strapdir/lib/firmware
|
||||
|
||||
pushd $R/tmp/kernels/$device_name/${device_name}-linux
|
||||
sudo -E PATH="$PATH" \
|
||||
make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
|
||||
make mrproper
|
||||
ARCH=arm make bb.org_defconfig
|
||||
sudo -E PATH="$PATH" \
|
||||
make modules_prepare || zerr
|
||||
sudo -E PATH="$PATH" \
|
||||
make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
|
||||
make mrproper
|
||||
ARCH=arm make bb.org_defconfig
|
||||
sudo -E PATH="$PATH" \
|
||||
make modules_prepare || zerr
|
||||
popd
|
||||
|
||||
postbuild || zerr
|
||||
|
|
|
|||
|
|
@ -1,94 +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/>.
|
||||
|
||||
## 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
|
||||
}
|
||||
|
|
@ -54,7 +54,6 @@ prebuild() {
|
|||
enablessh
|
||||
write-fstab
|
||||
copy-zram-init
|
||||
rdate-to-rclocal
|
||||
|
||||
mkdir -p $R/tmp/kernels/$device_name
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <<EOF | sudo tee ${strapdir}/etc/fstab
|
||||
# <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 $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 <<EOF | sudo tee ${strapdir}/ouya.sh ${TEEVERBOSE}
|
||||
cat <<EOF | sudo tee ${strapdir}/ouya.sh
|
||||
#!/bin/sh
|
||||
for deb in /ouya/*.deb; do
|
||||
dpkg -i $deb
|
||||
dpkg -i \$deb
|
||||
apt-get -f --yes --force-yes install
|
||||
done
|
||||
rm -rf /ouya
|
||||
rm -f /ouya.sh
|
||||
EOF
|
||||
|
||||
sudo chmod +x $strapdir/ouya.sh
|
||||
sudo chroot $strapdir /ouya.sh
|
||||
sudo -E chroot $strapdir /ouya.sh
|
||||
|
||||
postbuild-clean
|
||||
}
|
||||
build_kernel_armhf() {
|
||||
fn build_kernel_armhf
|
||||
|
|
@ -81,26 +96,17 @@ build_kernel_armhf() {
|
|||
prebuild || zerr
|
||||
|
||||
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/ #
|
||||
#############################################################################
|
||||
#############################################################################
|
||||
# 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 $CPVERBOSE -ra $R/extra/ouya/3.1.10-tk3+ $strapdir/lib/modules/
|
||||
|
||||
postbuild || zerr
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,150 +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/>.
|
||||
|
||||
## 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 <<EOF | sudo tee -a ${strapdir}/etc/apt/sources.list ${TEEVERBOSE}
|
||||
|
||||
## raspbian repositories needed for certain packages
|
||||
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi firmware
|
||||
#deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi firmware
|
||||
|
||||
## for omxplayer
|
||||
deb http://linux.subogero.com/deb /
|
||||
|
||||
deb http://pipplware.pplware.pt/pipplware/dists/jessie/main/binary /
|
||||
EOF
|
||||
## }}}
|
||||
|
||||
notice "creating cmdline.txt"
|
||||
cat <<EOF | sudo tee ${strapdir}/boot/cmdline.txt ${TEEVERBOSE}
|
||||
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0 quiet
|
||||
EOF
|
||||
|
||||
notice "creating config.txt"
|
||||
cat <<EOF | sudo tee ${strapdir}/boot/config.txt ${TEEVERBOSE}
|
||||
## memory shared with the GPU
|
||||
gpu_mem=64
|
||||
|
||||
dtparam=audio=on
|
||||
|
||||
max_usb_current=1
|
||||
EOF
|
||||
|
||||
## TODO: remove systemd merda from raspi-config and add here
|
||||
|
||||
notice "installing raspberry pi 3 firmware for bt/wifi"
|
||||
sudo mkdir -p $strapdir/lib/firmware/brcm
|
||||
sudo cp $CPVERBOSE $R/extra/rpi3/brcmfmac43430-sdio.txt $strapdir/lib/firmware/brcm/
|
||||
sudo cp $CPVERBOSE $R/extra/rpi3/brcmfmac43430-sdio.bin $strapdir/lib/firmware/brcm/
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/postbuild ${TEEVERBOSE}
|
||||
|
||||
#!/bin/sh
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
rm -f /postbuild
|
||||
rm -f /usr/bin/${qemu_bin}
|
||||
EOF
|
||||
chmod +x $strapdir/postbuild || zerr
|
||||
chroot $strapdir /postbuild || zerr
|
||||
}
|
||||
|
||||
build_kernel_armhf() {
|
||||
fn build_kernel_armhf
|
||||
req=(R arch device_name gitkernel gitbranch MAKEOPTS rpifirmware)
|
||||
req+=(strapdir)
|
||||
ckreq || return 1
|
||||
|
||||
notice "building $arch kernel"
|
||||
|
||||
prebuild || zerr
|
||||
|
||||
get-kernel-sources
|
||||
pushd $R/tmp/kernels/$device_name/${device_name}-linux
|
||||
make bcm2709_defconfig
|
||||
make $MAKEOPTS || zerr
|
||||
sudo -E PATH="$PATH" \
|
||||
make INSTALL_MOD_PATH=$strapdir modules_install || zerr
|
||||
popd
|
||||
|
||||
clone-git $rpifirmware "$R/tmp/kernels/$device_name/${device_name}-firmware"
|
||||
sudo cp $CPVERBOSE -rf $R/tmp/kernels/$device_name/${device_name}-firmware/boot/* $strapdir/boot/
|
||||
|
||||
pushd $R/tmp/kernels/$device_name/${device_name}-linux
|
||||
sudo perl scripts/mkknlimg --dtok arch/arm/boot/zImage $strapdir/boot/kernel7.img
|
||||
sudo cp $CPVERBOSE "arch/arm/boot/dts/bcm*.dtb" $strapdir/boot/
|
||||
sudo cp $CPVERBOSE "arch/arm/boot/dts/overlays/*overlay*.dtb" $strapdir/boot/overlays/
|
||||
popd
|
||||
|
||||
sudo rm -rf $strapdir/lib/firmware
|
||||
get-kernel-firmware
|
||||
sudo cp $CPVERBOSE -ra $R/tmp/linux-firmware $strapdir/lib/firmware
|
||||
|
||||
pushd $R/tmp/kernels/$device_name/${device_name}-linux
|
||||
sudo -E PATH="$PATH" \
|
||||
make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
|
||||
#make mrproper
|
||||
make bcm2709_defconfig
|
||||
sudo -E PATH="$PATH" \
|
||||
make modules_prepare || zerr
|
||||
popd
|
||||
|
||||
postbuild || zerr
|
||||
}
|
||||
Loading…
Reference in New Issue