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 sed
-e
's#@KERNEL@#$(KERNEL_NAME)#g' $(BOOT_SCRIPT
) > $@
-boot.scr
18 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 \
19 -n
'$(DEVICE_TITLE) OpenWrt bootscript' \
23 SIGNATURE
="$(IMG_PART_SIGNATURE)" \
24 $(SCRIPT_DIR
)/gen_image_generic.sh \
26 $(CONFIG_TARGET_KERNEL_PARTSIZE
) $@.boot \
27 $(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(IMAGE_ROOTFS
) \
30 $(if
$(UBOOT
),dd if
=$(STAGING_DIR_IMAGE
)/$(UBOOT
).img of
=$@ bs
=512 skip
=1 seek
=1 conv
=notrunc
)
33 DEVICE_VARS
+= BOOT_SCRIPT UBOOT
36 BOOT_SCRIPT
:= generic-bootscript
37 IMAGES
:= sdcard.img.gz
38 IMAGE
/sdcard.img.gz
:= tegra-sdcard | gzip | append-metadata
42 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
45 define Device
/compulab_trimslice
46 DEVICE_VENDOR
:= CompuLab
47 DEVICE_MODEL
:= TrimSlice
48 DEVICE_DTS
:= tegra20-trimslice
49 DEVICE_PACKAGES
:= kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
50 kmod-usb-storage wpad-basic-wolfssl
51 UBOOT
:= trimslice-mmc
53 TARGET_DEVICES
+= compulab_trimslice
55 $(eval
$(call BuildImage
))