How to combine complete bootable img

Development on core packages and the distribution goes on in here.

How to combine complete bootable img

Postby investigator » Tue Oct 09, 2018 3:32 pm

Hi all

I have a different parts of complete image. For example in that place
http://gr.mirror.archlinuxarm.org/os/rockchip/ I have see a
$this->bbcode_second_pass_code('', 'ArchLinuxARM-2018.10-gru-rootfs.tar.gz 2018-Oct-05 18:35:03 346.9M application/octet-stream')
In that place http://gr.mirror.archlinuxarm.org/os/ro ... ot/rock64/ I have see
$this->bbcode_second_pass_code('', 'boot.scr 2018-Apr-03 04:14:55 0.8K application/octet-stream
idbloader.img 2018-Apr-03 04:14:55 84.0K application/octet-stream
trust.img 2018-Apr-03 04:14:55 4.0M application/octet-stream
uboot.img 2018-Apr-03 04:14:55 4.0M application/octet-stream')

    1. What steps I must provide to convert ArchLinuxARM-2018.10-gru-rootfs.tar.gz archive to rootfs.img file?
    2. How does I can combine single complete bootable img file to using as bootable image?
    3. What steps I must provide with created single complete bootable img file for write it to SD card and boot from it?

Thanx
investigator
 
Posts: 2
Joined: Tue Oct 09, 2018 2:59 pm

Re: How to combine complete bootable img

Postby TheSaint » Wed Oct 10, 2018 4:59 am

First off, better to have a backup plan.
Second you may try to write to write idbloader.img$this->bbcode_second_pass_code('', 'dd if=idbloader.img of=/dev/<kernel_name> bs=512 seek=64') or to write the entire 4 Mb to the head of the storage media.$this->bbcode_second_pass_code('', ' dd if=uboot.img of=/dev/<kernel_name>') or using the trusted image, insted uboot, if you are using secure boot method.

The <kernel_name> might be sdY or mmcblkY where Y is a letter [a-z] according to what the kernel has found when you connect the media.

The partitioning will start at block 8192. But In such a case you should take care of the partition table which will be messed up.
After writing the boot loader, the partitioning and wrote the rootfs, it will take to write boor.scr into /boot.

If anything goes wrong, please recover your backup and write it back, if it is necessary to restore the previous status.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: How to combine complete bootable img

Postby investigator » Wed Oct 10, 2018 1:32 pm

Thank you TheSaint

I have try your instruction but it doesn't load/ AlsoI have use that instruction
https://archlinuxarm.org/platforms/armv ... hip/rock64

but it doesn't work too. I have see only black screen and monitor is not active. Could somebody help to understand what is problem?

I have see an single partition on my sdcard and it is looklike as not bootable.

Are the instructions correct?
investigator
 
Posts: 2
Joined: Tue Oct 09, 2018 2:59 pm

Re: How to combine complete bootable img

Postby TheSaint » Wed Oct 10, 2018 6:49 pm

If you are interested about what's going on during the boot, then you should connect a USB-232 adapter and find which UART is having the output log. In most of the cases would be UART 2.
But I think you should try to recompile the u-boot. I got a bit of experience because I have an RK3288 on tinker board. The full story is here

So for the simplest condition, perhaps just get a working distro and implant the new rootfs. But must take care to preserve the original kernel and modules, if are there.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am


Return to Arch Linux ARM

Who is online

Users browsing this forum: No registered users and 5 guests