2 # Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
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
)
18 -e
's#@ROOT@#$(IMG_PART_SIGNATURE)#g' \
19 -e
's#@KERNEL@#$(KERNEL_NAME)#g' \
20 $(BOOT_SCRIPT
) > $@
-boot.scr
21 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 \
22 -n
'$(DEVICE_TITLE) OpenWrt bootscript' \
26 SIGNATURE
="$(IMG_PART_SIGNATURE)" \
27 $(SCRIPT_DIR
)/gen_image_generic.sh \
29 $(CONFIG_TARGET_KERNEL_PARTSIZE
) $@.boot \
30 $(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(IMAGE_ROOTFS
) \
33 $(if
$(UBOOT
),dd if
=$(STAGING_DIR_IMAGE
)/$(UBOOT
).img of
=$@ bs
=512 skip
=1 seek
=1 conv
=notrunc
)
36 DEVICE_VARS
+= BOOT_SCRIPT UBOOT
39 BOOT_SCRIPT
:= generic-bootscript
40 IMAGES
:= sdcard.img.gz
41 IMAGE
/sdcard.img.gz
:= tegra-sdcard | gzip | append-metadata
45 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
48 define Device
/compulab_trimslice
49 DEVICE_VENDOR
:= CompuLab
50 DEVICE_MODEL
:= TrimSlice
51 DEVICE_DTS
:= tegra20-trimslice
52 DEVICE_PACKAGES
:= kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
53 kmod-usb-storage wpad-basic-wolfssl
54 UBOOT
:= trimslice-mmc
56 TARGET_DEVICES
+= compulab_trimslice
58 $(eval
$(call BuildImage
))