[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
es:howtos:hardware:arm:gcc_aarch64_cross-compiler [2019/07/15 23:39 (UTC)] – [Construyendo el kernel arm64, modulos, y and árbol de dispositivos blob (DTB)] rrampes:howtos:hardware:arm:gcc_aarch64_cross-compiler [2019/07/16 22:38 (UTC)] (actual) – Traducción completa. Comentarios y sugerencias son bienvenidos. rramp
Línea 1: Línea 1:
-<note important>En proceso de traducción. rramp</note> 
 ====== Slackware ARM GCC aarch64-linux compilación cruzada para la Raspberry Pi ====== ====== Slackware ARM GCC aarch64-linux compilación cruzada para la Raspberry Pi ======
  
Línea 14: Línea 13:
 === Notas === === Notas ===
  
-Slackware ARM current  +Slackware ARM current se usó en una Raspberry Pi 3 para construir e instalar el compilador cruzado GCC aarch64-linux, y para construir el kernel, los módulos y los dispositivos de árbol blobs de arm64 Linux. Eso no quiere decir que Slackware ARM 14.2 no funcionará tambiénpero simplemente no hice ninguna compilación cruzada usando punto flotante soft. Lo mismo se aplica a la Raspberry Pi 1 2. Aunque //se podría// compilar de forma cruzada para estos dispositivosno hice ninguna prueba con ellosTambién tenga en cuenta que las opciones de configuración y los ajustes deben ser considerados primero.
-Slackware ARM current was used on a Raspberry Pi 3 to build and install the GCC aarch64-linux cross-compilerand build the arm64 Linux kernel, modules, and device tree blob(s)That's not to say Slackware ARM 14.2 won't work toobut I just didn't do any cross-compiling on the soft float portThe same applies to the Raspberry Pi 1 and 2. Even though it //should// be possible to carry out aarch64 cross-compiler builds on these devicesI didn't do any testing with themAlso bear in mind that configuration options and settings will need to be considered first.+
  
 === Requerimientos === === Requerimientos ===
Línea 284: Línea 282:
  
 Primero de todo, como siempre, es necesario estar en el directorio fuente del núcleo de Raspberry Pi Linux que está en la carpeta 'build-dir'. Primero de todo, como siempre, es necesario estar en el directorio fuente del núcleo de Raspberry Pi Linux que está en la carpeta 'build-dir'.
- +Luego necesita crear un archivo .config para el kernel, basado en los parámetros de Raspberry Pi 3. 
-First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is in the 'build-dir' folderThen you need to create a kernel .config filebased on Raspberry Pi 3 parametersTo keep it simple you can generate a default .config (**defconfig**) fileThis file holds the Linux kernel configuration for the arm64 kernel you are going to buildTo achieve this run the following commands:+Para simplificar, puede generar un archivo por defecto .config (**defconfig**). 
 +Este archivo contiene la configuración del núcleo de Linux para el núcleo arm64 que va a construirPara ello ejecute los siguientes comandos:
  
 <code> <code>
Línea 292: Línea 291:
 </code> </code>
  
-<note important>Make a note here of the CFLAGS which have been specified. They should be self-explanatory by now. Pay special attention to the trailing '-' of 'CROSS_COMPILE=aarch64-linux-' because that's **NOT** a typo. __It needs to be like that!__</note> 
  
-=== Construyendo el kernel arm64 ===+<note important>Tome nota aquí de los CFLAGS que han sido especificados. Ya deberían ser auto-explicativos. Ponga especial atención al final '-' de 'CROSS_COMPILE=aarch64-linux-' porque eso **NO** es un error tipográfico. __¡Esto tiene que ser así!__</note>
  
-Next up is building the kernel, based on the .config file you have just createdAgainyou'll use the same CFLAGS as beforeYou can even set a 'LOCALVERSION' here which appends whatever you set to the end of the kernel version (e.g. LOCALVERSION="-arm64" would eventually give you 4.8.13-v8--arm64) once the kernel and modules have been builtJust as an example we'll use it hereRun the following command to start building the arm64 Linux kernel:+ 
 +=== Construyendo el kernel arm64 === 
 +Lo siguiente es construir el kernel, basado en el archivo .config que acabas de crearUna vez másusarás el mismo CFLAGS que antes 
 +Puede incluso establecer una 'LOCALVERSION' aquí que añada lo que haya establecido al final de la versión del núcleo (por ejemplo, LOCALVERSION="-arm64" le daría eventualmente 4.8.13-v8--arm64) una vez que el núcleo y los módulos hayan sido construidosA modo de ejemplo lo usaremos aquí
  
 <code> <code>
Línea 302: Línea 303:
 </code> </code>
  
-Sohere you 'make' the kernel which will be saved with the name '**Image**'The rest you should be familiar withThis process will take a whileMaybe an hour or so.+Asíaquí `make' construye el núcleo que se guardará con el nombre '**Image**'El resto debe estar familiarizadoEste proceso tomará un tiempoTal vez una hora más o menos.
  
  
-=== Building the arm64 device tree blob(s) ===+=== Construyendo el árbol de dispositivos blob(s) ===
  
-Device tree is a means of describing hardware which is read by the kernel at boot time to tell it what hardware exists on the systemIn our case it relates to the Raspberry Pi 3 and is the method by which the systems knows which drivers to load for the hardware. On ARM-based devices the use of device trees has become mandatory for all new SOCs, including the Raspberry Pi. The device tree blobs you will be building are '**bcm2710-rpi-3-b.dtb**' and '**bcm2837-rpi-3-b.dtb**'+El árbol de dispositivos es un medio para describir el hardware que el núcleo (kernel) lee en el momento del arranque para saber qué hardware existe en el sistema. 
 +En nuestro caso, se relaciona con la Raspberry Pi 3 y es el método por el cual el sistema sabe qué controladores cargar para el hardware. 
 +En los dispositivos basados en ARM, el uso de árboles de dispositivos se ha vuelto obligatorio para todos los nuevos SOCs, incluyendo la Raspberry Pi. 
 +Los arboles de dispositivos blobs que se construirán son '**bcm2710-rpi-3-b.dtb**' '**bcm2837-rpi-3-b.dtb**'.
  
-To build the Raspberry Pi device tree blob(s) run the following command+Para construir el árbol de dispositivos blob(s) para la Raspberry Pi corra los siguientes comandos:
  
 <code> <code>
Línea 315: Línea 319:
 </code> </code>
  
-It's basically the same as you did to build the kernelonly where 'Image' is substituted for '**dtbs**'.+Es básicamente lo mismo que hiciste para construir el núcleosólo que donde 'Image' es sustituido por '**dtbs**'.
  
 === Construyendo los módulos arm64 === === Construyendo los módulos arm64 ===
Línea 324: Línea 328:
 </code> </code>
  
-Notice how each time the command is the same except when specifying what you're buildingIf you have set a 'LOCALVERSION' then it __must__ be kept the same for building the kernel and modulesThis process will probably take a while longer than building the arm64 kernel.+Observe cómo cada vez que el comando es el mismo, excepto cuando se especifica lo que está construyendo. 
 +Si ha establecido una 'LOCALVERSION' entonces __debe ser__ la misma para construir el kernel y los módulos. 
 +Este proceso probablemente tardará un poco más que la construcción del núcleo arm64.
  
 === Instalando los módulos arm64 === === Instalando los módulos arm64 ===
 + 
 +Una vez que los módulos han sido construidos, se debe hacer 'make modules_install'. El proceso debería instalar los módulos de tu núcleo (kernel) en el directorio '/tmp/lib/modules/4.8.13-v8'
  
-Once the modules have been built, you have to 'make modules_install' The process will install your kernel modules to '/tmp/lib/modules/4.8.13-v8'.  +Usted podría construir módulos //out-of-tree/// kernel peropara mantener las cosas simpleslos va a instalar en la ubicación usual.Una vez másusted usará el mismo CFLAGS que antes pero sin ninguna configuración de 'LOCALVERSION'
- +Primero necesitas convertirte en usuario '**root**' e introducir una contraseña cuando se te pidaPara instalar los módulos de aarch64 ejecute los siguientes comandos:
-You could build  //out-of-tree// kernel modules butto keep things simpleyou're going to install them to the usual locationAgainyou will use the same CFLAGS as before but without any 'LOCALVERSION' set+
- +
-First you need become '**root**' user and enter a passwd when promptedTo install the aarch64 modules run the following commands:+
  
 <code> <code>
Línea 339: Línea 344:
 </code> </code>
  
-<note important>You need to be '**root**' user to install the arm64 modulesnormal user does not have the rights to do so!</note>+<note important>Es necesario ser usuario '**root**', o tener permisos de administrador, para instalar los módulos arm64. ¡Un usuario normal no tiene permisos para hacer esto!</note>
  
-Soas I'm a great believer in being thoroughI always verify things at every opportunityJust to be sureif nothing elsebecause it's always a good policyMake sure the files and directories you have just spent quite a bit of time compiling actually do exist on your system and that they're in the right placeIf this is the first time you have installed the GCC cross-compiler on your system and/or built the kernel, modules, and device tree blob(s), then it goes without sayingYou could actually do this after each build processwhich I often do as well.+Así quecomo soy un gran creyente en ser minuciososiempre verifico las cosas en cada oportunidadSoló para estar segurossi no hay nada másporque siempre es una buena política. 
 +Asegúrese de que los archivos y directorios que acaba de pasar bastante tiempo compilando realmente existen en su sistema y que están en el lugar correcto. 
 +Si esta es la primera vez que instala el compilador cruzado de GCC en su sistema y/o construye el kernel, los módulos y el árbol de dispositivos (blob(s)), entonces no hace falta decirlo 
 +Podrías hacer esto después de cada proceso de construcciónlo que yo también hago a menudo
  
 <code> <code>
Línea 349: Línea 357:
 </code> </code>
  
-If you can see that they all existthen everything has worked as planned.+Si puedes ver que todos ellos existenentonces todo ha funcionado según lo planeado.
  
-==== Copying the arm64 kernel, modulesand device tree blobs (DTB) ====+==== Copiando el kernel arm64modulosy el árbol de dispositivos blobs (DTB) ====
  
-Connect the (sparemicroSD card containing a working Slackware ARM current system to your Raspberry Pi 3 using a USB microSD card readerYou'll need to mount the partitions firstbefore copying the arm64 kernel, modules, and device tree blob(s) onto it.  +Conecte la tarjeta microSD (de repuestoque contiene un sistema current Slackware ARM que funciona en su Raspberry Pi 3 usando un lector de tarjetas microSD USB. 
- +Primero es necesario montar la paticiónluego copiar el kernel arm64los módulos y el árbol de dispositivos blob(s) en ella
-You should still be logged in as '**root**' userIf nottype the following command and enter the passwd for the 'root' user when prompted:+Usted debería estar logeado como usuario '**root**'Si noescriba los siguientes comando e ingrese la clave del usuario 'root' cuando se la pida:
  
 <code> <code>
Línea 361: Línea 369:
 </code> </code>
  
-<note important>You need to be '**root**' user to carry out any mount procedures. A normal user does not have the rights to do so!</note>  
  
-As 'root' user type the following command:+<note important>Es necesario ser usuario '**root**para llevar adelante cualquier procedimiento de montaje. ¡Un usuario normal no tiene privilegios para hacer esto!</note>  
 + 
 +Como usuario 'root' escriba los siguientes comandos:
  
 <code> <code>
Línea 369: Línea 378:
 </code> </code>
  
-This should show you which device the (sparemicroSD card is using on your systemIn our case it's a 32GB card and has been identified  as '**/dev/sda**', as shown belowThis tells us that '**/dev/sda1**' is our /boot partition and '**/dev/sda3**' is our root filesystem partitionYours may be allocated differently so bear that in mind.+Este comando debería mostrarle qué dispositivo está usando la tarjeta microSD (de repuestoen su sistemaEn nuestro caso es una tarjeta de 32 GB y es identificada como '**/dev/sda**', como se muestra a continuación. 
 +Esto nos dice que ''**/dev/sda1**'' es nuestra partición /boot '**/dev/sda3**' es nuestra partición raíz. 
 +Los tuyos pueden ser asignados de manera diferente, así que tenlo en cuenta.
  
 <code> <code>
Línea 378: Línea 389:
 </code> </code>
  
-In order to mount the partitions you first need to create mount directoriesWorking in the /tmp directory you can do it like this:+Con el objetivo de montar las particiones primero necesitas crear los puntos de montajeTrabajando en el directorio /tmp puedes hacerlo así:
  
 <code> <code>
Línea 388: Línea 399:
 </code> </code>
  
-To check that you've done this correctlyuse the '**mount**' commandThe output from this should give you something similar to the following:+Para comprobar que estas haciendo todo correctamenteusa el comando '**mount**'La salida salida de esto debe ser similar a los siguiente:
  
 <code> <code>
Línea 400: Línea 411:
 </code> </code>
  
-The next thing to do is copy the arm64 kernelmodules, and device tree blobs to your newly mounted directoriesIt's important to get this rightAfter all the hard work you've done it would be a shame to mess it up at this stage.+Lo siguiente que hay que hacer es copiar el núcleolos módulos y el árbol de dispositivos blobs de arm64 a los directorios recién montadosEs importante hacer esto bienDespués de todo el trabajo duro que has hecho, sería una pena estropearlo en este momento.
  
-To copy these filesrun the following commands, as '**root**' user:+Para copiar estos archivoscomo usuario '**root**', ejecuta los siguientes comandos:
  
 <code> <code>
Línea 410: Línea 421:
 </code> </code>
  
-Once you have done thatcheck that the files you have copied are present and in the right place.+Una vez hecho estocompruebe que los archivos que ha copiado están presentes y en el lugar correcto.
  
 <code> <code>
Línea 418: Línea 429:
 </code> </code>
  
-If it all looks fine and dandy then the next thing you need to do is delete the old armv7 kernel in the rpi-boot/boot directoryThis old kernel is  named '**kernel7.img**' and to avoid any conflicts with the new arm64 'kernel8.img' you should remove it. +Si todo se ve bien, entonces lo siguiente que necesita hacer es borrar el antiguo kernel armv7 en el directorio rpi-boot/boot. 
 +Este antiguo núcleo se llama '**kernel7.img**' y para evitar cualquier conflicto con el nuevo arm64 'kernel8.img' debería eliminarlo
 <code> <code>
 rm -rf rpi-boot/kernel7.img  rm -rf rpi-boot/kernel7.img 
 </code> </code>
  
-No changes to the config.txt or cmdline.txt file(s) should be necessaryIf you are using a recent blootloader/GPU firmware version (i.e. post-September 2016) then nothing else needs to be changed or deleted. The system should boot using all your existing settings.+No debería ser necesario cambiar los archivos config.txt cmdline.txt. Si estas utilizando un bootloader/firmware GPU (por ejemplo post-septiembre 2016) entonces nada más es necesario cambiar o borrar.
  
-Now you can unmount the previously mounted directories.+Ahora puedes desmontar los directorios previamente montados.
  
 <code> <code>
Línea 432: Línea 444:
 </code> </code>
  
-=== Booting Slackware ARM aarch64 ===+=== Arrancando Slackware ARM aarch64 ===
  
-Power off your Raspberry Pi. +Apaga tu Raspberry Pi. 
 <code> <code>
 poweroff poweroff
 </code> </code>
  
-Remove the USB microSD card reader and swap microSD cardsPower on the Raspberry Pi and boot the microSD card on which you copied the arm64 kernel, modules, and device tree blobs.+Sacar la memoria microSD y tarjetas swapsEncender la Raspberry Pi y arrancar con la memoria microSD sobre la cual fue copiado el kernel, los módulos y el árbol de directorio de dispositivos blobs.
  
 ==== El resultado final ==== ==== El resultado final ====
  
-After booting the system with the arm64 kernel, I logged in remotely via SSH as 'root' userThen I ran the following commands:+Luego de arrancar el sistema con el kernel arm64yo me logue de forma remota via SSH como el usuario 'root'Entonces yo ejecute los siguientes comandos:
  
 <code> <code>
Línea 463: Línea 475:
 </code> </code>
  
-Although I've already come across a few things which need some workand attention, it'start. I hope to find more time to devote towards Slackware arm64 over Christmas and the New Year 2017.  +Aunque ya me he encontrado con algunas cosas que necesitan trabajo y atenciónes un comienzo. Espero encontrar más tiempo para dedicar a Slackware arm64 en navidad y año Nuevo 2017.  
- +Gracias por su interés. <3
-Thanks for being interested. <3+
  
 ====== Fuentes ====== ====== Fuentes ======
-[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz]] # Slackware ARM current - gawk package. \\ +[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz]] # Slackware ARM current - paquete gawk. \\ 
-[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz]] # Slackware ARM current - git package. \\ +[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz]] # Slackware ARM current - paquete git. \\ 
-[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz]] # Slackware ARM current - bison package. \\  +[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz]] # Slackware ARM current - paquete bison. \\  
-[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz]] # Slackware ARM current - flex package. \\  +[[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz]] # Slackware ARM current - paquete flex. \\  
-[[http://arm.slackware.com/FAQs]] # Slackware ARM Linux Project Frequently Asked Questions. \\  +[[http://arm.slackware.com/FAQs]] # Proyecto Slackware ARM Linux preguntas frecuentes. \\  
-[[http://wiki.osdev.org/GCC_Cross-Compiler]] # GCC cross-compiler documentation. \\  +[[http://wiki.osdev.org/GCC_Cross-Compiler]] # Documentación de la compilación cruzada de GCC. \\  
-[[https://www.raspberrypi.org/documentation/linux/kernel]] # Raspberry Pi Linux kernel documentation. \\ +[[https://www.raspberrypi.org/documentation/linux/kernel]] # Documentación del kernel Raspberry Pi. \\ 
 [[https://www.github.com/raspberrypi/]] # Raspberry Pi Foundation GitHub repository Linux kernel, bootloader/GPU firmware. \\ [[https://www.github.com/raspberrypi/]] # Raspberry Pi Foundation GitHub repository Linux kernel, bootloader/GPU firmware. \\
-[[https://ftp.gnu.org/gnu/]] # GCC, binutils, glibc, gmp, mpc, mpfr package source \\  +[[https://ftp.gnu.org/gnu/]] # Fuentes de paquetes GCC, binutils, glibc, gmp, mpc, mpfr\\  
-[[ftp://gcc.gnu.org/pub/gcc/infrastructure]] # cloog, isl package source+[[ftp://gcc.gnu.org/pub/gcc/infrastructure]] # cloog, paquete fuente pisl.
  
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
Línea 483: Línea 494:
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
   * Escrito originalmente por [[wiki:user:exaga | Exaga]].   * Escrito originalmente por [[wiki:user:exaga | Exaga]].
 +  * Traducido por  --- //[[wiki:user:rramp|rramp]] 2019/07/16 22:18 (UTC)//.
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
  
 es:howtos:hardware:arm:gcc_aarch64_cross-compiler ()