Running the recovery on the Poplar board


#1

I have a problem with this last step of the building process. When I run on the serial console:
fatload usb 0:1 ${scriptaddr} install.src
it shows:
reading install.src
** Unable to read file install.src **


#2

here is the output afrer running source ${scriptaddr}:

Executing script at 32000000

Wrong image format for “source” command


#3

I tried to manually execute the commands in the install.src script and I have the following error while unzipping the partition3.1-of-8.gz at the address 0x10000000:

Error: Bad gzipped data

I tried to use a higher address, because the image is quite big, but it didn’t work.


#4

Any one has an idea please?


#5

Can you share logs from the serial console. I’m afraid its too confusing with just the errors and no context around them. For example I can’t see what your second post means… did you eventually get the script to load or did you try to run a script that never was loaded?

I don’t personally mind long chunks of text on the forum (too much is way better than not enough) but if you are embarassed by that sort of thing then use https://gist.github.com/ or a pastebin somewhere.


#6

Acutally come to think of it… if you had shared the full logs (copy 'n paste) I’d know whether install.src was a typo when you posted on the forum or a typo when you entered the command into u-boot ;-). This file is called install.scr (it is short for script rather then source).


#7

Well, first I coudn’t donwload the file install.scr (https://gist.github.com/anonymous/bb83ae1f67bb8e5965fb99aa5cef9478) then I tried with the file install and it worked (https://gist.github.com/anonymous/a3f7e38fc44a3c0802b250580997d7ba). After that, I couldn’t execute the script I downloaded at 0x32000000 (https://gist.github.com/anonymous/5bd8c0ec85882f76933e89da773134e7), so I tried to execute the commands in script manually one by one (https://gist.github.com/anonymous/be83240a535767d877e1be0cd9998c9d) and here are the logs (https://gist.github.com/anonymous/57e92d8e5c560edff37938dd988b751d)


#8

btw the second post was a copy n’ paste, it is the # in the root console that changed the font…


#9

Thanks for the effort with the gists although I’m afraid that’s not quite what I as after (these are still each tiny fragments of information)! For boot/install problems, what’s easiest for others to read (and probably easier for you to post) is a big copy 'n paste of everything that has been put on the serial port from boot. That’s what I normally see in the scroll back buffer of my terminal so that’s what I’m used to studying when trying to figure out what is going on.

Anyhow, I’ve done my best to assemble the clues on all those gists and it certainly this does look rather odd. For now, I can think of two things to try.

Firstly lets just grab a directory listing from u-boot (this one you can post as a single gist :wink: ):

fatls usb 0:1

Secondly, on the PC, let’s extract the image from the USB stick and compare it to the original one:

cd <whatever-directory-your-usb_recovery.img-is-in>
sudo dd if=/dev/<your-usbdisk> of=usb_recovery-2.img bs=4096 count=500000
ls -l usb*.img
sha1sum usb*.img

#11

Thank you for your reply danielt. I am sorry about that post I am not quite used to forums. Anyway, here is the listing from u-boot:


and the two images are exactly the same:


#12

So first test is slightly odd… I’m suprised by the .trash-1000 directory (this is created when you delete files using the file manager). Its also very odd that install.scr has the same filesize as the install file you loaded previously.

However the bigger problems are in the other gist. Firstly it should be /dev/sdb (rather than /dev/sdb1) since we are trying to get an image of the entire disc rather than just the FAT partition but either way there’s no way the copy should be failing after 66MB has transferred.

Can you try again with a different USB stick?


#13

I am sorry for my very late reply, I have abandoned working on the poplar right after my holidays. Anyway, I tried to do the building again using another usb stick yesterday and it worked. The problem was the dd copy that had no space left on the usb disk (2Go is actually 1,87Go). The script install.scr doesn’t work though but executing the commands in the script one by one works fine. Thank you for your help.


#14

The linux suggested by Linaro is a debian 9 64-bit, is it possible to have partitions for a 32-bit release?


#15

Pretty much. The core can run in both 64- and 32-bit modes.

The simplest way to get things to work would be to make sure your (64-bit) kernel is compiled with COMPAT. With that option enabled then a 32-bit userspace should “just work” (although I’ve never tried it myself).


#16

I have binaries built for armv7l and I want to execute them on poplar board with the linaro linux (aarch64). I know that armv8 provides backwards compatibility with armv7 but things are not getting to work



I tried to install libraries like libgc for armhf but nothing changed. Any ideas?

Thank you.


#17

The “No such file or directory” applies to the interpreter (/iib/ld-linux.so.3 in your case) rather than the executable. In particular if looks to me like your binary is for armel rather than armhf so its not surprising installing libgcc for armhf has not effect.

If you’re just trying to run a single binary there’s no need to have a special partition. Debian built in multiarch support should be enough. Try:

sudo dpkg --add-architecture armel
sudo apt update
sudo apt install libstdc++6:armel

There might be a more optimal choice than libstdc++6 but this is enough to bring in basic C and C++ support… a few more packages may be needed but the error messages should be more descriptive once you have the right interpreter installed.


#18

It worked with armel rather than armhf. Thank you for your help danielt!