This Mirabox uses a special kernel version: linux-4.20.6-mvebu-mirabox-tld-12. Other MVEBU kernel will not work with this box.
Download new kernel at Dropbox
linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
md5sum
8cf3d08dee09d000cf8b50b2df2f4047
sha256sum
fc4eb7a66e2af7f17f31041581fa6d106ba3da22ec643ab80a24aa352084f201
This tarball contains 6 files:
Installation
I. Install with Serial console
A. Prepare rootfs on SD card
1. Download rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 from the release thread and extract rootfs to an SD card (at least 4GB). See the release thread for instruction how to create rootfs.
2. Copy the download Mirabox kernel tarball linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2 to rootfs
Mount the rootfs. Assuming the rootfs is mounted at /media/sdd1. Extract kernel files
3. Make Mirabox uImage for first boot
4. Copy Mirabox uImage to rootfs boot folder
B. Boot the Mirabox with new kernel
1. Plug in the new SD roots to the external SD slot. Connect serial console. Power up and interrupt serial console at count down. And
And then go ahead with booting to Debian
2. Login using SSH or serial console with root/root credential
Find the Mirabox dynamic IP address in the network. Or try to ping its hostname
Log in and check what kernel is running.
At this point the system is running with the new kernel 4.20.6-mvebu-mirabox-tld-12, but with older rootfs.
3. Install full kernel
4. Setup envs for booting Debian permanently
a. Check NAND mtds
b. Set up envs area
c. Do a sanilty check and then set the envs permanently
Go ahead set these permanently.
And then print them again
5. Reboot
You are readdy to reboot the system.
II. Install from Stock OS
TBD
Credits:
Thanks Willy Tarreau for a very informative post about UART booting for this box:
http://wtarreau.blogspot.com/2013/02/mirabox-much-better-than-guruplug.html
Download new kernel at Dropbox
linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
md5sum
8cf3d08dee09d000cf8b50b2df2f4047
sha256sum
fc4eb7a66e2af7f17f31041581fa6d106ba3da22ec643ab80a24aa352084f201
This tarball contains 6 files:
Quote
linux-image-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
linux-headers-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
zImage-4.20.6-mvebu-mirabox-tld-12
config-4.20.6-mvebu-mirabox-tld-12
linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar
linux-4.20.6-mvebu-tld-1.patch
Installation
I. Install with Serial console
A. Prepare rootfs on SD card
1. Download rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 from the release thread and extract rootfs to an SD card (at least 4GB). See the release thread for instruction how to create rootfs.
2. Copy the download Mirabox kernel tarball linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2 to rootfs
Mount the rootfs. Assuming the rootfs is mounted at /media/sdd1. Extract kernel files
mkdir -p /media/sdd1/usr/src/mirabox cd /media/sdd1/usr/src/mirabox tar xf linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
3. Make Mirabox uImage for first boot
cd /media/sdd1/usr/src/mirabox tar -xvf linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar dts/armada-370-mirabox.dtb cp zImage-4.20.6-mvebu-mirabox-tld-12 zImage.fdt cp -a zImage-4.20.6-mvebu-mirabox-tld-12 zImage.fdt cat dts/armada-370-mirabox.dtb >> zImage.fdt mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-mvebu-mirabox-tld-12 -d zImage.fdt uImage
4. Copy Mirabox uImage to rootfs boot folder
cd /media/sdd1/boot cp -a uImage uImage.bak cp -a /media/sdd1/usr/src/mirabox/uImage . sync
B. Boot the Mirabox with new kernel
1. Plug in the new SD roots to the external SD slot. Connect serial console. Power up and interrupt serial console at count down. And
printenvCopy and paste the list of the envs from above command in a notepad. And then,
setenv set_bootargs_stock 'setenv bootargs "console=ttyS0,115200 $mtdparts ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs"' setenv bootcmd_stock 'echo Booting Stock...; nand read 0x6400000 0x400000 0x400000; run set_bootargs_stock; bootm 0x6400000' setenv load_image_addr 0x6400000 setenv load_initrd_addr 0x8400000 setenv load_uImage 'ext2load usb 1:1 $load_image_addr /boot/uImage' setenv load_uInitrd 'ext2load usb 1:1 $load_initrd_addr /boot/uInitrd' setenv set_bootargs_debian 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial' setenv bootcmd_debian 'echo Booting Debian... ; usb start; run load_uImage; run load_uInitrd; run set_bootargs_debian; bootm $load_image_addr $load_initrd_addr' setenv bootcmd 'run bootcmd_debian; run bootcmd_stock'
And then go ahead with booting to Debian
boot
2. Login using SSH or serial console with root/root credential
Find the Mirabox dynamic IP address in the network. Or try to ping its hostname
ping debian.local
Log in and check what kernel is running.
uname -aExpect Output:
Linux debian 4.20.6-mvebu-mirabox-tld-12 #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019 armv7l GNU/Linux
At this point the system is running with the new kernel 4.20.6-mvebu-mirabox-tld-12, but with older rootfs.
3. Install full kernel
cd /boot cp -a uImage uImage.mirabox.bak cp -a uInitrd uInitrd.bak dpkg -i /usr/src/mirabox/linux-image-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb tar xf /usr/src/mirabox/linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar cp -a /usr/src/mirabox/zImage-4.20.6-mvebu-mirabox-tld-12 . cp -a zImage-4.20.6-mvebu-mirabox-tld-12 zImage.fdt cat dts/armada-370-mirabox.dtb >> zImage.fdt mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-mvebu-mirabox-tld-12 -d zImage.fdt uImage mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.20.6-mvebu-mirabox-tld-12 -d initrd.img-4.20.6-mvebu-mirabox-tld-12 uInitrd
4. Setup envs for booting Debian permanently
a. Check NAND mtds
cat /proc/mtdExpected Output:
dev: size erasesize name mtd0: 00400000 00080000 "u-boot" mtd1: 00400000 00080000 "linux" mtd2: 3f800000 00080000 "filesystem"
b. Set up envs area
echo "/dev/mtd0 0x100000 0x00080000 0x00080000" > /etc/fw_env.config
c. Do a sanilty check and then set the envs permanently
fw_setenv test_xxxx yes fw_printenv test_xxxx fw_printenvExpected Output: If you can list the envs and they look like the envs listed in Step B.1 (with the additional test_xxxx env just set), then it's all checked out. If there is any error at this point then please stop and post question.
Go ahead set these permanently.
fw_setenv set_bootargs_stock 'setenv bootargs "console=ttyS0,115200 $mtdparts ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs"' fw_setenv bootcmd_stock 'echo Booting Stock...; nand read 0x6400000 0x400000 0x400000; run set_bootargs_stock; bootm 0x6400000' fw_setenv load_image_addr 0x6400000 fw_setenv load_initrd_addr 0x8400000 fw_setenv load_uImage 'ext2load usb 1:1 $load_image_addr /boot/uImage' fw_setenv load_uInitrd 'ext2load usb 1:1 $load_initrd_addr /boot/uInitrd' fw_setenv set_bootargs_debian 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial' fw_setenv bootcmd_debian 'echo Booting Debian... ; usb start; run load_uImage; run load_uInitrd; run set_bootargs_debian; bootm $load_image_addr $load_initrd_addr' fw_setenv bootcmd 'run bootcmd_debian; run bootcmd_stock'
And then print them again
fw_printenvCopy and paster the envs to a notepad, for safe keeing.
5. Reboot
You are readdy to reboot the system.
sync shutdown -r now
II. Install from Stock OS
TBD
Credits:
Thanks Willy Tarreau for a very informative post about UART booting for this box:
http://wtarreau.blogspot.com/2013/02/mirabox-much-better-than-guruplug.html