Last active
January 21, 2023 09:52
-
-
Save RobertCNelson/ae2877d3b3fb5e7680d3b770ba74f84f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jumpers 1100 (microSD) | |
#microSD in x86: (lsblk shows drive is /dev/sdf) | |
wget https://rcn-ee.net/rootfs/2018-12-10/elinux/debian-9.6-console-armhf-2018-12-10.tar.xz | |
tar xf debian-9.6-console-armhf-2018-12-10.tar.xz | |
cd debian-9.6-console-armhf-2018-12-10/ | |
sudo ./setup_sdcard.sh --mmc /dev/sdf --dtb hwpack/imx8mq-evk.conf | |
git clone https://github.com/RobertCNelson/imx8-linux-dev | |
cd ./imx8-linux-dev/ | |
git checkout origin/v4.14.x -b tmp | |
./build_kernel.sh | |
#Open system.sh, add MMC=/dev/sdf | |
./tools/install_kernel.sh | |
#microSD in imx8 | |
# usb console plugged in, first port is serial.. | |
#[ 6138.065478] usbcore: registered new interface driver cp210x | |
#[ 6138.065495] usbserial: USB Serial support registered for cp210x | |
#[ 6138.065541] cp210x 2-10.1.1:1.0: cp210x converter detected | |
#[ 6138.067665] usb 2-10.1.1: cp210x converter now attached to ttyUSB1 | |
#[ 6138.067708] cp210x 2-10.1.1:1.1: cp210x converter detected | |
#[ 6138.069469] usb 2-10.1.1: cp210x converter now attached to ttyUSB2 | |
tio /dev/ttyUSB1 | |
user: debian | |
pass: temppwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install kpartx parted | |
#unlock/clear eMMC boot partitions.. | |
sudo sh -c "echo 0 > /sys/block/mmcblk0boot0/force_ro" | |
sudo sh -c "echo 0 > /sys/block/mmcblk0boot1/force_ro" | |
sudo dd if=/dev/zero of=/dev/mmcblk0boot0 bs=1M count=4 | |
sudo dd if=/dev/zero of=/dev/mmcblk0boot1 bs=1k count=4 | |
wget https://rcn-ee.net/rootfs/2018-12-10/elinux/debian-9.6-console-armhf-2018-12-10.tar.xz | |
tar xf debian-9.6-console-armhf-2018-12-10.tar.xz | |
cd debian-9.6-console-armhf-2018-12-10/ | |
sudo ./setup_sdcard.sh --mmc /dev/mmcblk0 --dtb hwpack/imx8mq-evk.conf | |
#Actually write the new bootloader for the eMMC.. | |
sudo dd if=/opt/backup/uboot/u-boot.imx8 of=/dev/mmcblk0boot0 bs=1k seek=33 | |
sudo dd if=/opt/backup/uboot/u-boot.imx8 of=/dev/mmcblk0boot1 bs=1k seek=33 | |
#Create a few directories for the eMMC: | |
sudo mkdir /mnt/emmc/ | |
sudo mkdir /mnt/emmc_boot/ | |
#Open /etc/fstab and make this change: (sudo nano /etc/fstab) | |
#*************************************************************** | |
# /etc/fstab: static file system information. | |
# | |
# Auto generated by RootStock-NG: setup_sdcard.sh | |
# | |
#/dev/mmcblk0p2 / ext4 noatime,errors=remount-ro 0 1 | |
debugfs /sys/kernel/debug debugfs defaults 0 0 | |
/dev/mmcblk1p2 / ext4 noatime,errors=remount-ro 0 1 | |
/dev/mmcblk1p1 /boot/ auto noatime 0 1 | |
/dev/mmcblk0p1 /mnt/emmc_boot/ auto noatime 0 2 | |
/dev/mmcblk0p2 /mnt/emmc/ ext4 noatime,errors=remount-ro 0 2 | |
#*************************************************************** | |
Then type "sudo mount -a" and verify they mounted.. "lsblk | grep mmc"... | |
debian@arm:~$ lsblk | grep mmc | |
mmcblk1 179:0 0 14.9G 0 disk | |
├─mmcblk1p1 179:1 0 64M 0 part /boot | |
└─mmcblk1p2 179:2 0 14.8G 0 part / | |
mmcblk0 179:32 0 13.8G 0 disk | |
├─mmcblk0p1 179:33 0 64M 0 part /mnt/emmc_boot | |
└─mmcblk0p2 179:34 0 13.7G 0 part /mnt/emmc | |
mmcblk0boot0 179:64 0 4M 0 disk | |
mmcblk0boot1 179:96 0 4M 0 disk | |
mmcblk0rpmb 179:128 0 128K 0 disk | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rsync -av /boot/ /mnt/emmc_boot/ --delete ;\ | |
sudo rsync -av /lib/modules/ /mnt/emmc/lib/modules/ --delete ;\ | |
sudo rm /mnt/emmc_boot/fsl-imx8mq-evk.dtb ;\ | |
sudo cp -v /mnt/emmc_boot/fsl-imx8mq-evk-emmc.dtb /mnt/emmc_boot/fsl-imx8mq-evk.dtb ;\ | |
sudo systemctl poweroff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove microsd, Swap jumper to 0010, insert 340 module, power up... | |
See brcm error.. | |
debian@arm:~$ dmesg | grep brcm | |
[ 5.731152] brcmfmac: F1 signature read @0x18000000=0xffffffff | |
[ 5.732868] brcmfmac: brcmf_chip_recognition: chip backplane type 15 is not supported | |
[ 5.751421] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed! | |
[ 5.761064] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed | |
[ 5.774510] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19... | |
looks like a sdio bus failure.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment