Well, I rebuild kerkel 4.9.33 with disabled NETCONSOLE: uImage and apollo3g.dtb (pathces from your latest patches for 4.9.33 with .config).
It compiled successfully.
Result the same - boot freezes after Loading Device Tree:
console output with compiled 4.9.33 and disabled NETCONSOLE - freezes
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.9.33-local/uImage'.
Load address: 0x1000000
Loading: *.#################################################################
. #################################################################
. #######################################################
done
Bytes transferred = 2705103 (2946cf hex)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.9.33-local/apollo3g.dtb'.
Load address: 0x1800000
Loading: *.#
done
Bytes transferred = 7509 (1d55 hex)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.9.33-mbl+
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2705039 Bytes = 2.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01800000
Booting using the fdt blob at 0x1800000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffb000, end 00fffd54 ... OK
.
console output with precompiled 4.9.33 from kernel_usb.4.9.33.tgz - freezes
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/kernel_usb.4.9.33/uImage_4.9.33.nc.usb'.
Load address: 0x1000000
Loading: *.#################################################################
. #################################################################
. ##########################################################
done
Bytes transferred = 2753810 (2a0512 hex)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/kernel_usb.4.9.33/apollo3g.dtb_4.9.33'.
Load address: 0x1800000
Loading: *.#
done
Bytes transferred = 9494 (2516 hex)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.9.33-mbl+
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2753746 Bytes = 2.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01800000
Booting using the fdt blob at 0x1800000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffa000, end 00fff515 ... OK
console output with prebuilt 4.9.33 from MBLJessieClean-4.9.33.tgz - freezes
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/MBLJessieClean-4.9.33/uImage'.
Load address: 0x1000000
Loading: *.T T T T T T T T T T
Retry count exceeded; starting again
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/MBLJessieClean-4.9.33/uImage'.
Load address: 0x1000000
Loading: *.#################################################################
. #################################################################
. ##########################################################
done
Bytes transferred = 2753810 (2a0512 hex)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/MBLJessieClean-4.9.33/apollo3g.dtb'.
Load address: 0x1800000
Loading: *.#
done
Bytes transferred = 9494 (2516 hex)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.9.33-mbl+
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2753746 Bytes = 2.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01800000
Booting using the fdt blob at 0x1800000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffa000, end 00fff515 ... OK
console output with prebuilt 4.1.17 from jessie_sda1_rootfs_password_4.1.17.tar.gz - success
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.1.17/uImage'.
Load address: 0x1000000
Loading: *.#################################################################
. #################################################################
. ##############################################################
done
Bytes transferred = 2813816 (2aef78 hex)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.1.17/apollo3g.dtb'.
Load address: 0x1800000
Loading: *.#
done
Bytes transferred = 8533 (2155 hex)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.1.17-mbl
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2813752 Bytes = 2.7 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01800000
Booting using the fdt blob at 0x1800000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffa000, end 00fff154 ... OK
Using PowerPC 44x Platform machine description
Initializing cgroup subsys cpu
Linux version 4.1.17-mbl (root@mbl-dev) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 Sat Feb 13 10:46:06 UTC 2016
Zone ranges:
DMA [mem 0x0000000000000000-0x000000000fffffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x000000000fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16352
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.144:/srv/nfs/jessie_sda1_rootfs_password_4.1.17 ip=dhcp console=ttyS0,115200
PID hash table entries: 1024 (order: -2, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 3, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 2, 65536 bytes)
Sorting __ex_table...
Memory: 255216K/262144K available (4384K kernel code, 192K rwdata, 984K rodata, 224K init, 259K bss, 6928K reserved, 0K cma-reserved)
... continue normal boot...
Unfortunately I can not build 4.1.17 by myself due to errors related to compiler-gcc7.h. But that’s another story and I think there is no sense to fix this because you have stable 4.9.33…
Build 4.1.17 error
build@build2:~/src/linux-4.1.17$ make -j 6
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
CC kernel/bounds.s
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/mod_devicetable.h:11,
from scripts/mod/devicetable-offsets.c:2:
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:555: recipe for target 'scripts' failed
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9:
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
Kbuild:43: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:990: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
I will try to place image from MBLJessieClean-4.9.33.tgz to HDD instead of TFTP, build *.scr and let yoy know the result.
One more thing. I recompile apollo3g.dtb and successfully started with prebuilt 4.1.17. Also I found that apollo3g.dts the same for 4.1.17 and 4.9.33. So, I think problem not with Device Tree. Something with kernel…
UPDATE. Just try to load system manually step-by-step using uboot commands:
Summary
=> sata init
SATA DWC initialization 1
init: Waiting for device...
sata_dwc: Device found
scan: Waiting for device...1
=> setenv bootargs root=/dev/md0 rw rootfstype=ext3 rootflags=data=ordered
=> tftp ${fdt_addr_r} /linux-4.9.33/apollo3g.dtb
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.9.33/apollo3g.dtb'.
Load address: 0x1800000
Loading: *.#
done
Bytes transferred = 7509 (1d55 hex)
=> tftp ${kernel_addr_r} /linux-4.9.33/uImage
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.144; our IP address is 192.168.1.5
Filename '/linux-4.9.33/uImage'.
Load address: 0x1000000
Loading: *.#################################################################
. #################################################################
. #######################################################
done
Bytes transferred = 2715437 (296f2d hex)
=> print addtty
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
=> run addtty
=> print bootargs
bootargs=root=/dev/md0 rw rootfstype=ext3 rootflags=data=ordered console=ttyS0,115200
=> bootm ${kernel_addr_r} - ${fdt_addr_r}
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.9.33-mbl+
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2715373 Bytes = 2.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01800000
Booting using the fdt blob at 0x1800000
Uncompressing Kernel Image ... OK
Loading Device Tree to 00ffb000, end 00fffd54 ... OK
At this point I found no more output to console, but rootfs loaded (from HDD - /dev/md0)!
I can connect using ssh! Great.
I rebuild 4.9.33 with your patches and set CONFIG_SERIAL_8250_CONSOLE=y - now i can see what kernel talks.
Thanks for help.