Nerten Posted February 7, 2017 Posted February 7, 2017 As I said previously - on eMMC u-boot is stored in the hidden boot partition, it comes flashed on the eMMC by default and can be updated only with a special software or from system running on the board. What if i boot from microsd? can I change u-boot on emmc?
justsomeguy1983 Posted February 9, 2017 Posted February 9, 2017 Here is the Uboot printout information off off my XU4 Using the "Armbian_5.24_Odroidxu4_Ubuntu_xenial_default_3.10.104_desktop" image. This image works great on the SD card but will not boot when using the EMMC Module (which I'd much rather use) U-Boot 2012.07-00035-g0209be0 (Oct 06 2015 - 18:21:02) for Exynos5422 CPU: Exynos5422 Rev0.1 [Samsung SOC on SMP Platform Base on ARM CortexA7] APLL = 800MHz, KPLL = 800MHz MPLL = 532MHz, BPLL = 825MHz Board: HardKernel ODROID DRAM: 2 GiB WARNING: Caches not enabled TrustZone Enabled BSP BL1 version: â–’/â–’â–’â–’ VDD_KFC: 0x44 LDO19: 0xf2 Checking Boot Mode ... EMMC MMC: S5P_MSHC0: 0, S5P_MSHC2: 1 MMC Device 0: 29.1 GiB MMC Device 1: [ERROR] response timeout error : 00000104 cmd 1 Card did not respond to voltage select! *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: No ethernet found. Press quickly 'Enter' twice to stop autoboot: 0 ** Unable to use mmc 0:1 for fatload ** Unknown command 'ext4load' - try 'help' Unknown command 'ext4load' - try 'help' >>> Load Boot Script from mmc 0:1 <<< ** Unable to use mmc 0:1 for fatload ** >>> Load Boot Script from mmc 0:2 <<< ** Partition 2 not valid on device 0 ** ** Unable to use mmc 0:2 for fatload ** >>> Run Default Bootcmd <<< reading kernel..device 0 Start 1263, Count 16384 MMC read: dev # 0, block # 1263, count 16384 ... 16384 blocks read: OK completed reading RFS..device 0 Start 17647, Count 2048 MMC read: dev # 0, block # 17647, count 2048 ... 2048 blocks read: OK completed Bad Linux ARM zImage magic! Exynos5422 #
justsomeguy1983 Posted February 9, 2017 Posted February 9, 2017 Ok, So I'm pretty sure I've gotten the problem solved with my EMMC module on my XU4. You will need 3 things to make this a success. 1. UART Module available from hardkernel or ameridroid (USA), or you can just buy an ftdi usb to uart cable but make sure you buy the 1.8V version so you don't over-voltage the console port 2. MicroSD card flashed with the latest version of Armbian I used 5.25 3. EMMC module for the XU4 ALSO flashed with the lastest Armbian version. A. Install BOTH the microsd and the emmc module into the XU4 B. Hook up the uart module to another computer and open up putty or hyperterminal or whatever you prefer, so when you power up your XU4 you can see the boot process (baud rate is 115200) C. Switch the Boot selector switch to microSD card. D. Apply power to XU4 E. After you see text scrolling hit enter twice to stop UBOOT F. If done correctly you should be greeted with a 'Exynos5422 #' prompt G. Run this command "run copy_uboot_sd2emmc" H. Below is a printout of a successful copy of armbians uboot to the special-hidden uboot partition on the EMMC module Exynos5422 # run copy_uboot_sd2emmc reading FWBL1 ..device 0 Start 1, Count 30 MMC read: dev # 0, block # 1, count 30 ... 30 blocks read: OK completed eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! writing FWBL1 ..device 1 Start 0, Count 30 MMC write: dev # 1, block # 0, count 30 ... 30 blocks write: OK completed eMMC CLOSE Success.!! reading BL2 ..device 0 Start 31, Count 32 MMC read: dev # 0, block # 31, count 32 ... 32 blocks read: OK completed eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! writing BL2 ..device 1 Start 30, Count 32 MMC write: dev # 1, block # 30, count 32 ... 32 blocks write: OK completed eMMC CLOSE Success.!! reading bootloader..device 0 Start 63, Count 656 MMC read: dev # 0, block # 63, count 656 ... 656 blocks read: OK completed eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! writing bootloader..device 1 Start 62, Count 656 MMC write: dev # 1, block # 62, count 656 ... 656 blocks write: OK completed eMMC CLOSE Success.!! reading 0 TrustZone S/W.. Start 719, Count 512 MMC read: dev # 0, block # 719, count 512 ... 512 blocks read: OK completed eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! writing 1 TrustZone S/W.. Start 718, Count 512 MMC write: dev # 1, block # 718, count 512 ... 512 blocks write: OK completed eMMC CLOSE Success.!! if you receive a eMMC OPEN Failed.!! message you didn't select the microSD as the boot Final step is to remove power, remove the microSD card and move the boot selector switch to the EMMC module. Enjoy your blazing fast EMMC Caleb 1
Nerten Posted February 9, 2017 Posted February 9, 2017 I also found this method two days ago, but stacked on kernel booting. It won't boot.
Shanther Posted February 14, 2017 Posted February 14, 2017 Basically I have very little knowledge about Linux but I am trying. I have been playing with a Raspberry Pi 2 and had fun. Now I want to get a more powerful version.I installed the official Ubuntu on my eMMC on my XU4 and had the sd card in as storage but hit a brick wall when I couldn't get plex server on Ubuntu as it was an arm board.Gave up and I am trying to get Armbian to work.My problem is this:If I install to sd card everything works until I want the eMMC attached (yes I attach it while it's off)I can't run "sudo nand-sata-install" because it won't boot while they are both attached. I get an error screen.I cannot see the error as I am using a tv as I don't have a monitor and use ssh and the error happens before ssh is up and my tv crops a stupid amount.Next problemIf I try and install the Armbian image directly to the eMMC chip it just doesn't load at all. Like no output to HDMI or network or anything.I want Armbian on the eMMC and the sd card as storage. I'm going crazy trying to figure this out. Please help.
Igor Posted February 14, 2017 Posted February 14, 2017 I want Armbian on the eMMC and the sd card as storage. I'm going crazy trying to figure this out. Please help. Currently this is still considered a bug.
Shanther Posted February 14, 2017 Posted February 14, 2017 I was reading this in a different tab. was meant to post this as separate thing...bugger. anyway how would I get debian on the emmc card? I just want it all working and I don't want to build my own when I have armbian to use.
Igor Posted February 14, 2017 Posted February 14, 2017 I was reading this in a different tab. was meant to post this as separate thing...bugger. anyway how would I get debian on the emmc card? I just want it all working and I don't want to build my own when I have armbian to use. We need to fix this or revert back to dual partition. Current temporally solution is that you start with older image -> 5.20, where we had dual partition scheme. Just write image directly to eMMC and it should work. 1
Shanther Posted February 14, 2017 Posted February 14, 2017 Ok...so download the old version. install to emmc. then it should side boot with sd card.Do I need to do anything or install anything to allow me to update safely or can I just update and it will all be good?
Shanther Posted February 14, 2017 Posted February 14, 2017 So can I use 5.20 or do I need to use 5.14?If I have to use 5.14 how do I install a .raw file from windows?
Igor Posted February 14, 2017 Posted February 14, 2017 So can I use 5.20 or do I need to use 5.14? If I have to use 5.14 how do I install a .raw file from windows? 5.20 should be o.k., no need to go for older. .raw rename to .img if you don't see it under your image writer. We recommend Etcher for writing.
Shanther Posted February 14, 2017 Posted February 14, 2017 Am I doing something wrong? I installed 5.20 and everything was great...then I upgraded...back to not working. Any ideas?
justsomeguy1983 Posted February 14, 2017 Posted February 14, 2017 Read my post #33. It will show you how to make the EMMC module boot by copying the armbian uboot to your emmc module. (you will need a serial console adapter to do it though...)
Shanther Posted February 14, 2017 Posted February 14, 2017 justsomeguy1983, on 15 Feb 2017 - 12:44 AM, said: Read my post #33. It will show you how to make the EMMC module boot by copying the armbian uboot to your emmc module. (you will need a serial console adapter to do it though...) I don't have the serial adapter or the knowledge on how to use it. I have it installed on the eMMC but if I run "sudo apt-get upgrade -y" the system won't boot afterward if I have any other drives attached which defeats the purpose for me. What I need to know is how to stop that from happening. I know the newer version has something changed that I want to avoid. I want to keep my system running like it is but with upgraded software. I don't know if fstab could help or what.
Shanther Posted February 14, 2017 Posted February 14, 2017 BTW don't take my issues as complaints...very very far from it. I love Debian over Ubuntu (I couldn't get Plex server to work on Ubuntu) but I just like being up to date with everything. I have sonar complaining about mono and I know their is an upgraded version for it.
Shanther Posted February 15, 2017 Posted February 15, 2017 I have been manually upgrading as I needed mono updated as sonar now crashed on startup. The following packages are left; armbian-firmware base-files bind9-host dbus dnsutils e2fslibs e2fsprogs gnupg gpgv hostapd libapt-inst1.5 libbind9-90 libc-bin libc-dev-bin libc6 libc6-dev libcomerr2 libcurl3-gnutls libdbus-1-3 libdns-export100 libdns100 libglade2.0-cil libgnutls-deb0-28 libgnutls-openssl27 libhogweed2 libicu52 libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90 liblwres90 libmysqlclient18 libnettle4 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpcsclite1 libss2 libsystemd0 libudev1 linux-dtb-odroidxu4 linux-headers-odroidxu4 linux-image-odroidxu4 linux-libc-dev linux-u-boot-odroidxu4-default locales monodoc-browser multiarch-support mysql-common sed sunxi-tools systemd systemd-sysv udev wget wireless-regdb wpasupplicantWhich one is the one to avoid? The one that stuff up my startup order?I'm not a pro but I was thinking it could be "armbian-firmware" or "linux-u-boot-odroidxu4-default". But I'm not 100% sure so I am asking you as you are the ones who made it. It could even be "linux-image-odroidxu4" for all I know.I narrowed it down to one of them after the over 300 upgrades that were originally needed.
Shanther Posted February 15, 2017 Posted February 15, 2017 Shanther, on 15 Feb 2017 - 7:33 PM, said: I have been manually upgrading as I needed mono updated as sonar now crashed on startup. The following packages are left; armbian-firmware base-files bind9-host dbus dnsutils e2fslibs e2fsprogs gnupg gpgv hostapd libapt-inst1.5 libbind9-90 libc-bin libc-dev-bin libc6 libc6-dev libcomerr2 libcurl3-gnutls libdbus-1-3 libdns-export100 libdns100 libglade2.0-cil libgnutls-deb0-28 libgnutls-openssl27 libhogweed2 libicu52 libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90 liblwres90 libmysqlclient18 libnettle4 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpcsclite1 libss2 libsystemd0 libudev1 linux-dtb-odroidxu4 linux-headers-odroidxu4 linux-image-odroidxu4 linux-libc-dev linux-u-boot-odroidxu4-default locales monodoc-browser multiarch-support mysql-common sed sunxi-tools systemd systemd-sysv udev wget wireless-regdb wpasupplicant Which one is the one to avoid? The one that stuff up my startup order? I'm not a pro but I was thinking it could be "armbian-firmware" or "linux-u-boot-odroidxu4-default". But I'm not 100% sure so I am asking you as you are the ones who made it. It could even be "linux-image-odroidxu4" for all I know. I narrowed it down to one of them after the over 300 upgrades that were originally needed. I narrowed it further but now I don't want to go ahead without professional advice. Which of these are safe if any? armbian-firmware linux-image-odroidxu4 linux-u-boot-odroidxu4-default I need to know what one not to install because I have taken your advice so far.
Shanther Posted February 17, 2017 Posted February 17, 2017 Got it! Fixed 100%. I installed DietPi because I was trying other OS and I underclocked it to 1000 and it fixed it. The XU4 was overheating suddenly whenever plex did anything. It's summer in Australia.
Zaiban Posted March 4, 2017 Posted March 4, 2017 Any update on this? I don't really like the idea of having to order the UART module just to fix this (from Hardkernel and with shipping it costs 26 dollars delivered to Finland), and would rather do a complete reinstall if a new working kernel was available.
Igor Posted March 4, 2017 Posted March 4, 2017 16 minutes ago, Zaiban said: Any update on this? I don't really like the idea of having to order the UART module just to fix this (from Hardkernel and with shipping it costs 26 dollars delivered to Finland), and would rather do a complete reinstall if a new working kernel was available. Nope, but I throw away 60 EUR shipped for cheapest eMMC and I could reproduce the problem + did some investigation. 1
Zaiban Posted March 4, 2017 Posted March 4, 2017 Quote Nope, but I throw away 60 EUR shipped for cheapest eMMC and I could reproduce the problem + did some investigation. Alright, I'm using my Odroid mainly for IRC at the moment so not in a great hurry to get it back up, but it's nice to know it is being worked on. Aside this latest issue Armbian has been great so far, thanks for all the hard work you have done and keep up the good work :-)
Igor Posted March 6, 2017 Posted March 6, 2017 This problem is solvable on legacy u-boot + kernel by adding those two lines to boot.ini: # To update boot loader on your eMMC, uncomment, reboot into SD card mode with your eMMC attached and comment back when done # run copy_uboot_sd2emmc While on modern u-boot / kernel, this remain broken. 1
voiter Posted March 13, 2017 Posted March 13, 2017 On my eMMC that I ordered maybe one or two years ago I had this version of u-boot: U-Boot 2012.07-00035-g0209be0 (Oct 06 2015 - 18:21:02) for Exynos5422 I tried to get u-boot from SD to eMMC the same way as @justsomeguy1983 but for some reason there is no copy_uboot_sd2emmc and also command movi was unknown (and probably still is) unknown to u-boot. Running the following commands finally read u-boot from SD and wrote to eMMC: ODROID-XU3 # mmc dev 0 ODROID-XU3 # mmc read 0x50000000 0x1 0xa3e ODROID-XU3 # mmc dev 1 1 ODROID-XU3 # mmc write 0x50000000 0x0 0xa3e ODROID-XU3 # mmc dev 1 0 (source: https://wiki.tizen.org/wiki/Quick_guide_for_odroidxu4#booting_with_eMMC) The only problem I had was not that there was no FAT partition in Armbian 5.27 but that ext4load was unknown to u-boot. Should have been ext2load. Actually, I was able to boot Armbian 5.27 from eMMC using serial console and these commands: setenv load_addr "0x44000000"; setenv kerneladdr "0x40800000"; setenv initrdaddr "0x42000000"; setenv ftdaddr "0x44000000"; setenv rootdev "/dev/mmcblk0p1"; setenv rootfstype "ext4"; setenv console "both"; setenv mmcbootdev "0"; setenv mmcbootpart "1" ext2load mmc ${mmcbootdev}:${mmcbootpart} ${load_addr} /boot/armbianEnv.txt; env import -t ${load_addr} ${filesize} setenv consoleargs "console=tty1"; setenv consoleargs "${consoleargs} console=ttySAC2,115200n8" setenv bootargs "${consoleargs} root=${rootdev} rootfstype=${rootfstype} rootwait panic=10 consoleblank=0 loglevel=${verbosity} ${extraargs}" ext2load mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} /boot/zImage; ext2load mmc ${mmcbootdev}:${mmcbootpart} ${initrdaddr} /boot/uInitrd; ext2load mmc ${mmcbootdev}:${mmcbootpart} ${ftdaddr} /boot/dtb/exynos5422-odroidxu4.dtb bootz ${kerneladdr} ${initrdaddr} ${ftdaddr} Basically this is a simplified boot.cmd from Armbian 5.27 replacing commands "load" with "ext2load". Armbian is my favourite flavour for SBCs. I say this with 15+ years experience in Linux. Thank you.
Igor Posted March 14, 2017 Posted March 14, 2017 2 hours ago, voiter said: The only problem I had was not that there was no FAT partition in Armbian 5.27 but that ext4load was unknown to u-boot. Should have been ext2load. Strange. Our u-boot is patched to gain those commands. You were booting kernel 4.x? Thanks for update and ... thanks!
zador.blood.stained Posted March 14, 2017 Posted March 14, 2017 9 hours ago, voiter said: The only problem I had was not that there was no FAT partition in Armbian 5.27 but that ext4load was unknown to u-boot. This is exactly the reason why you have to boot Armbian from SD and copy newer u-boot (with enabled ext4 support) to the eMMC. 9 hours ago, voiter said: I tried to get u-boot from SD to eMMC the same way as @justsomeguy1983 but for some reason there is no copy_uboot_sd2emmc and also command movi was unknown (and probably still is) unknown to u-boot. Are you sure that you booted from the SD? What was the u-boot build date?
voiter Posted March 14, 2017 Posted March 14, 2017 Quote This is exactly the reason why you have to boot Armbian from SD and copy newer u-boot (with enabled ext4 support) to the eMMC. Are you sure that you booted from the SD? What was the u-boot build date? @zador.blood.stained If I didn't boot from SD I wouldn't be able to write to eMMC as @justsomeguy1983 pointed out. My u-boot version was: U-Boot 2012.07-00035-g0209be0 (Oct 06 2015 - 18:21:02) for Exynos5422 What I noticed was that when I booted from eMMC up to the point where u-boot failed to continue boot process the prompt was Exynos5422# and copy_uboot_sd2emmc was present but when I interrupted boot process it was Odroid XU3# copy_uboot_sd2emmc was not present. To avoid all this unnecessary u-boot-prompt stuff it would be great to know how to write u-boot to eMMC (given that the controller exports those magical mmcblk0boot* partitions).
zador.blood.stained Posted March 14, 2017 Posted March 14, 2017 12 minutes ago, voiter said: U-Boot 2012.07-00035-g0209be0 (Oct 06 2015 - 18:21:02) for Exynos5422 This looks old, so you probably didn't boot from SD or used old Armbian image 13 minutes ago, voiter said: To avoid all this unnecessary u-boot-prompt stuff it would be great to know how to write u-boot to eMMC (given that the controller exports those magical mmcblk0boot* partitions). These partitions should be visible from OS. Disabling write protection may be necessary (with some sysfs manipulations), after that u-boot can be flashed there with "dd" (current contetns of these partitions needs to be investigated to find the correct offset and partition number (boot0 or boot1, though most likely it is boot0)
Raylynn Knight Posted April 2, 2017 Posted April 2, 2017 I ran into this issue after downloading ARMBIAN 5.27 mainline Ubuntu Xenial image. I created an image on a SD card, booted the SD card and then ran the nand-sata-install script to install to the eMMC card on my XU4. After this finished the device didn't appear to boot any longer. I have the USB-UART cable so I connected that and was able to determine that the old uboot was still trying to load the kernel image from a non-existant FAT partition. My forum search turned up this thread. I first tried the "run copy_uboot_sd2emmc" command, but this didn't work because the new uboot no longer contains the script. So reading further I saw the message above from Voiter and solved the issue by rebooting from the SD card, halting the boot script and at the uboot prompt running the following command: mmc dev 0; mmc read 0x50000000 0x1 0xa3e; mmc dev 1 1; mmc write 0x50000000 0x0 0xa3e; mmc dev 1 0 I was then able to switch the boot mode back to eMMC and successfully boot. So adding a copy_uboot_sd2emmc script with the above command should suffice in helping to resolve this issue.
Recommended Posts