diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-06-16 08:57:45 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2017-07-04 09:25:24 +0200 |
commit | 1db122202276b9f343ebdb386df961b2a8cb14a5 (patch) | |
tree | 3ebece2bdff32bb11941186b33bd7f4ca82d92d0 | |
parent | 966f675d7d9b9c2f7efd4fa25a50e8758884bf71 (diff) | |
download | DistroKit-1db122202276b9f343ebdb386df961b2a8cb14a5.tar.gz DistroKit-1db122202276b9f343ebdb386df961b2a8cb14a5.tar.xz |
platform-v7a: rpi2: add board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | configs/platform-v7a/config/images/rpi2.config | 29 | ||||
-rw-r--r-- | configs/platform-v7a/projectroot/loader/entries/rpi2.conf | 3 | ||||
-rw-r--r-- | configs/platform-v7a/rpi-firmware/config.txt | 2 | ||||
-rw-r--r-- | configs/platform-v7a/rules/image-rpi2.make | 49 |
4 files changed, 81 insertions, 2 deletions
diff --git a/configs/platform-v7a/config/images/rpi2.config b/configs/platform-v7a/config/images/rpi2.config new file mode 100644 index 0000000..b3cc4ca --- /dev/null +++ b/configs/platform-v7a/config/images/rpi2.config @@ -0,0 +1,29 @@ +image rpi2-boot.vfat { + vfat { + files = { @FIRMWARE_RPI2@ } + file barebox.bin { image = barebox-raspberry-pi-2.img-rpi2 } + } + size = 32M +} + +image @IMAGE@ { + hdimage { + align = 1M + disk-signature = 0xbedf7893 + } + partition boot { + image = rpi2-boot.vfat + size = 32M + partition-type = 0xc + bootable = true + } + partition root-A { + image = root.ext2 + partition-type = 0x83 + size = 512M + } + partition data { + partition-type = 0x83 + size = 512M + } +} diff --git a/configs/platform-v7a/projectroot/loader/entries/rpi2.conf b/configs/platform-v7a/projectroot/loader/entries/rpi2.conf index 05992c0..a4b77bc 100644 --- a/configs/platform-v7a/projectroot/loader/entries/rpi2.conf +++ b/configs/platform-v7a/projectroot/loader/entries/rpi2.conf @@ -1,5 +1,6 @@ title Raspberry Pi 2 - Pengutronix-DistroKit version 4.6 -options loglevel=5 systemd.log_level=warning systemd.show_status=auto root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw +options loglevel=5 systemd.log_level=warning systemd.show_status=auto rootwait rw linux /boot/zImage devicetree /boot/bcm2836-rpi-2-b.dtb +linux-appendroot true diff --git a/configs/platform-v7a/rpi-firmware/config.txt b/configs/platform-v7a/rpi-firmware/config.txt index a71e4a6..ad5726b 100644 --- a/configs/platform-v7a/rpi-firmware/config.txt +++ b/configs/platform-v7a/rpi-firmware/config.txt @@ -1,5 +1,5 @@ # Set barebox as third state bootloader -kernel=barebox.bin-rpi2 +kernel=barebox.bin # Set stdv mode to PAL (as used in Europe) sdtv_mode=2 # Force the monitor to HDMI mode so that sound will be sent over HDMI cable diff --git a/configs/platform-v7a/rules/image-rpi2.make b/configs/platform-v7a/rules/image-rpi2.make new file mode 100644 index 0000000..43d2e34 --- /dev/null +++ b/configs/platform-v7a/rules/image-rpi2.make @@ -0,0 +1,49 @@ +# -*-makefile-*- +# +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +IMAGE_PACKAGES-$(PTXCONF_IMAGE_RPI2) += image-rpi2 + +# +# Paths and names +# +IMAGE_RPI2 := image-rpi2 +IMAGE_RPI2_DIR := $(BUILDDIR)/$(IMAGE_RPI2) +IMAGE_RPI2_IMAGE := $(IMAGEDIR)/rpi2.hdimg +IMAGE_RPI2_FILES := $(IMAGEDIR)/root.tgz +IMAGE_RPI2_CONFIG := rpi2.config +IMAGE_RPI2_DATA := \ + $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.bin) \ + $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.elf) \ + $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.dat) \ + $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt) + +# ---------------------------------------------------------------------------- +# Image +# ---------------------------------------------------------------------------- + +define squote_and_comma +$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1)))) +endef + +IMAGE_RPI2_ENV := \ + FIRMWARE_RPI2="$(call squote_and_comma,$(IMAGE_RPI2_DATA))" + +$(IMAGE_RPI2_IMAGE): + @$(call targetinfo) + @GPU_MEM=$(PTXCONF_IMAGE_RPI2_GPU_MEM) \ + ptxd_replace_magic "$(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt" > \ + "$(PTXDIST_TEMPDIR)/config.txt" + @$(call image/genimage, IMAGE_RPI2) + @$(call finish) + +# vim: syntax=make |