PYNQ: PYTHON PRODUCTIVITY

Custom board: Rootfs on /dev/mmcblk1p2 not found

Hi,

I was able to complete a custom build for an UltraZedEV board.
The board in question has an eMMC on the SOM that appears as /dev/mmcblk0 device and a SD Card reader appearing as /dev/mmcblk1 (with p0 and p1 partitions on the card)

While running the build, the kernel loads and finds the devicetree, but I get a kernel panic error, indicating rootFS cannot be found at /dev/mmcblk0

In order to circumvent the problem I tried to reconfigure the devicetree config (system-user.dtsi) as following with a statement

/include/ “system-conf.dtsi”
/ {
xlnk {
compatible = “xlnx,xlnk-1.0”;
};
chosen {
bootargs = “earlycon clk_ignore_unused console=ttyPS0, 115200 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait”;
stdout-path = “serial0:115200n8”;
};
};

&gem3 {
status = “okay”;
local-mac-address = [00 0a 35 00 02 90];
phy-mode = “rgmii-id”;
phy-handle = <&phy0>;
phy0: phy@0 {
reg = <0x0>;
ti,rx-internal-delay = <0x5>;
ti,tx-internal-delay = <0x5>;
ti,fifo-depth = <0x1>;
};
};

&i2c1 {
status = “okay”;
clock-frequency = <400000>;

i2cswitch@70 { /* U7 on UZ3EG SOM, U8 on UZ7EV SOM */
	compatible = "nxp,pca9542";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x70>;
	i2c@0 { /* i2c mw 70 0 1 */
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		/* Ethernet MAC ID EEPROM */
		mac_eeprom@51 { /* U5 on UZ3EG IOCC and U7 on the UZ7EV EVCC */
			compatible = "at,24c08";
			reg = <0x51>;
		};
		/* CLOCK2 CONFIG EEPROM */
		clock_eeprom@52 { /* U5 on the UZ7EV EVCC */
			compatible = "at,24c08";
			reg = <0x52>;
		};
	};
};

};

/* SD0 eMMC, 8-bit wide data bus */
&sdhci0 {
status = “okay”;
bus-width = <8>;
max-frequency = <50000000>;
};

/* SD1 with level shifter /
&sdhci1 {
status = “okay”;
max-frequency = <50000000>;
no-1-8-v; /
for 1.0 silicon */
};

&qspi {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;
is-dual = <1>; /* Set for dual-parallel QSPI config /
num-cs = <2>;
xlnx,fb-clk = <0x1>;
flash0: flash@0 {
/
The Flash described below doesn’t match our board (“micron,n25qu256a”), but is needed /
/
so the Flash MTD partitions are correctly identified in /proc/mtd /
compatible = “micron,m25p80”; /
32MB /
#address-cells = <1>;
#size-cells = <1>;
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>; /
FIXME also DUAL configuration possible /
spi-max-frequency = <108000000>; /
Set to 108000000 Based on DC1 spec */
};
};

/* ULPI SMSC USB3320 */
&usb0 {
status = “okay”;
};

&dwc3_0 {
status = “okay”;
dr_mode = “host”;
phy-names = “usb3-phy”;
snps,usb3_lpm_capable;
phys = <&lane2 4 0 2 52000000>;
};

&amba {
usb1@ff9e0000 {
dwc3@fe300000 {
snps,enable_auto_retry;
};
};

zyxclmm_drm {
	compatible = "xlnx,zocl";
	status = "okay";
};

};

However, the chosen specification does not seem to get picked up, as after a rebuild the kernel is still provided with an incompatible set of boot arguments:

Starting kernel …

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Mon May 11 13:40:27 UTC 2020
[ 0.000000] Machine model: xlnx,zynqmp
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 128 MiB at 0x0000000077c00000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x3e0 with crng_init=0
[ 0.000000] percpu: Embedded 22 pages/cpu @(ptrval) s52632 r8192 d29288 u90112
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1031940
[ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id=“generic-uio” clk_ignore_unused

Could you help me out on this one?

Thx,

Kris

Ok found the solution

Kernel bootargs are picked up from pynq_bootargs.dtsi in PYNQ/sdbuild/boot/meta-pynq/recipes-bsp/device-tree/files

After modifying the rootFS location to /dev/mmcblk1p2 like below, I was able to access the notebooks after a rebuild

chosen {
	bootargs = "root=/dev/mmcblk1p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id=\"generic-uio\" clk_ignore_unused";
	pynq_board = "Unknown";
};
1 Like