LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   I'm getting started on bringing Slackware to the BeagleBone Black... (https://www.linuxquestions.org/questions/slackware-arm-108/im-getting-started-on-bringing-slackware-to-the-beaglebone-black-4175485553/)

spudgunner 11-22-2013 03:58 PM

I'm getting started on bringing Slackware to the BeagleBone Black...
 
I've recently re-installed Slackware on my desktop after spending some time with Arch Linux, and (as the title says), I'd like to replace Arch with Slackware on my BeagleBone Black. I've been doing some reading and I think this task may be a little over my head but I'm going to try it anyways. So here it goes...

First off, compiling a kernel. Since I already have Arch on the BBB and from my reading, it's a better idea to compile natively than cross-compile, I would assume it'd be a good idea to build my Slackware kernel. I know it'll take a while to complete but time isn't really a huge concern to me right now... So is there anything I should be aware of when attempting this, especially since Arch Linux is more up-to-date than the Slackware 14.1 kernel?

Thanks.

drmozes 11-22-2013 05:14 PM

Quote:

Originally Posted by spudgunner (Post 5069118)
First off, compiling a kernel. Since I already have Arch on the BBB and from my reading, it's a better idea to compile natively than cross-compile,

It's usually irrelevant where the kernel's concerned since it's not linking against anything in the OS. All of Slack ARM is built natively but that's because it's easier.

Quote:

Originally Posted by spudgunner (Post 5069118)
So is there anything I should be aware of when attempting this, especially since Arch Linux is more up-to-date than the Slackware 14.1 kernel?

I can't see what kernel Arch are using for this device's support. If there are additional patches required to fully support it, you would need to track those down.

You could probably work off the Linux 3.10.17 armv7 kernel config - 'CONFIG_SOC_AM33XX=y' is already set in that kernel: isn't this the CPU type in the Beaglebone black? There will be no doubt other requirements for it, but it'd probably be easier to start from here.

Linux 3.12.1 kernels for -current are currently building. Once I upload them, you can look at the config for the armv7 kernel: if there are any additional modules or support required for the Beaglebone, let me know and I'll see if I can add them to that kernel - as that's the purpose of it: a generic kernel for armv7 devices. Not all devices are able to be supported by a single kernel at the moment, but that's the goal with flattened device tree. It looks as if I'll need to make a new 'EXYNOS' kernel for my Chromebook 2012 as it can't be supported in the generic armv7 kernel yet.

turtleli 11-23-2013 04:27 PM

This reminds me that I have yet to put my BeagleBone Black to good use. I'm still on a borrowed Arch kernel (3.12.0-rc7) for now, but I'm now setting up Slackware ARM 14.1 on it. I'll probably compile a kernel when I have time. Kernel patches are located at https://github.com/beagleboard/kernel (there's a few different versions), pre-built firmware is located at http://arago-project.org/git/project...cm3.git;a=tree at bin/am335x-pm-firmware.bin.

I more or less followed the Arch Linux BeagleBone Black instructions. I modified the uEnv.txt in the bootloader files to initially mount read only instead of read/write (there are two 'rw' which I changed to 'ro'). I took the kernel, kernel modules and device tree files from the Arch Linux rootfs and placed them on the SD card along with the Slackware ARM mini rootfs. I added to the fstab:
Code:

/dev/mmcblk0p2        /        ext4        defaults,noatime        0        1
That basically gets you booting Slackware off the SD card (if I've not forgotten any steps).

I'm booting off the eMMC (err.. Arch Linux instructions again), but I have /usr, /var, /tmp and /home on a USB HDD drive since the eMMC is only 2GB large. I encountered a problem with a separate /usr partition since libgcc_s.so was in /usr/lib in the rootfs and stuff seemed to be depending on it, so I just copied that to /lib and all was well again.

spudgunner 11-25-2013 07:28 AM

Quote:

Originally Posted by drmozes (Post 5069144)
It's usually irrelevant where the kernel's concerned since it's not linking against anything in the OS. All of Slack ARM is built natively but that's because it's easier.

Ah, good to know, it'll be much faster to build a kernel on my desktop than on the BBB.

Quote:

Originally Posted by drmozes (Post 5069144)
I can't see what kernel Arch are using for this device's support. If there are additional patches required to fully support it, you would need to track those down.

As of today, I'm seeing that Arch is using 3.12.0, although I don't know of any patches that are being applied, so I'll have to check that out.

Quote:

Originally Posted by drmozes (Post 5069144)
You could probably work off the Linux 3.10.17 armv7 kernel config - 'CONFIG_SOC_AM33XX=y' is already set in that kernel: isn't this the CPU type in the Beaglebone black? There will be no doubt other requirements for it, but it'd probably be easier to start from here.

I did a quick cat /proc/cpuinfo on Arch and it does should ARMv7 (as expected) and also states that the hardware is "Generic AM33XX (Flattned Device Tree)" so I'm thinking those options should work.

Finally, I should be able to use the ARMv7 packages from any of the ARMv7 devices, right?

@turtleli: That's good info to know. By the looks of it, I'll be using 3.12 kernel since that what the first patch seems to be for. Good thing drmozes is building it.

I'm pretty noobish but I would like to get this off the ground, so if you guys can lead me in baby steps when need be, I should be pretty useful for testing and what not. All the help so far has pointed me in the right direction.

EDIT: So I've done some quick looking and I've managed to locate the some of the build stuff for the Arch Linux ARM kernel for the BeagleBone and BBB. Kernel config is here and the Arch Linux PKGBUILD is here. It looks like they apply a couple of patches to their kernel, but I don't think any of them are Arch Linux specific. Drmozes, let me know where your 3.12 kernel config is and I'll sort through it compared to the Arch one, unless you get to it before I do.

drmozes 11-25-2013 10:50 AM

Quote:

Originally Posted by spudgunner (Post 5070307)
Finally, I should be able to use the ARMv7 packages from any of the ARMv7 devices, right?

The packages are built for ARMv5te machines, so will run on armv7.
The ARMv7 kernel package is to provide support for machines with an ARMv7 CPU. It's similar- although not the same- as if you were to provide i486 packages with an i686 kernel.

Quote:

Originally Posted by spudgunner (Post 5070307)
but I don't think any of them are Arch Linux specific. Drmozes, let me know where your 3.12 kernel config is and I'll sort through it compared to the Arch one, unless you get to it before I do.

This is the current config I have for armv7 but it's not likely to be the final version, since I'm currently migrating the QEMU support into the ARMv7 generic kernel.

http://armed.slackware.com/misc/config-armv7

spudgunner 11-26-2013 07:06 AM

Quote:

Originally Posted by drmozes (Post 5070378)
The packages are built for ARMv5te machines, so will run on armv7.
The ARMv7 kernel package is to provide support for machines with an ARMv7 CPU. It's similar- although not the same- as if you were to provide i486 packages with an i686 kernel.

Ah I see, I was hoping that some of the ARMv7 platforms had native ARMv7 packages built for them and I could use those, but using ARMv5te works all the same (I'd just prefer ARMv7 packages, ya know? Maybe I'll try to build some once I get Slackware running on the BBB).

When I get a chance, I go through the config and see what's different.


All times are GMT -5. The time now is 06:41 PM.