-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fw.txt not created correctly #2
Comments
I wonder if it has something to do with the differences between different distro's /bin/sh. Our internal systems use dash (Ubuntu 14.04 LTS) and don't have trouble. In any case, I see no need for the escaping of the newline. Could you edit mkfwtxt.sh to remove the escape+nl? So:
Give that a try in your environment. If it works, we'll likely fix it. |
I did some checking on this. Turns out that with dash (what we use on Ubuntu), and ash (busybox), the heredoc delimiter is considered OK, but with bash it does indeed fail. The reason is simple: <<- is considered special and with the line-continuation, bash interprets the line to be essentially <<-"-transfer-list--" (quotes for illustration, obviously they're not included). dash interprets thus: <<"--transfer-list--". The proper fix is changing the lines thus:
This change to works in dash, ash and bash. I've made this change in our local repositories. Until I'm able to push them out publically, the workaround is:
|
Hi Steve, I am not using fw.txt so I didn't investigate. I just thought I'd report it so you are aware. Your analysis makes sense. I am using Fedora and bash. Removing the escape sequence and the double dashes fixes the problem. I.e. using This is what my fw.txt looks like after the fix, the format seems to have changed so I am not sure it is right. Copying here for you to check for yourself. # e6430-? # b9a6744e449baec282e1e3f880f91097 at91bs.bin 9280 # 304fa37de589b743844a5e8d7ce04d7b u-boot.bin 358960 6cf0d6ff16de114bcbce88f8cc20af09 kernel.bin 2091674 cf16493a890e03d957233549449020ef rootfs.bin 30670848 flags -c # transfer-list /etc/summit/profiles.conf /etc/network/interfaces /etc/ssl/certs /root/.ssh # old format... # http://e6430/wb/wb45n/20151230/at91bs.bin b9a6744e449baec282e1e3f880f91097 # http://e6430/wb/wb45n/20151230/u-boot.bin 304fa37de589b743844a5e8d7ce04d7b http://e6430/wb/wb45n/20151230/kernel.bin 6cf0d6ff16de114bcbce88f8cc20af09 http://e6430/wb/wb45n/20151230/rootfs.bin cf16493a890e03d957233549449020ef |
Yes, that is the correct format. The first chunk is the stuff now used by fw_update to fetch the files. Note that the bootloaders are commented out by default (as updating the bootloaders is something you'd not likely want to do). "flags -c" turns on filesystem checking. The transfer-list section are the files to copy from the old rootfs to the new rootfs (ie your profile settings and such). And finally the "old format..." section is for compatibility with really old fw_updates (which incidentally we don't support using due to a bug that results in corrupted rootfs, so maybe we should just clean that out). |
Add fixes for some of the build failures caused by strict-overflow warnings. Patches #1, #2, and #4 are upstream. Patch #3 is pending upstream. Fixes: http://autobuild.buildroot.net/results/923/9239f230629ca4e381af5e8f43989997d9bfde99/ http://autobuild.buildroot.net/results/618/6187b92bcdfd9281683c37906ae74f2e0c5e6d0e/ http://autobuild.buildroot.net/results/9eb/9eb5ed92a923f0c038e3d913289eddc1cda1b62f/ Cc: Scott Fan <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]>
Add patches fixing a number of build issues with uClibc. The issue fixed in patch #2 has been reported upstream. Patch #3 has been suggested by upstream but not applied yet. Drop the _SUBDIR assignment. The configure script moved to top level directory since upstream commit a947c49bec3 from 2014. This allows AUTORECONF to find configure.ac. Fixes: http://autobuild.buildroot.net/results/801/801e2b2909363b5dcd9735362bb921e017569edc/ http://autobuild.buildroot.net/results/398/3984c6cdd3398645c8ad98bbe23af9090cf4bfcf/ http://autobuild.buildroot.net/results/632/632f93046f9cceffd9b604911542426c10967e0f/ Cc: Alexander Dahl <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]> (cherry picked from commit 35b72be) Signed-off-by: Peter Korsgaard <[email protected]>
I am seeing warning of the sort:
And my fw.txt files are not correct. This is what my fw.txt file looks like:
I believe the problem is in this piece of code. The use of the backslash is maybe causing a problem? I don't know and I have not investigated but the way the here-doc is setup certainly looks much more complicated than it needs to be.
The code comes from the file:
The text was updated successfully, but these errors were encountered: