From patchwork Mon Jan 11 23:28:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1424874 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=AUFC2VVd; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DF8zk6NLtz9sWj for ; Tue, 12 Jan 2021 10:29:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CE4B622BCC; Mon, 11 Jan 2021 23:29:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i31mogkYouQD; Mon, 11 Jan 2021 23:29:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8409C22D0D; Mon, 11 Jan 2021 23:29:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 4E6011BF304 for ; Mon, 11 Jan 2021 23:28:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 44B2E22D0D for ; Mon, 11 Jan 2021 23:28:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cl+y3eSDs2Bb for ; Mon, 11 Jan 2021 23:28:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by silver.osuosl.org (Postfix) with ESMTPS id 7071722BCC for ; Mon, 11 Jan 2021 23:28:56 +0000 (UTC) Received: from mwalle01.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:fa59:71ff:fe9b:b851]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id A4DE523078; Tue, 12 Jan 2021 00:28:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1610407734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lBeI+oH8sKaWwHydF2T4PKSOoTAfytZXoZxTMnXbv/4=; b=AUFC2VVdY4AYoIMjhsVXO2hq3eYlZpIDFxLeCAtQnGcmERRiZpBozLoeims5zSvfLfc5ne rQhP/kei8CaYNuAb+k0V660kYWz3ka7BBqHy8rMIj0iXeKTJUH0MsG91eIczsTGVtlJjbr IT2/H1f4NzVhgBXR8FjLDpg1aZtkEj8= From: Michael Walle To: buildroot@buildroot.org Date: Tue, 12 Jan 2021 00:28:49 +0100 Message-Id: <20210111232849.11810-1-michael@walle.cc> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] configs/kontron_smarc_sal28: enable u-boot X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Enable building of the bootloader and integrate it into the resulting image. Signed-off-by: Michael Walle --- board/kontron/smarc-sal28/genimage.cfg | 6 ++++++ board/kontron/smarc-sal28/readme.txt | 15 +++++++++++++++ configs/kontron_smarc_sal28_defconfig | 9 +++++++++ 3 files changed, 30 insertions(+) diff --git a/board/kontron/smarc-sal28/genimage.cfg b/board/kontron/smarc-sal28/genimage.cfg index 9ef37de757..d75234d997 100644 --- a/board/kontron/smarc-sal28/genimage.cfg +++ b/board/kontron/smarc-sal28/genimage.cfg @@ -3,6 +3,12 @@ image sdcard-emmc.img { gpt = true } + partition u-boot { + offset = 1M + in-partition-table = "no" + image = "u-boot.rom" + } + partition rootfs { offset = 2M image = rootfs.ext4 diff --git a/board/kontron/smarc-sal28/readme.txt b/board/kontron/smarc-sal28/readme.txt index 2047f09b64..bdf2258b59 100644 --- a/board/kontron/smarc-sal28/readme.txt +++ b/board/kontron/smarc-sal28/readme.txt @@ -71,3 +71,18 @@ You will see something like this at boot time: [ 4.563565] GPT:Alternate GPT header not at the end of the disk. [ 4.569596] GPT:266272 != 7864319 [ 4.572925] GPT: Use GNU Parted to correct GPT errors. + +Updating the bootloader +======================= + +Buildroot will automatically build the u-boot bootloader. The resulting +image is called u-boot.rom and you can find it in the images/ directory. + +To update the bootloader on the board you could either copy it to an +USB thumb drive or you could put it on a TFTP server. The following +example assumes you have the bootloader image copied to the root of +a thumb drive: + + # usb start + # load usb 0:1 $loadaddr u-boot.rom + # sf probe 0 && sf update $fileaddr 0x210000 $filesize diff --git a/configs/kontron_smarc_sal28_defconfig b/configs/kontron_smarc_sal28_defconfig index b88f1aef4f..767858f601 100644 --- a/configs/kontron_smarc_sal28_defconfig +++ b/configs/kontron_smarc_sal28_defconfig @@ -19,5 +19,14 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="128M" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="kontron_sl28" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.rom" BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y