This shows you the differences between two versions of the page.
ass:laboratoare:04:tasks:01 [2023/07/22 03:48] radu.mantu |
ass:laboratoare:04:tasks:01 [2024/08/09 18:48] (current) florin.stancu [01. Preparation] |
||
---|---|---|---|
Line 23: | Line 23: | ||
<spoiler kernel_fdt.patch> | <spoiler kernel_fdt.patch> | ||
<code diff> | <code diff> | ||
- | diff --git a/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts b/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | + | diff --git i/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts w/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts |
- | index 89cbec5c41b2..3fe7f3713e4b 100644 | + | index 89cbec5c4..e15b104d6 100644 |
- | --- a/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | + | --- i/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts |
- | +++ b/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | + | +++ w/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts |
- | @@ -19,6 +19,25 @@ chosen { | + | @@ -35,6 +35,13 @@ reg_usb_otg_vbus: regulator-usb-otg-vbus { |
- | stdout-path = &uart1; | + | regulator-max-microvolt = <5000000>; |
+ | gpio = <&gpio3 14 GPIO_ACTIVE_LOW>; | ||
}; | }; | ||
- | + | + | |
+ firmware { | + firmware { | ||
+ optee { | + optee { | ||
Line 37: | Line 38: | ||
+ }; | + }; | ||
+ }; | + }; | ||
- | + | + | }; |
- | + leds { | + | |
- | + compatible = "gpio-leds"; | + | &fec1 { |
- | + pinctrl-names = "default"; | + | @@ -80,6 +87,7 @@ buck1: BUCK1 { |
- | + | + | |
- | + led { | + | |
- | + label = "gpio-led"; | + | |
- | + pintctrl-0 = <&pinctrl_led>; | + | |
- | + gpios = <&gpio5 5 0>; | + | |
- | + linux,default-trigger = "heartbeat"; | + | |
- | + }; | + | |
- | + }; | + | |
- | + | + | |
- | pmic_osc: clock-pmic { | + | |
- | compatible = "fixed-clock"; | + | |
- | #clock-cells = <0>; | + | |
- | @@ -80,6 +99,7 @@ buck1: BUCK1 { | + | |
regulator-min-microvolt = <700000>; | regulator-min-microvolt = <700000>; | ||
regulator-max-microvolt = <1300000>; | regulator-max-microvolt = <1300000>; | ||
Line 61: | Line 49: | ||
rohm,dvs-run-voltage = <900000>; | rohm,dvs-run-voltage = <900000>; | ||
rohm,dvs-idle-voltage = <850000>; | rohm,dvs-idle-voltage = <850000>; | ||
- | @@ -91,6 +111,7 @@ buck2: BUCK2 { | + | @@ -91,6 +99,7 @@ buck2: BUCK2 { |
regulator-min-microvolt = <700000>; | regulator-min-microvolt = <700000>; | ||
regulator-max-microvolt = <1300000>; | regulator-max-microvolt = <1300000>; | ||
Line 69: | Line 57: | ||
rohm,dvs-run-voltage = <1000000>; | rohm,dvs-run-voltage = <1000000>; | ||
rohm,dvs-idle-voltage = <900000>; | rohm,dvs-idle-voltage = <900000>; | ||
- | @@ -101,6 +122,7 @@ buck3: BUCK3 { | + | @@ -101,6 +110,7 @@ buck3: BUCK3 { |
regulator-min-microvolt = <700000>; | regulator-min-microvolt = <700000>; | ||
regulator-max-microvolt = <1300000>; | regulator-max-microvolt = <1300000>; | ||
Line 77: | Line 65: | ||
}; | }; | ||
- | @@ -109,6 +131,7 @@ buck4: BUCK4 { | + | @@ -109,6 +119,7 @@ buck4: BUCK4 { |
regulator-min-microvolt = <700000>; | regulator-min-microvolt = <700000>; | ||
regulator-max-microvolt = <1300000>; | regulator-max-microvolt = <1300000>; | ||
Line 85: | Line 73: | ||
}; | }; | ||
- | @@ -117,6 +140,7 @@ buck5: BUCK5 { | + | @@ -117,6 +128,7 @@ buck5: BUCK5 { |
regulator-min-microvolt = <700000>; | regulator-min-microvolt = <700000>; | ||
regulator-max-microvolt = <1350000>; | regulator-max-microvolt = <1350000>; | ||
Line 93: | Line 81: | ||
buck6: BUCK6 { | buck6: BUCK6 { | ||
- | @@ -124,6 +148,7 @@ buck6: BUCK6 { | + | @@ -124,6 +136,7 @@ buck6: BUCK6 { |
regulator-min-microvolt = <3000000>; | regulator-min-microvolt = <3000000>; | ||
regulator-max-microvolt = <3300000>; | regulator-max-microvolt = <3300000>; | ||
Line 101: | Line 89: | ||
buck7: BUCK7 { | buck7: BUCK7 { | ||
- | @@ -131,6 +156,7 @@ buck7: BUCK7 { | + | @@ -131,6 +144,7 @@ buck7: BUCK7 { |
regulator-min-microvolt = <1605000>; | regulator-min-microvolt = <1605000>; | ||
regulator-max-microvolt = <1995000>; | regulator-max-microvolt = <1995000>; | ||
Line 109: | Line 97: | ||
buck8: BUCK8 { | buck8: BUCK8 { | ||
- | @@ -138,6 +164,7 @@ buck8: BUCK8 { | + | @@ -138,6 +152,7 @@ buck8: BUCK8 { |
regulator-min-microvolt = <800000>; | regulator-min-microvolt = <800000>; | ||
regulator-max-microvolt = <1400000>; | regulator-max-microvolt = <1400000>; | ||
Line 117: | Line 105: | ||
ldo1: LDO1 { | ldo1: LDO1 { | ||
- | @@ -161,6 +188,7 @@ ldo3: LDO3 { | + | @@ -161,6 +176,7 @@ ldo3: LDO3 { |
regulator-min-microvolt = <1800000>; | regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | regulator-max-microvolt = <3300000>; | ||
Line 125: | Line 113: | ||
ldo4: LDO4 { | ldo4: LDO4 { | ||
- | @@ -168,6 +196,7 @@ ldo4: LDO4 { | + | @@ -168,6 +184,7 @@ ldo4: LDO4 { |
regulator-min-microvolt = <900000>; | regulator-min-microvolt = <900000>; | ||
regulator-max-microvolt = <1800000>; | regulator-max-microvolt = <1800000>; | ||
Line 133: | Line 121: | ||
ldo5: LDO5 { | ldo5: LDO5 { | ||
- | @@ -175,6 +204,7 @@ ldo5: LDO5 { | + | @@ -175,6 +192,7 @@ ldo5: LDO5 { |
regulator-min-microvolt = <1800000>; | regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | regulator-max-microvolt = <3300000>; | ||
Line 141: | Line 129: | ||
ldo6: LDO6 { | ldo6: LDO6 { | ||
- | @@ -182,6 +212,7 @@ ldo6: LDO6 { | + | @@ -182,6 +200,7 @@ ldo6: LDO6 { |
regulator-min-microvolt = <900000>; | regulator-min-microvolt = <900000>; | ||
regulator-max-microvolt = <1800000>; | regulator-max-microvolt = <1800000>; | ||
Line 149: | Line 137: | ||
ldo7: LDO7 { | ldo7: LDO7 { | ||
- | @@ -189,6 +220,7 @@ ldo7: LDO7 { | + | @@ -189,6 +208,7 @@ ldo7: LDO7 { |
regulator-min-microvolt = <1800000>; | regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | regulator-max-microvolt = <3300000>; | ||
Line 157: | Line 145: | ||
}; | }; | ||
}; | }; | ||
- | @@ -415,4 +447,10 @@ pinctrl_wdog: wdoggrp { | + | |
- | MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6 | + | |
- | >; | + | |
- | }; | + | |
- | + | + | |
- | + pinctrl_led: ledggrp { | + | |
- | + fsl,pins = < | + | |
- | + MX8MQ_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x19 | + | |
- | + >; | + | |
- | + }; | + | |
- | }; | + | |
</code> | </code> | ||
</spoiler> | </spoiler> | ||
Line 216: | Line 194: | ||
<note> | <note> | ||
- | Make sure you have the **coreutils**, **openssh** and **iproute2** packages installed! | + | Make sure you have the **coreutils**, **openssh**, **iproute2** and **vim** packages installed! |
</note> | </note> | ||
Line 267: | Line 245: | ||
# format partition 1 as FAT32 & partition 2 as ext4 | # format partition 1 as FAT32 & partition 2 as ext4 | ||
- | [student@host ~]$ mkimage.fat -F 32 /dev/sdb1 | + | [student@host ~]$ sudo mkfs.fat -F 32 /dev/sdb1 |
- | [student@host ~]$ mkimage.ext4 /dev/sdb2 | + | [student@host ~]$ sudo mkfs.ext4 /dev/sdb2 |
# copy FIT image (without ramdisk!) to FAT32 partition | # copy FIT image (without ramdisk!) to FAT32 partition | ||
- | [student@host ~/staging]$ mount /dev/sdb1 /mnt | + | [student@host ~/staging]$ sudo mount /dev/sdb1 /mnt |
- | [student@host ~/staging]$ cp linux.itb | + | [student@host ~/staging]$ sudo cp linux.itb /mnt |
- | [student@host ~/staging]$ umount /mnt | + | [student@host ~/staging]$ sudo umount /mnt |
# extract rootfs CPIO contents onto ext4 partition | # extract rootfs CPIO contents onto ext4 partition | ||
# NOTE: ext4 required in order to support symlinks | # NOTE: ext4 required in order to support symlinks | ||
- | [student@host ~/buildroot]$ mount /dev/sdb2 /mnt | + | [student@host ~/buildroot]$ sudo mount /dev/sdb2 /mnt |
- | [student@host ~/buildroot]$ cpio -i -D /mnt -F output/images/rootfs.cpio | + | [student@host ~/buildroot]$ sudo cpio -i -D /mnt -F output/images/rootfs.cpio |
- | [student@host ~/staging]$ umount /mnt | + | [student@host ~/staging]$ sudo umount /mnt |
</code> | </code> | ||
Line 295: | Line 273: | ||
<code bash> | <code bash> | ||
- | # place the FIP onto the eMMC at 33KB offset from the start | + | # place the FIP onto the eMMC at 32KB offset from the start |
- | [student@host ~/imx-mkimage/iMX8M]$ dd if=flash.bin of=/dev/sda bs=1024 seek=33 conv=fsync oflag=direct status=progress | + | # NOTE: for other ARMv8 platforms, this offset could be 33KB; check the datasheet |
+ | [student@host ~/imx-mkimage/iMX8M]$ dd if=flash.bin of=/dev/sda bs=1024 seek=32 conv=fsync oflag=direct status=progress | ||
</code> | </code> | ||
Line 335: | Line 314: | ||
# connect to the target via SSH | # connect to the target via SSH | ||
[root@board ~]$ systemctl status sshd | [root@board ~]$ systemctl status sshd | ||
- | [root@board ~]$ systemctl start ssh # only if not already started | + | [root@board ~]$ systemctl start sshd # only if not already started |
[student@host ~]$ ssh root@192.168.101.2 | [student@host ~]$ ssh root@192.168.101.2 | ||
</code> | </code> |