Artik5 Example: Minimal SD Card boot
PATCH 1/1 Artik5 Example: Minimal SD Card boot
Signed-off-by Kuldeep Singh Dhaka <[email protected]>
--- DEVELOPERS | 5 + board/artik520/genimage.cfg | 56 ++++ ...ing-able-to-find-skinny-extents-duri.patch | 88 ++++++ ...-mali-Fix-out-of-tree-compile-errors.patch | 278 ++++++++++++++++++ board/artik520/post-image.sh | 33 +++ ...0001-fix-single-sdfuse-flash-command.patch | 17 ++ configs/artik520_sdboot_defconfig | 28 ++ package/Config.in | 1 + package/artik520-boot-firmware/Config.in | 6 + .../artik520-boot-firmware.hash | 2 + .../artik520-boot-firmware.mk | 16 + 11 files changed, 530 insertions(+) create mode 100644 board/artik520/genimage.cfg create mode 100644 board/artik520/linux/0001-Btrfs-fix-not-being-able-to-find-skinny-extents-duri.patch create mode 100644 board/artik520/linux/0002-mali-Fix-out-of-tree-compile-errors.patch create mode 100755 board/artik520/post-image.sh create mode 100644 board/artik520/u-boot/0001-fix-single-sdfuse-flash-command.patch create mode 100644 configs/artik520_sdboot_defconfig create mode 100644 package/artik520-boot-firmware/Config.in create mode 100644 package/artik520-boot-firmware/artik520-boot-firmware.hash create mode 100644 package/artik520-boot-firmware/artik520-boot-firmware.mk
DEVELOPERS +5 -0
@@ -1111,6 +1111,11 @@ F: package/libgphoto2/ N: Koen Martens <[email protected]> F: package/linuxconsoletools/ +N: Kuldeep Singh Dhaka <[email protected]> +F: board/artik520/ +F: configs/artik520_sdboot_defconfig +F: package/artik520-boot-firmware/ + N: Kurt Van Dijck <[email protected]> F: package/bcusdk/ F: package/libpthsem/
board/artik520/genimage.cfg new file +56 -0
56 lines not on this page · raw message
board/artik520/linux/0001-Btrfs-fix-not-being-able-to-find-skinny-extents-duri.patch new file +88 -0
88 lines not on this page · raw message
board/artik520/linux/0002-mali-Fix-out-of-tree-compile-errors.patch new file +278 -0
278 lines not on this page · raw message
board/artik520/post-image.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +ARTIK520_TMP="${BUILD_DIR}/artik520.tmp" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" + +rm -rf "${ARTIK520_TMP}" "${GENIMAGE_TMP}" +mkdir -p "${ARTIK520_TMP}" + +cp "${BUILD_DIR}/uboot-custom/common/env_common.o" "${ARTIK520_TMP}/env_common.o" +arm-linux-objcopy -O binary --only-section=.rodata "${ARTIK520_TMP}/env_common.o" +tr '\0' '\n' < "${ARTIK520_TMP}/env_common.o" | grep '=' > "${ARTIK520_TMP}/env_common.txt" + +# /dev/mmcblk1 is SD Card +# Kernel in /dev/mmcblk1p1 +# FAT32 filesystem for /dev/mmcblk1p1 +# root=/dev/mmcblk1p2 +# When u-boot is loaded from SD card, eMMC is device 1! (0 if u-boot from eMMC) +sed -i -e 's/rootdev=[0-9]/rootdev=1/g' \ + -e 's/rootpart=[0-9]/rootpart=2/g' \ + -e 's/bootcmd=.*/bootcmd=run mmcboot/g' \ + -e 's/emmc_dev=0/emmc_dev=1/g' \ + "${ARTIK520_TMP}/env_common.txt" + +mkenvimage -s 16384 -o "${BINARIES_DIR}/u-boot-env.bin" "${ARTIK520_TMP}/env_common.txt" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}"
board/artik520/u-boot/0001-fix-single-sdfuse-flash-command.patch new file +17 -0
@@ -0,0 +1,17 @@ +u-boot-artik: Fix sdfuse command when flashing individual components + +Signed-off-by: Florin Sarbu <[email protected]> + + +Index: git/common/cmd_fastboot.c +=================================================================== +--- git.orig/common/cmd_fastboot.c ++++ git/common/cmd_fastboot.c +@@ -2268,6 +2268,7 @@ int do_sdfuse (cmd_tbl_t *cmdtp, int fla + + ret = 0; + } else if ((argc == 5) && !strcmp(argv[1], "flash")) { ++ part_num = simple_strtoul(argv[2], NULL, 16); + if (update_from_sd(part_num, argv[3], argv[4])) + return -1; +
configs/artik520_sdboot_defconfig new file +28 -0
@@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +BR2_GCC_VERSION_6_X=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/artik520/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,SamsungARTIK,linux-artik,artik-exynos/v3.10.x)/linux-artik-exynos-v3.10.x.tar.gz" +BR2_LINUX_KERNEL_PATCH="board/artik520/linux/" +BR2_LINUX_KERNEL_DEFCONFIG="artik5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos3250-artik5" +BR2_PACKAGE_ARTIK520_BOOT_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="artik5" +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,SamsungARTIK,u-boot-artik,artik-exynos/v2012.07)/u-boot-artik-exynos-v2012.07.tar.gz" +BR2_TARGET_UBOOT_PATCH="board/artik520/u-boot/" +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/espresso3250-spl.bin" +BR2_PACKAGE_HOST_DTC=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
package/Config.in +1 -0
@@ -370,6 +370,7 @@ menu "Hardware handling" menu "Firmware" source "package/am33x-cm3/Config.in" source "package/armbian-firmware/Config.in" + source "package/artik520-boot-firmware/Config.in" source "package/b43-firmware/Config.in" source "package/linux-firmware/Config.in" source "package/rpi-bt-firmware/Config.in"
package/artik520-boot-firmware/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ARTIK520_BOOT_FIRMWARE + bool "artik520-boot-firmware" + help + Artik520 pre-compiled binaries of bootloader. + + https://github.com/SamsungARTIK/boot-firmwares-artik5
package/artik520-boot-firmware/artik520-boot-firmware.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 f4d52b20438b5d9fa0f0ed82e67942748e339c91ff14cbf621c369a00c00f48c artik520-boot-firmware-A520_os_2.0.0.tar.gz
package/artik520-boot-firmware/artik520-boot-firmware.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# artik520-boot-firmware +# +################################################################################ + +ARTIK520_BOOT_FIRMWARE_VERSION = A520_os_2.0.0 +ARTIK520_BOOT_FIRMWARE_SITE = $(call github,SamsungARTIK,boot-firmwares-artik5,$(ARTIK520_BOOT_FIRMWARE_VERSION)) +ARTIK520_BOOT_FIRMWARE_INSTALL_IMAGES = YES + +define ARTIK520_BOOT_FIRMWARE_INSTALL_IMAGES_CMDS + $(INSTALL) -m 0644 $(@D)/bl1.bin $(BINARIES_DIR)/bl1.bin + $(INSTALL) -m 0644 $(@D)/tzsw.bin $(BINARIES_DIR)/tzsw.bin +endef + +$(eval $(generic-package))
Signature · 1 line
2.18.0
PATCH 1/1 Artik5 Example: Minimal SD Card boot
Hello,
Quoted 1 line · On Fri, 20 Jul 2018 16:28:36 +0530 Kuldeep Singh Dhaka…
Signed-off-by Kuldeep Singh Dhaka <[email protected]>
Sorry for not replying earlier. However, in the mean time, you probably have learned that Samsung has discontinued the Artik module/processor family (see
http://www.businesskorea.co.kr/news/articleView.html?idxno=27384) for example. So I don't think there's much sense to have a defconfig for a Artik platform.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com