diff options
author | Tomasz Maciej Nowak <tomek_n@o2.pl> | 2019-04-01 19:25:38 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-04-06 14:48:46 +0200 |
commit | 42f96ed9413a3483b0448581374feeb3343f6f6a (patch) | |
tree | 64dcc9c3a418ecec29a6654d75746574e4c0902a /target/linux/tegra/image | |
parent | de3eb0d8a060b1eb4e4027ebc435bb412ce8e096 (diff) | |
download | upstream-42f96ed9413a3483b0448581374feeb3343f6f6a.tar.gz upstream-42f96ed9413a3483b0448581374feeb3343f6f6a.tar.bz2 upstream-42f96ed9413a3483b0448581374feeb3343f6f6a.zip |
tegra: add new target
New target introduces initial support for NVIDIA Tegra SoC based devices.
It focuses on Tegra 2 CPUs, for successors supporting NEON instruction
set the target should be split in two subtargets.
This initial commit doesn't create any device image, it's groundwork
for further additions.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/tegra/image')
-rw-r--r-- | target/linux/tegra/image/Makefile | 47 | ||||
-rw-r--r-- | target/linux/tegra/image/generic-bootscript | 6 |
2 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile new file mode 100644 index 0000000000..757e5b823f --- /dev/null +++ b/target/linux/tegra/image/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl> +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH)) + +define Build/tegra-sdcard + rm -fR $@.boot + mkdir -p $@.boot + $(CP) $(KDIR)/$(KERNEL_NAME) $@.boot + $(if $(DEVICE_DTS),\ + $(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \ + $(CP) $(DTS_DIR)/*.dtb $@.boot) + sed \ + -e 's#@ROOT@#$(SIGNATURE)#g' \ + -e 's#@KERNEL@#$(KERNEL_NAME)#g' \ + $(BOOT_SCRIPT) > $@-boot.scr + mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n '$(DEVICE_TITLE) OpenWrt bootscript' \ + -d $@-boot.scr \ + $@.boot/boot.scr + + PADDING="$(CONFIG_TARGET_IMAGES_PAD)" \ + SIGNATURE="$(SIGNATURE)" \ + $(SCRIPT_DIR)/gen_image_generic.sh \ + $@ \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \ + 2048 +endef + +DEVICE_VARS += BOOT_SCRIPT +define Device/Default + BOOT_SCRIPT := generic-bootscript + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := tegra-sdcard | gzip | append-metadata + KERNEL_NAME := zImage + KERNEL := kernel-bin + PROFILES := Default +endef + +$(eval $(call BuildImage)) diff --git a/target/linux/tegra/image/generic-bootscript b/target/linux/tegra/image/generic-bootscript new file mode 100644 index 0000000000..7e86afdf5f --- /dev/null +++ b/target/linux/tegra/image/generic-bootscript @@ -0,0 +1,6 @@ +setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait console=ttyS0,115200 console=tty0" + +load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /@KERNEL@ +load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /${soc}-${board}.dtb + +bootz ${kernel_addr_r} - ${fdt_addr_r} |