From c73402f49cc0dd0e76cdea25db14ffebf3452104 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sun, 16 Dec 2018 10:37:46 +0100 Subject: image-fstype: rework files installation This adds a new recipe tdx-updater which provides the files needed by tdx-image-fstype.inc rather than copying them in a non OE way in tdx-image-fstype.inc. This required to restructure the layout in files. An additional update directory is inserted. Also in each of the overrides directories a symlink to library is created. This now allows to build legacy update images with a custom machine configuration if one adds the relevant machine override, e.g. for a machine targeting a colibri-imx6 module: MACHINEOVERRIDES .= ":colibri-imx6" Signed-off-by: Max Krummenacher --- .../apalis-imx6/apalis-imx6_bin/flash_blk.scr | 1 - .../apalis-imx6/apalis-imx6_bin/flash_eth.scr | 1 - .../files/apalis-imx6/apalis-imx6_bin/fwd_blk.scr | 1 - .../files/apalis-imx6/apalis-imx6_bin/fwd_eth.scr | 1 - .../files/apalis-imx6/apalis-imx6_bin/fwd_mmc.scr | 1 - .../apalis-imx6_bin/mk-u-boot-scripts.sh | 1 - .../files/apalis-imx6/imx_flash/genext4fs.sh | 1 - recipes-images/images/files/apalis-imx6/library | 1 + recipes-images/images/files/apalis-imx6/update.sh | 1 - .../update/apalis-imx6_bin/flash_blk.scr | 1 + .../update/apalis-imx6_bin/flash_eth.scr | 1 + .../apalis-imx6/update/apalis-imx6_bin/fwd_blk.scr | 1 + .../apalis-imx6/update/apalis-imx6_bin/fwd_eth.scr | 1 + .../apalis-imx6/update/apalis-imx6_bin/fwd_mmc.scr | 1 + .../update/apalis-imx6_bin/mk-u-boot-scripts.sh | 1 + .../apalis-imx6/update/imx_flash/genext4fs.sh | 1 + .../images/files/apalis-imx6/update/update.sh | 1 + .../apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct | Bin 6128 -> 0 bytes .../apalis-t30/apalis-t30_bin/apalis_t30.img.cfg | 22 -- .../apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct | Bin 6128 -> 0 bytes .../files/apalis-t30/apalis-t30_bin/flash_blk.scr | 46 ---- .../files/apalis-t30/apalis-t30_bin/flash_eth.scr | 43 ---- .../files/apalis-t30/apalis-t30_bin/fwd_blk.scr | 1 - .../files/apalis-t30/apalis-t30_bin/fwd_eth.scr | 1 - .../files/apalis-t30/apalis-t30_bin/fwd_mmc.scr | 1 - .../apalis-t30/apalis-t30_bin/mk-u-boot-scripts.sh | 1 - recipes-images/images/files/apalis-t30/library | 1 + .../apalis-t30/tegra-uboot-flasher/genext3fs.sh | 1 - recipes-images/images/files/apalis-t30/update.sh | 1 - .../apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct | Bin 0 -> 6128 bytes .../update/apalis-t30_bin/apalis_t30.img.cfg | 22 ++ .../apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct | Bin 0 -> 6128 bytes .../apalis-t30/update/apalis-t30_bin/flash_blk.scr | 46 ++++ .../apalis-t30/update/apalis-t30_bin/flash_eth.scr | 43 ++++ .../apalis-t30/update/apalis-t30_bin/fwd_blk.scr | 1 + .../apalis-t30/update/apalis-t30_bin/fwd_eth.scr | 1 + .../apalis-t30/update/apalis-t30_bin/fwd_mmc.scr | 1 + .../update/apalis-t30_bin/mk-u-boot-scripts.sh | 1 + .../update/tegra-uboot-flasher/genext3fs.sh | 1 + .../images/files/apalis-t30/update/update.sh | 1 + .../PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct | Bin 8192 -> 0 bytes .../apalis-tk1-mainline_bin/apalis-tk1.img.cfg | 22 -- .../apalis-tk1-mainline_bin/flash_blk.scr | 29 --- .../apalis-tk1-mainline_bin/flash_eth.scr | 27 --- .../apalis-tk1-mainline_bin/fwd_blk.scr | 11 - .../apalis-tk1-mainline_bin/fwd_eth.scr | 6 - .../apalis-tk1-mainline_bin/fwd_mmc.scr | 3 - .../apalis-tk1-mainline_bin/mk-u-boot-scripts.sh | 5 - .../images/files/apalis-tk1-mainline/library | 1 + .../tegra-uboot-flasher/genext4fs.sh | 1 - .../images/files/apalis-tk1-mainline/update.sh | 1 - .../PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct | Bin 0 -> 8192 bytes .../apalis-tk1-mainline_bin/apalis-tk1.img.cfg | 22 ++ .../update/apalis-tk1-mainline_bin/flash_blk.scr | 29 +++ .../update/apalis-tk1-mainline_bin/flash_eth.scr | 27 +++ .../update/apalis-tk1-mainline_bin/fwd_blk.scr | 11 + .../update/apalis-tk1-mainline_bin/fwd_eth.scr | 6 + .../update/apalis-tk1-mainline_bin/fwd_mmc.scr | 3 + .../apalis-tk1-mainline_bin/mk-u-boot-scripts.sh | 5 + .../update/tegra-uboot-flasher/genext4fs.sh | 1 + .../files/apalis-tk1-mainline/update/update.sh | 1 + .../PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct | Bin 8192 -> 0 bytes .../apalis-tk1/apalis-tk1_bin/apalis-tk1.img.cfg | 22 -- .../files/apalis-tk1/apalis-tk1_bin/flash_blk.scr | 29 --- .../files/apalis-tk1/apalis-tk1_bin/flash_eth.scr | 27 --- .../files/apalis-tk1/apalis-tk1_bin/fwd_blk.scr | 1 - .../files/apalis-tk1/apalis-tk1_bin/fwd_eth.scr | 1 - .../files/apalis-tk1/apalis-tk1_bin/fwd_mmc.scr | 1 - .../apalis-tk1/apalis-tk1_bin/mk-u-boot-scripts.sh | 1 - recipes-images/images/files/apalis-tk1/library | 1 + .../apalis-tk1/tegra-uboot-flasher/genext4fs.sh | 1 - recipes-images/images/files/apalis-tk1/update.sh | 1 - .../PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct | Bin 0 -> 8192 bytes .../update/apalis-tk1_bin/apalis-tk1.img.cfg | 22 ++ .../apalis-tk1/update/apalis-tk1_bin/flash_blk.scr | 29 +++ .../apalis-tk1/update/apalis-tk1_bin/flash_eth.scr | 27 +++ .../apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr | 1 + .../apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr | 1 + .../apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr | 1 + .../update/apalis-tk1_bin/mk-u-boot-scripts.sh | 1 + .../update/tegra-uboot-flasher/genext4fs.sh | 1 + .../images/files/apalis-tk1/update/update.sh | 1 + .../colibri-imx6-mainline_bin/flash_blk.scr | 1 - .../colibri-imx6-mainline_bin/flash_eth.scr | 1 - .../colibri-imx6-mainline_bin/fwd_blk.scr | 1 - .../colibri-imx6-mainline_bin/fwd_eth.scr | 1 - .../colibri-imx6-mainline_bin/fwd_mmc.scr | 1 - .../colibri-imx6-mainline_bin/mk-u-boot-scripts.sh | 1 - .../colibri-imx6-mainline/imx_flash/genext4fs.sh | 1 - .../images/files/colibri-imx6-mainline/update.sh | 1 - .../colibri-imx6/colibri-imx6_bin/flash_blk.scr | 1 - .../colibri-imx6/colibri-imx6_bin/flash_eth.scr | 1 - .../colibri-imx6/colibri-imx6_bin/fwd_blk.scr | 1 - .../colibri-imx6/colibri-imx6_bin/fwd_eth.scr | 1 - .../colibri-imx6/colibri-imx6_bin/fwd_mmc.scr | 1 - .../colibri-imx6_bin/mk-u-boot-scripts.sh | 1 - .../files/colibri-imx6/imx_flash/genext4fs.sh | 1 - recipes-images/images/files/colibri-imx6/library | 1 + recipes-images/images/files/colibri-imx6/update.sh | 1 - .../update/colibri-imx6_bin/flash_blk.scr | 1 + .../update/colibri-imx6_bin/flash_eth.scr | 1 + .../update/colibri-imx6_bin/fwd_blk.scr | 1 + .../update/colibri-imx6_bin/fwd_eth.scr | 1 + .../update/colibri-imx6_bin/fwd_mmc.scr | 1 + .../update/colibri-imx6_bin/mk-u-boot-scripts.sh | 1 + .../colibri-imx6/update/imx_flash/genext4fs.sh | 1 + .../images/files/colibri-imx6/update/update.sh | 1 + .../colibri-imx6ull_bin/flash_blk.scr | 15 -- .../colibri-imx6ull_bin/flash_eth.scr | 15 -- .../colibri-imx6ull_bin/fwd_blk.scr | 1 - .../colibri-imx6ull_bin/fwd_eth.scr | 1 - .../colibri-imx6ull_bin/mk-u-boot-scripts.sh | 1 - .../images/files/colibri-imx6ull/library | 1 + .../images/files/colibri-imx6ull/update.sh | 222 ------------------- .../update/colibri-imx6ull_bin/flash_blk.scr | 15 ++ .../update/colibri-imx6ull_bin/flash_eth.scr | 15 ++ .../update/colibri-imx6ull_bin/fwd_blk.scr | 1 + .../update/colibri-imx6ull_bin/fwd_eth.scr | 1 + .../colibri-imx6ull_bin/mk-u-boot-scripts.sh | 1 + .../images/files/colibri-imx6ull/update/update.sh | 222 +++++++++++++++++++ .../colibri-imx7/colibri-imx7_bin/flash_blk.scr | 29 --- .../colibri-imx7/colibri-imx7_bin/flash_eth.scr | 29 --- .../colibri-imx7/colibri-imx7_bin/fwd_blk.scr | 1 - .../colibri-imx7/colibri-imx7_bin/fwd_eth.scr | 1 - .../colibri-imx7_bin/mk-u-boot-scripts.sh | 1 - recipes-images/images/files/colibri-imx7/library | 1 + recipes-images/images/files/colibri-imx7/update.sh | 223 ------------------- .../update/colibri-imx7_bin/flash_blk.scr | 29 +++ .../update/colibri-imx7_bin/flash_eth.scr | 29 +++ .../update/colibri-imx7_bin/fwd_blk.scr | 1 + .../update/colibri-imx7_bin/fwd_eth.scr | 1 + .../update/colibri-imx7_bin/mk-u-boot-scripts.sh | 1 + .../images/files/colibri-imx7/update/update.sh | 223 +++++++++++++++++++ .../colibri-pxa/colibri-pxa_bin/flash_blk.scr | 1 - .../colibri-pxa/colibri-pxa_bin/flash_eth.scr | 1 - .../files/colibri-pxa/colibri-pxa_bin/fwd_blk.scr | 1 - .../files/colibri-pxa/colibri-pxa_bin/fwd_eth.scr | 1 - .../colibri-pxa_bin/mk-u-boot-scripts.sh | 1 - .../colibri-t20_bin/colibri_t20-256-hsmmc.bct | Bin 4080 -> 0 bytes .../colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg | 22 -- .../colibri-t20_bin/colibri_t20-256-v11-nand.bct | Bin 4080 -> 0 bytes .../colibri_t20-256-v11-nand.img.cfg | 22 -- .../colibri-t20_bin/colibri_t20-256-v12-nand.bct | Bin 4080 -> 0 bytes .../colibri_t20-256-v12-nand.img.cfg | 22 -- .../colibri-t20_bin/colibri_t20-512-hsmmc.bct | Bin 4080 -> 0 bytes .../colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg | 22 -- .../colibri-t20_bin/colibri_t20-512-v11-nand.bct | Bin 4080 -> 0 bytes .../colibri_t20-512-v11-nand.img.cfg | 22 -- .../colibri-t20_bin/colibri_t20-512-v12-nand.bct | Bin 4080 -> 0 bytes .../colibri_t20-512-v12-nand.img.cfg | 22 -- .../colibri-t20/colibri-t20_bin/flash_blk.scr | 34 --- .../colibri-t20/colibri-t20_bin/flash_eth.scr | 33 --- .../files/colibri-t20/colibri-t20_bin/fwd_blk.scr | 1 - .../files/colibri-t20/colibri-t20_bin/fwd_eth.scr | 1 - .../files/colibri-t20/colibri-t20_bin/fwd_mmc.scr | 1 - .../colibri-t20_bin/mk-u-boot-scripts.sh | 1 - recipes-images/images/files/colibri-t20/library | 1 + .../colibri-t20/tegra-uboot-flasher/genext3fs.sh | 1 - recipes-images/images/files/colibri-t20/update.sh | 1 - .../colibri-t20_bin/colibri_t20-256-hsmmc.bct | Bin 0 -> 4080 bytes .../colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg | 22 ++ .../colibri-t20_bin/colibri_t20-256-v11-nand.bct | Bin 0 -> 4080 bytes .../colibri_t20-256-v11-nand.img.cfg | 22 ++ .../colibri-t20_bin/colibri_t20-256-v12-nand.bct | Bin 0 -> 4080 bytes .../colibri_t20-256-v12-nand.img.cfg | 22 ++ .../colibri-t20_bin/colibri_t20-512-hsmmc.bct | Bin 0 -> 4080 bytes .../colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg | 22 ++ .../colibri-t20_bin/colibri_t20-512-v11-nand.bct | Bin 0 -> 4080 bytes .../colibri_t20-512-v11-nand.img.cfg | 22 ++ .../colibri-t20_bin/colibri_t20-512-v12-nand.bct | Bin 0 -> 4080 bytes .../colibri_t20-512-v12-nand.img.cfg | 22 ++ .../update/colibri-t20_bin/flash_blk.scr | 34 +++ .../update/colibri-t20_bin/flash_eth.scr | 33 +++ .../colibri-t20/update/colibri-t20_bin/fwd_blk.scr | 1 + .../colibri-t20/update/colibri-t20_bin/fwd_eth.scr | 1 + .../colibri-t20/update/colibri-t20_bin/fwd_mmc.scr | 1 + .../update/colibri-t20_bin/mk-u-boot-scripts.sh | 1 + .../update/tegra-uboot-flasher/genext3fs.sh | 1 + .../images/files/colibri-t20/update/update.sh | 1 + .../colibri-t30_bin/colibri_t30.img.cfg | 22 -- .../colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct | Bin 6128 -> 0 bytes .../colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct | Bin 6128 -> 0 bytes .../colibri-t30/colibri-t30_bin/flash_blk.scr | 46 ---- .../colibri-t30/colibri-t30_bin/flash_eth.scr | 43 ---- .../files/colibri-t30/colibri-t30_bin/fwd_blk.scr | 1 - .../files/colibri-t30/colibri-t30_bin/fwd_eth.scr | 1 - .../files/colibri-t30/colibri-t30_bin/fwd_mmc.scr | 1 - .../colibri-t30_bin/mk-u-boot-scripts.sh | 1 - recipes-images/images/files/colibri-t30/library | 1 + .../colibri-t30/tegra-uboot-flasher/genext3fs.sh | 1 - recipes-images/images/files/colibri-t30/update.sh | 1 - .../update/colibri-t30_bin/colibri_t30.img.cfg | 22 ++ .../colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct | Bin 0 -> 6128 bytes .../colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct | Bin 0 -> 6128 bytes .../update/colibri-t30_bin/flash_blk.scr | 46 ++++ .../update/colibri-t30_bin/flash_eth.scr | 43 ++++ .../colibri-t30/update/colibri-t30_bin/fwd_blk.scr | 1 + .../colibri-t30/update/colibri-t30_bin/fwd_eth.scr | 1 + .../colibri-t30/update/colibri-t30_bin/fwd_mmc.scr | 1 + .../update/colibri-t30_bin/mk-u-boot-scripts.sh | 1 + .../update/tegra-uboot-flasher/genext3fs.sh | 1 + .../images/files/colibri-t30/update/update.sh | 1 + recipes-images/images/files/colibri-vf/README | 6 - .../files/colibri-vf/colibri-vf_bin/flash_blk.scr | 28 --- .../files/colibri-vf/colibri-vf_bin/flash_eth.scr | 28 --- .../files/colibri-vf/colibri-vf_bin/fwd_blk.scr | 1 - .../files/colibri-vf/colibri-vf_bin/fwd_eth.scr | 1 - .../files/colibri-vf/colibri-vf_bin/fwd_mmc.scr | 1 - .../colibri-vf/colibri-vf_bin/mk-u-boot-scripts.sh | 1 - .../images/files/colibri-vf/format_sd.sh | 115 ---------- recipes-images/images/files/colibri-vf/library | 1 + recipes-images/images/files/colibri-vf/update.sh | 236 --------------------- .../images/files/colibri-vf/update/README | 6 + .../colibri-vf/update/colibri-vf_bin/flash_blk.scr | 28 +++ .../colibri-vf/update/colibri-vf_bin/flash_eth.scr | 28 +++ .../colibri-vf/update/colibri-vf_bin/fwd_blk.scr | 1 + .../colibri-vf/update/colibri-vf_bin/fwd_eth.scr | 1 + .../colibri-vf/update/colibri-vf_bin/fwd_mmc.scr | 1 + .../update/colibri-vf_bin/mk-u-boot-scripts.sh | 1 + .../images/files/colibri-vf/update/format_sd.sh | 115 ++++++++++ .../images/files/colibri-vf/update/update.sh | 236 +++++++++++++++++++++ .../images/files/update/no_update_defined.txt | 16 ++ recipes-images/images/tdx-image-fstype.inc | 28 +-- recipes-images/images/tdx-updater_1.0.bb | 16 ++ 224 files changed, 1656 insertions(+), 1627 deletions(-) delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/apalis-imx6/apalis-imx6_bin/mk-u-boot-scripts.sh delete mode 120000 recipes-images/images/files/apalis-imx6/imx_flash/genext4fs.sh create mode 120000 recipes-images/images/files/apalis-imx6/library delete mode 120000 recipes-images/images/files/apalis-imx6/update.sh create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_blk.scr create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_eth.scr create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-imx6/update/imx_flash/genext4fs.sh create mode 120000 recipes-images/images/files/apalis-imx6/update/update.sh delete mode 100644 recipes-images/images/files/apalis-t30/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct delete mode 100644 recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30.img.cfg delete mode 100644 recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct delete mode 100644 recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/apalis-t30/apalis-t30_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-t30/library delete mode 120000 recipes-images/images/files/apalis-t30/tegra-uboot-flasher/genext3fs.sh delete mode 120000 recipes-images/images/files/apalis-t30/update.sh create mode 100644 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct create mode 100644 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30.img.cfg create mode 100644 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct create mode 100644 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_blk.scr create mode 100644 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_eth.scr create mode 120000 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/apalis-t30/update/apalis-t30_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-t30/update/tegra-uboot-flasher/genext3fs.sh create mode 120000 recipes-images/images/files/apalis-t30/update/update.sh delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/apalis-tk1.img.cfg delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_blk.scr delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_eth.scr delete mode 100644 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_mmc.scr delete mode 100755 recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-tk1-mainline/library delete mode 120000 recipes-images/images/files/apalis-tk1-mainline/tegra-uboot-flasher/genext4fs.sh delete mode 120000 recipes-images/images/files/apalis-tk1-mainline/update.sh create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/apalis-tk1.img.cfg create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_blk.scr create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_eth.scr create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_blk.scr create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_eth.scr create mode 100644 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_mmc.scr create mode 100755 recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-tk1-mainline/update/tegra-uboot-flasher/genext4fs.sh create mode 120000 recipes-images/images/files/apalis-tk1-mainline/update/update.sh delete mode 100644 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct delete mode 100644 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/apalis-tk1.img.cfg delete mode 100644 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/apalis-tk1/apalis-tk1_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-tk1/library delete mode 120000 recipes-images/images/files/apalis-tk1/tegra-uboot-flasher/genext4fs.sh delete mode 120000 recipes-images/images/files/apalis-tk1/update.sh create mode 100644 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct create mode 100644 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg create mode 100644 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr create mode 100644 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr create mode 120000 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh create mode 120000 recipes-images/images/files/apalis-tk1/update/update.sh delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/mk-u-boot-scripts.sh delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/imx_flash/genext4fs.sh delete mode 120000 recipes-images/images/files/colibri-imx6-mainline/update.sh delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/colibri-imx6/colibri-imx6_bin/mk-u-boot-scripts.sh delete mode 120000 recipes-images/images/files/colibri-imx6/imx_flash/genext4fs.sh create mode 120000 recipes-images/images/files/colibri-imx6/library delete mode 120000 recipes-images/images/files/colibri-imx6/update.sh create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_blk.scr create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-imx6/update/imx_flash/genext4fs.sh create mode 120000 recipes-images/images/files/colibri-imx6/update/update.sh delete mode 100644 recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-imx6ull/library delete mode 100755 recipes-images/images/files/colibri-imx6ull/update.sh create mode 100644 recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_blk.scr create mode 100644 recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/mk-u-boot-scripts.sh create mode 100755 recipes-images/images/files/colibri-imx6ull/update/update.sh delete mode 100644 recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-imx7/colibri-imx7_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-imx7/library delete mode 100755 recipes-images/images/files/colibri-imx7/update.sh create mode 100644 recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_blk.scr create mode 100644 recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/mk-u-boot-scripts.sh create mode 100755 recipes-images/images/files/colibri-imx7/update/update.sh delete mode 100644 recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-pxa/colibri-pxa_bin/mk-u-boot-scripts.sh delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.bct delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/colibri-t20/colibri-t20_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-t20/library delete mode 120000 recipes-images/images/files/colibri-t20/tegra-uboot-flasher/genext3fs.sh delete mode 120000 recipes-images/images/files/colibri-t20/update.sh create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.bct create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_blk.scr create mode 100644 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/colibri-t20/update/colibri-t20_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-t20/update/tegra-uboot-flasher/genext3fs.sh create mode 120000 recipes-images/images/files/colibri-t20/update/update.sh delete mode 100644 recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30.img.cfg delete mode 100755 recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct delete mode 100644 recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct delete mode 100644 recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/colibri-t30/colibri-t30_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-t30/library delete mode 120000 recipes-images/images/files/colibri-t30/tegra-uboot-flasher/genext3fs.sh delete mode 120000 recipes-images/images/files/colibri-t30/update.sh create mode 100644 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30.img.cfg create mode 100755 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct create mode 100644 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct create mode 100644 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_blk.scr create mode 100644 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/colibri-t30/update/colibri-t30_bin/mk-u-boot-scripts.sh create mode 120000 recipes-images/images/files/colibri-t30/update/tegra-uboot-flasher/genext3fs.sh create mode 120000 recipes-images/images/files/colibri-t30/update/update.sh delete mode 100644 recipes-images/images/files/colibri-vf/README delete mode 100644 recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr delete mode 100644 recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_eth.scr delete mode 120000 recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_blk.scr delete mode 120000 recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_eth.scr delete mode 120000 recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_mmc.scr delete mode 120000 recipes-images/images/files/colibri-vf/colibri-vf_bin/mk-u-boot-scripts.sh delete mode 100755 recipes-images/images/files/colibri-vf/format_sd.sh create mode 120000 recipes-images/images/files/colibri-vf/library delete mode 100755 recipes-images/images/files/colibri-vf/update.sh create mode 100644 recipes-images/images/files/colibri-vf/update/README create mode 100644 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_blk.scr create mode 100644 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_eth.scr create mode 120000 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_blk.scr create mode 120000 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_eth.scr create mode 120000 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_mmc.scr create mode 120000 recipes-images/images/files/colibri-vf/update/colibri-vf_bin/mk-u-boot-scripts.sh create mode 100755 recipes-images/images/files/colibri-vf/update/format_sd.sh create mode 100755 recipes-images/images/files/colibri-vf/update/update.sh create mode 100644 recipes-images/images/files/update/no_update_defined.txt create mode 100644 recipes-images/images/tdx-updater_1.0.bb diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr deleted file mode 120000 index e980bc6..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr deleted file mode 120000 index 18c02a9..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_blk.scr b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_eth.scr b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/apalis-imx6/apalis-imx6_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/imx_flash/genext4fs.sh b/recipes-images/images/files/apalis-imx6/imx_flash/genext4fs.sh deleted file mode 120000 index f7eeef9..0000000 --- a/recipes-images/images/files/apalis-imx6/imx_flash/genext4fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/library b/recipes-images/images/files/apalis-imx6/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update.sh b/recipes-images/images/files/apalis-imx6/update.sh deleted file mode 120000 index fc60d21..0000000 --- a/recipes-images/images/files/apalis-imx6/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/imx6/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_blk.scr b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_blk.scr new file mode 120000 index 0000000..e980bc6 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_blk.scr @@ -0,0 +1 @@ +../../library/imx6/flash_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_eth.scr b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_eth.scr new file mode 120000 index 0000000..18c02a9 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/flash_eth.scr @@ -0,0 +1 @@ +../../library/imx6/flash_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_blk.scr b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_eth.scr b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/apalis-imx6_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/imx_flash/genext4fs.sh b/recipes-images/images/files/apalis-imx6/update/imx_flash/genext4fs.sh new file mode 120000 index 0000000..f7eeef9 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/imx_flash/genext4fs.sh @@ -0,0 +1 @@ +../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-imx6/update/update.sh b/recipes-images/images/files/apalis-imx6/update/update.sh new file mode 120000 index 0000000..fc60d21 --- /dev/null +++ b/recipes-images/images/files/apalis-imx6/update/update.sh @@ -0,0 +1 @@ +../library/imx6/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct b/recipes-images/images/files/apalis-t30/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct deleted file mode 100644 index f228cd2..0000000 Binary files a/recipes-images/images/files/apalis-t30/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct and /dev/null differ diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30.img.cfg b/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30.img.cfg deleted file mode 100644 index 6fbdc0d..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2014 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = Apalis_T30_2GB_800Mhz.bct; -BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct b/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct deleted file mode 100644 index 423aad1..0000000 Binary files a/recipes-images/images/files/apalis-t30/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct and /dev/null differ diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr deleted file mode 100644 index 8bdb6ef..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr +++ /dev/null @@ -1,46 +0,0 @@ -test -n ${interface} || setenv interface mmc -test -n ${drive} || setenv drive 1 - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1 crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' - -setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-apalis-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv echo_v2.3b2 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b2\" to complete update" -setenv migrate_v2.3b2 'run migrate_configblock; run update_new' -setenv update_v2.3b2 'run update_uboot && run echo_v2.3b2' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' -setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b2; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr deleted file mode 100644 index 3a01ae3..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr +++ /dev/null @@ -1,43 +0,0 @@ -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' - -setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-apalis-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv echo_v2.3b2 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b2\" to complete update" -setenv migrate_v2.3b2 'run migrate_configblock; run update_new' -setenv update_v2.3b2 'run update_uboot && run echo_v2.3b2' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' -setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b2; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-t30/apalis-t30_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/library b/recipes-images/images/files/apalis-t30/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/apalis-t30/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/apalis-t30/tegra-uboot-flasher/genext3fs.sh deleted file mode 120000 index cc716db..0000000 --- a/recipes-images/images/files/apalis-t30/tegra-uboot-flasher/genext3fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update.sh b/recipes-images/images/files/apalis-t30/update.sh deleted file mode 120000 index 6ebea84..0000000 --- a/recipes-images/images/files/apalis-t30/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct new file mode 100644 index 0000000..f228cd2 Binary files /dev/null and b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/Apalis_T30_2GB_800Mhz.bct differ diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30.img.cfg b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30.img.cfg new file mode 100644 index 0000000..6fbdc0d --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2014 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = Apalis_T30_2GB_800Mhz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct new file mode 100644 index 0000000..423aad1 Binary files /dev/null and b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/apalis_t30_12MHz_MT41K512M8RH-125_533MHz.bct differ diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_blk.scr b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_blk.scr new file mode 100644 index 0000000..8bdb6ef --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_blk.scr @@ -0,0 +1,46 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1 crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' + +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-apalis-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv echo_v2.3b2 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b2\" to complete update" +setenv migrate_v2.3b2 'run migrate_configblock; run update_new' +setenv update_v2.3b2 'run update_uboot && run echo_v2.3b2' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' +setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b2; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_eth.scr b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_eth.scr new file mode 100644 index 0000000..3a01ae3 --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/flash_eth.scr @@ -0,0 +1,43 @@ +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' + +setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-apalis-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-apalis-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv echo_v2.3b2 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b2\" to complete update" +setenv migrate_v2.3b2 'run migrate_configblock; run update_new' +setenv update_v2.3b2 'run update_uboot && run echo_v2.3b2' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' +setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b2; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_blk.scr b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_eth.scr b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/apalis-t30_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/apalis-t30/update/tegra-uboot-flasher/genext3fs.sh new file mode 120000 index 0000000..cc716db --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/tegra-uboot-flasher/genext3fs.sh @@ -0,0 +1 @@ +../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-t30/update/update.sh b/recipes-images/images/files/apalis-t30/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/apalis-t30/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct deleted file mode 100644 index 556a40e..0000000 Binary files a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct and /dev/null differ diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/apalis-tk1.img.cfg b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/apalis-tk1.img.cfg deleted file mode 100644 index b9d203c..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/apalis-tk1.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2016 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00400001; -Bctcopy = 1; -Bctfile = PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct; -BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr deleted file mode 100644 index 76868d5..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr +++ /dev/null @@ -1,29 +0,0 @@ -test -n ${drive} || setenv drive 1 -test -n ${fdt_module} || setenv fdt_module apalis -test -n ${interface} || setenv interface mmc - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr deleted file mode 100644 index 2793bac..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr +++ /dev/null @@ -1,27 +0,0 @@ -test -n ${fdt_module} || setenv fdt_module apalis - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_blk.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_blk.scr deleted file mode 100644 index 7af72e6..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_blk.scr +++ /dev/null @@ -1,11 +0,0 @@ -#the update.sh script renames this. fwd_blk.scr -> ../flash_blk.img -test -n ${interface} || setenv interface mmc -test -n ${drive} || setenv drive 1 -test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf -test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf -test "${board_name}" = "colibri_imx7" && setenv drive 0 -test "${board_name}" = "colibri_t20" && setenv drive 0 -test "${board_name}" = "colibri_vf" && setenv drive 0 - -test -n ${board_name} || echo "board_name env not set!" && exit -fatload ${interface} ${drive}:1 ${loadaddr} ${board_name}/flash_blk.img && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_eth.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_eth.scr deleted file mode 100644 index d7ea35c..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_eth.scr +++ /dev/null @@ -1,6 +0,0 @@ -#the update.sh script renames this. fwd_eth.scr -> ../flash_eth.img -test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf -test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf - -test -n ${board_name} || echo "board_name env not set!" && exit -tftpboot ${loadaddr} "${board_name}/flash_eth.img" && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_mmc.scr deleted file mode 100644 index 4c8f666..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/fwd_mmc.scr +++ /dev/null @@ -1,3 +0,0 @@ -#the update.sh script renames this. fwd_mmc.scr -> ../flash_mmc.img -#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions -fatload mmc ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh deleted file mode 100755 index dda47d5..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -for f in *.scr -do - mkimage -T script -C none -n 'Flash Apalis/Colibri module' -d $f `basename $f .scr`.img -done diff --git a/recipes-images/images/files/apalis-tk1-mainline/library b/recipes-images/images/files/apalis-tk1-mainline/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1-mainline/tegra-uboot-flasher/genext4fs.sh b/recipes-images/images/files/apalis-tk1-mainline/tegra-uboot-flasher/genext4fs.sh deleted file mode 120000 index f7eeef9..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/tegra-uboot-flasher/genext4fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1-mainline/update.sh b/recipes-images/images/files/apalis-tk1-mainline/update.sh deleted file mode 120000 index 6ebea84..0000000 --- a/recipes-images/images/files/apalis-tk1-mainline/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct new file mode 100644 index 0000000..556a40e Binary files /dev/null and b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct differ diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/apalis-tk1.img.cfg b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/apalis-tk1.img.cfg new file mode 100644 index 0000000..b9d203c --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/apalis-tk1.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2016 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00400001; +Bctcopy = 1; +Bctfile = PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_blk.scr new file mode 100644 index 0000000..76868d5 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_blk.scr @@ -0,0 +1,29 @@ +test -n ${drive} || setenv drive 1 +test -n ${fdt_module} || setenv fdt_module apalis +test -n ${interface} || setenv interface mmc + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_eth.scr new file mode 100644 index 0000000..2793bac --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/flash_eth.scr @@ -0,0 +1,27 @@ +test -n ${fdt_module} || setenv fdt_module apalis + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_blk.scr b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_blk.scr new file mode 100644 index 0000000..7af72e6 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_blk.scr @@ -0,0 +1,11 @@ +#the update.sh script renames this. fwd_blk.scr -> ../flash_blk.img +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 +test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf +test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf +test "${board_name}" = "colibri_imx7" && setenv drive 0 +test "${board_name}" = "colibri_t20" && setenv drive 0 +test "${board_name}" = "colibri_vf" && setenv drive 0 + +test -n ${board_name} || echo "board_name env not set!" && exit +fatload ${interface} ${drive}:1 ${loadaddr} ${board_name}/flash_blk.img && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_eth.scr b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_eth.scr new file mode 100644 index 0000000..d7ea35c --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_eth.scr @@ -0,0 +1,6 @@ +#the update.sh script renames this. fwd_eth.scr -> ../flash_eth.img +test -z "${board_name}" && test "${soc}" = "vf500" && setenv board_name colibri_vf +test -z "${board_name}" && test "${soc}" = "vf610" && setenv board_name colibri_vf + +test -n ${board_name} || echo "board_name env not set!" && exit +tftpboot ${loadaddr} "${board_name}/flash_eth.img" && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_mmc.scr new file mode 100644 index 0000000..4c8f666 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/fwd_mmc.scr @@ -0,0 +1,3 @@ +#the update.sh script renames this. fwd_mmc.scr -> ../flash_mmc.img +#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions +fatload mmc ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr} diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh new file mode 100755 index 0000000..dda47d5 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/apalis-tk1-mainline_bin/mk-u-boot-scripts.sh @@ -0,0 +1,5 @@ +#!/bin/sh +for f in *.scr +do + mkimage -T script -C none -n 'Flash Apalis/Colibri module' -d $f `basename $f .scr`.img +done diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/tegra-uboot-flasher/genext4fs.sh b/recipes-images/images/files/apalis-tk1-mainline/update/tegra-uboot-flasher/genext4fs.sh new file mode 120000 index 0000000..f7eeef9 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/tegra-uboot-flasher/genext4fs.sh @@ -0,0 +1 @@ +../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1-mainline/update/update.sh b/recipes-images/images/files/apalis-tk1-mainline/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1-mainline/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct deleted file mode 100644 index 556a40e..0000000 Binary files a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct and /dev/null differ diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/apalis-tk1.img.cfg b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/apalis-tk1.img.cfg deleted file mode 100644 index b9d203c..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/apalis-tk1.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2016 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00400001; -Bctcopy = 1; -Bctfile = PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct; -BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr deleted file mode 100644 index 76868d5..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr +++ /dev/null @@ -1,29 +0,0 @@ -test -n ${drive} || setenv drive 1 -test -n ${fdt_module} || setenv fdt_module apalis -test -n ${interface} || setenv interface mmc - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr deleted file mode 100644 index 2793bac..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr +++ /dev/null @@ -1,27 +0,0 @@ -test -n ${fdt_module} || setenv fdt_module apalis - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_blk.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_eth.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/library b/recipes-images/images/files/apalis-tk1/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/tegra-uboot-flasher/genext4fs.sh b/recipes-images/images/files/apalis-tk1/tegra-uboot-flasher/genext4fs.sh deleted file mode 120000 index f7eeef9..0000000 --- a/recipes-images/images/files/apalis-tk1/tegra-uboot-flasher/genext4fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update.sh b/recipes-images/images/files/apalis-tk1/update.sh deleted file mode 120000 index 6ebea84..0000000 --- a/recipes-images/images/files/apalis-tk1/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct new file mode 100644 index 0000000..556a40e Binary files /dev/null and b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct differ diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg new file mode 100644 index 0000000..b9d203c --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/apalis-tk1.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2016 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00400001; +Bctcopy = 1; +Bctfile = PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr new file mode 100644 index 0000000..76868d5 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_blk.scr @@ -0,0 +1,29 @@ +test -n ${drive} || setenv drive 1 +test -n ${fdt_module} || setenv fdt_module apalis +test -n ${interface} || setenv interface mmc + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr new file mode 100644 index 0000000..2793bac --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/flash_eth.scr @@ -0,0 +1,27 @@ +test -n ${fdt_module} || setenv fdt_module apalis + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-${fdt_module}-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_rootfs 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv update 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_rootfs; reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/apalis-tk1_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh b/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh new file mode 120000 index 0000000..f7eeef9 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/tegra-uboot-flasher/genext4fs.sh @@ -0,0 +1 @@ +../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/apalis-tk1/update/update.sh b/recipes-images/images/files/apalis-tk1/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/apalis-tk1/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_blk.scr deleted file mode 120000 index e980bc6..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_eth.scr deleted file mode 120000 index 18c02a9..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/flash_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/colibri-imx6-mainline_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/imx_flash/genext4fs.sh b/recipes-images/images/files/colibri-imx6-mainline/imx_flash/genext4fs.sh deleted file mode 120000 index f7eeef9..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/imx_flash/genext4fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6-mainline/update.sh b/recipes-images/images/files/colibri-imx6-mainline/update.sh deleted file mode 120000 index fc60d21..0000000 --- a/recipes-images/images/files/colibri-imx6-mainline/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/imx6/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr deleted file mode 120000 index e980bc6..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr deleted file mode 120000 index 18c02a9..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/imx6/flash_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-imx6/colibri-imx6_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/imx_flash/genext4fs.sh b/recipes-images/images/files/colibri-imx6/imx_flash/genext4fs.sh deleted file mode 120000 index f7eeef9..0000000 --- a/recipes-images/images/files/colibri-imx6/imx_flash/genext4fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/library b/recipes-images/images/files/colibri-imx6/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update.sh b/recipes-images/images/files/colibri-imx6/update.sh deleted file mode 120000 index fc60d21..0000000 --- a/recipes-images/images/files/colibri-imx6/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/imx6/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_blk.scr new file mode 120000 index 0000000..e980bc6 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_blk.scr @@ -0,0 +1 @@ +../../library/imx6/flash_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_eth.scr new file mode 120000 index 0000000..18c02a9 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/flash_eth.scr @@ -0,0 +1 @@ +../../library/imx6/flash_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/colibri-imx6_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/imx_flash/genext4fs.sh b/recipes-images/images/files/colibri-imx6/update/imx_flash/genext4fs.sh new file mode 120000 index 0000000..f7eeef9 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/imx_flash/genext4fs.sh @@ -0,0 +1 @@ +../../library/genext4fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6/update/update.sh b/recipes-images/images/files/colibri-imx6/update/update.sh new file mode 120000 index 0000000..fc60d21 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6/update/update.sh @@ -0,0 +1 @@ +../library/imx6/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_blk.scr deleted file mode 100644 index b8b8a93..0000000 --- a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_blk.scr +++ /dev/null @@ -1,15 +0,0 @@ -setenv create_bcb 'nand erase.part mx6ull-bcb && writebcb 80000 200000' -setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' - -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then else run prepare_kernel_fdt && && run prepare_rootfs; fi' - -setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' -setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/imx6ull-colibri${variant}-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv update 'mtdparts default && run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_eth.scr deleted file mode 100644 index c65c1d3..0000000 --- a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/flash_eth.scr +++ /dev/null @@ -1,15 +0,0 @@ -setenv create_bcb 'nand erase.part mx6ull-bcb && writebcb 80000 200000' -setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' - -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then else run prepare_kernel_fdt && && run prepare_rootfs; fi' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/imx6ull-colibri${variant}-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv update 'mtdparts default && run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-imx6ull/colibri-imx6ull_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/library b/recipes-images/images/files/colibri-imx6ull/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/update.sh b/recipes-images/images/files/colibri-imx6ull/update.sh deleted file mode 100755 index 03cd893..0000000 --- a/recipes-images/images/files/colibri-imx6ull/update.sh +++ /dev/null @@ -1,222 +0,0 @@ -#! /bin/sh -# Prepare files needed for flashing a Colibri iMX6ULL module and -# copy them to a convenient location for using from a running U-Boot - -set -e - -Flash() -{ - echo "To flash the Colibri iMX6ULL module a running U-Boot is required. Boot the" - echo "module to the U-Boot prompt and" - echo "" - echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" - echo "and enter:" - echo "'run setupdate'" - echo "" - echo "then to update all components enter:" - echo "'run update'" - echo "" - echo "Alternatively, to update U-Boot enter:" - echo "'run update_uboot'" - echo "to update a component stored in UBI enter:" - echo "'run prepare_ubi'" - echo "followed by one of:" - echo "'run update_kernel'" - echo "'run update_fdt'" - echo "'run update_rootfs'" - echo "" - echo "" - echo "If you don't have a working U-Boot anymore, connect your PC to the module's" - echo "USB client port, bring the module into the serial download mode and start the update.sh" - echo "script with the -d option. This will copy U-Boot into the module's RAM and" - echo "execute it." - echo "" - echo "Then use the following command to get U-Boot running:" - echo "'./update.sh -d'" - echo "" - echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" - echo "'run setupdate'" - echo "'run update_uboot'" - echo "'run create_bcb'" - echo "'cfgblock create'" -} - -Usage() -{ - echo "" - echo "Prepares and copies files for flashing internal NAND of Colibri iMX6ULL" - echo "" - echo "The recommended way is to copy the files on a SD card or USB flash drive." - echo "The script format_sd.sh may be used to format the SD card." - echo "" - echo "The flash step requires a running U-Boot on the target. Either one already" - echo "flashed on the NAND or downloaded using serial downloader (argument -d)." - echo "" - echo "-d : use a USB connection to copy/execute U-Boot to/from module's RAM" - echo "-f : flash instructions" - echo "-h : prints this message" - echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" - echo " 1: Colibri iMX6ULL" - echo "-o directory : output directory" - echo "" - echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" - echo "" - echo "*** For detailed recovery/update procedures, refer to the following website: ***" - echo "http://developer.toradex.com/knowledge-base/flashing-embedded-linux-to-imx7-modules" - echo "" -} - -# initialise options -KERNEL_DEVICETREE="%kernel_device_trees%" -KERNEL_IMAGETYPE="zImage" -MODTYPE_DETECT=0 - -# NAND parameters -BLOCK=124KiB -MAXLEB=8112 -PAGE=2KiB - -OUT_DIR="" -UBOOT_RECOVERY=0 - -while getopts "dfhm:o:" Option ; do - case $Option in - d) UBOOT_RECOVERY=1 - ;; - f) Flash - exit 0 - ;; - h) Usage - exit 0 - ;; - m) MODTYPE_DETECT=$OPTARG - ;; - o) OUT_DIR=$OPTARG - ;; - esac -done - -if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - Usage - exit 1 -fi - -# is OUT_DIR an existing directory? -if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - echo "$OUT_DIR" "does not exist, exiting" - exit 1 -fi - -case $MODTYPE_DETECT in - 0) # auto detect MODTYPE from rootfs directory - if [ -f rootfs/etc/issue ] ; then - CNT=`grep -c "MX6ULL" rootfs/etc/issue || true` - if [ "$CNT" -ge 1 ] ; then - echo "Colibri iMX6ULL rootfs detected" - MODTYPE=colibri-imx6ull - fi - fi - if [ -e $MODTYPE ] ; then - echo "can not detect module type from ./rootfs/etc/issue" - echo "please specify the module type with the -m parameter" - echo "see help: '$ ./update.sh -h'" - echo "exiting" - exit 1 - fi - ;; - 1) MODTYPE=colibri-imx6ull - echo "Colibri iMX6ULL rootfs specified" - ;; - *) echo "-m paramter specifies an unknown value" - exit 1 - ;; -esac - -case "$MODTYPE" in - "colibri-imx6ull") - IMAGEFILE=ubifs.img - LOCPATH="imx_flash" - OUT_DIR="$OUT_DIR/colibri-imx6ull" - ;; - *) echo "script internal error, unknown module type set" - exit 1 - ;; -esac - -BINARIES=${MODTYPE}_bin - -#is only U-Boot to be copied to RAM? -if [ "$UBOOT_RECOVERY" -eq 1 ] ; then - echo "Put the module in recovery mode and press [ENTER]..." - read RESULT - sudo ${LOCPATH}/imx_usb ${BINARIES}/u-boot.imx - exit -fi - -#sanity check for correct untared rootfs -DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` -if [ "${DEV_OWNER}x" != "rootx" ] -then - printf "rootfs/dev is not owned by root, but it should!\n" - printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" - printf "e.g. sudo tar xjvf Colibri-iMX6ULL_LXDE-Image_2.7b4-20171001.tar.bz2\n" - exit 1 -fi - -#sanity check, can we execute mkfs.ubifs, e.g. see the help text? -CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` -if [ "$CNT" -eq 0 ] ; then - echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" - echo "option." - echo "Are you on a 64bit Linux host without installed 32bit execution environment?" - printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m" - printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m" - exit 1 -fi - -#Install trap to write a sensible message in case any of the commands below -#exit premature... -trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT - -# Prepare full flashing -sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v - -echo "" -echo "UBI image of root file system generated, copying data to target folder..." - -#make a file with the used versions for U-Boot, kernel and rootfs -sudo touch ${BINARIES}/versions.txt -sudo chmod ugo+w ${BINARIES}/versions.txt -echo "Component Versions" > ${BINARIES}/versions.txt -basename "`readlink -e ${BINARIES}/u-boot.imx`" >> ${BINARIES}/versions.txt -ROOTFSVERSION=`grep MX6 rootfs/etc/issue || echo "Version Unknown"` -echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt - -#create subdirectory for this module type -sudo mkdir -p "$OUT_DIR" - -# Copy device tree file -COPIED=false -if test -n "${KERNEL_DEVICETREE}"; then - for DTB_FILE in ${KERNEL_DEVICETREE}; do - if [ -e "${BINARIES}/${DTB_FILE}" ]; then - sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" - COPIED=true - fi - done - [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } -fi - -#copy to $OUT_DIR -sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" -sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" -sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" -#cleanup intermediate files -sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt -sync - -#Remove trap and report success! -trap - EXIT -printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" - -Flash diff --git a/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_blk.scr new file mode 100644 index 0000000..b8b8a93 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_blk.scr @@ -0,0 +1,15 @@ +setenv create_bcb 'nand erase.part mx6ull-bcb && writebcb 80000 200000' +setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' + +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then else run prepare_kernel_fdt && && run prepare_rootfs; fi' + +setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' +setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/imx6ull-colibri${variant}-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv update 'mtdparts default && run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_eth.scr new file mode 100644 index 0000000..c65c1d3 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/flash_eth.scr @@ -0,0 +1,15 @@ +setenv create_bcb 'nand erase.part mx6ull-bcb && writebcb 80000 200000' +setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' + +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then else run prepare_kernel_fdt && && run prepare_rootfs; fi' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/imx6ull-colibri${variant}-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv update 'mtdparts default && run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/colibri-imx6ull_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx6ull/update/update.sh b/recipes-images/images/files/colibri-imx6ull/update/update.sh new file mode 100755 index 0000000..03cd893 --- /dev/null +++ b/recipes-images/images/files/colibri-imx6ull/update/update.sh @@ -0,0 +1,222 @@ +#! /bin/sh +# Prepare files needed for flashing a Colibri iMX6ULL module and +# copy them to a convenient location for using from a running U-Boot + +set -e + +Flash() +{ + echo "To flash the Colibri iMX6ULL module a running U-Boot is required. Boot the" + echo "module to the U-Boot prompt and" + echo "" + echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" + echo "and enter:" + echo "'run setupdate'" + echo "" + echo "then to update all components enter:" + echo "'run update'" + echo "" + echo "Alternatively, to update U-Boot enter:" + echo "'run update_uboot'" + echo "to update a component stored in UBI enter:" + echo "'run prepare_ubi'" + echo "followed by one of:" + echo "'run update_kernel'" + echo "'run update_fdt'" + echo "'run update_rootfs'" + echo "" + echo "" + echo "If you don't have a working U-Boot anymore, connect your PC to the module's" + echo "USB client port, bring the module into the serial download mode and start the update.sh" + echo "script with the -d option. This will copy U-Boot into the module's RAM and" + echo "execute it." + echo "" + echo "Then use the following command to get U-Boot running:" + echo "'./update.sh -d'" + echo "" + echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" + echo "'run setupdate'" + echo "'run update_uboot'" + echo "'run create_bcb'" + echo "'cfgblock create'" +} + +Usage() +{ + echo "" + echo "Prepares and copies files for flashing internal NAND of Colibri iMX6ULL" + echo "" + echo "The recommended way is to copy the files on a SD card or USB flash drive." + echo "The script format_sd.sh may be used to format the SD card." + echo "" + echo "The flash step requires a running U-Boot on the target. Either one already" + echo "flashed on the NAND or downloaded using serial downloader (argument -d)." + echo "" + echo "-d : use a USB connection to copy/execute U-Boot to/from module's RAM" + echo "-f : flash instructions" + echo "-h : prints this message" + echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" + echo " 1: Colibri iMX6ULL" + echo "-o directory : output directory" + echo "" + echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" + echo "" + echo "*** For detailed recovery/update procedures, refer to the following website: ***" + echo "http://developer.toradex.com/knowledge-base/flashing-embedded-linux-to-imx7-modules" + echo "" +} + +# initialise options +KERNEL_DEVICETREE="%kernel_device_trees%" +KERNEL_IMAGETYPE="zImage" +MODTYPE_DETECT=0 + +# NAND parameters +BLOCK=124KiB +MAXLEB=8112 +PAGE=2KiB + +OUT_DIR="" +UBOOT_RECOVERY=0 + +while getopts "dfhm:o:" Option ; do + case $Option in + d) UBOOT_RECOVERY=1 + ;; + f) Flash + exit 0 + ;; + h) Usage + exit 0 + ;; + m) MODTYPE_DETECT=$OPTARG + ;; + o) OUT_DIR=$OPTARG + ;; + esac +done + +if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + Usage + exit 1 +fi + +# is OUT_DIR an existing directory? +if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + echo "$OUT_DIR" "does not exist, exiting" + exit 1 +fi + +case $MODTYPE_DETECT in + 0) # auto detect MODTYPE from rootfs directory + if [ -f rootfs/etc/issue ] ; then + CNT=`grep -c "MX6ULL" rootfs/etc/issue || true` + if [ "$CNT" -ge 1 ] ; then + echo "Colibri iMX6ULL rootfs detected" + MODTYPE=colibri-imx6ull + fi + fi + if [ -e $MODTYPE ] ; then + echo "can not detect module type from ./rootfs/etc/issue" + echo "please specify the module type with the -m parameter" + echo "see help: '$ ./update.sh -h'" + echo "exiting" + exit 1 + fi + ;; + 1) MODTYPE=colibri-imx6ull + echo "Colibri iMX6ULL rootfs specified" + ;; + *) echo "-m paramter specifies an unknown value" + exit 1 + ;; +esac + +case "$MODTYPE" in + "colibri-imx6ull") + IMAGEFILE=ubifs.img + LOCPATH="imx_flash" + OUT_DIR="$OUT_DIR/colibri-imx6ull" + ;; + *) echo "script internal error, unknown module type set" + exit 1 + ;; +esac + +BINARIES=${MODTYPE}_bin + +#is only U-Boot to be copied to RAM? +if [ "$UBOOT_RECOVERY" -eq 1 ] ; then + echo "Put the module in recovery mode and press [ENTER]..." + read RESULT + sudo ${LOCPATH}/imx_usb ${BINARIES}/u-boot.imx + exit +fi + +#sanity check for correct untared rootfs +DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` +if [ "${DEV_OWNER}x" != "rootx" ] +then + printf "rootfs/dev is not owned by root, but it should!\n" + printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" + printf "e.g. sudo tar xjvf Colibri-iMX6ULL_LXDE-Image_2.7b4-20171001.tar.bz2\n" + exit 1 +fi + +#sanity check, can we execute mkfs.ubifs, e.g. see the help text? +CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` +if [ "$CNT" -eq 0 ] ; then + echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" + echo "option." + echo "Are you on a 64bit Linux host without installed 32bit execution environment?" + printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m" + printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m" + exit 1 +fi + +#Install trap to write a sensible message in case any of the commands below +#exit premature... +trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT + +# Prepare full flashing +sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v + +echo "" +echo "UBI image of root file system generated, copying data to target folder..." + +#make a file with the used versions for U-Boot, kernel and rootfs +sudo touch ${BINARIES}/versions.txt +sudo chmod ugo+w ${BINARIES}/versions.txt +echo "Component Versions" > ${BINARIES}/versions.txt +basename "`readlink -e ${BINARIES}/u-boot.imx`" >> ${BINARIES}/versions.txt +ROOTFSVERSION=`grep MX6 rootfs/etc/issue || echo "Version Unknown"` +echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt + +#create subdirectory for this module type +sudo mkdir -p "$OUT_DIR" + +# Copy device tree file +COPIED=false +if test -n "${KERNEL_DEVICETREE}"; then + for DTB_FILE in ${KERNEL_DEVICETREE}; do + if [ -e "${BINARIES}/${DTB_FILE}" ]; then + sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" + COPIED=true + fi + done + [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } +fi + +#copy to $OUT_DIR +sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" +sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" +sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" +#cleanup intermediate files +sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt +sync + +#Remove trap and report success! +trap - EXIT +printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" + +Flash diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_blk.scr deleted file mode 100644 index 9fa6296..0000000 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_blk.scr +++ /dev/null @@ -1,29 +0,0 @@ -setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000' -setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi' - -setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run recreate_bcb && run update" && echo && echo "(note the recreate_bcb command in between!)"' -setenv update_uboot_old 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${fdt_addr_r} 80000 200000 $filesize && nand erase.part u-boot-env && nand erase.part ubi && run upgrade_msg' -setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' -setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -# Test which version of U-Boot we are currently running on -setenv update 'mtdparts default && env default -f updlevel && if test $updlevel -lt 1; then; run update_uboot_old; else; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset; fi' - -if itest.b *0x30360800 -lt 0x11; then -echo && -echo 'NOTE: The U-Boot provided with this BSP version does not support the' && -echo 'early tapeout/stepping of i.MX 7 used on your module. You still can' && -echo 'update the kernel/device-tree/rootfs manually using: ' && -echo '# run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs' && -echo && setenv update_uboot; setenv update_uboot_old; setenv update -else -echo 'enter "run update" to update the entire module' -fi diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr deleted file mode 100644 index 20244d7..0000000 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/flash_eth.scr +++ /dev/null @@ -1,29 +0,0 @@ -setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000' -setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi' - -setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run recreate_bcb && run update" && echo && echo "(note the recreate_bcb command in between!)"' -setenv update_uboot_old 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${fdt_addr_r} 80000 200000 $filesize && nand erase.part u-boot-env && nand erase.part ubi && run upgrade_msg' -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -# Test which version of U-Boot we are currently running on -setenv update 'mtdparts default && env default -f updlevel && if test $updlevel -lt 1; then; run update_uboot_old; else; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset; fi' - -if itest.b *0x30360800 -lt 0x11; then -echo && -echo 'NOTE: The U-Boot provided with this BSP version does not support the' && -echo 'early tapeout/stepping of i.MX 7 used on your module. You still can' && -echo 'update the kernel/device-tree/rootfs manually using: ' && -echo '# run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs' && -echo && setenv update_uboot; setenv update_uboot_old; setenv update -else -echo 'enter "run update" to update the entire module' -fi diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-imx7/colibri-imx7_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/library b/recipes-images/images/files/colibri-imx7/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/update.sh b/recipes-images/images/files/colibri-imx7/update.sh deleted file mode 100755 index f6dfcc2..0000000 --- a/recipes-images/images/files/colibri-imx7/update.sh +++ /dev/null @@ -1,223 +0,0 @@ -#! /bin/sh -# Prepare files needed for flashing a Colibri iMX7 module and -# copy them to a convenient location for using from a running U-Boot - -set -e - -Flash() -{ - echo "To flash the Colibri iMX7 module a running U-Boot is required. Boot the" - echo "module to the U-Boot prompt and" - echo "" - echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" - echo "and enter:" - echo "'run setupdate'" - echo "" - echo "then to update all components enter:" - echo "'run update'" - echo "" - echo "Alternatively, to update U-Boot enter:" - echo "'run update_uboot'" - echo "to update a component stored in UBI enter:" - echo "'run prepare_ubi'" - echo "followed by one of:" - echo "'run update_kernel'" - echo "'run update_fdt'" - echo "'run update_rootfs'" - echo "" - echo "" - echo "If you don't have a working U-Boot anymore, connect your PC to the module's" - echo "USB client port, bring the module into the serial download mode and start the update.sh" - echo "script with the -d option. This will copy U-Boot into the module's RAM and" - echo "execute it." - echo "" - echo "Then use the following command to get U-Boot running:" - echo "'./update.sh -d'" - echo "" - echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" - echo "'run setupdate'" - echo "'run update_uboot'" - echo "'run create_bcb'" - echo "'cfgblock create'" -} - -Usage() -{ - echo "" - echo "Prepares and copies files for flashing internal NAND of Colibri iMX7" - echo "" - echo "The recommended way is to copy the files on a SD card or USB flash drive." - echo "The script format_sd.sh may be used to format the SD card." - echo "" - echo "The flash step requires a running U-Boot on the target. Either one already" - echo "flashed on the NAND or downloaded using serial downloader (argument -d)." - echo "" - echo "-d : use a USB connection to copy/execute U-Boot to/from module's RAM" - echo "-f : flash instructions" - echo "-h : prints this message" - echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" - echo " 1: Colibri iMX7" - echo "-o directory : output directory" - echo "" - echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" - echo "" - echo "*** For detailed recovery/update procedures, refer to the following website: ***" - echo "http://developer.toradex.com/knowledge-base/flashing-embedded-linux-to-imx7-modules" - echo "" -} - -# initialise options -KERNEL_DEVICETREE="%kernel_device_trees%" -KERNEL_IMAGETYPE="zImage" -MODTYPE_DETECT=0 - -# NAND parameters -BLOCK=124KiB -MAXLEB=8112 -PAGE=2KiB - -OUT_DIR="" -UBOOT_RECOVERY=0 - -while getopts "dfhm:o:" Option ; do - case $Option in - d) UBOOT_RECOVERY=1 - ;; - f) Flash - exit 0 - ;; - h) Usage - exit 0 - ;; - m) MODTYPE_DETECT=$OPTARG - ;; - o) OUT_DIR=$OPTARG - ;; - esac -done - -if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - Usage - exit 1 -fi - -# is OUT_DIR an existing directory? -if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - echo "$OUT_DIR" "does not exist, exiting" - exit 1 -fi - -case $MODTYPE_DETECT in - 0) # auto detect MODTYPE from rootfs directory - if [ -f rootfs/etc/issue ] ; then - CNT=`grep -c "MX7" rootfs/etc/issue || true` - if [ "$CNT" -ge 1 ] ; then - echo "Colibri iMX7 rootfs detected" - MODTYPE=colibri-imx7 - fi - fi - if [ -e $MODTYPE ] ; then - echo "can not detect module type from ./rootfs/etc/issue" - echo "please specify the module type with the -m parameter" - echo "see help: '$ ./update.sh -h'" - echo "exiting" - exit 1 - fi - ;; - 1) MODTYPE=colibri-imx7 - echo "Colibri iMX7 rootfs specified" - ;; - *) echo "-m paramter specifies an unknown value" - exit 1 - ;; -esac - -case "$MODTYPE" in - "colibri-imx7") - IMAGEFILE=ubifs.img - LOCPATH="imx_flash" - OUT_DIR="$OUT_DIR/colibri_imx7" - ;; - *) echo "script internal error, unknown module type set" - exit 1 - ;; -esac - -BINARIES=${MODTYPE}_bin - -#is only U-Boot to be copied to RAM? -if [ "$UBOOT_RECOVERY" -eq 1 ] ; then - echo "Put the module in recovery mode and press [ENTER]..." - read RESULT - sudo ${LOCPATH}/imx_usb ${BINARIES}/u-boot-nand.imx - exit -fi - -#sanity check for correct untared rootfs -DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` -if [ "${DEV_OWNER}x" != "rootx" ] -then - printf "rootfs/dev is not owned by root, but it should!\n" - printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" - printf "e.g. sudo tar xjvf Colibri_iMX7_LinuxImageV2.6_20160331.tar.bz2\n" - exit 1 -fi - -#sanity check, can we execute mkfs.ubifs, e.g. see the help text? -CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` -if [ "$CNT" -eq 0 ] ; then - echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" - echo "option." - echo "Are you on a 64bit Linux host without installed 32bit execution environment?" - printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m" - printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m" - exit 1 -fi - -#Install trap to write a sensible message in case any of the commands below -#exit premature... -trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT - -# Prepare full flashing -sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v - -echo "" -echo "UBI image of root file system generated, copying data to target folder..." - -#make a file with the used versions for U-Boot, kernel and rootfs -sudo touch ${BINARIES}/versions.txt -sudo chmod ugo+w ${BINARIES}/versions.txt -echo "Component Versions" > ${BINARIES}/versions.txt -basename "`readlink -e ${BINARIES}/u-boot-nand.imx`" >> ${BINARIES}/versions.txt -basename "`readlink -e ${BINARIES}/${KERNEL_IMAGETYPE}`" >> ${BINARIES}/versions.txt -ROOTFSVERSION=`grep MX7 rootfs/etc/issue || echo "Version Unknown"` -echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt - -#create subdirectory for this module type -sudo mkdir -p "$OUT_DIR" - -# Copy device tree file -COPIED=false -if test -n "${KERNEL_DEVICETREE}"; then - for DTB_FILE in ${KERNEL_DEVICETREE}; do - if [ -e "${BINARIES}/${DTB_FILE}" ]; then - sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" - COPIED=true - fi - done - [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } -fi - -#copy to $OUT_DIR -sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" -sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" -sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" -#cleanup intermediate files -sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt -sync - -#Remove trap and report success! -trap - EXIT -printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" - -Flash diff --git a/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_blk.scr b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_blk.scr new file mode 100644 index 0000000..9fa6296 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_blk.scr @@ -0,0 +1,29 @@ +setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000' +setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi' + +setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run recreate_bcb && run update" && echo && echo "(note the recreate_bcb command in between!)"' +setenv update_uboot_old 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${fdt_addr_r} 80000 200000 $filesize && nand erase.part u-boot-env && nand erase.part ubi && run upgrade_msg' +setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' +setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +# Test which version of U-Boot we are currently running on +setenv update 'mtdparts default && env default -f updlevel && if test $updlevel -lt 1; then; run update_uboot_old; else; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset; fi' + +if itest.b *0x30360800 -lt 0x11; then +echo && +echo 'NOTE: The U-Boot provided with this BSP version does not support the' && +echo 'early tapeout/stepping of i.MX 7 used on your module. You still can' && +echo 'update the kernel/device-tree/rootfs manually using: ' && +echo '# run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs' && +echo && setenv update_uboot; setenv update_uboot_old; setenv update +else +echo 'enter "run update" to update the entire module' +fi diff --git a/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_eth.scr b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_eth.scr new file mode 100644 index 0000000..20244d7 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/flash_eth.scr @@ -0,0 +1,29 @@ +setenv create_bcb 'nand erase.part mx7-bcb && writebcb 80000 200000' +setenv recreate_bcb 'nand read ${fdt_addr_r} 0x800 0x800 && run create_bcb && nand write ${fdt_addr_r} 0x800 0x800' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_m4firmware 'ubi create m4firmware 0xe0000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_m4firmware && run prepare_rootfs; fi' + +setenv upgrade_msg 'echo && echo "Upgraded U-Boot, please reset the board and complete update with" && echo "# run setupdate && run recreate_bcb && run update" && echo && echo "(note the recreate_bcb command in between!)"' +setenv update_uboot_old 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && writeboot ${fdt_addr_r} 80000 200000 $filesize && nand erase.part u-boot-env && nand erase.part ubi && run upgrade_msg' +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot1 && nand write ${fdt_addr_r} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${fdt_addr_r} u-boot2 ${filesize}' +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +# Test which version of U-Boot we are currently running on +setenv update 'mtdparts default && env default -f updlevel && if test $updlevel -lt 1; then; run update_uboot_old; else; run update_uboot && run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs && reset; fi' + +if itest.b *0x30360800 -lt 0x11; then +echo && +echo 'NOTE: The U-Boot provided with this BSP version does not support the' && +echo 'early tapeout/stepping of i.MX 7 used on your module. You still can' && +echo 'update the kernel/device-tree/rootfs manually using: ' && +echo '# run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs' && +echo && setenv update_uboot; setenv update_uboot_old; setenv update +else +echo 'enter "run update" to update the entire module' +fi diff --git a/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_blk.scr b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_eth.scr b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/colibri-imx7_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-imx7/update/update.sh b/recipes-images/images/files/colibri-imx7/update/update.sh new file mode 100755 index 0000000..f6dfcc2 --- /dev/null +++ b/recipes-images/images/files/colibri-imx7/update/update.sh @@ -0,0 +1,223 @@ +#! /bin/sh +# Prepare files needed for flashing a Colibri iMX7 module and +# copy them to a convenient location for using from a running U-Boot + +set -e + +Flash() +{ + echo "To flash the Colibri iMX7 module a running U-Boot is required. Boot the" + echo "module to the U-Boot prompt and" + echo "" + echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" + echo "and enter:" + echo "'run setupdate'" + echo "" + echo "then to update all components enter:" + echo "'run update'" + echo "" + echo "Alternatively, to update U-Boot enter:" + echo "'run update_uboot'" + echo "to update a component stored in UBI enter:" + echo "'run prepare_ubi'" + echo "followed by one of:" + echo "'run update_kernel'" + echo "'run update_fdt'" + echo "'run update_rootfs'" + echo "" + echo "" + echo "If you don't have a working U-Boot anymore, connect your PC to the module's" + echo "USB client port, bring the module into the serial download mode and start the update.sh" + echo "script with the -d option. This will copy U-Boot into the module's RAM and" + echo "execute it." + echo "" + echo "Then use the following command to get U-Boot running:" + echo "'./update.sh -d'" + echo "" + echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" + echo "'run setupdate'" + echo "'run update_uboot'" + echo "'run create_bcb'" + echo "'cfgblock create'" +} + +Usage() +{ + echo "" + echo "Prepares and copies files for flashing internal NAND of Colibri iMX7" + echo "" + echo "The recommended way is to copy the files on a SD card or USB flash drive." + echo "The script format_sd.sh may be used to format the SD card." + echo "" + echo "The flash step requires a running U-Boot on the target. Either one already" + echo "flashed on the NAND or downloaded using serial downloader (argument -d)." + echo "" + echo "-d : use a USB connection to copy/execute U-Boot to/from module's RAM" + echo "-f : flash instructions" + echo "-h : prints this message" + echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" + echo " 1: Colibri iMX7" + echo "-o directory : output directory" + echo "" + echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" + echo "" + echo "*** For detailed recovery/update procedures, refer to the following website: ***" + echo "http://developer.toradex.com/knowledge-base/flashing-embedded-linux-to-imx7-modules" + echo "" +} + +# initialise options +KERNEL_DEVICETREE="%kernel_device_trees%" +KERNEL_IMAGETYPE="zImage" +MODTYPE_DETECT=0 + +# NAND parameters +BLOCK=124KiB +MAXLEB=8112 +PAGE=2KiB + +OUT_DIR="" +UBOOT_RECOVERY=0 + +while getopts "dfhm:o:" Option ; do + case $Option in + d) UBOOT_RECOVERY=1 + ;; + f) Flash + exit 0 + ;; + h) Usage + exit 0 + ;; + m) MODTYPE_DETECT=$OPTARG + ;; + o) OUT_DIR=$OPTARG + ;; + esac +done + +if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + Usage + exit 1 +fi + +# is OUT_DIR an existing directory? +if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + echo "$OUT_DIR" "does not exist, exiting" + exit 1 +fi + +case $MODTYPE_DETECT in + 0) # auto detect MODTYPE from rootfs directory + if [ -f rootfs/etc/issue ] ; then + CNT=`grep -c "MX7" rootfs/etc/issue || true` + if [ "$CNT" -ge 1 ] ; then + echo "Colibri iMX7 rootfs detected" + MODTYPE=colibri-imx7 + fi + fi + if [ -e $MODTYPE ] ; then + echo "can not detect module type from ./rootfs/etc/issue" + echo "please specify the module type with the -m parameter" + echo "see help: '$ ./update.sh -h'" + echo "exiting" + exit 1 + fi + ;; + 1) MODTYPE=colibri-imx7 + echo "Colibri iMX7 rootfs specified" + ;; + *) echo "-m paramter specifies an unknown value" + exit 1 + ;; +esac + +case "$MODTYPE" in + "colibri-imx7") + IMAGEFILE=ubifs.img + LOCPATH="imx_flash" + OUT_DIR="$OUT_DIR/colibri_imx7" + ;; + *) echo "script internal error, unknown module type set" + exit 1 + ;; +esac + +BINARIES=${MODTYPE}_bin + +#is only U-Boot to be copied to RAM? +if [ "$UBOOT_RECOVERY" -eq 1 ] ; then + echo "Put the module in recovery mode and press [ENTER]..." + read RESULT + sudo ${LOCPATH}/imx_usb ${BINARIES}/u-boot-nand.imx + exit +fi + +#sanity check for correct untared rootfs +DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` +if [ "${DEV_OWNER}x" != "rootx" ] +then + printf "rootfs/dev is not owned by root, but it should!\n" + printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" + printf "e.g. sudo tar xjvf Colibri_iMX7_LinuxImageV2.6_20160331.tar.bz2\n" + exit 1 +fi + +#sanity check, can we execute mkfs.ubifs, e.g. see the help text? +CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` +if [ "$CNT" -eq 0 ] ; then + echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" + echo "option." + echo "Are you on a 64bit Linux host without installed 32bit execution environment?" + printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m" + printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m" + exit 1 +fi + +#Install trap to write a sensible message in case any of the commands below +#exit premature... +trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT + +# Prepare full flashing +sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v + +echo "" +echo "UBI image of root file system generated, copying data to target folder..." + +#make a file with the used versions for U-Boot, kernel and rootfs +sudo touch ${BINARIES}/versions.txt +sudo chmod ugo+w ${BINARIES}/versions.txt +echo "Component Versions" > ${BINARIES}/versions.txt +basename "`readlink -e ${BINARIES}/u-boot-nand.imx`" >> ${BINARIES}/versions.txt +basename "`readlink -e ${BINARIES}/${KERNEL_IMAGETYPE}`" >> ${BINARIES}/versions.txt +ROOTFSVERSION=`grep MX7 rootfs/etc/issue || echo "Version Unknown"` +echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt + +#create subdirectory for this module type +sudo mkdir -p "$OUT_DIR" + +# Copy device tree file +COPIED=false +if test -n "${KERNEL_DEVICETREE}"; then + for DTB_FILE in ${KERNEL_DEVICETREE}; do + if [ -e "${BINARIES}/${DTB_FILE}" ]; then + sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" + COPIED=true + fi + done + [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } +fi + +#copy to $OUT_DIR +sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" +sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" +sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" +#cleanup intermediate files +sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt +sync + +#Remove trap and report success! +trap - EXIT +printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" + +Flash diff --git a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_blk.scr b/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_blk.scr deleted file mode 100644 index d6f89e0..0000000 --- a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_blk.scr +++ /dev/null @@ -1 +0,0 @@ -# dummy U-Boot update script diff --git a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_eth.scr b/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_eth.scr deleted file mode 100644 index d6f89e0..0000000 --- a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/flash_eth.scr +++ /dev/null @@ -1 +0,0 @@ -# dummy U-Boot update script diff --git a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_blk.scr b/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_eth.scr b/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-pxa/colibri-pxa_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.bct deleted file mode 100644 index bcef8b1..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg deleted file mode 100644 index 6fc664d..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-256-hsmmc.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.bct deleted file mode 100644 index 7ddd5d8..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg deleted file mode 100644 index 3ce017e..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-256-v11-nand.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.bct deleted file mode 100644 index 365877f..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg deleted file mode 100644 index 41ed535..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-256-v12-nand.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.bct deleted file mode 100644 index 09eb434..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg deleted file mode 100644 index 60760fc..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-512-hsmmc.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.bct deleted file mode 100644 index 5d68994..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg deleted file mode 100644 index 992f47a..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-512-v11-nand.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.bct b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.bct deleted file mode 100644 index f9db8fc..0000000 Binary files a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg b/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg deleted file mode 100644 index cb96289..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2015 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t20-512-v12-nand.bct; -BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_blk.scr b/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_blk.scr deleted file mode 100644 index b2728bb..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_blk.scr +++ /dev/null @@ -1,34 +0,0 @@ -test -n ${interface} || setenv interface mmc - -test -n ${hw-version} || if test $lnxoffset = 0x1200000; then setenv hw-version v11; else setenv hw-version v12; fi - -setenv check_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; nand read $fdt_addr_r 0x300000 0x64; crc32 -v $toradex_oui_addr 3 94305232' - -setenv migrate_1 'nand read $fdt_addr_r 0x15C0000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_2 'nand read $fdt_addr_r 0x1C80000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_3 'nand read $fdt_addr_r 0x7380000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_4 'nand read $fdt_addr_r 0x7900000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs - dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' - -setenv update_configblock 'load ${interface} 0:1 ${fdt_addr_r} ${board_name}/configblock.bin && nand erase.part cfgblock && nand write ${fdt_addr_r} cfgblock ${filesize}' -setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${board_name}-${ram-size}-${hw-version}-nand.img && nand erase 0x0 0x300000 && nand write ${fdt_addr_r} 0x0 ${filesize}' - -setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -#Writting data to invalidate current device tree -setenv update_fdt 'mw.w ${fdt_addr_r} 0xFF 16 && ubi write ${fdt_addr_r} dtb 16 && fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && -ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv echo_v2.3b7 echo "successfully updated U-Boot," \${note} "power-cycle and enter \"run setupdate\; run migrate_v2.3b7\" to complete update" -setenv migrate_v2.3b7 'run migrate_configblock; nand erase.part ubi; run update_new' -setenv update_v2.3b7 'setenv ram-size 256; run update_uboot && setenv note "wait a sec," && run echo_v2.3b7 && md 0x1ffffffc 1 && setenv ram-size 512 && run update_uboot && setenv note && run echo_v2.3b7' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run prepare_ubi && run update_kernel && run update_rootfs && run update_fdt; reset' -setenv update 'if test -v $ver; then run update_new; else run update_v2.3b7; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_eth.scr b/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_eth.scr deleted file mode 100644 index 7f4cbb4..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/flash_eth.scr +++ /dev/null @@ -1,33 +0,0 @@ -test -n ${hw-version} || if test $lnxoffset = 0x1200000; then setenv hw-version v11; else setenv hw-version v12; fi - -setenv check_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; nand read $fdt_addr_r 0x300000 0x64; crc32 -v $toradex_oui_addr 3 94305232' - -setenv migrate_1 'nand read $fdt_addr_r 0x15C0000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_2 'nand read $fdt_addr_r 0x1C80000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_3 'nand read $fdt_addr_r 0x7380000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_4 'nand read $fdt_addr_r 0x7900000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' -setenv migrate_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs - dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' - -setenv update_configblock 'tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && nand erase.part cfgblock && nand write ${fdt_addr_r} cfgblock ${filesize}' -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}-${ram-size}-${hw-version}-nand.img && nand erase 0x0 0x300000 && nand write ${fdt_addr_r} 0x0 ${filesize}' - -setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && run prepare_rootfs && ubi write ${fdt_addr_r} rootfs ${filesize}' -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -#Writting data to invalidate current device tree -setenv update_fdt 'mw.w ${fdt_addr_r} 0xFF 16 && ubi write ${fdt_addr_r} dtb 16 && tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && -ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv echo_v2.3b7 echo "successfully updated U-Boot," \${note} "power-cycle and enter \"run setupdate\; run migrate_v2.3b7\" to complete update" -setenv migrate_v2.3b7 'run migrate_configblock; nand erase.part ubi; run update_new' -setenv update_v2.3b7 'setenv ram-size 256; run update_uboot && setenv note "wait a sec," && run echo_v2.3b7 && md 0x1ffffffc 1 && setenv ram-size 512 && run update_uboot && setenv note && run echo_v2.3b7' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run prepare_ubi && run update_kernel && run update_rootfs && run update_fdt; reset' -setenv update 'if test -v $ver; then run update_new; else run update_v2.3b7; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_blk.scr b/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_eth.scr b/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/colibri-t20_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-t20/colibri-t20_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-t20/colibri-t20_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/library b/recipes-images/images/files/colibri-t20/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/colibri-t20/tegra-uboot-flasher/genext3fs.sh deleted file mode 120000 index cc716db..0000000 --- a/recipes-images/images/files/colibri-t20/tegra-uboot-flasher/genext3fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update.sh b/recipes-images/images/files/colibri-t20/update.sh deleted file mode 120000 index 6ebea84..0000000 --- a/recipes-images/images/files/colibri-t20/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.bct new file mode 100644 index 0000000..bcef8b1 Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg new file mode 100644 index 0000000..6fc664d --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-hsmmc.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-256-hsmmc.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.bct new file mode 100644 index 0000000..7ddd5d8 Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg new file mode 100644 index 0000000..3ce017e --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v11-nand.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-256-v11-nand.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.bct new file mode 100644 index 0000000..365877f Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg new file mode 100644 index 0000000..41ed535 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-256-v12-nand.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-256-v12-nand.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.bct new file mode 100644 index 0000000..09eb434 Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg new file mode 100644 index 0000000..60760fc --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-hsmmc.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-512-hsmmc.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.bct new file mode 100644 index 0000000..5d68994 Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg new file mode 100644 index 0000000..992f47a --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v11-nand.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-512-v11-nand.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.bct b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.bct new file mode 100644 index 0000000..f9db8fc Binary files /dev/null and b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.bct differ diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg new file mode 100644 index 0000000..cb96289 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/colibri_t20-512-v12-nand.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t20-512-v12-nand.bct; +BootLoader = u-boot-dtb-tegra.bin,0x00108000,0x00108000,Complete; diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_blk.scr b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_blk.scr new file mode 100644 index 0000000..b2728bb --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_blk.scr @@ -0,0 +1,34 @@ +test -n ${interface} || setenv interface mmc + +test -n ${hw-version} || if test $lnxoffset = 0x1200000; then setenv hw-version v11; else setenv hw-version v12; fi + +setenv check_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; nand read $fdt_addr_r 0x300000 0x64; crc32 -v $toradex_oui_addr 3 94305232' + +setenv migrate_1 'nand read $fdt_addr_r 0x15C0000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_2 'nand read $fdt_addr_r 0x1C80000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_3 'nand read $fdt_addr_r 0x7380000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_4 'nand read $fdt_addr_r 0x7900000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs - dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' + +setenv update_configblock 'load ${interface} 0:1 ${fdt_addr_r} ${board_name}/configblock.bin && nand erase.part cfgblock && nand write ${fdt_addr_r} cfgblock ${filesize}' +setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${board_name}-${ram-size}-${hw-version}-nand.img && nand erase 0x0 0x300000 && nand write ${fdt_addr_r} 0x0 ${filesize}' + +setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +#Writting data to invalidate current device tree +setenv update_fdt 'mw.w ${fdt_addr_r} 0xFF 16 && ubi write ${fdt_addr_r} dtb 16 && fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && +ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv echo_v2.3b7 echo "successfully updated U-Boot," \${note} "power-cycle and enter \"run setupdate\; run migrate_v2.3b7\" to complete update" +setenv migrate_v2.3b7 'run migrate_configblock; nand erase.part ubi; run update_new' +setenv update_v2.3b7 'setenv ram-size 256; run update_uboot && setenv note "wait a sec," && run echo_v2.3b7 && md 0x1ffffffc 1 && setenv ram-size 512 && run update_uboot && setenv note && run echo_v2.3b7' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run prepare_ubi && run update_kernel && run update_rootfs && run update_fdt; reset' +setenv update 'if test -v $ver; then run update_new; else run update_v2.3b7; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_eth.scr b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_eth.scr new file mode 100644 index 0000000..7f4cbb4 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/flash_eth.scr @@ -0,0 +1,33 @@ +test -n ${hw-version} || if test $lnxoffset = 0x1200000; then setenv hw-version v11; else setenv hw-version v12; fi + +setenv check_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; nand read $fdt_addr_r 0x300000 0x64; crc32 -v $toradex_oui_addr 3 94305232' + +setenv migrate_1 'nand read $fdt_addr_r 0x15C0000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_2 'nand read $fdt_addr_r 0x1C80000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_3 'nand read $fdt_addr_r 0x7380000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_4 'nand read $fdt_addr_r 0x7900000 0x40; crc32 -v $toradex_oui_addr 3 94305232 && nand erase.part cfgblock && nand write $fdt_addr_r 0x300000 0x64' +setenv migrate_configblock 'setexpr toradex_oui_addr $fdt_addr_r + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs - dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' + +setenv update_configblock 'tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && nand erase.part cfgblock && nand write ${fdt_addr_r} cfgblock ${filesize}' +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}-${ram-size}-${hw-version}-nand.img && nand erase 0x0 0x300000 && nand write ${fdt_addr_r} 0x0 ${filesize}' + +setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && run prepare_rootfs && ubi write ${fdt_addr_r} rootfs ${filesize}' +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +#Writting data to invalidate current device tree +setenv update_fdt 'mw.w ${fdt_addr_r} 0xFF 16 && ubi write ${fdt_addr_r} dtb 16 && tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && +ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs_${leb-size}.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv echo_v2.3b7 echo "successfully updated U-Boot," \${note} "power-cycle and enter \"run setupdate\; run migrate_v2.3b7\" to complete update" +setenv migrate_v2.3b7 'run migrate_configblock; nand erase.part ubi; run update_new' +setenv update_v2.3b7 'setenv ram-size 256; run update_uboot && setenv note "wait a sec," && run echo_v2.3b7 && md 0x1ffffffc 1 && setenv ram-size 512 && run update_uboot && setenv note && run echo_v2.3b7' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run prepare_ubi && run update_kernel && run update_rootfs && run update_fdt; reset' +setenv update 'if test -v $ver; then run update_new; else run update_v2.3b7; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_blk.scr b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_eth.scr b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/colibri-t20_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/colibri-t20/update/tegra-uboot-flasher/genext3fs.sh new file mode 120000 index 0000000..cc716db --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/tegra-uboot-flasher/genext3fs.sh @@ -0,0 +1 @@ +../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t20/update/update.sh b/recipes-images/images/files/colibri-t20/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/colibri-t20/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30.img.cfg b/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30.img.cfg deleted file mode 100644 index d797a13..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30.img.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2013-2014 Toradex, Inc. -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# 3. This notice may not be removed or altered from any source distribution. - -Version = 0x00020001; -Bctcopy = 1; -Bctfile = colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct; -BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct b/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct deleted file mode 100755 index 109f0c0..0000000 Binary files a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct b/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct deleted file mode 100644 index 0349242..0000000 Binary files a/recipes-images/images/files/colibri-t30/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct and /dev/null differ diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr deleted file mode 100644 index aefc08f..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr +++ /dev/null @@ -1,46 +0,0 @@ -test -n ${interface} || setenv interface mmc -test -n ${drive} || setenv drive 1 - -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' - -setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv echo_v2.3b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b1\" to complete update" -setenv migrate_v2.3b1 'run migrate_configblock; run update_new' -setenv update_v2.3b1 'run update_uboot && run echo_v2.3b1' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' -setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b1; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr deleted file mode 100644 index 26eb0a3..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr +++ /dev/null @@ -1,43 +0,0 @@ -setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' -#workaround U-Boot counting in hex and split did in decimal -setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' -setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' - -setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' - -setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' -setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' - -setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' - -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' - -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb ${filesize}' - -setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' - -setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' -setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' -#do it in chunks of 64M to fit into DDR RAM of the smallest module -setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' - -setenv echo_v2.3b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b1\" to complete update" -setenv migrate_v2.3b1 'run migrate_configblock; run update_new' -setenv update_v2.3b1 'run update_uboot && run echo_v2.3b1' - -setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' -setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b1; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_blk.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_eth.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-t30/colibri-t30_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/library b/recipes-images/images/files/colibri-t30/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/colibri-t30/tegra-uboot-flasher/genext3fs.sh deleted file mode 120000 index cc716db..0000000 --- a/recipes-images/images/files/colibri-t30/tegra-uboot-flasher/genext3fs.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update.sh b/recipes-images/images/files/colibri-t30/update.sh deleted file mode 120000 index 6ebea84..0000000 --- a/recipes-images/images/files/colibri-t30/update.sh +++ /dev/null @@ -1 +0,0 @@ -../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30.img.cfg b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30.img.cfg new file mode 100644 index 0000000..d797a13 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30.img.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2013-2014 Toradex, Inc. +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +Version = 0x00020001; +Bctcopy = 1; +Bctfile = colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct; +BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete; diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct new file mode 100755 index 0000000..109f0c0 Binary files /dev/null and b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_400MHz.bct differ diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct new file mode 100644 index 0000000..0349242 Binary files /dev/null and b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/colibri_t30_12MHz_NT5CC256M16CP-DI_533MHz.bct differ diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_blk.scr b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_blk.scr new file mode 100644 index 0000000..aefc08f --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_blk.scr @@ -0,0 +1,46 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' + +setenv cp_file_chunk 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'load ${interface} ${drive}:1 ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv echo_v2.3b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b1\" to complete update" +setenv migrate_v2.3b1 'run migrate_configblock; run update_new' +setenv update_v2.3b1 'run update_uboot && run echo_v2.3b1' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' +setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b1; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_eth.scr b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_eth.scr new file mode 100644 index 0000000..26eb0a3 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/flash_eth.scr @@ -0,0 +1,43 @@ +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +#workaround U-Boot counting in hex and split did in decimal +setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true' +setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}' + +setenv check_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${fdt_addr_r} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3' + +setenv migrate_1 'setexpr conf_blk_addr ${fdt_addr_r} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_2 'mmc dev 0 0; mmc read ${fdt_addr_r} 6000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_3 'mmc dev 0 0; mmc read ${fdt_addr_r} 8000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_4 'mmc dev 0 0; mmc read ${fdt_addr_r} 9000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_5 'mmc dev 0 0; mmc read ${fdt_addr_r} 28000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_6 'mmc dev 0 0; mmc read ${fdt_addr_r} 32000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_7 'mmc dev 0 0; mmc read ${fdt_addr_r} 32400 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_8 'mmc dev 0 0; mmc read ${fdt_addr_r} 34000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_9 'mmc dev 0 0; mmc read ${fdt_addr_r} 34800 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_a 'mmc dev 0 0; mmc read ${fdt_addr_r} 36000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_b 'mmc dev 0 0; mmc read ${fdt_addr_r} 37000 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' +setenv migrate_configblock 'setexpr toradex_oui_addr ${fdt_addr_r} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6; run migrate_7; run migrate_8; run migrate_9; run migrate_a; run migrate_b' + +setenv cp_file_chunk 'tftpboot ${fdt_addr_r} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${fdt_addr_r} ${blkstart} ${blkcnt}' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${fdt_addr_r} 0x0 ${blkcnt}' + +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && fatwrite mmc 0:1 ${fdt_addr_r} zImage ${filesize}' + +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && fatwrite mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb ${filesize}' + +setenv update_configblock 'run check_configblock; tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && mmc dev 0 1 && mmc write ${fdt_addr_r} ${conf_blk_offset} 1' + +setenv update_1 'tftpboot ${fdt_addr_r} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x0 0x1' +setenv update_2 'tftpboot ${fdt_addr_r} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${fdt_addr_r} 0x2000 ${blkcnt}' +#do it in chunks of 64M to fit into DDR RAM of the smallest module +setenv update_3 'setenv filesize 4000000; setenv filenum 100; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done' + +setenv echo_v2.3b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.3b1\" to complete update" +setenv migrate_v2.3b1 'run migrate_configblock; run update_new' +setenv update_v2.3b1 'run update_uboot && run echo_v2.3b1' + +setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset' +setenv update 'if test -v ${ver}; then run update_new; else run update_v2.3b1; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_blk.scr b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_eth.scr b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/colibri-t30_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/tegra-uboot-flasher/genext3fs.sh b/recipes-images/images/files/colibri-t30/update/tegra-uboot-flasher/genext3fs.sh new file mode 120000 index 0000000..cc716db --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/tegra-uboot-flasher/genext3fs.sh @@ -0,0 +1 @@ +../../library/genext3fs.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-t30/update/update.sh b/recipes-images/images/files/colibri-t30/update/update.sh new file mode 120000 index 0000000..6ebea84 --- /dev/null +++ b/recipes-images/images/files/colibri-t30/update/update.sh @@ -0,0 +1 @@ +../library/tegra/update.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/README b/recipes-images/images/files/colibri-vf/README deleted file mode 100644 index 8d283da..0000000 --- a/recipes-images/images/files/colibri-vf/README +++ /dev/null @@ -1,6 +0,0 @@ -Toradex Linux BSP -================= - -Use the update.sh script to update your module. Check the Release Notes for -detailed instruction how to use flash your module. The Release Notes is located -in the same directory of the BSP release tarball. diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr b/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr deleted file mode 100644 index ae0fd5c..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_blk.scr +++ /dev/null @@ -1,28 +0,0 @@ -setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000' -setenv update_configblock 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/configblock.bin && nand write ${fdt_addr_r} 0x800 ${filesize}' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' - -setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${fdt_addr_r} u-boot' -setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset' - -# Upgrade part 1, write new U-Boot, but with old ECC format still... -# Store config block temporarly in memory at kernel_addr_r. -setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"' -setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.' - -# Upgrade part 2, use new ECC format for the whole device... -setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}' -setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.' - -# fsl_nfc indicates old NAND format (24-bit ECC), start migration process -setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_eth.scr b/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_eth.scr deleted file mode 100644 index b0e4904..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/flash_eth.scr +++ /dev/null @@ -1,28 +0,0 @@ -setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000' -setenv update_configblock 'tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && nand write ${fdt_addr_r} 0x800 ${filesize}' - -# Migrate to UBI volume based boot schema -setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' -setenv prepare_rootfs 'ubi create rootfs 0 dynamic' -setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' - -setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${fdt_addr_r} u-boot' -setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' -setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' -setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' - -setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset' - -# Upgrade part 1, write new U-Boot, but with old ECC format still... -# Store config block temporarly in memory at kernel_addr_r. -setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"' -setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.' - -# Upgrade part 2, use new ECC format for the whole device... -setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}' -setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.' - -# fsl_nfc indicates old NAND format (24-bit ECC), start migration process -setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi' - -echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_blk.scr b/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_blk.scr deleted file mode 120000 index 5954646..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_blk.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_eth.scr b/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_eth.scr deleted file mode 120000 index decc214..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_eth.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_mmc.scr deleted file mode 120000 index 3848cfa..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/fwd_mmc.scr +++ /dev/null @@ -1 +0,0 @@ -../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/colibri-vf_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-vf/colibri-vf_bin/mk-u-boot-scripts.sh deleted file mode 120000 index ce71dbd..0000000 --- a/recipes-images/images/files/colibri-vf/colibri-vf_bin/mk-u-boot-scripts.sh +++ /dev/null @@ -1 +0,0 @@ -../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/format_sd.sh b/recipes-images/images/files/colibri-vf/format_sd.sh deleted file mode 100755 index 79cc985..0000000 --- a/recipes-images/images/files/colibri-vf/format_sd.sh +++ /dev/null @@ -1,115 +0,0 @@ -#! /bin/sh -# Format a SD card to be used for flashing a Colibri VFxx module -# Then calls update.sh to add needed files - -# sometimes we need the binary echo, not the shell builtin -ECHO=`which echo` - -Usage() -{ - echo "" - echo "Formats and fills a SD card with files for flashing the internal NAND of a" - echo "Colibri VFxx. Optionally creates a rootfs partition to allow booting and taking" - echo "kernel and rootfs from SD card." - echo "ALL DATA ON THE DEVICE GIVEN WITH -d WILL BE DELETED!!" - echo - echo "Requires a running U-Boot on the target. Either one already flashed on the NAND" - echo "or strapping the board to boot from SD card and booting U-Boot from the card" - echo "(only possible on older samples without blown boot fuses)." - echo "" - echo "-h : Prints this message" - echo "" - echo "-d FILE : device file of the SD card" - echo "-f : additionally copy the rootfs into the second partition" - echo "-s : optimise file system for 128MB NAND, increases usable space" - echo " on VF50 module a little, but on VF61 uses also only 128MB" - echo "" - echo "Example \"./format_sd.sh -d /dev/mmcblk0\" prepares the SD card /dev/mmcblk0" - echo "" -} - -#initialise options -DEV="/dev/null" -CFGBLOCK_ONLY=0 -DEBUG_ONLY=0 -KERNEL_ONLY=0 -UBOOT_ONLY=0 -CP_ROOTFS=0 - -while getopts "hd:fs" Option ; do - case $Option in - h) Usage - # Exit if only usage (-h) was specified. - if [[ $# -eq 1 ]] ; then - exit 10 - fi - exit 0 - ;; - d) DEV=$OPTARG - ;; - f) CP_ROOTFS=1 - ;; - s) UPDATE_OPTS="-s" - esac -done - -DEVNAME=`basename $DEV` -DEVNAMESTART=`echo $DEVNAME | cut -c 1-3` - -# sanity checks to try and not touch one of the users hard drives or other issues -if [ ! -b $DEV ] ; then - echo $DEV "is not a block device, " - echo "please specify the device file representing your SD card" - exit 1 -fi -if [ "$DEVNAMESTART" = "sda" ] ; then - echo $DEV "seems to be your primary hard disk," - echo "please specify the device file representing your SD card" - exit 1 -fi -if [ ! -d /sys/block/$DEVNAME ] ; then - echo "/sys/block/$DEVNAME" - echo $DEV "seems to not be a disk, please specify the device file" - echo "representing your SD card (without any trailing number)" - exit 1 -fi -IS_USB_MMC=`ls -l /sys/block/$DEVNAME | grep -c "usb\|mmc"` -if [ $IS_USB_MMC -eq 0 ] ; then - echo $DEV "seems not to be connected over USB or MMC, please specify the device file" - echo "representing your SD card (without any trailing number)" - exit 1 -fi - -if [ "$DEVNAMESTART" = "mmc" ] ; then - PART_PREFIX="p" -else - PART_PREFIX="" -fi -# make sure the partitions are unmounted -sudo umount ${DEV}${PART_PREFIX}? - -# partition and format the vfat partition -sudo parted -s $DEV mklabel msdos mkpart primary fat32 1MB 512MB mkpart primary ext3 512MB 100% -sudo umount ${DEV}${PART_PREFIX}1 -sudo mkfs.fat -n UPDATE ${DEV}${PART_PREFIX}1 - -# dd U-Boot onto the SD card -sudo dd if=colibri-vf_bin/u-boot.imx of=${DEV} bs=512 seek=2 - -sudo mkdir -p mntpoint1 -sudo mount -t vfat ${DEV}${PART_PREFIX}1 mntpoint1 -o umask=0 - -# now copy U-Boot, kernel and ubi-img to the KERNEL partition -DEST=`readlink -e mntpoint1` -./update.sh -o "$DEST" $UPDATE_OPTS - -#copy the rootfs -if [ "$CP_ROOTFS" -eq 1 ] ; then - sudo umount ${DEV}${PART_PREFIX}2 - sudo mkfs.ext3 -L RFS ${DEV}${PART_PREFIX}2 && sync - sudo mkdir -p mntpoint2 - sudo mount -t ext3 ${DEV}${PART_PREFIX}2 mntpoint2 - sudo cp -pPr rootfs/* mntpoint2/ -fi - -sudo umount ${DEV}${PART_PREFIX}? diff --git a/recipes-images/images/files/colibri-vf/library b/recipes-images/images/files/colibri-vf/library new file mode 120000 index 0000000..53bed96 --- /dev/null +++ b/recipes-images/images/files/colibri-vf/library @@ -0,0 +1 @@ +../library \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/update.sh b/recipes-images/images/files/colibri-vf/update.sh deleted file mode 100755 index 0b6b3af..0000000 --- a/recipes-images/images/files/colibri-vf/update.sh +++ /dev/null @@ -1,236 +0,0 @@ -#! /bin/sh -# Prepare files needed for flashing a Colibri VF50/VF61 module and -# copy them to a convenient location for using from a running U-Boot - -set -e - -Flash() -{ - echo "To flash the Colibri VF50/VF61 module a running U-Boot is required. Boot the" - echo "module to the U-Boot prompt and" - echo "" - echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" - echo "and enter:" - echo "'run setupdate'" - echo "" - echo "then to update all components enter:" - echo "'run update'" - echo "" - echo "Alternatively, to update U-Boot enter:" - echo "'run update_uboot'" - echo "to update a component stored in UBI enter:" - echo "'run prepare_ubi'" - echo "followed by one of:" - echo "'run update_kernel'" - echo "'run update_fdt'" - echo "'run update_rootfs'" - echo "" - echo "" - echo "If you don't have a working U-Boot anymore, connect your PC to the module's" - echo "UART, bring the module into the serial download mode and start the update.sh" - echo "script with the -d option. This will copy U-Boot into the module's RAM and" - echo "execute it. Don't forget to also bridge RTS/CTS if using an USB-to-serial" - echo "converter without handshake signals." - echo "" - echo "Then use the following command to get U-Boot running:" - echo "'./update.sh -n -d /dev/ttyUSB0'" - echo "" - echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" - echo "'run setupdate'" - echo "'run update_uboot'" - echo "'run create_bcb'" - echo "'cfgblock create'" -} - -Usage() -{ - echo "" - echo "Prepares and copies files for flashing internal NAND of Colibri VF50/VF61" - echo "" - echo "The recommended way is to copy the files on a SD card or USB flash drive." - echo "The script format_sd.sh may be used to format the SD card." - echo "" - echo "The flash step requires a running U-Boot on the target. Either one already" - echo "flashed on the NAND or downloaded using serial downloader (argument -d)." - echo "" - echo "-d uart_dev : use UART connection to copy/execute U-Boot to/from module's RAM" - echo "-f : flash instructions" - echo "-h : prints this message" - echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" - echo " 1: Colibri VF50/VF61" - echo "-n : disable hardware flow control (bridge RTS/CTS!)" - echo "-o directory : output directory" - echo "-s : optimise file system for 128MB NAND, increases usable space" - echo " on VF50 module a little, but on VF61 uses also only 128MB" - echo "" - echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" - echo "" - echo "*** For detailed recovery/update procedures, refer to the following website: ***" - echo "http://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules" - echo "" -} - -# initialise options -KERNEL_DEVICETREE="%kernel_device_trees%" -KERNEL_IMAGETYPE="zImage" -MODTYPE_DETECT=0 -NORTSCTS=0 -OUT_DIR="" -UBOOT_RECOVERY=0 -# NAND parameters -PAGE=2KiB -BLOCK=124KiB -MAXLEB=8112 - -while getopts "d:fhm:no:s" Option ; do - case $Option in - d) UBOOT_RECOVERY=1 - UARTDEV=$OPTARG - ;; - f) Flash - exit 0 - ;; - h) Usage - exit 0 - ;; - m) MODTYPE_DETECT=$OPTARG - ;; - n) NORTSCTS=1 - ;; - o) OUT_DIR=$OPTARG - ;; - s) MAXLEB=982 - ;; - esac -done - -if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - Usage - exit 1 -fi - -# is OUT_DIR an existing directory? -if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then - echo "$OUT_DIR" "does not exist, exiting" - exit 1 -fi - -case $MODTYPE_DETECT in - 0) # auto detect MODTYPE from rootfs directory - if [ -f rootfs/etc/issue ] ; then - CNT=`grep -c "VF" rootfs/etc/issue || true` - if [ "$CNT" -ge 1 ] ; then - echo "Colibri VF rootfs detected" - MODTYPE=colibri-vf - fi - fi - if [ -e $MODTYPE ] ; then - echo "can not detect module type from ./rootfs/etc/issue" - echo "please specify the module type with the -m parameter" - echo "see help: '$ ./update.sh -h'" - echo "exiting" - exit 1 - fi - ;; - 1) MODTYPE=colibri-vf - echo "Colibri VF rootfs specified" - ;; - *) echo "-m paramter specifies an unknown value" - exit 1 - ;; -esac - -case "$MODTYPE" in - "colibri-vf") - IMAGEFILE=ubifs.img - LOCPATH="vf_flash" - OUT_DIR="$OUT_DIR/colibri_vf" - ;; - *) echo "script internal error, unknown module type set" - exit 1 - ;; -esac - -BINARIES=${MODTYPE}_bin - -#is only U-Boot to be copied to RAM? -if [ "$UBOOT_RECOVERY" -eq 1 ] ; then - LOADEROPTS="" - if [ ${NORTSCTS} = 1 ]; then - LOADEROPTS="--no-rtscts" - fi - - echo "Put the module in recovery mode and press [ENTER]..." - read RESULT - sudo ${LOCPATH}/imx_uart ${LOADEROPTS} ${UARTDEV} ${LOCPATH}/vybrid_usb_work.conf ${BINARIES}/u-boot.imx - exit -fi - -#sanity check for correct untared rootfs -DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` -if [ "${DEV_OWNER}x" != "rootx" ] -then - printf "rootfs/dev is not owned by root, but it should!\n" - printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" - printf "e.g. sudo tar xjvf Colibri_VF_LinuxImageV2.6_20160331.tar.bz2\n" - exit 1 -fi - -#sanity check, can we execute mkfs.ubifs, e.g. see the help text? -CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` -if [ "$CNT" -eq 0 ] ; then - echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" - echo "option." - echo "Are you on a 64bit Linux host without installed 32bit execution environment?" - printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m\n" - printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m\n" - exit 1 -fi - -#Install trap to write a sensible message in case any of the commands below -#exit premature... -trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT - -#Prepare full flashing -sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v - -echo "" -echo "UBI image of root file system generated, copying data to target folder..." - -#make a file with the used versions for U-Boot, kernel and rootfs -sudo touch ${BINARIES}/versions.txt -sudo chmod ugo+w ${BINARIES}/versions.txt -echo "Component Versions" > ${BINARIES}/versions.txt -basename "`readlink -e ${BINARIES}/u-boot.imx`" >> ${BINARIES}/versions.txt -ROOTFSVERSION=`grep VF rootfs/etc/issue || echo "Version Unknown"` -echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt - -#create subdirectory for this module type -sudo mkdir -p "$OUT_DIR" - -# Copy device tree file -COPIED=false -if test -n "${KERNEL_DEVICETREE}"; then - for DTB_FILE in ${KERNEL_DEVICETREE}; do - if [ -e "${BINARIES}/${DTB_FILE}" ]; then - sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" - COPIED=true - fi - done - [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } -fi - -#copy to $OUT_DIR -sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" -sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" -sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" -sudo cp ${BINARIES}/fwd_mmc.img "$OUT_DIR/../flash_mmc.img" -#cleanup intermediate files -sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt -sync - -#Remove trap and report success! -trap - EXIT -printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" - -Flash diff --git a/recipes-images/images/files/colibri-vf/update/README b/recipes-images/images/files/colibri-vf/update/README new file mode 100644 index 0000000..8d283da --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/README @@ -0,0 +1,6 @@ +Toradex Linux BSP +================= + +Use the update.sh script to update your module. Check the Release Notes for +detailed instruction how to use flash your module. The Release Notes is located +in the same directory of the BSP release tarball. diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_blk.scr b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_blk.scr new file mode 100644 index 0000000..ae0fd5c --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_blk.scr @@ -0,0 +1,28 @@ +setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000' +setenv update_configblock 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/configblock.bin && nand write ${fdt_addr_r} 0x800 ${filesize}' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' + +setenv update_uboot 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${fdt_addr_r} u-boot' +setenv update_kernel 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'fatload ${interface} 0:1 ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset' + +# Upgrade part 1, write new U-Boot, but with old ECC format still... +# Store config block temporarly in memory at kernel_addr_r. +setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"' +setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.' + +# Upgrade part 2, use new ECC format for the whole device... +setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}' +setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.' + +# fsl_nfc indicates old NAND format (24-bit ECC), start migration process +setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_eth.scr b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_eth.scr new file mode 100644 index 0000000..b0e4904 --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/flash_eth.scr @@ -0,0 +1,28 @@ +setenv create_bcb 'nand erase.part vf-bcb && writebcb 0x20000 0x20000' +setenv update_configblock 'tftpboot ${fdt_addr_r} ${board_name}/configblock.bin && nand write ${fdt_addr_r} 0x800 ${filesize}' + +# Migrate to UBI volume based boot schema +setenv prepare_kernel_fdt 'ubi create kernel 0x800000 static && ubi create dtb 0x20000 static' +setenv prepare_rootfs 'ubi create rootfs 0 dynamic' +setenv prepare_ubi 'ubi part ubi && if ubi check rootfs; then if ubi check kernel; then else ubi remove rootfs && run prepare_kernel_fdt && run prepare_rootfs; fi; else run prepare_kernel_fdt && run prepare_rootfs; fi' + +setenv update_uboot 'tftpboot ${fdt_addr_r} ${board_name}/u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${fdt_addr_r} u-boot' +setenv update_kernel 'tftpboot ${fdt_addr_r} ${board_name}/zImage && ubi write ${fdt_addr_r} kernel ${filesize}' +setenv update_fdt 'tftpboot ${fdt_addr_r} ${board_name}/${soc}-colibri-${fdt_board}.dtb && ubi write ${fdt_addr_r} dtb ${filesize}' +setenv update_rootfs 'tftpboot ${fdt_addr_r} ${board_name}/ubifs.img && ubi write ${fdt_addr_r} rootfs ${filesize}' + +setenv update_new 'run update_uboot; run prepare_ubi && run update_kernel && run update_fdt && run update_rootfs; reset' + +# Upgrade part 1, write new U-Boot, but with old ECC format still... +# Store config block temporarly in memory at kernel_addr_r. +setenv upgrade_part1 'run update_uboot && nand read ${kernel_addr_r} 0x800 0x20 && echo "${upgrade_part1_msg}"' +setenv upgrade_part1_msg 'Successfully updated U-Boot, NAND upgrade required. Enter "reset", interrupt boot process and enter "run setupdate; run upgrade_part2" to complete upgrade.' + +# Upgrade part 2, use new ECC format for the whole device... +setenv upgrade_part2 'run create_bcb && nand write ${kernel_addr_r} 0x800 0x20 && run update_uboot && nand erase.part ubi && run update_rootfs && echo ${upgrade_part2_msg}' +setenv upgrade_part2_msg 'Successfully upgraded module, enter "reset" to restart the module.' + +# fsl_nfc indicates old NAND format (24-bit ECC), start migration process +setenv update 'mtdparts default && if test "${mtdids}" = "nand0=fsl_nfc"; then; run upgrade_part1; else run update_new; fi' + +echo 'enter "run update" to update the entire module' diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_blk.scr b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_blk.scr new file mode 120000 index 0000000..5954646 --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_blk.scr @@ -0,0 +1 @@ +../../library/fwd_blk.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_eth.scr b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_eth.scr new file mode 120000 index 0000000..decc214 --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_eth.scr @@ -0,0 +1 @@ +../../library/fwd_eth.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_mmc.scr b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_mmc.scr new file mode 120000 index 0000000..3848cfa --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/fwd_mmc.scr @@ -0,0 +1 @@ +../../library/fwd_mmc.scr \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/mk-u-boot-scripts.sh b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/mk-u-boot-scripts.sh new file mode 120000 index 0000000..ce71dbd --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/colibri-vf_bin/mk-u-boot-scripts.sh @@ -0,0 +1 @@ +../../library/mk-u-boot-scripts.sh \ No newline at end of file diff --git a/recipes-images/images/files/colibri-vf/update/format_sd.sh b/recipes-images/images/files/colibri-vf/update/format_sd.sh new file mode 100755 index 0000000..79cc985 --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/format_sd.sh @@ -0,0 +1,115 @@ +#! /bin/sh +# Format a SD card to be used for flashing a Colibri VFxx module +# Then calls update.sh to add needed files + +# sometimes we need the binary echo, not the shell builtin +ECHO=`which echo` + +Usage() +{ + echo "" + echo "Formats and fills a SD card with files for flashing the internal NAND of a" + echo "Colibri VFxx. Optionally creates a rootfs partition to allow booting and taking" + echo "kernel and rootfs from SD card." + echo "ALL DATA ON THE DEVICE GIVEN WITH -d WILL BE DELETED!!" + echo + echo "Requires a running U-Boot on the target. Either one already flashed on the NAND" + echo "or strapping the board to boot from SD card and booting U-Boot from the card" + echo "(only possible on older samples without blown boot fuses)." + echo "" + echo "-h : Prints this message" + echo "" + echo "-d FILE : device file of the SD card" + echo "-f : additionally copy the rootfs into the second partition" + echo "-s : optimise file system for 128MB NAND, increases usable space" + echo " on VF50 module a little, but on VF61 uses also only 128MB" + echo "" + echo "Example \"./format_sd.sh -d /dev/mmcblk0\" prepares the SD card /dev/mmcblk0" + echo "" +} + +#initialise options +DEV="/dev/null" +CFGBLOCK_ONLY=0 +DEBUG_ONLY=0 +KERNEL_ONLY=0 +UBOOT_ONLY=0 +CP_ROOTFS=0 + +while getopts "hd:fs" Option ; do + case $Option in + h) Usage + # Exit if only usage (-h) was specified. + if [[ $# -eq 1 ]] ; then + exit 10 + fi + exit 0 + ;; + d) DEV=$OPTARG + ;; + f) CP_ROOTFS=1 + ;; + s) UPDATE_OPTS="-s" + esac +done + +DEVNAME=`basename $DEV` +DEVNAMESTART=`echo $DEVNAME | cut -c 1-3` + +# sanity checks to try and not touch one of the users hard drives or other issues +if [ ! -b $DEV ] ; then + echo $DEV "is not a block device, " + echo "please specify the device file representing your SD card" + exit 1 +fi +if [ "$DEVNAMESTART" = "sda" ] ; then + echo $DEV "seems to be your primary hard disk," + echo "please specify the device file representing your SD card" + exit 1 +fi +if [ ! -d /sys/block/$DEVNAME ] ; then + echo "/sys/block/$DEVNAME" + echo $DEV "seems to not be a disk, please specify the device file" + echo "representing your SD card (without any trailing number)" + exit 1 +fi +IS_USB_MMC=`ls -l /sys/block/$DEVNAME | grep -c "usb\|mmc"` +if [ $IS_USB_MMC -eq 0 ] ; then + echo $DEV "seems not to be connected over USB or MMC, please specify the device file" + echo "representing your SD card (without any trailing number)" + exit 1 +fi + +if [ "$DEVNAMESTART" = "mmc" ] ; then + PART_PREFIX="p" +else + PART_PREFIX="" +fi +# make sure the partitions are unmounted +sudo umount ${DEV}${PART_PREFIX}? + +# partition and format the vfat partition +sudo parted -s $DEV mklabel msdos mkpart primary fat32 1MB 512MB mkpart primary ext3 512MB 100% +sudo umount ${DEV}${PART_PREFIX}1 +sudo mkfs.fat -n UPDATE ${DEV}${PART_PREFIX}1 + +# dd U-Boot onto the SD card +sudo dd if=colibri-vf_bin/u-boot.imx of=${DEV} bs=512 seek=2 + +sudo mkdir -p mntpoint1 +sudo mount -t vfat ${DEV}${PART_PREFIX}1 mntpoint1 -o umask=0 + +# now copy U-Boot, kernel and ubi-img to the KERNEL partition +DEST=`readlink -e mntpoint1` +./update.sh -o "$DEST" $UPDATE_OPTS + +#copy the rootfs +if [ "$CP_ROOTFS" -eq 1 ] ; then + sudo umount ${DEV}${PART_PREFIX}2 + sudo mkfs.ext3 -L RFS ${DEV}${PART_PREFIX}2 && sync + sudo mkdir -p mntpoint2 + sudo mount -t ext3 ${DEV}${PART_PREFIX}2 mntpoint2 + sudo cp -pPr rootfs/* mntpoint2/ +fi + +sudo umount ${DEV}${PART_PREFIX}? diff --git a/recipes-images/images/files/colibri-vf/update/update.sh b/recipes-images/images/files/colibri-vf/update/update.sh new file mode 100755 index 0000000..0b6b3af --- /dev/null +++ b/recipes-images/images/files/colibri-vf/update/update.sh @@ -0,0 +1,236 @@ +#! /bin/sh +# Prepare files needed for flashing a Colibri VF50/VF61 module and +# copy them to a convenient location for using from a running U-Boot + +set -e + +Flash() +{ + echo "To flash the Colibri VF50/VF61 module a running U-Boot is required. Boot the" + echo "module to the U-Boot prompt and" + echo "" + echo "insert the SD card, USB flash drive or when using TFTP connect Ethernet only" + echo "and enter:" + echo "'run setupdate'" + echo "" + echo "then to update all components enter:" + echo "'run update'" + echo "" + echo "Alternatively, to update U-Boot enter:" + echo "'run update_uboot'" + echo "to update a component stored in UBI enter:" + echo "'run prepare_ubi'" + echo "followed by one of:" + echo "'run update_kernel'" + echo "'run update_fdt'" + echo "'run update_rootfs'" + echo "" + echo "" + echo "If you don't have a working U-Boot anymore, connect your PC to the module's" + echo "UART, bring the module into the serial download mode and start the update.sh" + echo "script with the -d option. This will copy U-Boot into the module's RAM and" + echo "execute it. Don't forget to also bridge RTS/CTS if using an USB-to-serial" + echo "converter without handshake signals." + echo "" + echo "Then use the following command to get U-Boot running:" + echo "'./update.sh -n -d /dev/ttyUSB0'" + echo "" + echo "Next, recreate the Boot Configuration Block and the Toradex Config Block:" + echo "'run setupdate'" + echo "'run update_uboot'" + echo "'run create_bcb'" + echo "'cfgblock create'" +} + +Usage() +{ + echo "" + echo "Prepares and copies files for flashing internal NAND of Colibri VF50/VF61" + echo "" + echo "The recommended way is to copy the files on a SD card or USB flash drive." + echo "The script format_sd.sh may be used to format the SD card." + echo "" + echo "The flash step requires a running U-Boot on the target. Either one already" + echo "flashed on the NAND or downloaded using serial downloader (argument -d)." + echo "" + echo "-d uart_dev : use UART connection to copy/execute U-Boot to/from module's RAM" + echo "-f : flash instructions" + echo "-h : prints this message" + echo "-m : module type: 0: autodetect from ./rootfs/etc/issues (default)" + echo " 1: Colibri VF50/VF61" + echo "-n : disable hardware flow control (bridge RTS/CTS!)" + echo "-o directory : output directory" + echo "-s : optimise file system for 128MB NAND, increases usable space" + echo " on VF50 module a little, but on VF61 uses also only 128MB" + echo "" + echo "Example \"./update.sh -o /media/KERNEL/\" copies the required files to SD card" + echo "" + echo "*** For detailed recovery/update procedures, refer to the following website: ***" + echo "http://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules" + echo "" +} + +# initialise options +KERNEL_DEVICETREE="%kernel_device_trees%" +KERNEL_IMAGETYPE="zImage" +MODTYPE_DETECT=0 +NORTSCTS=0 +OUT_DIR="" +UBOOT_RECOVERY=0 +# NAND parameters +PAGE=2KiB +BLOCK=124KiB +MAXLEB=8112 + +while getopts "d:fhm:no:s" Option ; do + case $Option in + d) UBOOT_RECOVERY=1 + UARTDEV=$OPTARG + ;; + f) Flash + exit 0 + ;; + h) Usage + exit 0 + ;; + m) MODTYPE_DETECT=$OPTARG + ;; + n) NORTSCTS=1 + ;; + o) OUT_DIR=$OPTARG + ;; + s) MAXLEB=982 + ;; + esac +done + +if [ "$OUT_DIR" = "" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + Usage + exit 1 +fi + +# is OUT_DIR an existing directory? +if [ ! -d "$OUT_DIR" ] && [ "$UBOOT_RECOVERY" = "0" ] ; then + echo "$OUT_DIR" "does not exist, exiting" + exit 1 +fi + +case $MODTYPE_DETECT in + 0) # auto detect MODTYPE from rootfs directory + if [ -f rootfs/etc/issue ] ; then + CNT=`grep -c "VF" rootfs/etc/issue || true` + if [ "$CNT" -ge 1 ] ; then + echo "Colibri VF rootfs detected" + MODTYPE=colibri-vf + fi + fi + if [ -e $MODTYPE ] ; then + echo "can not detect module type from ./rootfs/etc/issue" + echo "please specify the module type with the -m parameter" + echo "see help: '$ ./update.sh -h'" + echo "exiting" + exit 1 + fi + ;; + 1) MODTYPE=colibri-vf + echo "Colibri VF rootfs specified" + ;; + *) echo "-m paramter specifies an unknown value" + exit 1 + ;; +esac + +case "$MODTYPE" in + "colibri-vf") + IMAGEFILE=ubifs.img + LOCPATH="vf_flash" + OUT_DIR="$OUT_DIR/colibri_vf" + ;; + *) echo "script internal error, unknown module type set" + exit 1 + ;; +esac + +BINARIES=${MODTYPE}_bin + +#is only U-Boot to be copied to RAM? +if [ "$UBOOT_RECOVERY" -eq 1 ] ; then + LOADEROPTS="" + if [ ${NORTSCTS} = 1 ]; then + LOADEROPTS="--no-rtscts" + fi + + echo "Put the module in recovery mode and press [ENTER]..." + read RESULT + sudo ${LOCPATH}/imx_uart ${LOADEROPTS} ${UARTDEV} ${LOCPATH}/vybrid_usb_work.conf ${BINARIES}/u-boot.imx + exit +fi + +#sanity check for correct untared rootfs +DEV_OWNER=`ls -ld rootfs/dev | awk '{print $3}'` +if [ "${DEV_OWNER}x" != "rootx" ] +then + printf "rootfs/dev is not owned by root, but it should!\n" + printf "\033[1mPlease unpack the tarball with root rights.\033[0m\n" + printf "e.g. sudo tar xjvf Colibri_VF_LinuxImageV2.6_20160331.tar.bz2\n" + exit 1 +fi + +#sanity check, can we execute mkfs.ubifs, e.g. see the help text? +CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` +if [ "$CNT" -eq 0 ] ; then + echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" + echo "option." + echo "Are you on a 64bit Linux host without installed 32bit execution environment?" + printf "\033[1mPlease install e.g. ia32-libs on 64-bit Ubuntu\033[0m\n" + printf "\033[1mMaybe others are needed e.g. liblzo2:i386 on 64-bit Ubuntu\033[0m\n" + exit 1 +fi + +#Install trap to write a sensible message in case any of the commands below +#exit premature... +trap '{ printf "\033[31mScript aborted unexpectedly...\033[0m\n"; }' EXIT + +#Prepare full flashing +sudo $LOCPATH/mkfs.ubifs --space-fixup -c ${MAXLEB} -e ${BLOCK} -m ${PAGE} -o ${BINARIES}/${IMAGEFILE} -r rootfs/ -v + +echo "" +echo "UBI image of root file system generated, copying data to target folder..." + +#make a file with the used versions for U-Boot, kernel and rootfs +sudo touch ${BINARIES}/versions.txt +sudo chmod ugo+w ${BINARIES}/versions.txt +echo "Component Versions" > ${BINARIES}/versions.txt +basename "`readlink -e ${BINARIES}/u-boot.imx`" >> ${BINARIES}/versions.txt +ROOTFSVERSION=`grep VF rootfs/etc/issue || echo "Version Unknown"` +echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt + +#create subdirectory for this module type +sudo mkdir -p "$OUT_DIR" + +# Copy device tree file +COPIED=false +if test -n "${KERNEL_DEVICETREE}"; then + for DTB_FILE in ${KERNEL_DEVICETREE}; do + if [ -e "${BINARIES}/${DTB_FILE}" ]; then + sudo cp ${BINARIES}/${DTB_FILE} "$OUT_DIR/" + COPIED=true + fi + done + [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; } +fi + +#copy to $OUT_DIR +sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" +sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img" +sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img" +sudo cp ${BINARIES}/fwd_mmc.img "$OUT_DIR/../flash_mmc.img" +#cleanup intermediate files +sudo rm ${BINARIES}/ubifs.img ${BINARIES}/versions.txt +sync + +#Remove trap and report success! +trap - EXIT +printf "\033[32mSuccessfully copied data to target folder.\033[0m\n\n" + +Flash diff --git a/recipes-images/images/files/update/no_update_defined.txt b/recipes-images/images/files/update/no_update_defined.txt new file mode 100644 index 0000000..34c2429 --- /dev/null +++ b/recipes-images/images/files/update/no_update_defined.txt @@ -0,0 +1,16 @@ +For this machine no directory with the files for the legacy update +procedure was found. So the legacy update image will not be built. + +If you inherited your machine.conf from one of the toradex machines for which +the legacy update exists make sure to amend your overrides, e.g. if your +building for a colibri-imx6.conf derived machine add something like this to +your machine.conf file: + +MACHINEOVERRIDES .= ":colibri-imx6 + +alternatively add a directory tree with the needed files for your machine +to: + +images/files//update/ + +Note that this must not include a file named no_update_defined.txt! \ No newline at end of file diff --git a/recipes-images/images/tdx-image-fstype.inc b/recipes-images/images/tdx-image-fstype.inc index 13ff51e..8062284 100644 --- a/recipes-images/images/tdx-image-fstype.inc +++ b/recipes-images/images/tdx-image-fstype.inc @@ -3,7 +3,6 @@ include conf/tdx_version.conf PV = "${TDX_VER_PACKAGE_MIN}" -BURNFLASH := "${THISDIR}/files/${MACHINE}" IMAGE_DIR = "${IMAGE_NAME}_${TDX_VER_ITEM}" IMAGE_ROOTFS = "${WORKDIR}/${IMAGE_DIR}/rootfs" @@ -25,7 +24,7 @@ UBOOT_BINARY_tegra124 = "u-boot-dtb-tegra.${UBOOT_EXT}" UBOOT_BINARY_tegra124m = "u-boot-dtb-tegra.${UBOOT_EXT}" #we need some native tools for deployment -DEPENDS_append = " pbzip2-native" +DEPENDS_append = " pbzip2-native tdx-updater" DEPENDS_append_mx6 = " imx-loader-native" DEPENDS_append_use-mainline-bsp = " imx-loader-native" DEPENDS_append_mx6ull = " mtd-utils-native imx-loader-native" @@ -37,7 +36,7 @@ DEPENDS_append_tegra2 = " mtd-utils-native" DEPENDS_append_vf = " mtd-utils-native imx-loader-native" #we need mkimage to produce the U-Boot scripts even if not building a uImage kernel DEPENDS_append_arm = " virtual/bootloader u-boot-mkimage-native" -DEPENDS_remove_qemuarm = "virtual/bootloader" +DEPENDS_remove_qemuall = "virtual/bootloader" imagedeploytools() { # default to nothing to deploy @@ -113,7 +112,7 @@ imagedeploytools_append_mx7() { ${BUILD_STRIP} ${IMAGE_ROOT}/imx_usb cp ${STAGING_ETCDIR_NATIVE}/imx-loader.d/imx_usb.conf ${IMAGE_ROOT}/ cp ${STAGING_ETCDIR_NATIVE}/imx-loader.d/mx7_usb_*.conf ${IMAGE_ROOT}/ - cp ${IMAGE_ROOTFS}/../${MACHINE}_bin/${UBOOT_BINARY} ${IMAGE_ROOTFS}/../${MACHINE}_bin/u-boot.imx + cp ${MACHINE_BIN}/${UBOOT_BINARY} ${MACHINE_BIN}/u-boot.imx } imagedeploytools_append_tegra() { @@ -173,9 +172,9 @@ imagedeploytools_append_vf() { imagedeploy_kernel() { # put kernel, existing device-tree(s) into the bin directories - cp -pP ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ - ls ${DEPLOY_DIR_IMAGE}/*.dtb 2> /dev/null && cp -pP ${DEPLOY_DIR_IMAGE}/*.dtb ${IMAGE_ROOTFS}/../${MACHINE}_bin/ - mv ${IMAGE_ROOTFS}/../${MACHINE}_bin/${KERNEL_IMAGETYPE}-${MACHINE}.bin ${IMAGE_ROOTFS}/../${MACHINE}_bin/${KERNEL_IMAGETYPE} + cp -pP ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}* ${MACHINE_BIN}/ + ls ${DEPLOY_DIR_IMAGE}/*.dtb 2> /dev/null && cp -pP ${DEPLOY_DIR_IMAGE}/*.dtb ${MACHINE_BIN}/ + mv ${MACHINE_BIN}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ${MACHINE_BIN}/${KERNEL_IMAGETYPE} } fakeroot imagedeploy() { @@ -184,23 +183,24 @@ fakeroot imagedeploy() { fakeroot imagedeploy_arm() { cd ${WORKDIR} - cp -Lr ${BURNFLASH}/* ${IMAGE_DIR}/ + cp -Lr ${RECIPE_SYSROOT}${datadir}/update/* ${IMAGE_DIR}/ + export MACHINE_BIN=$(readlink -e ${IMAGE_ROOTFS}/../*_bin) sed -i 's/%kernel_device_trees%/${KERNEL_DEVICETREE}/' ${IMAGE_DIR}/update.sh - cd ${IMAGE_DIR}/${MACHINE}_bin + cd ${IMAGE_DIR}/*_bin ./mk-u-boot-scripts.sh cd ${WORKDIR} imagedeploy_kernel - cp -P ${DEPLOY_DIR_IMAGE}/u-boot* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ + cp -P ${DEPLOY_DIR_IMAGE}/u-boot* ${MACHINE_BIN}/ if [ -e ${DEPLOY_DIR_IMAGE}/SPL ] then - cp -P ${DEPLOY_DIR_IMAGE}/SPL* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ + cp -P ${DEPLOY_DIR_IMAGE}/SPL* ${MACHINE_BIN}/ fi - rm -f ${IMAGE_ROOTFS}/../${MACHINE}_bin/u-boot-hsmmc-${MACHINE}.${UBOOT_EXT} - mv ${IMAGE_ROOTFS}/../${MACHINE}_bin/${UBOOT_SYMLINK} ${IMAGE_ROOTFS}/../${MACHINE}_bin/${UBOOT_BINARY} + rm -f ${MACHINE_BIN}/u-boot-hsmmc-${MACHINE}.${UBOOT_EXT} + mv ${MACHINE_BIN}/${UBOOT_SYMLINK} ${MACHINE_BIN}/${UBOOT_BINARY} # add additional tools if required imagedeploytools @@ -214,7 +214,7 @@ fakeroot imagedeploy_arm() { } fakeroot do_imagedeploy() { - if [ -e ${BURNFLASH} ] + if [ ! -e ${RECIPE_SYSROOT}/${datadir}/update/no_update_defined.txt ] then imagedeploy fi diff --git a/recipes-images/images/tdx-updater_1.0.bb b/recipes-images/images/tdx-updater_1.0.bb new file mode 100644 index 0000000..bee6a35 --- /dev/null +++ b/recipes-images/images/tdx-updater_1.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Toradex legacy updater host files" +DESCRIPTION = "Deploys files used by tdx-image-fstype.inc to create \ +the legacy update tarball." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://update file://library" + +do_install () { + install -d ${D}/${datadir}/update + cp -Lr ${WORKDIR}/update/* ${D}/${datadir}/update/ +} + +FILES_${PN} += "${datadir}/update" +PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3