u-boot building is OK, but using of new built u-boot failed

Moderators: odroid, mdrjr

u-boot building is OK, but using of new built u-boot failed

Unread postby vvs » Sun Dec 02, 2018 8:00 pm

I need to replace u-boot in image
(https://odroid.in/Ubuntu_XU/ubuntu-12.0 ... 103.img.xz)
with some another u-boot.
So at first I installed the image https://odroid.in/Ubuntu_XU/ubuntu-12.0 ... 103.img.xz
on microSD, and it worked OK.

Then I built a new u-boot
(mostly using https://odroid.com/dokuwiki/doku.php?id=en:odroid-xu)
like this:

git clone --depth 0 https://github.com/hardkernel/u-boot.git -b odroid-v2012.07 odroid-v2012.07

export PATH=/opt/toolchains/arm-eabi-4.6/bin:$PATH
make distclean
make smdk5410_config
make
(building was OK)

Then I replaced the microSD's u-boot by new built u-boot:
dd if=u-boot.bin of=/dev/sdg seek=63

That resulted in the normal boot process, but the linux was hanging
in a few seconds after the linux console prompt appeared.

What am I doing wrong?
Do I need to use new smdk5410-spl.bin in some way?
If, so, how can I do that?
Do I need to sign anything?

Thank you very much.
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby odroid » Mon Dec 03, 2018 10:55 am

Do you have a USB-UART cable to monitor what's going on something like this?
https://www.hardkernel.com/shop/usb-uart-module-kit/

BTW, I've removed another duplicated post.
User avatar
odroid
Site Admin
 
Posts: 29098
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby vvs » Wed Dec 05, 2018 9:17 pm

Hello,
Thank you for reply.
Yes, I am using USB-UART cable:
the output with my own built u-boot.bin looks very similar to output with original u-boot.bin.
(the beginning and end of output for built u-boot.bin is attached)
Linux is running a few seconds after console prompt appears.
(I can even issue Linux console commands for a few seconds)
Then the terminal is hanging, and the odroid-xu fan does not stop.

By the way, the u-boot.bin built by me is bigger by a few KBytes then original u-boot.bin.
To double check:
To replace u-boot.bin on microSD I do just the:
dd if=u-boot.bin of=/dev/sdg seek=63
Only that!

Thanks a lot.






U-Boot 2012.07-g58ce899-dirty (Nov 30 2018 - 16:24:53) for Exynos5410

CPU: Exynos5410 Rev2.3 [Samsung SOC on SMP Platform Base on ARM CortexA15]
APLL = 900MHz, KPLL = 600MHz
MPLL = 532MHz, BPLL = 800MHz
VPLL = 66MHz, DPLL = 66MHz
CPLL = 640MHz, EPLL = 66MHz
IPLL = 66MHz
DRAM: 2 GiB
WARNING: Caches not enabled

TrustZone Enabled BSP
BL1 version:
PMIC VER : 0, CHIP REV : 6
VDD MIF : 1.00000V
VDD ARM : 1.00000V
VDD INT : 1.00000V
VDD G3D : 1.00000V
VDD KFC : 1.00000V

Checking Boot Mode ... SDMMC
MMC: S5P_MSHC2: 0, S5P_MSHC0: 1
MMC Device 0: 29 GiB
MMC Device 1: [ERROR] response error : 00000006 cmd 8
[ERROR] response error : 00000006 cmd 55
[ERROR] response error : 00000006 cmd 2
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
Press 'Enter' or 'Space' to stop autoboot: 0
there are pending interrupts 0x00000001
reading boot.ini

5505 bytes read
Loading boot.ini from FAT
Find boot.ini file from FAT/Ext4 Area!!
boot.ini command = setenv hk_current_version "2"
boot.ini command = setenv verify 'if test $hk_version != $hk_current_version;then;fatload mmc 0:1 40008000 u-boot.bin;emmc open 0;movi w z u 0 40008000;emmc close 0;setenv hk_version $hk_current_v'
boot.ini command = run verify
reading u-boot.bin

293168 bytes read
[ERROR] response timeout error : 00000104 cmd 6
eMMC OPEN Failed.!!
boot.ini command = setenv initrd_high "0xffffffff"
boot.ini command = setenv fdt_high "0xffffffff"
boot.ini command = setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro"
boot.ini command = setenv fb_x_res "1280"
boot.ini command = setenv fb_y_res "720"
boot.ini command = setenv vout "hdmi"
boot.ini command = setenv left "56"
boot.ini command = setenv right "24"
boot.ini command = setenv upper "3"
boot.ini command = setenv lower "3"
boot.ini command = setenv hsync "14"
boot.ini command = setenv vsync "3"
boot.ini command = setenv fb_control "left=${left} right=${right} upper=${upper} lower=${lower} vsync=${vsync} hsync=${hsync}"
boot.ini command = setenv hdmi_phy_res "720p60hz"
boot.ini command = setenv led_blink "1"
boot.ini command = setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootz 0x40008000 0x42000000"
boot.ini command = setenv bootargs "${bootrootfs} ${fb_control} fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} vout=${vout} hdmi_phy_res=${hdmi_phy_res} led_blink=${led_blink}"
boot.ini command = boot
reading zImage

5232416 bytes read
reading uInitrd

1753120 bytes read
## Loading init Ramdisk from Legacy Image at 42000000 ...
Image Name: uInitrd 3.4.75
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 1753056 Bytes = 1.7 MiB
Load Address: 00000000
Entry Point: 00000000

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4.75 (root@sa1) (gcc version 4.8.2 20130902 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.09 - Linaro GCC 2013.09) ) #1 SMP PREEMPT Thu Jan 2 22:10:03 CST 2014
[ 0.000000] CPU: ARMv7 Processor [412fc0f3] revision 3 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: ODROIDXU
[ 0.000000] S5P/CMA: Reserved 0x08000000@0xb7e00000 for 'ion'
[ 0.000000] S5P/CMA: Reserved 0x00100000@0xb7d00000 for 'drm_mfc_sh'
..............
..............
..............
..............
.....
[ 6.130209] write to read-only section trapped, success
[ 6.180882] udevd[1301]: starting version 175
[ 6.448439] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[ 6.455854] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[ 11.102400] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
[ 11.108417] EXT4-fs (mmcblk0p2): 2 orphan inodes deleted
[ 11.112286] EXT4-fs (mmcblk0p2): recovery complete
[ 11.177473] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 11.738427] init: ureadahead main process (1469) terminated with status 5
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
rootfs: clean, 120140/382976 files, 1745057/3059711 blocks
* Starting mDNS/DNS-SD daemon[ OK ]
* Starting system logging daemon[ OK ]
* Starting Failsafe Boot Delay[ OK ]
* Starting configure network device[ OK ]
* Stopping Failsafe Boot Delay[ OK ]
* Stopping Send an event to indicate plymouth is up[ OK ]
* Starting System V initialisation compatibility[ OK ]
* Starting modem connection manager[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device security[ OK ]
* Starting configure network device[ OK ]
* Starting Bridge socket events into upstart[ OK ]
* Starting network connection manager[ OK ]
* Starting CUPS printing spooler/server[ OK ]

speech-dispatcher disabled; edit /etc/default/speech-dispatcher
Last login: Sat Dec 31 22:00:14 BRST 2011 on ttySAC2
saned disabled; edit /etc/default/saned
* Stopping System V initialisation compatibility[ OK ]
* Starting System V runlevel compatibility[ OK ]
* Starting automatic crash report generation[ OK ]
* Starting regular background program processing daemon[ OK ]
* Starting LightDM Display Manager[ OK ]
* Starting anac(h)ronistic cron[ OK ]
* Starting save kernel messages[ OK ]
* Starting deferred execution scheduler[ OK ]
* Stopping Send an event to indicate plymouth is up[ OK ]
* Starting Exynos 5 Hardware Composer[ OK ]
* Starting CPU interrupts balancing daemon[ OK ]
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.4.75 armv7l)

