diff options
-rwxr-xr-x | scripts/install.sh | 18 | ||||
-rw-r--r-- | target/arm/Makefile | 16 | ||||
-rw-r--r-- | target/arm/kernel/raspberry-pi2 | 2 | ||||
-rw-r--r-- | target/config/Config.in.runtime | 5 |
4 files changed, 30 insertions, 11 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index d38ffe94a..7df634213 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -142,7 +142,7 @@ tgt=$2 src=$3 case $target { -(raspberry-pi|solidrun-imx6|default) ;; +(raspberry-pi|raspberry-pi2|solidrun-imx6|default) ;; (*) print -u2 "Unknown target '$target', exiting" exit 1 ;; @@ -165,7 +165,7 @@ case $ostype { basedev=$tgt rootpart=${basedev}s1 datapart=${basedev}s2 - if [[ $target = raspberry-pi ]]; then + if [[ $target = raspberry-pi || $target = raspberry-pi2 ]]; then bootpart=${basedev}s1 rootpart=${basedev}s2 datapart=${basedev}s3 @@ -192,7 +192,7 @@ case $ostype { basedev=$tgt rootpart=${basedev}1 datapart=${basedev}2 - if [[ $target = raspberry-pi ]]; then + if [[ $target = raspberry-pi || $target = raspberry-pi2 ]]; then bootpart=${basedev}1 rootpart=${basedev}2 datapart=${basedev}3 @@ -256,7 +256,7 @@ syspartno=0 # data - flexible (parameter) # system - everything else -if [[ $target = raspberry-pi ]]; then +if [[ $target = raspberry-pi || $target = raspberry-pi2 ]]; then syspartno=1 bootfssz=100 if (( grub )); then @@ -313,7 +313,7 @@ fi #(( partofs = ((coreendsec / secs) + 1) * secs )) # we just use 2048 all the time, since some loaders are longer partofs=2048 -if [[ $target = raspberry-pi ]]; then +if [[ $target = raspberry-pi || $target = raspberry-pi2 ]]; then (( spartofs = partofs + (100 * 2048) )) else spartofs=$partofs @@ -424,7 +424,7 @@ if (( datafssz )); then dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1CE)) 2>/dev/null fi -if [[ $target = raspberry-pi ]]; then +if [[ $target = raspberry-pi || $target = raspberry-pi2 ]]; then # move system and data partition from #0/#1 to #1/#2 dd if="$T/firsttrack" bs=1 skip=$((0x1BE)) count=32 of="$T/x" 2>/dev/null dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1CE)) if="$T/x" 2>/dev/null @@ -503,7 +503,7 @@ case $target { dd if="$fwdir/SPL" of="$tgt" bs=1024 seek=1 > /dev/null 2>&1 dd if="$fwdir/u-boot.img" of="$tgt" bs=1024 seek=42 > /dev/null 2>&1 ;; -(raspberry-pi) +(raspberry-pi|raspberry-pi2) (( noformat )) || create_fs "$bootpart" ADKBOOT vfat ;; } @@ -520,7 +520,7 @@ if (( datafssz )); then ((keep)) || create_fs "$datapart" ADKDATA ext4 ((keep)) || tune_fs "$datapart" case $target { - (raspberry-pi) + (raspberry-pi|raspberry-pi2) echo "/dev/mmcblk0p3 /data ext4 rw 0 0" >> "$R"/etc/fstab ;; (solidrun-imx6) @@ -530,7 +530,7 @@ if (( datafssz )); then fi case $target { -(raspberry-pi) +(raspberry-pi|raspberry-pi2) mount_fs "$bootpart" "$B" vfat for x in "$R"/boot/*; do [[ -e "$x" ]] && mv -f "$R"/boot/* "$B/" diff --git a/target/arm/Makefile b/target/arm/Makefile index 634bee924..180e02e83 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -52,6 +52,12 @@ ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) @echo "Use following command to install with a writable data partition" @echo "sudo ./scripts/install.sh -d 256 raspberry-pi /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)" endif +ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y) + @echo "Use following command to install it on SD card:" + @echo "sudo ./scripts/install.sh raspberry-pi2 /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)" + @echo "Use following command to install with a writable data partition" + @echo "sudo ./scripts/install.sh -d 256 raspberry-pi2 /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)" +endif ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y) ifeq ($(ADK_APPLIANCE_KODI),y) @echo "Use following command to install with a writable data partition" @@ -102,6 +108,13 @@ ifeq ($(ADK_KERNEL_BCM2708_DT),y) $(ADK_TOPDIR)/scripts/mkknlimg --dtok $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) $(MAKE_TRACE) endif endif +ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y) +ifeq ($(ADK_KERNEL_BCM2709_DT),y) + @echo adding DT trailer to kernel $(MAKE_TRACE) + -rm $(BUILD_DIR)/$(TARGET_KERNEL) + $(ADK_TOPDIR)/scripts/mkknlimg --dtok $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) $(MAKE_TRACE) +endif +endif kernel-install: kernel-strip @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @@ -110,6 +123,9 @@ dtb-install: ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) env $(KERNEL_MAKE_ENV) $(MAKE) $(KERNEL_MAKE_OPTS) dtbs $(MAKE_TRACE) endif +ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y) + env $(KERNEL_MAKE_ENV) $(MAKE) $(KERNEL_MAKE_OPTS) dtbs $(MAKE_TRACE) +endif ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y) env $(KERNEL_MAKE_ENV) $(MAKE) $(KERNEL_MAKE_OPTS) \ imx6q-cubox-i.dtb imx6dl-cubox-i.dtb imx6dl-hummingboard.dtb imx6q-hummingboard.dtb $(MAKE_TRACE) diff --git a/target/arm/kernel/raspberry-pi2 b/target/arm/kernel/raspberry-pi2 index 592a38201..767a675c3 100644 --- a/target/arm/kernel/raspberry-pi2 +++ b/target/arm/kernel/raspberry-pi2 @@ -2,10 +2,8 @@ CONFIG_ARM=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_BCM2709=y -CONFIG_ARCH_BCM2836=y CONFIG_MACH_BCM2709=y CONFIG_HAVE_ARM_ARCH_TIMER=y CONFIG_FIQ=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_CMDLINE_EXTEND=y diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 6e6e29aaa..3af067c16 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -38,6 +38,7 @@ config ADK_RUNTIME_TMPFS_SIZE default "16384" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default "32768" if ADK_TARGET_SYSTEM_IBM_X40 default "32768" if ADK_TARGET_SYSTEM_RASPBERRY_PI + default "32768" if ADK_TARGET_SYSTEM_RASPBERRY_PI2 default "32768" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default "8192" if ADK_TARGET_SYSTEM_MIKROTIK_RB532 default "2048" @@ -135,6 +136,7 @@ config ADK_RUNTIME_GETTY_VGA default y if ADK_TARGET_QEMU_WITH_GRAPHIC_ONLY default y if ADK_TARGET_QEMU_WITH_GRAPHIC default y if ADK_TARGET_SYSTEM_RASPBERRY_PI + default y if ADK_TARGET_SYSTEM_RASPBERRY_PI2 default y if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_IBM_X40 @@ -150,6 +152,7 @@ config ADK_RUNTIME_GETTY_SERIAL default n if ADK_TARGET_QEMU_WITH_GRAPHIC_ONLY default n if ADK_TARGET_QEMU_WITH_GRAPHIC default n if ADK_TARGET_SYSTEM_RASPBERRY_PI + default n if ADK_TARGET_SYSTEM_RASPBERRY_PI2 default n if ADK_TARGET_SYSTEM_HUMMINGBOARD default n if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n if ADK_TARGET_SYSTEM_IBM_X40 @@ -163,6 +166,7 @@ config ADK_RUNTIME_CONSOLE_VGA_DEVICE string "VGA console device" depends on ADK_TARGET_WITH_VGA default "tty1" if ADK_TARGET_SYSTEM_RASPBERRY_PI + default "tty1" if ADK_TARGET_SYSTEM_RASPBERRY_PI2 default "tty0" config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE @@ -174,6 +178,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE default "ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH default "ttymxc0" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default "ttyAMA0" if ADK_TARGET_SYSTEM_RASPBERRY_PI + default "ttyAMA0" if ADK_TARGET_SYSTEM_RASPBERRY_PI2 default "ttyS0" config ADK_RUNTIME_CONSOLE_SERIAL_SPEED |