2021-02-10 13:52:34 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2019-04-01 17:25:38 +00:00
|
|
|
#
|
2020-11-20 18:46:35 +00:00
|
|
|
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
2021-02-10 13:52:34 +00:00
|
|
|
|
2019-04-01 17:25:38 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
|
|
|
define Build/tegra-sdcard
|
|
|
|
rm -fR $@.boot
|
|
|
|
mkdir -p $@.boot
|
|
|
|
$(CP) $(KDIR)/$(KERNEL_NAME) $@.boot
|
|
|
|
$(if $(DEVICE_DTS),\
|
2024-05-29 14:24:09 +00:00
|
|
|
$(foreach dtb,$(DEVICE_DTS),$(CP) $(DEVICE_DTS_DIR)/$(dtb).dtb $@.boot), \
|
|
|
|
$(CP) $(DEVICE_DTS_DIR)/*.dtb $@.boot)
|
2019-04-01 17:25:38 +00:00
|
|
|
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
|
|
|
-n '$(DEVICE_TITLE) OpenWrt bootscript' \
|
2020-11-25 16:10:05 +00:00
|
|
|
-d $(BOOT_SCRIPT) \
|
2019-04-01 17:25:38 +00:00
|
|
|
$@.boot/boot.scr
|
2024-05-15 17:02:06 +00:00
|
|
|
$(CP) $@ $@.rootfs
|
2019-04-01 17:25:38 +00:00
|
|
|
|
2019-11-04 20:55:23 +00:00
|
|
|
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
2019-04-01 17:25:38 +00:00
|
|
|
$(SCRIPT_DIR)/gen_image_generic.sh \
|
|
|
|
$@ \
|
|
|
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
2024-05-15 17:02:06 +00:00
|
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $@.rootfs \
|
2019-04-01 17:25:38 +00:00
|
|
|
2048
|
2019-04-01 17:25:41 +00:00
|
|
|
|
|
|
|
$(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
|
2019-04-01 17:25:38 +00:00
|
|
|
endef
|
|
|
|
|
2019-04-01 17:25:41 +00:00
|
|
|
DEVICE_VARS += BOOT_SCRIPT UBOOT
|
2020-03-10 06:41:09 +00:00
|
|
|
|
2019-04-01 17:25:38 +00:00
|
|
|
define Device/Default
|
|
|
|
BOOT_SCRIPT := generic-bootscript
|
2024-05-29 14:24:09 +00:00
|
|
|
ifeq ($(KERNEL),6.6)
|
|
|
|
DEVICE_DTS_DIR := $$(DTS_DIR)/nvidia
|
|
|
|
else
|
|
|
|
DEVICE_DTS_DIR := $$(DTS_DIR)
|
|
|
|
endif
|
2019-04-01 17:25:38 +00:00
|
|
|
IMAGES := sdcard.img.gz
|
2024-05-15 17:02:06 +00:00
|
|
|
IMAGE/sdcard.img.gz := append-rootfs | pad-extra 128k | tegra-sdcard | gzip | append-metadata
|
2019-04-01 17:25:38 +00:00
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL := kernel-bin
|
|
|
|
PROFILES := Default
|
|
|
|
endef
|
|
|
|
|
2019-05-01 17:43:54 +00:00
|
|
|
define Device/compulab_trimslice
|
2019-07-14 08:35:21 +00:00
|
|
|
DEVICE_VENDOR := CompuLab
|
|
|
|
DEVICE_MODEL := TrimSlice
|
tegra: add support for CompuLab TrimSlice
It is a small form factor computer with rich amount of expansion ports.
Some hardware specs and supported features in this commit:
CPU: NVIDIA Tegra 2 @ 1GHz
RAM: 1GB DDR2-667
Storage: SDHC card slot
µSDHC card slot
USB to SATA bridge (depends on model)
1MB SPI NOR flash for bootloader (single partition)
LAN: RTL8111DL GbE
WIFI: RT3070 b/g/n with external antenna (depends on model)
RTC: EM3027 (mapped as rtc0; with battery backup)
Tegra 2 built-in (mapped as rtc1)
Sound: Analog/Digital (TLV320AIC23b; S/PDIF not tested)
Connectors: 4x USB 2.0
RS232 (mini serial)
HDMI
DVI-D (depends on model, not supported atm)
Extension connector (24 pin ZIF, 0.5mm pitch):
2X UART
SPI
JTAG (1.8V)
Other: power button with green led (not functional for early revisions
without programmed PMIC)
2x GPIO configurable green led
TrimSlice uses U-Boot placed in NOR flash. Boots Linux from any media
connected to USB, SATA or SD card inserted in slot. Can also boot from
TFTP. To run OpenWrt one needs to update U-Boot to fairly recent version
(the versions, pre-dts/dts provided by CompuLab won't suffice):
1. Boot TrimSlice into Your current linux distro,
2. Download trimslice-spi.img from u-boot-trimslice subdir,
3. Install mtd-utils,
4. Run following commands:
flash_erase /dev/mtd0 0 256
nandwrite /dev/mtd0 trimslice-spi.img
5. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If by some obstacle You can't follow those instructions, it is possible
to flash U-Boot using serial console.
1. Insert FAT or EXT2/EXT3 formatted SD card with trimslice-spi.img,
2. Interrupt boot process to enter U-Boot command line,
3. Run following commands:
${fs}load mmc 0 0x04080000 trimslice-spi.img
sf probe 0
sf erase 0 0x100000
sf write 0x04080000 0x0 ${filesize}
reset
4. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If something went wrong with one of above steps, there is simple
recovery option:
1. Open the µSD slot security door to access the recovery-boot button,
2. Insert SD card with OpenWrt to the front slot while unpowered,
3. Power on the TrimSlice while pressing the recovery-boot button,
4. With this it should boot straigth to OpenWrt, from there download
trimslice-spi.img and execute following commands:
mtd erase /dev/mtd0
mtd write trimslice-spi.img /dev/mtd0
5. Reboot, now it should boot straigth to OpenWrt, without pressing the
recovery-boot button, with proper U-Boot flashed.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-01 17:25:43 +00:00
|
|
|
DEVICE_DTS := tegra20-trimslice
|
2024-05-15 17:02:08 +00:00
|
|
|
DEVICE_PACKAGES := kmod-leds-gpio kmod-r8169 kmod-rt2800-usb \
|
2024-05-15 17:02:09 +00:00
|
|
|
kmod-rtc-em3027 kmod-usb-hid kmod-usb-storage wpad-basic-mbedtls
|
tegra: add support for CompuLab TrimSlice
It is a small form factor computer with rich amount of expansion ports.
Some hardware specs and supported features in this commit:
CPU: NVIDIA Tegra 2 @ 1GHz
RAM: 1GB DDR2-667
Storage: SDHC card slot
µSDHC card slot
USB to SATA bridge (depends on model)
1MB SPI NOR flash for bootloader (single partition)
LAN: RTL8111DL GbE
WIFI: RT3070 b/g/n with external antenna (depends on model)
RTC: EM3027 (mapped as rtc0; with battery backup)
Tegra 2 built-in (mapped as rtc1)
Sound: Analog/Digital (TLV320AIC23b; S/PDIF not tested)
Connectors: 4x USB 2.0
RS232 (mini serial)
HDMI
DVI-D (depends on model, not supported atm)
Extension connector (24 pin ZIF, 0.5mm pitch):
2X UART
SPI
JTAG (1.8V)
Other: power button with green led (not functional for early revisions
without programmed PMIC)
2x GPIO configurable green led
TrimSlice uses U-Boot placed in NOR flash. Boots Linux from any media
connected to USB, SATA or SD card inserted in slot. Can also boot from
TFTP. To run OpenWrt one needs to update U-Boot to fairly recent version
(the versions, pre-dts/dts provided by CompuLab won't suffice):
1. Boot TrimSlice into Your current linux distro,
2. Download trimslice-spi.img from u-boot-trimslice subdir,
3. Install mtd-utils,
4. Run following commands:
flash_erase /dev/mtd0 0 256
nandwrite /dev/mtd0 trimslice-spi.img
5. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If by some obstacle You can't follow those instructions, it is possible
to flash U-Boot using serial console.
1. Insert FAT or EXT2/EXT3 formatted SD card with trimslice-spi.img,
2. Interrupt boot process to enter U-Boot command line,
3. Run following commands:
${fs}load mmc 0 0x04080000 trimslice-spi.img
sf probe 0
sf erase 0 0x100000
sf write 0x04080000 0x0 ${filesize}
reset
4. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If something went wrong with one of above steps, there is simple
recovery option:
1. Open the µSD slot security door to access the recovery-boot button,
2. Insert SD card with OpenWrt to the front slot while unpowered,
3. Power on the TrimSlice while pressing the recovery-boot button,
4. With this it should boot straigth to OpenWrt, from there download
trimslice-spi.img and execute following commands:
mtd erase /dev/mtd0
mtd write trimslice-spi.img /dev/mtd0
5. Reboot, now it should boot straigth to OpenWrt, without pressing the
recovery-boot button, with proper U-Boot flashed.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-01 17:25:43 +00:00
|
|
|
UBOOT := trimslice-mmc
|
|
|
|
endef
|
2019-05-01 17:43:54 +00:00
|
|
|
TARGET_DEVICES += compulab_trimslice
|
tegra: add support for CompuLab TrimSlice
It is a small form factor computer with rich amount of expansion ports.
Some hardware specs and supported features in this commit:
CPU: NVIDIA Tegra 2 @ 1GHz
RAM: 1GB DDR2-667
Storage: SDHC card slot
µSDHC card slot
USB to SATA bridge (depends on model)
1MB SPI NOR flash for bootloader (single partition)
LAN: RTL8111DL GbE
WIFI: RT3070 b/g/n with external antenna (depends on model)
RTC: EM3027 (mapped as rtc0; with battery backup)
Tegra 2 built-in (mapped as rtc1)
Sound: Analog/Digital (TLV320AIC23b; S/PDIF not tested)
Connectors: 4x USB 2.0
RS232 (mini serial)
HDMI
DVI-D (depends on model, not supported atm)
Extension connector (24 pin ZIF, 0.5mm pitch):
2X UART
SPI
JTAG (1.8V)
Other: power button with green led (not functional for early revisions
without programmed PMIC)
2x GPIO configurable green led
TrimSlice uses U-Boot placed in NOR flash. Boots Linux from any media
connected to USB, SATA or SD card inserted in slot. Can also boot from
TFTP. To run OpenWrt one needs to update U-Boot to fairly recent version
(the versions, pre-dts/dts provided by CompuLab won't suffice):
1. Boot TrimSlice into Your current linux distro,
2. Download trimslice-spi.img from u-boot-trimslice subdir,
3. Install mtd-utils,
4. Run following commands:
flash_erase /dev/mtd0 0 256
nandwrite /dev/mtd0 trimslice-spi.img
5. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If by some obstacle You can't follow those instructions, it is possible
to flash U-Boot using serial console.
1. Insert FAT or EXT2/EXT3 formatted SD card with trimslice-spi.img,
2. Interrupt boot process to enter U-Boot command line,
3. Run following commands:
${fs}load mmc 0 0x04080000 trimslice-spi.img
sf probe 0
sf erase 0 0x100000
sf write 0x04080000 0x0 ${filesize}
reset
4. Poweroff, insert SD card with OpenWrt, boot and enjoy.
If something went wrong with one of above steps, there is simple
recovery option:
1. Open the µSD slot security door to access the recovery-boot button,
2. Insert SD card with OpenWrt to the front slot while unpowered,
3. Power on the TrimSlice while pressing the recovery-boot button,
4. With this it should boot straigth to OpenWrt, from there download
trimslice-spi.img and execute following commands:
mtd erase /dev/mtd0
mtd write trimslice-spi.img /dev/mtd0
5. Reboot, now it should boot straigth to OpenWrt, without pressing the
recovery-boot button, with proper U-Boot flashed.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-01 17:25:43 +00:00
|
|
|
|
2019-04-01 17:25:38 +00:00
|
|
|
$(eval $(call BuildImage))
|