Skip to content
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

Document arm testing enviroment installation procedure #62

Closed
aliceinwire opened this issue Jul 13, 2018 · 4 comments
Closed

Document arm testing enviroment installation procedure #62

aliceinwire opened this issue Jul 13, 2018 · 4 comments
Assignees
Labels
documentation documentation related issues in progress
Projects

Comments

@aliceinwire
Copy link
Member

No description provided.

@kuzetsa
Copy link

kuzetsa commented Jul 13, 2018

the current amd64 boot test is done using qcow image:

http://distfiles.gentoo.org/experimental/amd64/openstack/

I didn't see the analogous arm-type one available:

http://distfiles.gentoo.org/experimental/arm/openstack/

so perhaps a very minimalist boot tester like in this footnote:

#59 (comment)

intended / specific details for arm test need to be decided, I think

# using a cross toolchain for arm testing
  293  crossdev -S -t armv7a-hardfloat-linux-gnueabi
# confirmed nothing "weird" was recently modified:
  319  history | grep crossdev
# need kernel source to test the cross-toolchain:
  322  emerge '=sys-kernel/gentoo-sources-4.17.4'
# noticed it's not stable, so therefore did this:
  323  cd /etc/portage/package.keywords/
  326  nano -w crosscompile_kernel_arm 
  327  eshowkw gentoo-sources
# //still// need kernel source to actually test this:
  329  emerge '=sys-kernel/gentoo-sources-4.17.4'
# details for compiling a kernel omitted (for now)

[...]

# creating minimalist payload for qemu boot test:

{redacted / refer to updated documentation}

^ this type of initramfs can be used with qemu

a good qemu version (for arm) looks like this one:

#61 (comment)

example wrapper script for qemu-based test:

#!/bin/sh
# This script created by AQEMU
/usr/bin/qemu-system-arm -kernel $1 \
-initrd armpayload-initramfs.gz \
-machine virt -nographic -serial mon:stdio

A single argument is passed to this script:

just the name of the kernel, such as the compiled one
mentioned in the history entry 329 (see above)

the kernel version to be tested was compiled using this script:

#!/bin/sh
make \
ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- \
--jobs 18 --load-average 19.9

note: there are a few ways to generate a .config
(board-specific defconfigs for arm are common)

@kuzetsa
Copy link

kuzetsa commented Jul 13, 2018

The specific init script I wrote is lazy / ugly [1], and was successfully
used for testing an arbitrary kernel [2] here's a (boot) log:

https://mouses.xyz/~kuzetsa/gentoo_tmp/arm_kernel_test.log


[1] - wiki.gentoo.org, on the topic of custom initramfs: "kernel panics"

[2] - crossarmkernel_build.log, cross-compiling a kernel for test (log)

@kuzetsa
Copy link

kuzetsa commented Jul 16, 2018

Tried to reproduce this environment today... dot dot dot

Discovered a gap in the documentation.
this is more correct (and more concise)


emerge-armv7a-hardfloat-linux-gnueabi busybox

[...]

last few lines of output contain:

Using system located in ROOT tree /usr/armv7a-hardfloat-linux-gnueabi/

>>> No outdated packages were found on your system.

and creating the busybox-based initramfs:

mkdir ./armpayload-qemu/
mkdir ./armpayload-qemu/bin/
cp -P /usr/armv7a-hardfloat-linux-gnueabi/bin/* ./armpayload-qemu/bin/
cd armpayload-qemu
nano -w ./init 
find . | cpio -R root:root -H newc -o | gzip > ../armpayload-initramfs.gz

github now offers the option to review past revisions of comments.
I'll editing the earlier / above comment for brevity.

@aliceinwire
Copy link
Member Author

arm as been added in the testing enviroments

GkernelCI automation moved this from In progress to Done Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation related issues in progress
Projects
GkernelCI
  
Done
Development

No branches or pull requests

3 participants