summaryrefslogtreecommitdiffstats
path: root/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-06-07 17:29:03 -0400
committerScott Murray <scott.murray@konsulko.com>2022-06-07 22:40:21 +0000
commit194b0bb522ba6d491c12762f1baf82cb9d3e4ebb (patch)
tree479525186027fe81482a119e009427099ce0d54b /meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch
parenta3fc369d430c7f0c530d10c5692817edde8d276c (diff)
To ensure MMC device naming is deterministic after the change to asynchronous probing in upstream commit 7320915c8861, add the required MMC device aliases. This matches what was done for the Salvator-X boards in d765a4f3 in upstream mainline (or e6d95f35 in linux-5.10.y). Bug-AGL: SPEC-4432 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I7d86c27a9547daa6017d72e01820d739ef0d07d9
Diffstat (limited to 'meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch')
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch
index e159cc1..bece498 100644
--- a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch
+++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Add-AGL-reference-hardware-support.patch
@@ -1,4 +1,4 @@
-From a544d23becdda2f8fb44506498c57fc46b5a075d Mon Sep 17 00:00:00 2001
+From e8df6330789b106821b9bb59177efa8a191adfda Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Tue, 21 Sep 2021 15:45:18 -0400
Subject: [PATCH 2/4] Add AGL reference hardware support
@@ -10,19 +10,19 @@ Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
[asm330lhh interrupt fix]
Signed-off-by: Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com>
---
- .../boot/dts/renesas/agl-refhw-common.dtsi | 919 ++++++++++++++++++
+ .../boot/dts/renesas/agl-refhw-common.dtsi | 922 ++++++++++++++++++
.../boot/dts/renesas/r8a77951-agl-refhw.dts | 392 ++++++++
drivers/media/i2c/adv748x/adv748x-core.c | 24 +-
- 3 files changed, 1334 insertions(+), 1 deletion(-)
+ 3 files changed, 1337 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
create mode 100644 arch/arm64/boot/dts/renesas/r8a77951-agl-refhw.dts
diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
new file mode 100644
-index 000000000000..7474ed578c21
+index 000000000000..3f6f8d86f76d
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
-@@ -0,0 +1,919 @@
+@@ -0,0 +1,922 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for common parts of AGL Reference Hardware board variants
@@ -74,6 +74,9 @@ index 000000000000..7474ed578c21
+ serial4 = &hscif0;
+ serial5 = &hscif2;
+ ethernet0 = &avb;
++ mmc0 = &sdhi2;
++ mmc1 = &sdhi0;
++ mmc2 = &sdhi3;
+ };
+
+ chosen {
@@ -1386,5 +1389,5 @@ index fe156e8f88b8..da295b106561 100644
if (IS_ERR(state->i2c_clients[i])) {
adv_err(state, "failed to create i2c client %u\n", i);
--
-2.31.1
+2.35.1
ral.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
meta-netboot
============

This layer contains some recipes and configuration adjustments to allow network boot through NBD (network block device).

Content and usage
-----------------

This layer creates a new supplementary initrd image which can be downloaded through TFTP with the kernel.
At boot time, the init script will try to mount the rootfs based on the following kernel command line parameters:
* nbd.server: IP address to reach the NBD server
* nbd.port: TCP port on which server is listening (default: 10809)
* nbd.dev: nbd device to use (default: /dev/nbd0)
* nbd.debug: activate debug mode (init script is then interruptible)

The layer meta-netboot contains recipes for the following components:
* busybox: activate the built-in NBD client
* initramfs-netboot: contains the init script started by the kernel: basically, this script mounts the real root filesystem, then pivot_root on it and finally exec systemd.
* initramfs-netboot-image: image to specify for building the initrd

To enable the build of the netboot initrd and ext4 rootfs, add the following line in conf/local.conf:

INHERIT += "netboot"


Server side
-----------

On the server side (assuming that the build dir is stored in $BUILD) we can run:

* a TFTP server, for example tftpd-hpa started with $BUILD/tmp/deploy/images as the TFTP dir:

  /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure $BUILD/tmp/deploy/images

* a NBD server, for example xnbd-server, used to expose the whole ext4 rootfs as a network block device:

  xnbd-server --target --lport 10809 $BUILD/tmp/deploy/images/$MACHINE/agl-demo-platform-$MACHINE.ext4


Target side
-----------

On the target board, a specific setup should also be done. For example, for Renesas Porter board, the following U-boot environment could be used (adjust IP addresses !):

------------------------------------------------------------------
setenv 'bootkfile' 'uImage+dtb'
setenv 'bootkaddr' '0x40007fc0'
setenv 'bootifile' 'initramfs-netboot-image-porter.ext4.gz.u-boot'
setenv 'bootiaddr' '0x50000000'
setenv 'ipaddr' '<board_IP>'
setenv 'serverip' '<server_IP>'

setenv 'bootargs_console' 'console=ttySC6,38400 ignore_loglevel'
setenv 'bootargs_video' 'vmalloc=384M video=HDMI-A-1:1280x960-32@60'
setenv 'bootargs_extra' 'rw rootfstype=ext4 rootwait rootdelay=2'
setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv 'bootkload_net' 'tftp ${bootkaddr} porter/${bootkfile}'
setenv 'bootiload_net' 'tftp ${bootiaddr} porter/${bootifile}'
setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run bootkload_net; run bootiload_net; bootm ${bootkaddr} ${bootiaddr}'

saveenv # optional: saves env in flash
run bootcmd # boots the board, executed automatically after power up
------------------------------------------------------------------

About Renesas Gen3 board, u-boot is updated and environment is more like :

------------------------------------------------------------------
setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel'
setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2'
setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60'
setenv serverip '<your_serverip>'
setenv 'bootdaddr' '0x48000000'
setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb'
setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}'
setenv 'bootkaddr' '0x48080000'
setenv 'bootkfile' 'Image'
setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}'
setenv 'bootiaddr' '0x5C3F9520'
setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz'
setenv 'bootiload_net' 'tftp ${bootraddr} h3ulcb/${bootrfile}'
setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}'

setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}'
------------------------------------------------------------------