2 # Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 define Build
/tegra-sdcard
13 $(CP
) $(KDIR
)/$(KERNEL_NAME
) $@.boot
15 $(foreach dtb
,$(DEVICE_DTS
),$(CP
) $(DTS_DIR
)/$(dtb
).dtb
$@.boot
), \
16 $(CP
) $(DTS_DIR
)/*.dtb
$@.boot
)
17 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 \
18 -n
'$(DEVICE_TITLE) OpenWrt bootscript' \
22 SIGNATURE
="$(IMG_PART_SIGNATURE)" \
23 $(SCRIPT_DIR
)/gen_image_generic.sh \
25 $(CONFIG_TARGET_KERNEL_PARTSIZE
) $@.boot \
26 $(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(IMAGE_ROOTFS
) \
29 $(if
$(UBOOT
),dd if
=$(STAGING_DIR_IMAGE
)/$(UBOOT
).img of
=$@ bs
=512 skip
=1 seek
=1 conv
=notrunc
)
32 DEVICE_VARS
+= BOOT_SCRIPT UBOOT
35 BOOT_SCRIPT
:= generic-bootscript
36 IMAGES
:= sdcard.img.gz
37 IMAGE
/sdcard.img.gz
:= tegra-sdcard | gzip | append-metadata
43 define Device
/compulab_trimslice
44 DEVICE_VENDOR
:= CompuLab
45 DEVICE_MODEL
:= TrimSlice
46 DEVICE_DTS
:= tegra20-trimslice
47 DEVICE_PACKAGES
:= kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
48 kmod-usb-storage wpad-basic-wolfssl
49 UBOOT
:= trimslice-mmc
51 TARGET_DEVICES
+= compulab_trimslice
53 $(eval
$(call BuildImage
))