hardkernel / linux

Linux kernel source tree
Other
427 stars 408 forks source link

odroidxu4_defconfig #280

Closed ShorTie8 closed 7 years ago

ShorTie8 commented 7 years ago

Trying to build the latest 4.9.y kernel (linux-4.9.13). For ODROID-XU4 But getting "Can't find default configuration "arch/arm/configs/odroidxu4_defconfig"!"

tobetter commented 7 years ago

There is no "odroidxu4_defconfig", but you can try "odroidxu3_defconfig".

paralin commented 7 years ago

Why is there no xu4 defconfig? Is there no difference on the XU4?

Is there some place I can find the status of the mainline kernel for xu4? Does it work? All the forum threads are out of date.

paralin commented 7 years ago

With the xu3_defconfig I get this error on boot. Do you think the uboot version might be out of date, causing the problem? I can't flash a new uboot version because it's an emmc, and we have a lot of them, and as of now it seems fastboot can only be run on a actual device.

## Flattened Device Tree blob at 43e77e30
   Booting using the fdt blob at 0x43e77e30
   Using Device Tree in place at 43e77e30, end 43e89dae
WARNING: could not create /chosen FDT_ERR_BADSTRUCTURE.
WARNING: could not create /memory: FDT_ERR_BADSTRUCTURE.
fdt_initrd: FDT_ERR_BADSTRUCTURE

Starting kernel ...
moonlinux commented 7 years ago

which u-boot version are you testing against.

paralin commented 7 years ago

Unfortunately I can't tell you that right now, since the hardware I was testing at is at the lab and out of my reach until this summer.

They're using eMMCs, with the pre-flashed u-boot. Last I checked it had the fastboot command and a few other more advanced features that would indicate it's a newer version.

As of Monday I can request that people in the lab there do whatever tests or checks you'd like to get more information. As of now I would say that it's OK to assume it's a relatively recent version of u-boot, probably the version shipped on eMMCs with XU4s around summer of last year.

bkrepo commented 7 years ago

The reason is that one of XU4's marketing points, "The XU4 is fully software compatible with XU3!", when the XU4 was released. ref> ODROID-XU4 product page So, XU3 and XU4 have used the same kernel configurations so far even if they have some different hardwares (audio, usb otg, ethernet, ...).

On ODROID-XU4, you can not burn directly the boot loader to eMMC due to the hidden sector. We have to burn the bootloader to eMMC on SD card u-boot. ref> Recoverying eMMC with Micro SD card

paralin commented 7 years ago

I'm intimately aware of how the bootloader works, and the differences between the mmc and the SD card. I've been working with the stuff for a couple years now.

http://github.com/paralin/skiffos

It's not acceptable to just revert to using the SD card only, as we have everything working fine with the mmc using the default bootloader version on the old 4.2 alpha branch. The issue is that version does not support HMP.

We are able to get it to boot on the 4.6 (off the top of my head, it's the one after 4.2, but not the latest which I think is 4.9). I'm interested in finding out what is causing the bootloader to fail to load the 4.9 kernel. Is it a device tree issue or incompatibility? Something else?

I can dig into the code to figure out where the errors originate, but I have a feeling Odroid staff are aware of the issue / incompatibility and can shed some light on it here.

bkrepo commented 7 years ago

@paralin, could you make the thread to ODROID forum about the issue? Hardkernel does not support upstream u-boot officially. But, @moonlinux and some users have interested in the issue. I will also join it.

That's not related to this issue.

paralin commented 7 years ago

Wrong. It is related to this issue. I don't care about using upstream uboot. I'm using the standard version that ships from the factory.

There's some incompatibility I believe between that version and the 4.9 kernel. This thread is about compiling the 4.9 kernel for the xu4. I think it's relevant, no?

I'll file another issue / post on the forum. But you're seriously misunderstanding the issue. I'm not using upstream uboot at all on the mmcs.

bkrepo commented 7 years ago

I see. Did you use exynos5422-odroidxu4.dtb file for 4.9 kernel? And let me know your compiler information. I use the gcc 4.9 Linaro cross-compiler to build 4.9 kernel. I will check again included the native build (gcc 5.4.0).

paralin commented 7 years ago

That's more like it! Thanks for helping.

I compile the exynos5422-odroidxu4.dts from the kernel source as part of my kernel compile process in Buildroot. I'm using the linaro 2016.05 toolchain with GCC 5.3.1.

You can replicate my process exactly with:

git clone https://github.com/paralin/skiffos.git
cd skiffos
git checkout xu4/kernel-4.9 # or 4.2. Working one is in master. 
SKIFF_CONFIG=odroid/xu4 make configure compile 

The output is in workspaces/default/output/images.

That should produce a reliable repro.

bkrepo commented 7 years ago

I tested it. I don't understand why the skiffos uses the 0x43E77E30 and 0x43E84568 load adresses. But, their unaligned address has the potential to cause the architecture specific problem. Please use the aligned load address (at least PAGE_SIZE).

paralin commented 7 years ago

That was what worked at the time, I had to tweak it because the images are different sizes with my setup and the data was overlapping otherwise. The kernel decompresses itself to the entire memory space anyway, is that still an issue?

I'll align the addresses to the page size. That's an interesting problem and you're right that it's probably causing issues.

bkrepo commented 7 years ago

Use odroidxu3_defconfig inetead of odroidxu4_defconfig. We will consider making the configuration file. Other things are not related to main topic.