Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
10
target/linux/imx/image/Makefile
Normal file
10
target/linux/imx/image/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
include $(SUBTARGET).mk
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
41
target/linux/imx/image/bootscript-gateworks_venice
Normal file
41
target/linux/imx/image/bootscript-gateworks_venice
Normal file
@@ -0,0 +1,41 @@
|
||||
# distro-config bootscript
|
||||
# - use only well-known variable names provided by U-Boot Distro boot
|
||||
# - devtype - device type script run from (mmc|usb|scsi)
|
||||
# - devnum - device number script run from (0 based int)
|
||||
# - distro_bootpart - partition script run from (0 based int)
|
||||
# - prefix - directory boot script was found in
|
||||
# - kernel_addr_r - address to load kernel image to
|
||||
# - fdt_addr_r - address to load dtb to
|
||||
# - ftdcontroladdr - address dtb is at
|
||||
# - fdt_file{1,2,3,4,5} name of fdt to load
|
||||
# - fdt_overlays - list of fdt overlay files to load and apply
|
||||
echo "Gateworks Venice OpenWrt Boot script v1.0"
|
||||
|
||||
# determine root device using PARTUUID:
|
||||
# - this avoids any difference beteween uboot's device names/numbers
|
||||
# not matching Linux as device enumeration is not a set API.
|
||||
# - PARTUUID is disk UUID concatenated with partition number
|
||||
# - for MBR disk UUID is unique disk id at offset 440
|
||||
# - for GPT disk UUID is GPT UUID
|
||||
# - for OpenWrt the squasfs rootfs is not readable by U-Boot so we have
|
||||
# a 'boot' partition containing bootscript kernel dtbs followed by the rootfs
|
||||
# partition, therefore we add 1 to the current partition
|
||||
setexpr rootpart ${distro_bootpart} + 1 # root on 'next' partition
|
||||
part uuid ${devtype} ${devnum}:${rootpart} uuid
|
||||
setenv bootargs ${bootargs} console=${console} root=PARTUUID=${uuid} rootfstype=squashfs,ext4,f2fs rootwait
|
||||
|
||||
# load dtb (we try fdt_file and then fdt_file{1,2,3,4,5})
|
||||
echo "loading DTB..."
|
||||
setenv fdt_addr
|
||||
setenv fdt_list $fdt_file $fdt_file1 $fdt_file2 $fdt_file3 $fdt_file4 $fdt_file5
|
||||
setenv load_fdt 'echo Loading $fdt...; load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${fdt} && setenv fdt_addr ${fdt_addr_r}'
|
||||
setenv apply_overlays 'fdt addr $fdt_addr_r && fdt resize && for fdt in "$fdt_overlays"; do load ${devtype} ${devnum}:${distro_bootpart} $loadaddr $prefix/$fdt && fdt apply $loadaddr && echo applied $prefix/$fdt; done'
|
||||
for fdt in ${fdt_list}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${fdt}; then run load_fdt; fi; done
|
||||
if test -z "$fdt_addr"; then echo "Warning: Using bootloader DTB"; setenv fdt_addr $fdtcontroladdr; fi
|
||||
if test -n "$fdt_overlays"; then echo "Applying overlays"; run apply_overlays; fi
|
||||
if test -n "$fixfdt"; then echo "Adjusting FDT"; run fixfdt; fi
|
||||
|
||||
# load and boot kernel
|
||||
echo "loading kernel..."
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image &&
|
||||
booti ${kernel_addr_r} - ${fdt_addr}
|
||||
31
target/linux/imx/image/bootscript-solidrun_cubox-i
Normal file
31
target/linux/imx/image/bootscript-solidrun_cubox-i
Normal file
@@ -0,0 +1,31 @@
|
||||
echo "CuBox OpenWrt Boot script"
|
||||
|
||||
# Set console variable for both UART and HDMI
|
||||
setenv console console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
|
||||
|
||||
# Find correct dtb
|
||||
if test ${board_rev} = MX6DL; then
|
||||
setenv fdt_soc_type imx6dl;
|
||||
elif test ${board_rev} = MX6Q; then
|
||||
setenv fdt_soc_type imx6q;
|
||||
fi
|
||||
if test ${board_name} = CUBOXI; then
|
||||
setenv fdt_name ${fdt_soc_type}-cubox-i.dtb;
|
||||
elif test ${board_name} = HUMMINGBOARD; then
|
||||
setenv fdt_name ${fdt_soc_type}-hummingboard.dtb;
|
||||
fi
|
||||
|
||||
# Set correct devtype and partition
|
||||
if test ${devtype} != mmc; then setenv devtype mmc; fi
|
||||
if mmc dev 0; then
|
||||
setenv mmcdev 0
|
||||
elif mmc dev 1; then
|
||||
setenv mmcdev 1
|
||||
fi
|
||||
|
||||
# Boot from the SD card is supported at the moment
|
||||
setenv bootargs "${console} root=/dev/mmcblk1p2 rw rootwait"
|
||||
mmc dev ${mmcdev}
|
||||
load ${devtype} ${mmcdev}:${devplist} ${kernel_addr_r} /uImage
|
||||
load ${devtype} ${mmcdev}:${devplist} ${fdt_addr_r} /${fdt_name}
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
18
target/linux/imx/image/bootscript-technexion_imx7d-pico-pi
Normal file
18
target/linux/imx/image/bootscript-technexion_imx7d-pico-pi
Normal file
@@ -0,0 +1,18 @@
|
||||
echo "PICO-PI-IMX7 OpenWrt boot script"
|
||||
|
||||
# Initial setup, avoid overwriting environment every boot
|
||||
if test ${bootm_boot_mode} != nonsec; then setenv bootm_boot_mode nonsec; setenv bootcmd run bootcmd_mmc0; saveenv; fi
|
||||
|
||||
# Set console variable for both UART and HDMI
|
||||
setenv console "console=ttymxc4,115200 console=tty0 video=DPI-1:800x480-32"
|
||||
setenv fdt_name imx7d-pico-pi.dtb
|
||||
setenv mmcdev 0
|
||||
setenv mmcrootpart 2
|
||||
part uuid mmc ${mmcdev}:${mmcrootpart} uuid
|
||||
|
||||
# Boot from eMMC is the only supported option
|
||||
setenv bootargs "${console} root=PARTUUID=${uuid} rw rootwait"
|
||||
mmc dev ${mmcdev}
|
||||
load ${devtype} ${mmcdev}:${devplist} ${kernel_addr_r} /uImage
|
||||
load ${devtype} ${mmcdev}:${devplist} ${fdt_addr_r} /${fdt_name}
|
||||
bootm ${kernel_addr_r} - ${fdt_addr_r}
|
||||
23
target/linux/imx/image/bootscript-toradex_apalis
Normal file
23
target/linux/imx/image/bootscript-toradex_apalis
Normal file
@@ -0,0 +1,23 @@
|
||||
echo "Toradex Apalis OpenWrt Boot script v1.1"
|
||||
|
||||
setenv mmcdev 0
|
||||
setenv mmcrootpart 2
|
||||
part uuid mmc ${mmcdev}:${mmcrootpart} uuid
|
||||
|
||||
setenv nextcon 0
|
||||
setenv boot_file uImage
|
||||
setenv fdt_file imx6q-apalis-ixora.dtb
|
||||
setenv root root=PARTUUID=${uuid} rootfstype=squashfs rootwait
|
||||
setenv bootargs earlyprintk console=${console},${baudrate}n8 ${root}
|
||||
setenv fsload ext4load mmc ${mmcdev}:${mmcbootpart}
|
||||
|
||||
if ${fsload} ${kernel_addr_r} ${boot_file}; then
|
||||
if ${fsload} ${fdt_addr_r} ${fdt_file}; then
|
||||
test -n "$fdt_fixup" && run fdt_fixup
|
||||
bootm ${kernel_addr_r} - ${fdt_addr_r}
|
||||
else
|
||||
echo "Error loading device-tree"
|
||||
fi
|
||||
else
|
||||
echo "Error loading kernel image"
|
||||
fi
|
||||
85
target/linux/imx/image/bootscript-ventana
Normal file
85
target/linux/imx/image/bootscript-ventana
Normal file
@@ -0,0 +1,85 @@
|
||||
echo "Gateworks Ventana OpenWrt Boot script v1.02"
|
||||
|
||||
# set some defaults
|
||||
# set some defaults
|
||||
test -n "$fs" || fs=ext2
|
||||
test -n "$disk" || disk=0
|
||||
setenv nextcon 0
|
||||
setenv bootargs console=${console},${baudrate}
|
||||
setenv loadaddr 10800000
|
||||
setenv fdt_addr 18000000
|
||||
|
||||
# detect dtype by looking for kernel on media the bootloader
|
||||
# has mounted (in order of preference: usb/mmc/sata)
|
||||
#
|
||||
# This assumes the bootloader has already started the respective subsystem
|
||||
# or mounted the filesystem if appropriate to get to this bootscript
|
||||
#
|
||||
# To Speed up boot set dtype manually
|
||||
if test -n "$dtype" ; then
|
||||
echo "Using dtype from env: $dtype"
|
||||
else
|
||||
echo "Detecting boot device (dtype)..."
|
||||
if ${fs}load usb ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
|
||||
dtype=usb
|
||||
elif ${fs}load mmc ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
|
||||
dtype=mmc
|
||||
elif ${fs}load sata ${disk}:1 ${loadaddr} ${bootdir}/uImage ; then
|
||||
dtype=sata
|
||||
elif ubifsload ${loadaddr} ${bootdir}/uImage ; then
|
||||
dtype=nand
|
||||
fi
|
||||
echo "detected dtype:$dtype"
|
||||
fi
|
||||
|
||||
echo "Booting from ${dtype}..."
|
||||
if itest.s "x${dtype}" == "xnand" ; then
|
||||
# fix partition name
|
||||
# OpenWrt kernel bug prevents partition name of 'rootfs' from booting
|
||||
# instead name the partition ubi which is what is looked for by
|
||||
# procd sysupgrade
|
||||
mtdparts del rootfs && mtdparts add nand0 - ubi
|
||||
echo "mtdparts:${mtdparts}"
|
||||
setenv fsload ubifsload
|
||||
setenv root "ubi0:ubi ubi.mtd=2 rootfstype=squashfs,ubifs"
|
||||
else
|
||||
setenv fsload "${fs}load ${dtype} ${disk}:1"
|
||||
part uuid ${dtype} ${disk}:2 uuid
|
||||
if test -z "${uuid}"; then
|
||||
# fallback to bootdev
|
||||
if test -n "$bootdev" ; then
|
||||
echo "Using bootdev from env: $bootdev"
|
||||
else
|
||||
if itest.s "x${dtype}" == "xmmc" ; then
|
||||
bootdev=mmcblk0p1
|
||||
else
|
||||
bootdev=sda1
|
||||
fi
|
||||
fi
|
||||
setenv root "root=/dev/${bootdev}"
|
||||
else
|
||||
setenv root "root=PARTUUID=${uuid}"
|
||||
fi
|
||||
setenv root "$root rootfstype=squashfs rootwait"
|
||||
fi
|
||||
|
||||
setenv bootargs "${bootargs}" "${root}" "${video}" "${extra}"
|
||||
if ${fsload} ${loadaddr} ${bootdir}/uImage; then
|
||||
if ${fsload} ${fdt_addr} ${bootdir}/${fdt_file}; then
|
||||
echo Loaded DTB from ${bootdir}/${fdt_file}
|
||||
test -n "$fixfdt" && run fixfdt
|
||||
bootm ${loadaddr} - ${fdt_addr}
|
||||
elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file1}; then
|
||||
echo Loaded DTB from ${bootdir}/${fdt_file1}
|
||||
test -n "$fixfdt" && run fixfdt
|
||||
bootm ${loadaddr} - ${fdt_addr}
|
||||
elif ${fsload} ${fdt_addr} ${bootdir}/${fdt_file2}; then
|
||||
echo Loaded DTB from ${bootdir}/${fdt_file2}
|
||||
test -n "$fixfdt" && run fixfdt
|
||||
bootm ${loadaddr} - ${fdt_addr}
|
||||
else
|
||||
echo "Error loading device-tree"
|
||||
fi
|
||||
else
|
||||
echo "Error loading kernel image"
|
||||
fi
|
||||
61
target/linux/imx/image/common.mk
Normal file
61
target/linux/imx/image/common.mk
Normal file
@@ -0,0 +1,61 @@
|
||||
define Build/imx-combined-image-prepare
|
||||
rm -rf $@.boot
|
||||
mkdir -p $@.boot
|
||||
endef
|
||||
|
||||
define Build/imx-combined-image-clean
|
||||
rm -rf $@.boot $@.fs
|
||||
endef
|
||||
|
||||
define Build/imx-combined-image
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/uImage
|
||||
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$@.boot/;
|
||||
)
|
||||
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
||||
-d bootscript-$(DEVICE_NAME) \
|
||||
$@.boot/boot.scr
|
||||
|
||||
cp $@ $@.fs
|
||||
|
||||
$(SCRIPT_DIR)/gen_image_generic.sh $@ \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) \
|
||||
$@.boot \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
||||
$@.fs \
|
||||
1024
|
||||
endef
|
||||
|
||||
define Build/imx-sdcard
|
||||
$(Build/imx-combined-image-prepare)
|
||||
|
||||
if [ -f $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img ]; then \
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img \
|
||||
$@.boot/u-boot.img; \
|
||||
fi
|
||||
|
||||
if [ -f $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img ]; then \
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img \
|
||||
$@.boot/u-boot-dtb.img; \
|
||||
fi
|
||||
|
||||
$(Build/imx-combined-image)
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
|
||||
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
|
||||
define Build/imx-sdcard-raw-uboot
|
||||
$(Build/imx-combined-image-prepare)
|
||||
|
||||
$(Build/imx-combined-image)
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img of=$@ bs=1024 seek=69 conv=notrunc
|
||||
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
60
target/linux/imx/image/cortexa53.mk
Normal file
60
target/linux/imx/image/cortexa53.mk
Normal file
@@ -0,0 +1,60 @@
|
||||
define Build/boot-scr
|
||||
rm -f $@-boot.scr
|
||||
mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 \
|
||||
-d bootscript-$(BOOT_SCRIPT) $@-boot.scr
|
||||
endef
|
||||
|
||||
define Build/boot-img-ext4
|
||||
rm -fR $@.boot
|
||||
mkdir -p $@.boot
|
||||
$(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;)
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME)
|
||||
-$(CP) $@-boot.scr $@.boot/boot.scr
|
||||
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M \
|
||||
$(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \
|
||||
$@.bootimg $@.boot
|
||||
endef
|
||||
|
||||
define Build/sdcard-img-ext4
|
||||
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
||||
PARTOFFSET="$(PARTITION_OFFSET)" PADDING=1 \
|
||||
$(if $(filter $(1),efi),GUID="$(IMG_PART_DISKGUID)") $(SCRIPT_DIR)/gen_image_generic.sh \
|
||||
$@ \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
|
||||
256
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
FILESYSTEMS := squashfs ubifs ext4
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/freescale
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL_NAME := Image
|
||||
KERNEL := kernel-bin
|
||||
endef
|
||||
|
||||
define Device/imx8m
|
||||
DEVICE_VENDOR := NXP
|
||||
DEVICE_MODEL := i.MX8M
|
||||
DEVICE_DTS := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*.dts)))
|
||||
endef
|
||||
TARGET_DEVICES += imx8m
|
||||
|
||||
define Device/gateworks_venice
|
||||
$(call Device/Default)
|
||||
FILESYSTEMS := squashfs ext4
|
||||
DEVICE_VENDOR := Gateworks
|
||||
DEVICE_MODEL := i.MX8M Venice
|
||||
BOOT_SCRIPT := gateworks_venice
|
||||
PARTITION_OFFSET := 16M
|
||||
DEVICE_DTS := $(basename $(notdir $(wildcard $(DTS_DIR)/freescale/imx8m*-venice*.dts)))
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-hwmon-gsc kmod-rtc-ds1672 kmod-eeprom-at24 \
|
||||
kmod-gpio-button-hotplug kmod-leds-gpio kmod-pps-gpio \
|
||||
kmod-lan743x kmod-sky2 kmod-iio-st_accel-i2c \
|
||||
kmod-can kmod-can-flexcan kmod-can-mcp251x
|
||||
IMAGES := img.gz
|
||||
IMAGE/img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += gateworks_venice
|
||||
33
target/linux/imx/image/cortexa7.mk
Normal file
33
target/linux/imx/image/cortexa7.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
DEVICE_VARS += UBOOT
|
||||
|
||||
include common.mk
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
FILESYSTEMS := squashfs ext4
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
ifdef CONFIG_LINUX_6_6
|
||||
DTS_DIR := $(DTS_DIR)/nxp/imx
|
||||
endif
|
||||
IMAGES :=
|
||||
endef
|
||||
|
||||
define Device/technexion_imx7d-pico-pi
|
||||
DEVICE_VENDOR := TechNexion
|
||||
DEVICE_MODEL := PICO-PI-IMX7D
|
||||
UBOOT := pico-pi-imx7d
|
||||
DEVICE_DTS := imx7d-pico-pi
|
||||
DEVICE_PACKAGES := kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
|
||||
kmod-can kmod-can-flexcan kmod-can-raw kmod-leds-gpio \
|
||||
kmod-input-touchscreen-edt-ft5x06 kmod-usb-hid kmod-btsdio \
|
||||
kmod-brcmfmac brcmfmac-firmware-4339-sdio cypress-nvram-4339-sdio
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := combined.bin sysupgrade.bin
|
||||
IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx-sdcard-raw-uboot
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += technexion_imx7d-pico-pi
|
||||
197
target/linux/imx/image/cortexa9.mk
Normal file
197
target/linux/imx/image/cortexa9.mk
Normal file
@@ -0,0 +1,197 @@
|
||||
DEVICE_VARS += MKUBIFS_OPTS UBOOT
|
||||
|
||||
include common.mk
|
||||
|
||||
define Build/boot-overlay
|
||||
rm -rf $@.boot
|
||||
mkdir -p $@.boot
|
||||
|
||||
$(CP) $@ $@.boot/$(IMG_PREFIX)-uImage
|
||||
ln -sf $(IMG_PREFIX)-uImage $@.boot/uImage
|
||||
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$@.boot/$(IMG_PREFIX)-$(dts).dtb; \
|
||||
ln -sf \
|
||||
$(IMG_PREFIX)-$(dts).dtb \
|
||||
$@.boot/$(dts).dtb; \
|
||||
)
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
||||
-d ./bootscript-$(DEVICE_NAME) \
|
||||
$@.boot/6x_bootscript-$(DEVICE_NAME)
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
|
||||
--space-fixup --compr=zlib --squash-uids \
|
||||
$(MKUBIFS_OPTS) -c 16248 \
|
||||
-o $@.boot.ubifs -d $@.boot
|
||||
|
||||
$(TAR) -C $@.boot -cf $@.boot.tar .
|
||||
endef
|
||||
|
||||
define Build/bootfs.tar.gz
|
||||
rm -rf $@.boot
|
||||
mkdir -p $@.boot
|
||||
|
||||
$(TAR) -C $@.boot -xf $(IMAGE_KERNEL).boot.tar
|
||||
$(TAR) -C $@.boot \
|
||||
--numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
|
||||
-czvf $@ .
|
||||
endef
|
||||
|
||||
define Build/recovery-scr
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n '$(DEVICE_ID) OpenWrt recovery bootscript' \
|
||||
-d ./recovery-$(DEVICE_NAME) $@
|
||||
endef
|
||||
|
||||
define Build/apalis-emmc
|
||||
$(Build/imx-combined-image-prepare)
|
||||
$(Build/imx-combined-image)
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
|
||||
define Build/ventana-img
|
||||
rm -rf $@.boot
|
||||
mkdir -p $@.boot/boot
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/boot/uImage
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$@.boot/boot/;
|
||||
)
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
||||
-d bootscript-$(DEVICE_NAME) \
|
||||
$@.boot/boot/6x_bootscript-ventana
|
||||
cp $@ $@.fs
|
||||
|
||||
$(SCRIPT_DIR)/gen_image_generic.sh $@ \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) \
|
||||
$@.boot \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
||||
$@.fs \
|
||||
1024
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
FILESYSTEMS := squashfs ext4
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_LOADADDR := 0x10008000
|
||||
ifdef CONFIG_LINUX_6_6
|
||||
DTS_DIR := $(DTS_DIR)/nxp/imx
|
||||
endif
|
||||
IMAGES :=
|
||||
endef
|
||||
|
||||
define Device/gateworks_ventana
|
||||
DEVICE_VENDOR := Gateworks
|
||||
DEVICE_MODEL := Ventana family
|
||||
DEVICE_VARIANT := normal NAND flash
|
||||
DEVICE_NAME := ventana
|
||||
DEVICE_DTS:= \
|
||||
imx6dl-gw51xx \
|
||||
imx6dl-gw52xx \
|
||||
imx6dl-gw53xx \
|
||||
imx6dl-gw54xx \
|
||||
imx6dl-gw551x \
|
||||
imx6dl-gw552x \
|
||||
imx6dl-gw553x \
|
||||
imx6dl-gw5904 \
|
||||
imx6dl-gw5907 \
|
||||
imx6dl-gw5910 \
|
||||
imx6dl-gw5912 \
|
||||
imx6dl-gw5913 \
|
||||
imx6q-gw51xx \
|
||||
imx6q-gw52xx \
|
||||
imx6q-gw53xx \
|
||||
imx6q-gw54xx \
|
||||
imx6q-gw5400-a \
|
||||
imx6q-gw551x \
|
||||
imx6q-gw552x \
|
||||
imx6q-gw553x \
|
||||
imx6q-gw5904 \
|
||||
imx6q-gw5907 \
|
||||
imx6q-gw5910 \
|
||||
imx6q-gw5912 \
|
||||
imx6q-gw5913
|
||||
DEVICE_PACKAGES := kmod-sky2 kmod-sound-core kmod-sound-soc-imx \
|
||||
kmod-sound-soc-imx-sgtl5000 kmod-can kmod-can-flexcan kmod-can-raw \
|
||||
kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio kobs-ng \
|
||||
kmod-gpio-button-hotplug
|
||||
KERNEL += | boot-overlay
|
||||
IMAGES := img.gz nand.ubi bootfs.tar.gz dtb
|
||||
IMAGE/nand.ubi := append-ubi
|
||||
IMAGE/bootfs.tar.gz := bootfs.tar.gz
|
||||
IMAGE/dtb := install-dtb
|
||||
IMAGE/img.gz := append-rootfs | pad-extra 128k | ventana-img | gzip
|
||||
UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB
|
||||
endef
|
||||
TARGET_DEVICES += gateworks_ventana
|
||||
|
||||
define Device/gateworks_ventana-large
|
||||
$(Device/gateworks_ventana)
|
||||
DEVICE_VARIANT := large NAND flash
|
||||
IMAGES := nand.ubi
|
||||
PAGESIZE := 4096
|
||||
BLOCKSIZE := 256k
|
||||
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB
|
||||
endef
|
||||
TARGET_DEVICES += gateworks_ventana-large
|
||||
|
||||
define Device/solidrun_cubox-i
|
||||
DEVICE_VENDOR := SolidRun
|
||||
DEVICE_MODEL := CuBox-i
|
||||
DEVICE_DTS := \
|
||||
imx6q-cubox-i \
|
||||
imx6dl-cubox-i \
|
||||
imx6q-hummingboard \
|
||||
imx6dl-hummingboard
|
||||
DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid
|
||||
UBOOT := mx6cuboxi
|
||||
KERNEL := kernel-bin
|
||||
KERNEL_SUFFIX := -zImage
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := combined.bin dtb
|
||||
IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx-sdcard
|
||||
IMAGE/dtb := install-dtb
|
||||
endef
|
||||
TARGET_DEVICES += solidrun_cubox-i
|
||||
|
||||
define Device/toradex_apalis
|
||||
DEVICE_VENDOR := Toradex
|
||||
DEVICE_MODEL := Apalis family
|
||||
SUPPORTED_DEVICES := apalis,ixora apalis,eval
|
||||
DEVICE_DTS := \
|
||||
imx6q-apalis-eval \
|
||||
imx6q-apalis-ixora \
|
||||
imx6q-apalis-ixora-v1.1
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-can kmod-can-flexcan kmod-can-raw \
|
||||
kmod-leds-gpio kmod-gpio-button-hotplug \
|
||||
kmod-pps-gpio kmod-rtc-ds1307
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := combined.bin sysupgrade.bin
|
||||
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2)
|
||||
IMAGE/combined.bin := append-rootfs | pad-extra 128k | apalis-emmc
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
ARTIFACTS := recovery.scr
|
||||
ARTIFACT/recovery.scr := recovery-scr
|
||||
endef
|
||||
TARGET_DEVICES += toradex_apalis
|
||||
|
||||
define Device/wandboard_dual
|
||||
DEVICE_VENDOR := Wandboard
|
||||
DEVICE_MODEL := Dual
|
||||
DEVICE_DTS := imx6dl-wandboard
|
||||
endef
|
||||
TARGET_DEVICES += wandboard_dual
|
||||
15
target/linux/imx/image/recovery-toradex_apalis
Normal file
15
target/linux/imx/image/recovery-toradex_apalis
Normal file
@@ -0,0 +1,15 @@
|
||||
# flash u-boot-with-spl.imx
|
||||
# using fixed size of 1M for U-Boot + SPL
|
||||
mmc dev 0 1
|
||||
mmc write 0x12100000 0x2 0x800
|
||||
|
||||
# flash openwrt-imx6-apalis-squashfs.combined.bin
|
||||
setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
|
||||
run set_blkcnt
|
||||
mmc dev 0 0
|
||||
mmc write 0x12500000 0 ${blkcnt}
|
||||
|
||||
env default -f -a
|
||||
saveenv
|
||||
|
||||
reset
|
||||
Reference in New Issue
Block a user