* Documentation: https://help.ubuntu.com/

root@odroid-desktop:~#
root@odroid-desktop:~#
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby tobetter » Wed Dec 05, 2018 10:44 pm

Have you flashed your card with the script sd_fusing.sh to flash after building? If not, can you please try?
User avatar
tobetter
 
Posts: 2557
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby vvs » Thu Dec 06, 2018 1:13 am

Hello,
Do you mean https://github.com/hardkernel/u-boot/tr ... e/smdk5410 ?
If so, I just tried a fragment of this script, namely:
dd iflag=dsync oflag=dsync if=./u-boot.bin of=/dev/sdg seek=63
(i.e. I involved iflag=dsync oflag=dsync, which I did not use before.)
as I need to customize only u-boot.bin
Unfortunately, that did not help.

To flash other components (E5410_S.bl1.bin, E5410_bl2.bin, E5410_tzsw.bin )
I am afraid I need to have that somehow. Where can I find that?

By the way, in my previous posts I wrote I flashed the SD with image
https://odroid.in/Ubuntu_XU/ubuntu-12.0 ... 103.img.xz
that presumably contained all needed bootloaders already flashed.
Anyway, I am eager to re-flash (E5410_S.bl1.bin, E5410_bl2.bin, E5410_tzsw.bin )
as soon as I have an idea how to find that in hopes that will help.

