Browse Source

Added Raspberry Pi config

Thomas Buck 8 years ago
parent
commit
465584fe85
2 changed files with 60 additions and 2 deletions
  1. 35
    0
      configs/raspi_defconfig
  2. 25
    2
      flash.sh

+ 35
- 0
configs/raspi_defconfig View File

@@ -0,0 +1,35 @@
1
+BR2_arm=y
2
+BR2_arm1176jzf_s=y
3
+BR2_ARM_EABIHF=y
4
+
5
+BR2_DL_DIR="$(HOME)/.buildroot-dl"
6
+BR2_CCACHE=y
7
+
8
+BR2_TARGET_GENERIC_HOSTNAME="raspberrypi"
9
+BR2_TARGET_GENERIC_ISSUE="Welcome to the CamCorder"
10
+BR2_TARGET_GENERIC_ROOT_PASSWD="camcorder"
11
+
12
+BR2_TARGET_GENERIC_GETTY_PORT="tty1"
13
+
14
+# Linux headers same as kernel, a 4.1 series
15
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y
16
+
17
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
18
+
19
+BR2_LINUX_KERNEL=y
20
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
21
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git"
22
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d33d0293e245badc4ca6ede3984d8bb8ea63cb1a"
23
+BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
24
+BR2_LINUX_KERNEL_ZIMAGE=y
25
+
26
+# Build the DTBs for A/B, A+/B+ and compute module from the kernel sources
27
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
28
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm"
29
+
30
+BR2_PACKAGE_RPI_FIRMWARE=y
31
+# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set
32
+
33
+BR2_PACKAGE_FFMPEG=y
34
+BR2_PACKAGE_FFMPEG_SWSCALE=y
35
+

+ 25
- 2
flash.sh View File

@@ -37,6 +37,27 @@ if [ -e output/images/imx23_olinuxino_dev_linux.sb ] ; then
37 37
 elif [ -e output/images/u-boot.sd ] ; then
38 38
 	echo Writing U-Boot bootstream
39 39
 	sudo dd if=output/images/u-boot.sd of="$1"1
40
+elif [ -e output/images/ ] ; then
41
+    echo Creaeting boot filesystem
42
+    sudo mkfs.vfat -F 16 -n boot "$1"1
43
+
44
+    echo Mounting boot filesystem
45
+	sudo mkdir -p /media/boot
46
+	sudo mount "$1"1 /media/boot
47
+
48
+    echo Copying bootloader files
49
+    sudo cp output/images/rpi-firmware/* /media/boot/
50
+    sudo cp output/images/*.dtb /media/boot/
51
+
52
+    echo Preparing and copying Kernel Image
53
+    output/host/usr/bin/mkknlimg output/images/zImage /media/boot/zImage
54
+
55
+    echo Synchronising changes to disk
56
+	sudo sync
57
+
58
+	echo Unmounting boot filesystem
59
+	sudo umount /media/boot
60
+	sudo rm -rf /media/boot
40 61
 else
41 62
 	echo Could not find a suitable bootstream!
42 63
 fi
@@ -58,11 +79,13 @@ if [ -e output/images/rootfs.tar ] ; then
58 79
 	echo Unmounting root filesystem
59 80
 	sudo umount /media/rootfs
60 81
 	sudo rm -rf /media/rootfs
61
-else
62
-	echo Writing root filesystem
82
+elif [ -e output/images/rootfs.ext2 ] ; then
83
+	echo Writing ext2 root filesystem
63 84
 	sudo dd if=output/images/rootfs.ext2 of="$1"2 bs=512
64 85
 
65 86
 	echo Synchronising changes to disk
66 87
 	sudo sync
88
+else
89
+    echo Could not find a suitable root filesystem!
67 90
 fi
68 91
 

Loading…
Cancel
Save