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 SIGNATURE
:=$(shell printf
"%.8s" $(SOURCE_DATE_EPOCH
))
12 define Build
/tegra-sdcard
15 $(CP
) $(KDIR
)/$(KERNEL_NAME
) $@.boot
17 $(foreach dtb
,$(DEVICE_DTS
),$(CP
) $(DTS_DIR
)/$(dtb
).dtb
$@.boot
), \
18 $(CP
) $(DTS_DIR
)/*.dtb
$@.boot
)
20 -e
's#@ROOT@#$(SIGNATURE)#g' \
21 -e
's#@KERNEL@#$(KERNEL_NAME)#g' \
22 $(BOOT_SCRIPT
) > $@
-boot.scr
23 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 \
24 -n
'$(DEVICE_TITLE) OpenWrt bootscript' \
28 PADDING
="$(CONFIG_TARGET_IMAGES_PAD)" \
29 SIGNATURE
="$(SIGNATURE)" \
30 $(SCRIPT_DIR
)/gen_image_generic.sh \
32 $(CONFIG_TARGET_KERNEL_PARTSIZE
) $@.boot \
33 $(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(IMAGE_ROOTFS
) \
36 $(if
$(UBOOT
),dd if
=$(STAGING_DIR_IMAGE
)/$(UBOOT
).img of
=$@ bs
=512 skip
=1 seek
=1 conv
=notrunc
)
39 DEVICE_VARS
+= BOOT_SCRIPT UBOOT
41 BOOT_SCRIPT
:= generic-bootscript
42 IMAGES
:= sdcard.img.gz
43 IMAGE
/sdcard.img.gz
:= tegra-sdcard | gzip | append-metadata
47 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
50 define Device
/compulab_trimslice
51 DEVICE_TITLE
:= CompuLab TrimSlice
52 DEVICE_DTS
:= tegra20-trimslice
53 DEVICE_PACKAGES
:= kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
54 kmod-usb-storage wpad-mini
55 UBOOT
:= trimslice-mmc
57 TARGET_DEVICES
+= compulab_trimslice
59 $(eval
$(call BuildImage
))