Thanks a lot.
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby tobetter » Thu Dec 06, 2018 1:22 am

The rest binaries could be downloaded from here and can be flashed with sd_fuse.sh.
https://github.com/hardkernel/linux/tre ... -pre-built

By the way, you said your u-boot.bin is bigger than original u-boot.bin. What is the size of it?
User avatar
tobetter
 
Posts: 2557
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby vvs » Thu Dec 06, 2018 1:31 am

I built u-boot.bin from
https://github.com/hardkernel/u-boot/tr ... d-v2012.07
without modifications.
The size is 330784 compared to 293168 of original u-boot.bin (that was flashed from image)
Thank you !
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby vvs » Thu Dec 06, 2018 8:17 pm

Hello,
I am facing the same problem:
At first I used sd_fusing.sh and original boot loaders from:
https://github.com/hardkernel/linux/tre ... -pre-built
and the result was in successful boot process. The Linux was running OK.
Then I just replaced the original u-boot.bin with my own one in the u-boot-pre-built folder and repeated the sd_fusing.sh.
The result was in successful boot process but the system is hanging after a few seconds after console prompt appears.
(I can still issue commands like dmesg for a few seconds after boot process is complete, then Linux is hanging).

By the way,
I built my own u-boot.bin strictly according to manual https://odroid.com/dokuwiki/doku.php?id=en:odroid-xu
(although I used toolchain 4.6 instead of 4.4.3 because 4.4.3 gives compilation errors (as that was recommended in the manual ))

I wonder why my u-boot.bin is bigger than original (330784 compared to 293168).
Why the manual says to use toolchain 4.4.3 if it gives compilation errors at uboot compilation.

What do you recommend me to do?

Thank you.
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU

Re: u-boot building is OK, but using of new built u-boot fa

Unread postby vvs » Fri Dec 07, 2018 12:07 am

!!!!!!!!!!!!!!!!!
Please, ignore the post as it may happen with original u-boot.bin too
The previous post summarizes the problem.
!!!!!!!!!!!!!!!


Hello,
I once got the following output (attached below).
that shows uboot is restarted due to some failure.
Maybe the couse is trustzone sw?
Maybe trustzone sw signature depends on contents of u-boot.bin which I replaced?
Who outputs: rootfs: ***** FILE SYSTEM WAS MODIFIED ***** ???? et cetera


.......
.......
.......
mountall: Plymouth command failed
mountall: Disconnected from Plymouth
Pass 2: Checking directory structure

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts

Pass 5: Checking group summary information
Block bitmap differences: -192018
Fix? yes

Free blocks count wrong for group #5 (20858, counted=20859).
Fix? yes

Free blocks count wrong (724225, counted=724226).
Fix? yes

Inode bitmap differences: -2017
Fix? yes

Free inodes count wrong for group #0 (237, counted=238).
Fix? yes

Free inodes count wrong (184566, counted=184567).
Fix? yes

rootfs: ***** FILE SYSTEM WAS MODIFIED *****
rootfs: ***** REBOOT LINUX *****
rootfs: 167689/352256 files (0.6% non-contiguous), 684029/1408255 blocks
mountall: fsck / [1495] terminated with status 3
mountall: System must be rebooted: /
[ 33.501948] Resta

U-Boot 2012.07-g58ce899-dirty (Nov 30 2018 - 16:24:53) for Exynos5410

CPU: Exynos5410 Rev2.3 [Samsung SOC on SMP Platform Base on ARM CortexA15]
APLL = 900MHz, KPLL = 600MHz
MPLL = 532MHz, BPLL = 800MHz
VPLL = 66MHz, DPLL = 66MHz
CPLL = 640MHz, EPLL = 66MHz
IPLL = 66MHz
DRAM: 2 GiB
WARNING: Caches not enabled
.....
.....
.....
vvs
 
Posts: 26
Joined: Fri Apr 04, 2014 6:58 pm
languages_spoken: english
ODROIDs: ODROID-XU


Return to Others

Who is online

Users browsing this forum: No registered users and 1 guest