Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rpi-zero/build_rpi0w.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
cd buildroot
make BR2_EXTERNAL=../buildroot-external mistex_rpi0w_defconfig
# This builds the sdcard image and the SDK
make BR2_EXTERNAL=../buildroot-external sdk
34 changes: 34 additions & 0 deletions rpi-zero/buildroot-external/board/raspberrypi0w/config_mistex.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Please note that this is only a sample, we recommend you to change it to fit
# your needs.
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax

start_file=start.elf
fixup_file=fixup.dat

kernel=zImage

# To use an external initramfs file
#initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

hdmi_safe=1
hdmi_mode=4
dtparam=spi=on
dtparam=audio=off

# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
dtoverlay=miniuart-bt

# enable autoprobing of Bluetooth driver without need of hciattach/btattach
dtoverlay=krnbt=on
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
image boot.vfat {
vfat {
files = {
"bcm2708-rpi-zero-w.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"rpi-firmware/overlays",
"zImage"
}
}

size = 32M
}

image media.vfat {
vfat { }
mountpoint = "/media/fat"
size = 1024M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
size = 512M
}

partition media {
partition-type = 0xC
image = "media.vfat"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

case "$1" in
start)
echo "Starting SPI"
/sbin/modprobe spidev
# This is actually spidev0.0,
# which is automatically created
# but we alias it to this one too
# to make it consistent with the Allwinner D1
/bin/mknod /dev/spidev1.0 c 153 0
exit $?
;;

stop)
echo "Stopping SPI"
/sbin/rmmod spidev
exit $?
;;

restart)
$0 stop
sleep 1
$0 start
;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

case "$1" in
start)
echo "Mounting /media/fat"
mkdir -p /media/fat
/bin/mount /dev/mmcblk0p3 /media/fat
exit $?
;;

stop)
echo "Unmounting /media/fat"
/bin/umount /media/fat
exit $?
;;

restart)
$0 stop
sleep 1
$0 start
;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# Server-side demuxing by default

case "$1" in
start)
echo "Starting MiSTer"
openFPGALoader -c dirtyJtag /media/fat/menu.rbf
start-stop-daemon -S -m --background -p /var/run/mister.pid -x /bin/nice -n -19 /media/fat/MiSTer
exit $?
;;

stop)
echo "Stopping MiSTer"
start-stop-daemon -K -q -p /var/run/mister.pid 2>/dev/null
exit $?
;;

restart)
$0 stop
sleep 1
$0 start
;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Welcome to MiSTeX!
Have fun...
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3T1tGyB0hS2377It8AuzDcdYdhKW3rdAtqF0T5AnVW2QlmIVBN86J8fTGHDaCs0OJkmKFhjDcedgucJn8E8MqWojDvFO9652Ylx+T7NViSWUROYzgyVcXEq2G96tv1aQYle6psADfTKLuq12tCUkK+vfbbYHQzrg6eB33EjKkiqN8lq+raUXInJYKukBwntCH16wNHxdI8Y7YVfLfXUCgKeJIGbHKhUVt25qxaHoN53EC9GrZR5DkwgfA77hT2O4ewnjk8qfGiIYuK+Vpw7VnQpYDssL1KewhPEAkj79w+p4Hy0viIxxOrwDpz1d5jRxLZ5R3Zv/uC3x0GX0kBCGT user@desktop
31 changes: 31 additions & 0 deletions rpi-zero/buildroot-external/board/raspberrypi0w/post-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -e

BOARD_DIR="$(dirname $0)"
BOARD_NAME="$(basename ${BOARD_DIR})"
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"

# Pass an empty rootpath. genimage makes a full copy of the given rootpath to
# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk
# space. We don't rely on genimage to build the rootfs image, just to insert a
# pre-built one in the disk image.

trap 'rm -rf "${ROOTPATH_TMP}"' EXIT
ROOTPATH_TMP="$(mktemp -d)"

MEDIA_SRC_PATH="../../Distribution_MiSTeX/"
mkdir -p ${ROOTPATH_TMP}/media/fat
cp -rv ${MEDIA_SRC_PATH}/* ${ROOTPATH_TMP}/media/fat

rm -rf "${GENIMAGE_TMP}"

genimage \
--rootpath "${ROOTPATH_TMP}" \
--tmppath "${GENIMAGE_TMP}" \
--inputpath "${BINARIES_DIR}" \
--outputpath "${BINARIES_DIR}" \
--config "${GENIMAGE_CFG}"

exit $?
Empty file.
Loading