# Toolchain git clone git://github.com/raspberrypi/tools # Firmware git clone git://github.com/raspberrypi/firmware # Raspbian http://downloads.raspberrypi.org/raspbian_latest 2015-05-05-raspbian-wheezy.zip # Das U-Boot - Binary http://people.freebsd.org/~gonzo/arm/rpi/raspberry-pi-uboot-20120707.tar.gz http://people.freebsd.org/~gonzo/arm/rpi/raspberry-pi-uboot-20120707.img mount /dev/mmcblk0p1 /mnt cp start.elf /mnt # Das U-Boot - Build # Stephen Warren git clone https://github.com/swarren/u-boot git checkout -b rpi_dev origin/rpi_dev cd u-boot # Oleksandr Tymoshenko git clone https://github.com/gonzoua/u-boot-pi cd u-boot-pi git revert 6709570cdc947c2a546f96d571551acf4474778c # network boot broken # no usb (and ethernet) support yet git clone git://git.denx.de/u-boot.git cd u-boot export CROSS_COMPILE=/opt/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- make ARCH=arm rpi_b_config make cp u-boot.bin /mnt echo 'kernel=u-boot.bin' >/mnt/config.txt echo 'bootcmd=usb start; dhcp; tftp 100 %C; go 8000' >/mnt/uEnv.txt # Changes --- a/include/configs/rpi_b.h +++ b/include/configs/rpi_b.h @@ -114,6 +114,7 @@ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ + "bootcmd=usb start; dhcp; tftp 100 %C; go 8000" \ #define CONFIG_BOOTCOMMAND \ "if mmc rescan ${mmcdev}; then " \ # Das U-Boot - Reset environment env default -f -a # Plan 9 SD card fdisk /dev/mmcblk0 n p 1 [enter] [enter] t b w mkfs.vfat -F 32 /dev/mmcblk0p1 mount /dev/mmcblk0p1 /mnt wget https://github.com/raspberrypi/firmware/archive/master.tar.gz tar xzf master.tar.gz cp firmware-master/boot/LICENCE.broadcom /mnt cp firmware-master/boot/bcm2711-rpi-4-b.dtb /mnt cp firmware-master/boot/bootcode.bin /mnt cp firmware-master/boot/fixup4cd.dat /mnt cp firmware-master/boot/fixup_cd.dat /mnt cp firmware-master/boot/start4cd.elf /mnt cp firmware-master/boot/start_cd.elf /mnt #echo readparts=1 nobootprompt=tcp\!192.168.1.130 nvram=/boot/nvram fs=192.168.1.130 auth=192.168.1.130 sysname=rpi32 *ncpu=4 console=\'0 b115200\' >/mnt/cmdline.txt echo readparts=1 nobootprompt=tcp\!192.168.1.130 nvram=/boot/nvram fs=192.168.1.130 auth=192.168.1.130 >/mnt/cmdline.txt cat > /mnt/config.txt << EOF [pi0] kernel=9picpu [pi1] kernel=9picpu [pi2] kernel=9pi2cpu [pi3] kernel=9pi2cpu core_freq=250 [pi4] kernel=9pi4cpu core_freq=250 device_tree= cmdline=cmdline.txt enable_gic=1 [all] gpu_mem=16' EOF cp 9pi* /mnt umount /mnt # Misc configuration Add "console='0 b115200'" in cmdline.txt to enable TTL output. Add "ether1=type=4330" in cmdline.txt to enable Wi-Fi. Add "arm_freq=1200" in config.txt to set the clock to 1.2 GHz. Add "core_freq=250" in config.txt to fix the serial output on Raspberry Pi 3 # swap diskparts /dev/sdM0 swap /dev/sdM0/linuxswap