Linux mit anderem rootfs booten
War vom Kunden Bosch gefragt
Das Roofs kann hier heruntergeladen werden http://archlinuxarm.org/os/ArchLinuxARM-boundary-latest.tar.gz. Das rootfs stammt von einem Archlinux BSP für das Nitrogen6x.
- Partitionierung der SD Karte anpassen
Im BSP Verzeichnis unter /configs/platform-tq-mba6x/config/images/ die Datei uboot-hd.config anpassen. Die Partition spare wurde auf 1024M erhöht und die Device Größe angepasst.
partition spare {
size = 1024M partition-type = 0x83 } size=2048M
}
Danach muss ein neues Image gebaut werden mit dem Befehl ptxdist images gebaut werden, anschließend SD Karte mit neuem Image erstellen.
- Rootfs Datei auf ArchLinuxARM-boundary-latest.tar.gz auf USB Stick (FAT32) kopieren.
- Starterkit mit dem in Punkt 1 erstellten Image booten
- TQ rootfs mit dem Befehl mount –o remount , rw / von read only auf read write setzen (muss nach reboot wiederholt werden)
- Unter /mnt die Ordner usb und rootfs erstellen mit mkdir /mnt/usb und mkdir /mnt/rootfs
- USB Stick mit dem Befehl mount -t vfat /dev/sdx1 /mnt/usb mounten(sdax1 entspechend des USB Stick Gerätenames abändern z.B. sda1 )
- EXT4 Filesystem auf mmcblk0p3 erstellen mit mkfs.ext4 /dev/mmcblk0p3
- mmcblk0p3 auf /mnt/rootfs mounten mit mount /dev/mmcblk0p3 /mnt/rootfs
- Das tar Archiv des roofs auf mmcblk0p3 entpacken mit tar xvzf /mnt/usb/ArchLinuxARM-boundary-latest.tar.gz -C /mnt/rootfs
- Reboot des Starterkits durchführen und den Bootvorgang im Uboot unterbrechen
- Angabe der Rootfs Partition ändern mit setenv mmcpart 3 anschließend u-boot environment speichern
- Nun sollte Linux mit dem anderen rootfs booten
—-
Openssh Port ändern
Der Port des Openssh Servers kann in der Datei /lib/systemd/system/sshd.socket angepasst werden
EEPROM vom MBa6x unter U-Boot auslesen
- mit i2c probe prüfen ob das Gerät am Bus ist
- gegebenenfalls mit i2c dev <Busnummer> ändern
- mit i2c md 0x50 0.2 0x100
—-
Rootfs dauerhaft auf red/write setzen BSP Rev.0109
Standardmäßig ist das Rootfs auf read only konfiguriert um dies zu ändern im U-Boot die Environmentvariable rootfsmode von ro auf rw setzen und Environment speichern.
setenv rootfsmode rw saveenv
Audio Wiedergabe / Aufnahme mit STKa6x BSP Rev.0109
Audiowiedergabe
Für die Audiowiedergabe über X22 (Default: Line Out / Bestückoption: Headphone) sind keine weiteren Einstellungen notwendig.
Audioaufnahme
Um mit dem STKa6x über X20 (Line in) aufnehmen zu können muss folgende Befehlzeile unter Linux abgesetzt werden.
amixer set 'Right Input Mixer IN1_R P' unmute amixer set 'Left Input Mixer IN1_L P' unmute amixer set 'ADCFGA Right Mute' mute amixer set 'ADCFGA Left Mute' mute
Aufnahme und anschließendes Abspielen wie folgt:
root@MBa6x:~ mount -o remount,rw / [ 369.544383] EXT4-fs (mmcblk1p2): re-mounted. Opts: errors=remount-ro,data=ordered root@MBa6x:~ arecord -f cd testfile Recording WAVE 'testfile' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Aborted by signal Interrupt... root@MBa6x:~ aplay testfile
X21 (Mic in) bitte vorab nochmal testen
amixer set 'Left Input Mixer IN3_L P' unmute cap amixer set 'ADCFGA Right Mute' mute amixer set 'ADCFGA Left Mute' mute
Console UART U-Boot von UART2 auf UART3 umstellen STKa6x BSP Rev.0109
Subject: [PATCH] Change U-Boot console from UART2 to UART3 --- board/tqc/tqma6/tqma6_mba6.c | 10 +++++----- include/configs/tqma6_mba6.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c index 0761d9e4db14..7819f27cb890 100644 --- a/board/tqc/tqma6/tqma6_mba6.c +++ b/board/tqc/tqma6/tqma6_mba6.c @@ -151,15 +151,15 @@ static void mba6_setup_iomuxc_enet(void) mdelay(15); } -static iomux_v3_cfg_t const mba6_uart2_pads[] = { - NEW_PAD_CTRL(MX6_PAD_SD4_DAT4__UART2_RX_DATA, UART_PAD_CTRL), - NEW_PAD_CTRL(MX6_PAD_SD4_DAT7__UART2_TX_DATA, UART_PAD_CTRL), +static iomux_v3_cfg_t const mba6_uart3_pads[] = { + NEW_PAD_CTRL(MX6_PAD_SD4_CLK__UART3_RX_DATA, UART_PAD_CTRL), + NEW_PAD_CTRL(MX6_PAD_SD4_CMD__UART3_TX_DATA, UART_PAD_CTRL), }; static void mba6_setup_iomuxc_uart(void) { - imx_iomux_v3_setup_multiple_pads(mba6_uart2_pads, - ARRAY_SIZE(mba6_uart2_pads)); + imx_iomux_v3_setup_multiple_pads(mba6_uart3_pads, + ARRAY_SIZE(mba6_uart3_pads)); } #define USDHC2_CD_GPIO IMX_GPIO_NR(1, 4) diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h index 11098a40091a..1bd47c7ffbf9 100644 --- a/include/configs/tqma6_mba6.h +++ b/include/configs/tqma6_mba6.h @@ -29,8 +29,8 @@ #define CONFIG_PHY_MICREL #define CONFIG_PHY_KSZ9031 -#define CONFIG_MXC_UART_BASE UART2_BASE -#define CONFIG_CONSOLE_DEV "ttymxc1" +#define CONFIG_MXC_UART_BASE UART3_BASE +#define CONFIG_CONSOLE_DEV "ttymxc2" #define CONFIG_CMD_GPIO -- 1.9.1
Loop Toggle GPIO sysfs
#!/bin/sh i=1000000 while [ "$i" -le 100000000000 ]; do echo 1 > /sys/class/gpio/gpio40/value echo 0 > /sys/class/gpio/gpio40/value i=$(( i + 1 )) done
i.MX6 interne RTC verwenden
Die intere RTC des i.MX6 ist standardmäßig deaktiviert und muss zuerst im Devicetree aktiviert werden.
imx6qdl-mba6.dtsi
&snvs_rtc { status = "okay"; };
Kernel für interne RTC konfigurieren damit interne RTC die Systemzeit setzt:
Device Drivers —>
[*] Real Time Clock —>
(rtc1) RTC used to set the system time
Set the RTC in BSP REV.0109:
hwclock -w hwclock -f /dev/rtc1 –w
Read the RTC in BSP REV.0109:
hwclock -f /dev/rtc1 –show
Die interne RTC des i.MX6 hat eine hohe Stromaufnahme, daher empfehlen wir die Verwendung einer externen RTC auf dem Bausboard bei längeren Pufferzeiten.
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.